Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Eval Update Response

From Leeroopedia
Knowledge Sources
Domains API_Types, Python
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete type for the evaluation update response object provided by the openai-python SDK.

Description

The EvalUpdateResponse Pydantic model represents the Eval object returned after updating an evaluation. It has the same structure as EvalCreateResponse, EvalListResponse, and EvalRetrieveResponse: an id, created_at timestamp, data_source_config (discriminated union of custom, logs, or stored_completions configs), optional metadata, a name, object type "eval", and testing_criteria list of grader variants. This is the return type from client.evals.update() reflecting the updated state.

Usage

Import this type when inspecting the return value of client.evals.update().

Code Reference

Source Location

Signature

class EvalUpdateResponse(BaseModel):
    id: str
    created_at: int
    data_source_config: DataSourceConfig
    metadata: Optional[Metadata] = None
    name: str
    object: Literal["eval"]
    testing_criteria: List[TestingCriterion]

DataSourceConfig = Annotated[
    Union[EvalCustomDataSourceConfig, DataSourceConfigLogs, EvalStoredCompletionsDataSourceConfig],
    PropertyInfo(discriminator="type"),
]

TestingCriterion = Union[
    LabelModelGrader, StringCheckGrader,
    TestingCriterionEvalGraderTextSimilarity,
    TestingCriterionEvalGraderPython,
    TestingCriterionEvalGraderScoreModel,
]

Import

from openai.types import EvalUpdateResponse

I/O Contract

Fields

Name Type Required Description
id str Yes Unique identifier for the evaluation
created_at int Yes Unix timestamp (seconds) when the eval was created
data_source_config DataSourceConfig Yes Configuration of data sources (custom, logs, or stored_completions)
metadata Optional[Metadata] No Up to 16 key-value pairs for additional information
name str Yes Name of the evaluation (may reflect the updated name)
object Literal["eval"] Yes Object type, always "eval"
testing_criteria List[TestingCriterion] Yes List of graders for the evaluation

Usage Examples

from openai import OpenAI

client = OpenAI()

updated = client.evals.update(
    "eval_abc123",
    name="Updated Eval Name",
    metadata={"version": "3"},
)
print(f"ID: {updated.id}")
print(f"Name: {updated.name}")          # "Updated Eval Name"
print(f"Object: {updated.object}")      # "eval"
print(f"Criteria: {len(updated.testing_criteria)}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment