# Beta.Observability.ChatCompletionEvents.Fields ## Overview ### Available Operations * [list](#list) - Get Chat Completion Fields * [fetchOptions](#fetchoptions) - Get Chat Completion Field Options * [fetchOptionCounts](#fetchoptioncounts) - Get Chat Completion Field Options Counts ## list Get Chat Completion Fields ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.observability.chatCompletionEvents.fields.list(); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaObservabilityChatCompletionEventsFieldsList } from "@mistralai/mistralai/funcs/betaObservabilityChatCompletionEventsFieldsList.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaObservabilityChatCompletionEventsFieldsList(mistral); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaObservabilityChatCompletionEventsFieldsList failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.ListChatCompletionFieldsResponse](../../models/components/listchatcompletionfieldsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## fetchOptions Get Chat Completion Field Options ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.observability.chatCompletionEvents.fields.fetchOptions({ fieldName: "", operator: "startswith", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaObservabilityChatCompletionEventsFieldsFetchOptions } from "@mistralai/mistralai/funcs/betaObservabilityChatCompletionEventsFieldsFetchOptions.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaObservabilityChatCompletionEventsFieldsFetchOptions(mistral, { fieldName: "", operator: "startswith", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaObservabilityChatCompletionEventsFieldsFetchOptions failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest](../../models/operations/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.FetchChatCompletionFieldOptionsResponse](../../models/components/fetchchatcompletionfieldoptionsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## fetchOptionCounts Get Chat Completion Field Options Counts ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.observability.chatCompletionEvents.fields.fetchOptionCounts({ fieldName: "", fetchFieldOptionCountsRequest: {}, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaObservabilityChatCompletionEventsFieldsFetchOptionCounts } from "@mistralai/mistralai/funcs/betaObservabilityChatCompletionEventsFieldsFetchOptionCounts.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaObservabilityChatCompletionEventsFieldsFetchOptionCounts(mistral, { fieldName: "", fetchFieldOptionCountsRequest: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaObservabilityChatCompletionEventsFieldsFetchOptionCounts failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `request` | [operations.GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest](../../models/operations/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.FetchFieldOptionCountsResponse](../../models/components/fetchfieldoptioncountsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* |