- list - Get Chat Completion Fields
- fetch_options - Get Chat Completion Field Options
- fetch_option_counts - Get Chat Completion Field Options Counts
Get Chat Completion Fields
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.chat_completion_events.fields.list()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ListChatCompletionFieldsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Chat Completion Field Options
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.chat_completion_events.fields.fetch_options(field_name="<value>", operator="startswith")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
field_name |
str | ✔️ | N/A |
operator |
models.Operator | ✔️ | The operator to use for filtering options |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.FetchChatCompletionFieldOptionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Chat Completion Field Options Counts
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.chat_completion_events.fields.fetch_option_counts(field_name="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
field_name |
str | ✔️ | N/A |
filter_params |
OptionalNullable[models.FilterPayload] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.FetchFieldOptionCountsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |