Skip to content

Latest commit

 

History

History
98 lines (65 loc) · 7.93 KB

README.md

File metadata and controls

98 lines (65 loc) · 7.93 KB

Beta.Observability.Evaluations.Records

Overview

Available Operations

  • get - Get a specific record from an evaluation run
  • search - Search records for an evaluation run with content filters

get

Get a specific record from an evaluation run

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.beta.observability.evaluations.records.get(run_id="4561f251-c638-4a33-8739-db876b032f73", record_id="24b40e66-4e0d-4788-bb5a-df09239c7ba9")

    # Handle response
    print(res)

Parameters

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

Response

models.EvaluationRunRecordV2Response

Errors

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

search

Search records for an evaluation run with content filters

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.beta.observability.evaluations.records.search(run_id="3ec2a158-4bb7-4020-8a52-0f64a2745094", page_size=50, page=1)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
run_id str ✔️ N/A
page_size Optional[int] ➖ N/A
page Optional[int] ➖ N/A
input_filters OptionalNullable[models.ContentSearchFilterGroup] ➖ N/A
output_filters OptionalNullable[models.ContentSearchFilterGroup] ➖ N/A
score_filters OptionalNullable[models.ScoreFilterGroup] ➖ N/A
goal_filters OptionalNullable[models.GoalStatusFilterGroup] ➖ N/A
sort OptionalNullable[models.Sort] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ListEvaluationRunRecordsResponse

Errors

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