Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Observability Chat Completion Events Fields Endpoints

(beta) List and inspect filterable fields for chat completion events.

Get Chat Completion Fields

GET /v1/observability/chat-completion-fields

200

Successful Response

field_definitions
*array<BaseFieldDefinition>
field_groups
*array<FieldGroup>

Playground

Test the endpoints live

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)

curl https://api.mistral.ai/v1/observability/chat-completion-fields \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "field_definitions": [
    {
      "label": "ipsum eiusmod",
      "name": "consequat do",
      "supported_operators": [
        "lt"
      ],
      "type": "ENUM"
    }
  ],
  "field_groups": [
    {
      "label": "reprehenderit ut dolore",
      "name": "occaecat dolor sit"
    }
  ]
}

Get Chat Completion Field Options

GET /v1/observability/chat-completion-fields/{field_name}/options

200

Successful Response

options
array<string|boolean|null>|null

Playground

Test the endpoints live

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)

curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{}

Get Chat Completion Field Options Counts

POST /v1/observability/chat-completion-fields/{field_name}/options-counts

200

Successful Response

Playground

Test the endpoints live

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)

curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options-counts \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "counts": [
    {
      "count": 87,
      "value": "ipsum eiusmod"
    }
  ]
}