Update certain properties of an evaluation. Args: metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via
(
self,
eval_id: str,
*,
metadata: Optional[Metadata] | Omit = omit,
name: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
)
| 168 | ) |
| 169 | |
| 170 | def update( |
| 171 | self, |
| 172 | eval_id: str, |
| 173 | *, |
| 174 | metadata: Optional[Metadata] | Omit = omit, |
| 175 | name: str | Omit = omit, |
| 176 | class="cm"># Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 177 | class="cm"># The extra values given here take precedence over values defined on the client or passed to this method. |
| 178 | extra_headers: Headers | None = None, |
| 179 | extra_query: Query | None = None, |
| 180 | extra_body: Body | None = None, |
| 181 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 182 | ) -> EvalUpdateResponse: |
| 183 | class="st">""" |
| 184 | Update certain properties of an evaluation. |
| 185 | |
| 186 | Args: |
| 187 | metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful |
| 188 | for storing additional information about the object in a structured format, and |
| 189 | querying for objects via API or the dashboard. |
| 190 | |
| 191 | Keys are strings with a maximum length of 64 characters. Values are strings with |
| 192 | a maximum length of 512 characters. |
| 193 | |
| 194 | name: Rename the evaluation. |
| 195 | |
| 196 | extra_headers: Send extra headers |
| 197 | |
| 198 | extra_query: Add additional query parameters to the request |
| 199 | |
| 200 | extra_body: Add additional JSON properties to the request |
| 201 | |
| 202 | timeout: Override the client-level default timeout for this request, in seconds |
| 203 | class="st">""" |
| 204 | if not eval_id: |
| 205 | raise ValueError(fclass="st">"Expected a non-empty value for `eval_id` but received {eval_id!r}") |
| 206 | return self._post( |
| 207 | path_template(class="st">"/evals/{eval_id}", eval_id=eval_id), |
| 208 | body=maybe_transform( |
| 209 | { |
| 210 | class="st">"metadata": metadata, |
| 211 | class="st">"name": name, |
| 212 | }, |
| 213 | eval_update_params.EvalUpdateParams, |
| 214 | ), |
| 215 | options=make_request_options( |
| 216 | extra_headers=extra_headers, |
| 217 | extra_query=extra_query, |
| 218 | extra_body=extra_body, |
| 219 | timeout=timeout, |
| 220 | security={class="st">"bearer_auth": True}, |
| 221 | ), |
| 222 | cast_to=EvalUpdateResponse, |
| 223 | ) |
| 224 | |
| 225 | def list( |
| 226 | self, |