Skip to content

Latest commit

 

History

History
133 lines (85 loc) · 7.07 KB

File metadata and controls

133 lines (85 loc) · 7.07 KB

Beta.Observability.ChatCompletionEvents.Fields

Overview

Available Operations

list

Get Chat Completion Fields

Example Usage

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)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ListChatCompletionFieldsResponse

Errors

Error Type Status Code Content Type
errors.ObservabilityError 400, 404, 408, 409, 422 application/json
errors.SDKError 4XX, 5XX */*

fetch_options

Get Chat Completion Field Options

Example Usage

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)

Parameters

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.

Response

models.FetchChatCompletionFieldOptionsResponse

Errors

Error Type Status Code Content Type
errors.ObservabilityError 400, 404, 408, 409, 422 application/json
errors.SDKError 4XX, 5XX */*

fetch_option_counts

Get Chat Completion Field Options Counts

Example Usage

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)

Parameters

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.

Response

models.FetchFieldOptionCountsResponse

Errors

Error Type Status Code Content Type
errors.ObservabilityError 400, 404, 408, 409, 422 application/json
errors.SDKError 4XX, 5XX */*