Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Beta.Observability.Logs

Overview

Available Operations

search

Search logs

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.logs.search(page_size=50, order="desc")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
from_ date N/A
to date N/A
page_size Optional[int] N/A
cursor OptionalNullable[str] N/A
search_expression OptionalNullable[str] N/A
order Optional[models.Order] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetLogs

Errors

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

list

Get log field definitions

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.logs.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.GetLogFields

Errors

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

fetch_options

Get options for a log field

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.logs.fetch_options(field_name="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
field_name str ✔️ N/A
from_ date N/A
to date N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetLogFieldOptions

Errors

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