Beta.Observability.Evaluations
Create a pipeline
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .create_pipeline (name = "<value>" , selectors = [], definitions = [
{
"slug" : "<value>" ,
},
], enabled = True )
# Handle response
print (res )
models.Pipeline
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
List pipelines
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .list_pipelines (page_size = 50 , page = 1 )
# Handle response
print (res )
Parameter
Type
Required
Description
enabled
OptionalNullable[bool]
➖
N/A
page_size
Optional[int]
➖
N/A
page
Optional[int]
➖
N/A
q
OptionalNullable[str]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.PipelinesResponse
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
Get a pipeline
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .get_pipeline (pipeline_id = "aafed470-377a-4e11-85ec-e5de5b40c79f" )
# Handle response
print (res )
Parameter
Type
Required
Description
pipeline_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.Pipeline
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
Update a pipeline
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .update_pipeline (pipeline_id = "2c18966b-8d2d-41fb-a02c-9a9bf9df2919" )
# Handle response
print (res )
models.Pipeline
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
Delete a pipeline
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
mistral .beta .observability .evaluations .delete_pipeline (pipeline_id = "eb888b07-60a4-490b-9515-f6b32ee11ccf" )
# Use the SDK ...
Parameter
Type
Required
Description
pipeline_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
List evaluations for a project
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .list (project_slug = "<value>" , page_size = 50 , page = 1 )
# Handle response
print (res )
Parameter
Type
Required
Description
project_slug
str
✔️
N/A
page_size
Optional[int]
➖
N/A
page
Optional[int]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.EvaluationsV2
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*
Get evaluation by slug
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .observability .evaluations .get (evaluation_slug = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
evaluation_slug
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.EvaluationV2
Error Type
Status Code
Content Type
errors.ObservabilityError
400, 404, 408, 409, 422
application/json
errors.SDKError
4XX, 5XX
*/*