REST API Objects¶
This page documents all the public data types and response models used by the REST API methods. These objects represent the data structures returned by REST API calls and used as parameters.
The types are automatically generated from the REST API definition and include classes for resources, page objects for pagination, filter objects for queries, and various utility types.
Note
These are the raw REST API data types. For the main SDK objects like Dataset, Experiment, etc.,
see the main Opik documentation and the Objects section in the main documentation.
- class opik.rest_api.types.Agent(*, name: str | None = None, description: str | None = None, language: str | None = None, executable: str | None = None, source_file: str | None = None, params: List[Param] | None = None, timeout: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- description: str | None¶
- language: str | None¶
- executable: str | None¶
- source_file: str | None¶
- timeout: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentBlueprintHistory(*, id: str | None = None, name: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, envs: List[str] | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, values: List[AgentConfigValueHistory], **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- type: Literal['blueprint', 'mask'] | Any¶
- description: str | None¶
- envs: List[str] | None¶
- created_by: str | None¶
- created_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_at: datetime | None¶
- values: List[AgentConfigValueHistory]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentBlueprintPublic(*, id: str | None = None, name: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, envs: List[str] | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, values: List[AgentConfigValuePublic], **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- type: Literal['blueprint', 'mask'] | Any¶
- description: str | None¶
- envs: List[str] | None¶
- created_by: str | None¶
- created_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_at: datetime | None¶
- values: List[AgentConfigValuePublic]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentBlueprintWrite(*, id: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, values: List[AgentConfigValueWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- type: Literal['blueprint', 'mask'] | Any¶
- description: str | None¶
- values: List[AgentConfigValueWrite]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentConfigCreateWrite(*, project_id: str | None = None, project_name: str | None = None, id: str | None = None, blueprint: AgentBlueprintWrite, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str | None¶
Project ID. Either project_id or project_name must be provided
- project_name: str | None¶
Project name. Either project_id or project_name must be provided
- id: str | None¶
Agent config ID. Generated automatically if not provided
- blueprint: AgentBlueprintWrite¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentConfigEnv(*, id: str | None = None, project_id: str | None = None, env_name: str, blueprint_id: str, created_by: str | None = None, created_at: datetime | None = None, ended_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str | None¶
- env_name: str¶
- blueprint_id: str¶
- created_by: str | None¶
- created_at: datetime | None¶
- ended_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentConfigValueHistory(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- key: str¶
- value: str | None¶
- type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any¶
- description: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentConfigValuePublic(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- key: str¶
- value: str | None¶
- type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any¶
- description: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentConfigValueWrite(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- key: str¶
- value: str | None¶
- type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any¶
- description: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentInsightsIssue(*, id: str | None = None, name: str | None = None, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, status: Literal['open', 'resolved', 'closed'] | Any | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any | None = None, traces_query: str | None = None, total_occurrences: int | None = None, latest_count: int | None = None, total: int | None = None, users_impacted: int | None = None, total_users: int | None = None, first_seen: date | None = None, last_seen: date | None = None, days_reported: int | None = None, close_note: str | None = None, status_changed_by: str | None = None, status_changed_at: datetime | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- description: str | None¶
- cause: str | None¶
- suggested_fix: str | None¶
- status: Literal['open', 'resolved', 'closed'] | Any | None¶
- severity: Literal['critical', 'high', 'medium', 'low'] | Any | None¶
- traces_query: str | None¶
- total_occurrences: int | None¶
SUM(count) over the requested window
- latest_count: int | None¶
Occurrences on the latest report day in the window only. The issue’s description/cause narrate that most recent run, so this is the count consistent with them; totalOccurrences instead sums every day in the window.
- total: int | None¶
SUM(total_count) over the requested window
- users_impacted: int | None¶
SUM(users_impacted) over the requested window
- total_users: int | None¶
SUM(total_users) over the requested window
- first_seen: date | None¶
MIN(report_day) in the requested window
- last_seen: date | None¶
MAX(report_day) in the requested window
- days_reported: int | None¶
COUNT(DISTINCT report_day) in the requested window
- close_note: str | None¶
The team’s reason for closing the issue as not useful; set only while status is closed
- status_changed_by: str | None¶
Who last changed the status
- status_changed_at: datetime | None¶
When the status was last changed
- created_by: str | None¶
- created_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentInsightsIssueDetail(*, report_day: date | None = None, count: int | None = None, total_count: int | None = None, users_impacted: int | None = None, total_users: int | None = None, metadata: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelPer-day breakdown within the requested window, ordered by report_day ascending
- report_day: date | None¶
- count: int | None¶
- total_count: int | None¶
- users_impacted: int | None¶
- total_users: int | None¶
- metadata: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentInsightsIssuePage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AgentInsightsIssue] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[AgentInsightsIssue] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentInsightsIssueWithDetails(*, id: str | None = None, name: str | None = None, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, status: Literal['open', 'resolved', 'closed'] | Any | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any | None = None, traces_query: str | None = None, close_note: str | None = None, status_changed_by: str | None = None, status_changed_at: datetime | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, details: List[AgentInsightsIssueDetail] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- description: str | None¶
- cause: str | None¶
- suggested_fix: str | None¶
- status: Literal['open', 'resolved', 'closed'] | Any | None¶
- severity: Literal['critical', 'high', 'medium', 'low'] | Any | None¶
- traces_query: str | None¶
- close_note: str | None¶
The team’s reason for closing the issue as not useful; set only while status is closed
- status_changed_by: str | None¶
Who last changed the status
- status_changed_at: datetime | None¶
When the status was last changed
- created_by: str | None¶
- created_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_at: datetime | None¶
- details: List[AgentInsightsIssueDetail] | None¶
Per-day breakdown within the requested window, ordered by report_day ascending
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AgentInsightsJob(*, id: str | None = None, project_id: str | None = None, status: Literal['enabled', 'disabled'] | Any | None = None, auto_first_run_enrolled: bool | None = None, auto_first_run_at: datetime | None = None, last_scan_at: datetime | None = None, last_failure_reason: str | None = None, last_failure_detail: str | None = None, last_failed_at: datetime | None = None, guidance: str | None = None, guidance_updated_by: str | None = None, guidance_updated_at: datetime | None = None, guidance_version: int | None = None, results_guidance_version: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str | None¶
- status: Literal['enabled', 'disabled'] | Any | None¶
- auto_first_run_enrolled: bool | None¶
- auto_first_run_at: datetime | None¶
- last_scan_at: datetime | None¶
- last_failure_reason: str | None¶
- last_failure_detail: str | None¶
- last_failed_at: datetime | None¶
- guidance: str | None¶
Project guidance sent to every run; null when none
- guidance_updated_by: str | None¶
Who last saved the guidance
- guidance_updated_at: datetime | None¶
When the guidance was last saved
- guidance_version: int | None¶
Bumped each time the guidance text changes; 0 = never saved
- results_guidance_version: int | None¶
Guidance version the current results were produced with; null = no run since guidance existed
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AggregationData(*, experiment_count: int | None = None, trace_count: int | None = None, total_estimated_cost: float | None = None, total_estimated_cost_avg: float | None = None, duration: PercentageValues | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, experiment_scores: List[FeedbackScoreAverage] | None = None, pass_rate_avg: float | None = None, passed_count_sum: int | None = None, total_count_sum: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- experiment_count: int | None¶
- trace_count: int | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_avg: float | None¶
- duration: PercentageValues | None¶
- feedback_scores: List[FeedbackScoreAverage] | None¶
- experiment_scores: List[FeedbackScoreAverage] | None¶
- pass_rate_avg: float | None¶
- passed_count_sum: int | None¶
- total_count_sum: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Alert(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, custom_fields: Dict[str, str] | None = None, webhook: Webhook, triggers: List[AlertTrigger] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, project_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- enabled: bool | None¶
- alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None¶
- metadata: Dict[str, str] | None¶
- custom_fields: Dict[str, str] | None¶
Optional user-defined key/value pairs, added as top-level keys of the alert’s EventBridge event detail. Keys must not collide with the event’s own keys.
- triggers: List[AlertTrigger] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- project_id: str | None¶
project trigger config will result in an error.
- Type:
Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope
- Type:
project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AlertPublic] | None = None, sortable_by: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[AlertPublic] | None¶
- sortable_by: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertPublic(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, custom_fields: Dict[str, str] | None = None, webhook: WebhookPublic, triggers: List[AlertTriggerPublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, project_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- enabled: bool | None¶
- alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None¶
- metadata: Dict[str, str] | None¶
- custom_fields: Dict[str, str] | None¶
Optional user-defined key/value pairs, added as top-level keys of the alert’s EventBridge event detail. Keys must not collide with the event’s own keys.
- webhook: WebhookPublic¶
- triggers: List[AlertTriggerPublic] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- project_id: str | None¶
project trigger config will result in an error.
- Type:
Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope
- Type:
project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTrigger(*, id: str | None = None, alert_id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfig] | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- alert_id: str | None¶
- event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any¶
- trigger_configs: List[AlertTriggerConfig] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTriggerConfig(*, id: str | None = None, alert_trigger_id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- alert_trigger_id: str | None¶
- type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any¶
- config_value: Dict[str, str] | None¶
- group_index: int | None¶
project configs.
- Type:
Groups configs within a trigger
- Type:
same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTriggerConfigPublic(*, id: str | None = None, alert_trigger_id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- alert_trigger_id: str | None¶
- type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any¶
- config_value: Dict[str, str] | None¶
- group_index: int | None¶
project configs.
- Type:
Groups configs within a trigger
- Type:
same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTriggerConfigWrite(*, id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any¶
- config_value: Dict[str, str] | None¶
- group_index: int | None¶
project configs.
- Type:
Groups configs within a trigger
- Type:
same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTriggerPublic(*, id: str | None = None, alert_id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfigPublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- alert_id: str | None¶
- event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any¶
- trigger_configs: List[AlertTriggerConfigPublic] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertTriggerWrite(*, id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfigWrite] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any¶
- trigger_configs: List[AlertTriggerConfigWrite] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AlertWrite(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, custom_fields: Dict[str, str] | None = None, webhook: WebhookWrite, triggers: List[AlertTriggerWrite] | None = None, project_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- enabled: bool | None¶
- alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None¶
- metadata: Dict[str, str] | None¶
- custom_fields: Dict[str, str] | None¶
Optional user-defined key/value pairs, added as top-level keys of the alert’s EventBridge event detail. Keys must not collide with the event’s own keys.
- webhook: WebhookWrite¶
- triggers: List[AlertTriggerWrite] | None¶
- project_id: str | None¶
project trigger config will result in an error.
- Type:
Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope
- Type:
project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnalyticsQueryResponse(*, results: List[Dict[str, Any | None]] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- results: List[Dict[str, Any | None]] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueue(*, id: str | None = None, project_id: str, project_name: str | None = None, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, automation: AnnotationQueueAutomation | None = None, annotator_view: AnnotationQueueAnnotatorView | None = None, reviewers: List[AnnotationQueueReviewer] | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, items_count: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelList of annotation queues to create
- id: str | None¶
- project_id: str¶
- project_name: str | None¶
- name: str¶
- description: str | None¶
- instructions: str | None¶
- scope: Literal['trace', 'thread'] | Any¶
- comments_enabled: bool | None¶
- feedback_definition_names: List[str] | None¶
- annotators_per_item: int | None¶
- lock_timeout_seconds: int | None¶
- automation: AnnotationQueueAutomation | None¶
- annotator_view: AnnotationQueueAnnotatorView | None¶
- reviewers: List[AnnotationQueueReviewer] | None¶
- feedback_scores: List[FeedbackScoreAverage] | None¶
- items_count: int | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAnnotatorView(*, html: str | None = None, kit_version: int | None = None, summary: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- html: str | None¶
A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation
- kit_version: int | None¶
Version of the view kit the html was written for
- summary: str | None¶
What annotators see in the view, in one or two sentences
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAnnotatorViewPublic(*, html: str | None = None, kit_version: int | None = None, summary: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- html: str | None¶
A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation
- kit_version: int | None¶
Version of the view kit the html was written for
- summary: str | None¶
What annotators see in the view, in one or two sentences
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAnnotatorViewWrite(*, html: str | None = None, kit_version: int | None = None, summary: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- html: str | None¶
A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation
- kit_version: int | None¶
Version of the view kit the html was written for
- summary: str | None¶
What annotators see in the view, in one or two sentences
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAutomation(*, enabled: bool | None = None, conditions: Conditions | None = None, max_items_in_queue: int | None = None, clear_max_items_in_queue: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- enabled: bool | None¶
- conditions: Conditions | None¶
- max_items_in_queue: int | None¶
- clear_max_items_in_queue: bool | None¶
When true, removes the item ceiling so automation adds without bound
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAutomationPublic(*, enabled: bool | None = None, conditions: ConditionsPublic | None = None, max_items_in_queue: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- enabled: bool | None¶
- conditions: ConditionsPublic | None¶
- max_items_in_queue: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueAutomationWrite(*, enabled: bool | None = None, conditions: ConditionsWrite | None = None, max_items_in_queue: int | None = None, clear_max_items_in_queue: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- enabled: bool | None¶
- conditions: ConditionsWrite | None¶
- max_items_in_queue: int | None¶
- clear_max_items_in_queue: bool | None¶
When true, removes the item ceiling so automation adds without bound
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueBatch(*, annotation_queues: List[AnnotationQueue], **extra_data: Any)¶
Bases:
UniversalBaseModelBatch of annotation queues to create
- annotation_queues: List[AnnotationQueue]¶
List of annotation queues to create
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueItemIds(*, ids: List[str], **extra_data: Any)¶
Bases:
UniversalBaseModel- ids: List[str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueItemPublic(*, id: str | None = None, source: Literal['manual', 'automated'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- source: Literal['manual', 'automated'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueItemsPublic(*, content: List[AnnotationQueueItemPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[AnnotationQueueItemPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueuePagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AnnotationQueuePublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcb46710>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[AnnotationQueuePublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dcb46710>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueuePublic(*, id: str | None = None, project_id: str, project_name: str | None = None, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, automation: AnnotationQueueAutomationPublic | None = None, annotator_view: AnnotationQueueAnnotatorViewPublic | None = None, reviewers: List[AnnotationQueueReviewerPublic] | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, items_count: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str¶
- project_name: str | None¶
- name: str¶
- description: str | None¶
- instructions: str | None¶
- scope: Literal['trace', 'thread'] | Any¶
- comments_enabled: bool | None¶
- feedback_definition_names: List[str] | None¶
- annotators_per_item: int | None¶
- lock_timeout_seconds: int | None¶
- automation: AnnotationQueueAutomationPublic | None¶
- annotator_view: AnnotationQueueAnnotatorViewPublic | None¶
- reviewers: List[AnnotationQueueReviewerPublic] | None¶
- feedback_scores: List[FeedbackScoreAveragePublic] | None¶
- items_count: int | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueReference(*, id: str, name: str, **extra_data: Any)¶
Bases:
UniversalBaseModelAnnotation queue reference with ID and name
- id: str¶
Annotation queue ID
- name: str¶
Annotation queue name
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueReferencePublic(*, id: str, name: str, **extra_data: Any)¶
Bases:
UniversalBaseModelAnnotation queue reference with ID and name
- id: str¶
Annotation queue ID
- name: str¶
Annotation queue name
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueReviewer(*, username: str | None = None, status: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- username: str | None¶
- status: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueReviewerPublic(*, username: str | None = None, status: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- username: str | None¶
- status: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AnnotationQueueWrite(*, id: str | None = None, project_id: str, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, automation: AnnotationQueueAutomationWrite | None = None, annotator_view: AnnotationQueueAnnotatorViewWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelList of annotation queues to create
- id: str | None¶
- project_id: str¶
- name: str¶
- description: str | None¶
- instructions: str | None¶
- scope: Literal['trace', 'thread'] | Any¶
- comments_enabled: bool | None¶
- feedback_definition_names: List[str] | None¶
- annotators_per_item: int | None¶
- lock_timeout_seconds: int | None¶
- automation: AnnotationQueueAutomationWrite | None¶
- annotator_view: AnnotationQueueAnnotatorViewWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssertionResult(*, value: str | None = None, passed: bool | None = None, reason: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: str | None¶
- passed: bool | None¶
- reason: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssertionResultBatchItem(*, entity_id: str, project_name: str | None = None, project_id: str | None = None, name: str, status: Literal['passed', 'failed'] | Any, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, **extra_data: Any)¶
Bases:
UniversalBaseModel- entity_id: str¶
- project_name: str | None¶
If null, the default project is used
- project_id: str | None¶
- name: str¶
- status: Literal['passed', 'failed'] | Any¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssertionResultCompare(*, value: str | None = None, passed: bool | None = None, reason: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: str | None¶
- passed: bool | None¶
- reason: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssertionScoreAverage(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModelPer-assertion average pass rates for test suite experiments. Null for regular experiments.
- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssertionScoreAveragePublic(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModelPer-assertion average pass rates for test suite experiments. Null for regular experiments.
- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AssistantMessage(*, role: Literal['system', 'user', 'assistant', 'tool', 'function'] | ~typing.Any | None=None, content: str | None = None, reasoning_content: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcdac830>]=None, name: str | None = None, tool_calls: ToolCall] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcaa47c0>]=None, refusal: str | None = None, function_call: FunctionCall | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcaa48d0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: Literal['system', 'user', 'assistant', 'tool', 'function'] | Any | None¶
- content: str | None¶
- reasoning_content: FieldMetadata object at 0x7725dcdac830>]¶
- name: str | None¶
- tool_calls: FieldMetadata object at 0x7725dcaa47c0>]¶
- refusal: str | None¶
- function_call: FieldMetadata object at 0x7725dcaa48d0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Attachment(*, link: str | None = None, file_name: str, file_size: int, mime_type: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- link: str | None¶
- file_name: str¶
- file_size: int¶
- mime_type: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AttachmentPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[Attachment] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcc9d550>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[Attachment] | None¶
- sortable_by: FieldMetadata object at 0x7725dcc9d550>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AudioUrl(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AudioUrlPublic(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AudioUrlWrite(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AuthorizationServerMetadata(*, issuer: str | None = None, authorization_endpoint: str | None = None, token_endpoint: str | None = None, revocation_endpoint: str | None = None, registration_endpoint: str | None = None, response_types_supported: List[str] | None = None, grant_types_supported: List[str] | None = None, code_challenge_methods_supported: List[str] | None = None, token_endpoint_auth_methods_supported: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- issuer: str | None¶
- authorization_endpoint: str | None¶
- token_endpoint: str | None¶
- revocation_endpoint: str | None¶
- registration_endpoint: str | None¶
- response_types_supported: List[str] | None¶
- grant_types_supported: List[str] | None¶
- code_challenge_methods_supported: List[str] | None¶
- token_endpoint_auth_methods_supported: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AuthorizeContext(*, client_name: str | None = None, client_logo_uri: str | None = None, workspaces: List[WorkspaceInfo] | None = None, csrf_token: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- client_name: str | None¶
- client_logo_uri: str | None¶
- workspaces: List[WorkspaceInfo] | None¶
- csrf_token: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudge(*, filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilter] | None¶
- code: LlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudgePublic(*, filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilterPublic] | None¶
- code: LlmAsJudgeCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudgeWrite(*, filters: List[TraceFilterWrite] | None = None, code: LlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilterWrite] | None¶
- code: LlmAsJudgeCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['llm_as_judge']¶
- filters: Optional[List[TraceFilterPublic]]¶
- code: Optional[LlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_llm_as_judge']¶
- filters: Optional[List[SpanFilterPublic]]¶
- code: Optional[SpanLlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_user_defined_metric_python']¶
- filters: Optional[List[SpanFilterPublic]]¶
- code: Optional[SpanUserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_llm_as_judge']¶
- filters: Optional[List[TraceThreadFilterPublic]]¶
- code: Optional[TraceThreadLlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_user_defined_metric_python']¶
- filters: Optional[List[TraceThreadFilterPublic]]¶
- code: Optional[TraceThreadUserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['user_defined_metric_python']¶
- filters: Optional[List[TraceFilterPublic]]¶
- code: Optional[UserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython] | None = None, sortable_by: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython] | None¶
- sortable_by: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['llm_as_judge']¶
- filters: Optional[List[TraceFilterPublic]]¶
- code: Optional[LlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_llm_as_judge']¶
- filters: Optional[List[SpanFilterPublic]]¶
- code: Optional[SpanLlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_user_defined_metric_python']¶
- filters: Optional[List[SpanFilterPublic]]¶
- code: Optional[SpanUserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_llm_as_judge']¶
- filters: Optional[List[TraceThreadFilterPublic]]¶
- code: Optional[TraceThreadLlmAsJudgeCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_user_defined_metric_python']¶
- filters: Optional[List[TraceThreadFilterPublic]]¶
- code: Optional[TraceThreadUserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorPublic_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['user_defined_metric_python']¶
- filters: Optional[List[TraceFilterPublic]]¶
- code: Optional[UserDefinedMetricPythonCodePublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudge(*, filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilter] | None¶
- code: SpanLlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudgePublic(*, filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilterPublic] | None¶
- code: SpanLlmAsJudgeCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudgeWrite(*, filters: List[SpanFilterWrite] | None = None, code: SpanLlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilterWrite] | None¶
- code: SpanLlmAsJudgeCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPython(*, filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilter] | None¶
- code: SpanUserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic(*, filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilterPublic] | None¶
- code: SpanUserDefinedMetricPythonCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite(*, filters: List[SpanFilterWrite] | None = None, code: SpanUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilterWrite] | None¶
- code: SpanUserDefinedMetricPythonCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudge(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilter] | None¶
- code: TraceThreadLlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic(*, filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilterPublic] | None¶
- code: TraceThreadLlmAsJudgeCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite(*, filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadLlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilterWrite] | None¶
- code: TraceThreadLlmAsJudgeCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilter] | None¶
- code: TraceThreadUserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic(*, filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilterPublic] | None¶
- code: TraceThreadUserDefinedMetricPythonCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite(*, filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilterWrite] | None¶
- code: TraceThreadUserDefinedMetricPythonCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateLlmAsJudge(*, filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilter] | None¶
- code: LlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateSpanLlmAsJudge(*, filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilter] | None¶
- code: SpanLlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython(*, filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[SpanFilter] | None¶
- code: SpanUserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilter] | None¶
- code: TraceThreadLlmAsJudgeCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceThreadFilter] | None¶
- code: TraceThreadUserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdateUserDefinedMetricPython(*, filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilter] | None¶
- code: UserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_LlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['llm_as_judge']¶
- filters: Optional[List[TraceFilter]]¶
- code: Optional[LlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_SpanLlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_llm_as_judge']¶
- filters: Optional[List[SpanFilter]]¶
- code: Optional[SpanLlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_SpanUserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_user_defined_metric_python']¶
- filters: Optional[List[SpanFilter]]¶
- code: Optional[SpanUserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_llm_as_judge']¶
- filters: Optional[List[TraceThreadFilter]]¶
- code: Optional[TraceThreadLlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_user_defined_metric_python']¶
- filters: Optional[List[TraceThreadFilter]]¶
- code: Optional[TraceThreadUserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUpdate_UserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['user_defined_metric_python']¶
- filters: Optional[List[TraceFilter]]¶
- code: Optional[UserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPython(*, filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilter] | None¶
- code: UserDefinedMetricPythonCode | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPythonPublic(*, filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilterPublic] | None¶
- code: UserDefinedMetricPythonCodePublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPythonWrite(*, filters: List[TraceFilterWrite] | None = None, code: UserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- filters: List[TraceFilterWrite] | None¶
- code: UserDefinedMetricPythonCodeWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_LlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterWrite] | None = None, code: LlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['llm_as_judge']¶
- filters: Optional[List[TraceFilterWrite]]¶
- code: Optional[LlmAsJudgeCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_SpanLlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterWrite] | None = None, code: SpanLlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_llm_as_judge']¶
- filters: Optional[List[SpanFilterWrite]]¶
- code: Optional[SpanLlmAsJudgeCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_SpanUserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterWrite] | None = None, code: SpanUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_user_defined_metric_python']¶
- filters: Optional[List[SpanFilterWrite]]¶
- code: Optional[SpanUserDefinedMetricPythonCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadLlmAsJudgeCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_llm_as_judge']¶
- filters: Optional[List[TraceThreadFilterWrite]]¶
- code: Optional[TraceThreadLlmAsJudgeCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_user_defined_metric_python']¶
- filters: Optional[List[TraceThreadFilterWrite]]¶
- code: Optional[TraceThreadUserDefinedMetricPythonCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluatorWrite_UserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterWrite] | None = None, code: UserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['user_defined_metric_python']¶
- filters: Optional[List[TraceFilterWrite]]¶
- code: Optional[UserDefinedMetricPythonCodeWrite]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['llm_as_judge']¶
- filters: Optional[List[TraceFilter]]¶
- code: Optional[LlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_llm_as_judge']¶
- filters: Optional[List[SpanFilter]]¶
- code: Optional[SpanLlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['span_user_defined_metric_python']¶
- filters: Optional[List[SpanFilter]]¶
- code: Optional[SpanUserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_llm_as_judge']¶
- filters: Optional[List[TraceThreadFilter]]¶
- code: Optional[TraceThreadLlmAsJudgeCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['trace_thread_user_defined_metric_python']¶
- filters: Optional[List[TraceThreadFilter]]¶
- code: Optional[TraceThreadUserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AutomationRuleEvaluator_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator', 'annotation_queue_router'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['user_defined_metric_python']¶
- filters: Optional[List[TraceFilter]]¶
- code: Optional[UserDefinedMetricPythonCode]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.AvgValueStatPublic(*, value: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BatchDelete(*, ids: List[str], **extra_data: Any)¶
Bases:
UniversalBaseModel- ids: List[str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BiInformation(*, workspace_id: str | None = None, user: str | None = None, count: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace_id: str | None¶
- user: str | None¶
- count: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BiInformationResponse(*, bi_information: List[BiInformation] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- bi_information: List[BiInformation] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BlueprintPageHistory(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AgentBlueprintHistory] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[AgentBlueprintHistory] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDefinition(*, details: BooleanFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: BooleanFeedbackDetail | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDefinitionCreate(*, details: BooleanFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: BooleanFeedbackDetailCreate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDefinitionPublic(*, details: BooleanFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: BooleanFeedbackDetailPublic | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDefinitionUpdate(*, details: BooleanFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: BooleanFeedbackDetailUpdate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDetail(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd360>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd4f0>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- true_label: FieldMetadata object at 0x7725dc8bd360>]¶
Label for true/1 value
- false_label: FieldMetadata object at 0x7725dc8bd4f0>]¶
Label for false/0 value
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDetailCreate(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd810>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd950>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- true_label: FieldMetadata object at 0x7725dc8bd810>]¶
Label for true/1 value
- false_label: FieldMetadata object at 0x7725dc8bd950>]¶
Label for false/0 value
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDetailPublic(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bdd60>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bddb0>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- true_label: FieldMetadata object at 0x7725dc8bdd60>]¶
Label for true/1 value
- false_label: FieldMetadata object at 0x7725dc8bddb0>]¶
Label for false/0 value
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BooleanFeedbackDetailUpdate(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8be210>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8be2b0>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- true_label: FieldMetadata object at 0x7725dc8be210>]¶
Label for true/1 value
- false_label: FieldMetadata object at 0x7725dc8be2b0>]¶
Label for false/0 value
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BreakdownConfig(*, field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None = None, metadata_key: str | None = None, sub_metric: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None¶
each tag receives the full metric value. For cost, adding tag groups can exceed actual spend; use provider or model for additive span cost totals.
- Type:
Field to group by. Tags are overlapping groups
- metadata_key: str | None¶
- sub_metric: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BreakdownConfigPublic(*, field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None = None, metadata_key: str | None = None, sub_metric: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None¶
each tag receives the full metric value. For cost, adding tag groups can exceed actual spend; use provider or model for additive span cost totals.
- Type:
Field to group by. Tags are overlapping groups
- metadata_key: str | None¶
- sub_metric: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BridgeCommand(*, command_id: str | None = None, runner_id: str | None = None, type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None = None, status: Literal['pending', 'picked_up', 'completed', 'failed', 'timed_out'] | Any | None = None, args: Dict[str, Any | None] | None = None, result: Dict[str, Any | None] | None = None, error: Dict[str, Any | None] | None = None, timeout_seconds: int | None = None, submitted_at: datetime | None = None, picked_up_at: datetime | None = None, completed_at: datetime | None = None, duration_ms: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- command_id: str | None¶
- runner_id: str | None¶
- type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None¶
- status: Literal['pending', 'picked_up', 'completed', 'failed', 'timed_out'] | Any | None¶
- args: Dict[str, Any | None] | None¶
- result: Dict[str, Any | None] | None¶
- error: Dict[str, Any | None] | None¶
- timeout_seconds: int | None¶
- submitted_at: datetime | None¶
- picked_up_at: datetime | None¶
- completed_at: datetime | None¶
- duration_ms: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BridgeCommandBatchResponse(*, commands: List[BridgeCommandItem] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- commands: List[BridgeCommandItem] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BridgeCommandItem(*, command_id: str | None = None, type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None = None, args: Dict[str, Any | None] | None = None, timeout_seconds: int | None = None, submitted_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- command_id: str | None¶
- type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None¶
- args: Dict[str, Any | None] | None¶
- timeout_seconds: int | None¶
- submitted_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.BridgeCommandSubmitResponse(*, command_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- command_id: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDefinition(*, details: CategoricalFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: CategoricalFeedbackDetail | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDefinitionCreate(*, details: CategoricalFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: CategoricalFeedbackDetailCreate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDefinitionPublic(*, details: CategoricalFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: CategoricalFeedbackDetailPublic | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDefinitionUpdate(*, details: CategoricalFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: CategoricalFeedbackDetailUpdate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDetail(*, categories: Dict[str, float], **extra_data: Any)¶
Bases:
UniversalBaseModel- categories: Dict[str, float]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDetailCreate(*, categories: Dict[str, float], **extra_data: Any)¶
Bases:
UniversalBaseModel- categories: Dict[str, float]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDetailPublic(*, categories: Dict[str, float], **extra_data: Any)¶
Bases:
UniversalBaseModel- categories: Dict[str, float]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CategoricalFeedbackDetailUpdate(*, categories: Dict[str, float], **extra_data: Any)¶
Bases:
UniversalBaseModel- categories: Dict[str, float]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChatCompletionChoice(*, index: int | None = None, message: AssistantMessage | None = None, delta: Delta | None = None, finish_reason: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc734fa0>]=None, logprobs: LogProbs | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- index: int | None¶
- message: AssistantMessage | None¶
- finish_reason: FieldMetadata object at 0x7725dc734fa0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChatCompletionResponse(*, id: str | None = None, created: int | None = None, model: str | None = None, choices: List[ChatCompletionChoice] | None = None, usage: Usage | None = None, system_fingerprint: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735d60>]=None, service_tier: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735e00>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- created: int | None¶
- model: str | None¶
- choices: List[ChatCompletionChoice] | None¶
- system_fingerprint: FieldMetadata object at 0x7725dc735d60>]¶
- service_tier: FieldMetadata object at 0x7725dc735e00>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Check(*, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None = None, result: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None¶
- result: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CheckPublic(*, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None = None, result: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None¶
- result: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChunkedOutputJsonNode(*, type: ChunkedOutputJsonNodeType | None = None, closed: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: ChunkedOutputJsonNodeType | None¶
- closed: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChunkedOutputJsonNodePublic(*, type: ChunkedOutputJsonNodePublicType | None = None, closed: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: ChunkedOutputJsonNodePublicType | None¶
- closed: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChunkedOutputJsonNodePublicType(*, type_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc737160>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type_name: FieldMetadata object at 0x7725dc737160>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ChunkedOutputJsonNodeType(*, type_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc736d00>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type_name: FieldMetadata object at 0x7725dc736d00>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ClientRegistrationResponse(*, client_id: str | None = None, client_id_issued_at: int | None = None, client_name: str | None = None, logo_uri: str | None = None, software_id: str | None = None, software_version: str | None = None, client_uri: str | None = None, redirect_uris: List[str] | None = None, token_endpoint_auth_method: str | None = None, grant_types: List[str] | None = None, response_types: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- client_id: str | None¶
- client_id_issued_at: int | None¶
- client_name: str | None¶
- logo_uri: str | None¶
- software_id: str | None¶
- software_version: str | None¶
- client_uri: str | None¶
- redirect_uris: List[str] | None¶
- token_endpoint_auth_method: str | None¶
- grant_types: List[str] | None¶
- response_types: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Column(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc7376b0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None¶
- filter_field_prefix: str | None¶
- filter_field: FieldMetadata object at 0x7725dc7376b0>]¶
The field to use for filtering
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ColumnCompare(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc737a20>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None¶
- filter_field_prefix: str | None¶
- filter_field: FieldMetadata object at 0x7725dc737a20>]¶
The field to use for filtering
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ColumnPublic(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc737de0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None¶
- filter_field_prefix: str | None¶
- filter_field: FieldMetadata object at 0x7725dc737de0>]¶
The field to use for filtering
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Comment(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- text: str¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CommentCompare(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- text: str¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CommentPublic(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- text: str¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CompleteMultipartUploadRequest(*, file_name: str, project_name: str | None = None, entity_type: Literal['trace', 'span'] | Any, entity_id: str, container_id: str | None = None, file_size: int, mime_type: str | None = None, upload_id: str, uploaded_file_parts: List[MultipartUploadPart], **extra_data: Any)¶
Bases:
UniversalBaseModel- file_name: str¶
- project_name: str | None¶
If null, the default project is used
- entity_type: Literal['trace', 'span'] | Any¶
- entity_id: str¶
- container_id: str | None¶
- file_size: int¶
- mime_type: str | None¶
- upload_id: str¶
- uploaded_file_parts: List[MultipartUploadPart]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CompletionTokensDetails(*, reasoning_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735770>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- reasoning_tokens: FieldMetadata object at 0x7725dc735770>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConditionGroup(*, conditions: List[ScoreCondition], **extra_data: Any)¶
Bases:
UniversalBaseModel- conditions: List[ScoreCondition]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConditionGroupPublic(*, conditions: List[ScoreConditionPublic], **extra_data: Any)¶
Bases:
UniversalBaseModel- conditions: List[ScoreConditionPublic]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConditionGroupWrite(*, conditions: List[ScoreConditionWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- conditions: List[ScoreConditionWrite]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Conditions(*, groups: List[ConditionGroup], **extra_data: Any)¶
Bases:
UniversalBaseModel- groups: List[ConditionGroup]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConditionsPublic(*, groups: List[ConditionGroupPublic], **extra_data: Any)¶
Bases:
UniversalBaseModel- groups: List[ConditionGroupPublic]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConditionsWrite(*, groups: List[ConditionGroupWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- groups: List[ConditionGroupWrite]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ConsentResponse(*, redirect_to: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- redirect_to: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CountValueStatPublic(*, value: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CreateSessionResponse(*, session_id: str | None = None, runner_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- session_id: str | None¶
- runner_id: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Credential(*, key: str, value: str | None = None, secret: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelFields sent to the token URL. Values flagged as secret are write-only: they read back as the ‘__SECRET__’ sentinel
- key: str¶
- value: str | None¶
- secret: bool | None¶
Secret values are encrypted at rest and never read back; once true it cannot be unset
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CredentialPublic(*, key: str, value: str | None = None, secret: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelFields sent to the token URL. Values flagged as secret are write-only: they read back as the ‘__SECRET__’ sentinel
- key: str¶
- value: str | None¶
- secret: bool | None¶
Secret values are encrypted at rest and never read back; once true it cannot be unset
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.CredentialWrite(*, key: str, value: str | None = None, secret: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelFields sent to the token URL. Values flagged as secret are write-only: they read back as the ‘__SECRET__’ sentinel
- key: str¶
- value: str | None¶
- secret: bool | None¶
Secret values are encrypted at rest and never read back; once true it cannot be unset
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardPagePublic(*, content: List[DashboardPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, sortable_by: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[DashboardPublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- sortable_by: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardPublic(*, id: str | None = None, workspace_id: str | None = None, project_id: str | None = None, name: str, type: Literal['multi_project', 'experiments'] | Any | None = None, scope: Literal['workspace', 'insights'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None], created_by: str | None = None, last_updated_by: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- workspace_id: str | None¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- name: str¶
- type: Literal['multi_project', 'experiments'] | Any | None¶
- scope: Literal['workspace', 'insights'] | Any | None¶
- description: str | None¶
- config: Dict[str, Any | None]¶
- created_by: str | None¶
- last_updated_by: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardSavedQuery(*, id: str | None = None, project_id: str | None = None, sql: str, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str | None¶
Project the query is bounded to. Omit for every project in the workspace.
- sql: str¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardUpdatePublic(*, name: str | None = None, type: Literal['multi_project', 'experiments'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- type: Literal['multi_project', 'experiments'] | Any | None¶
- description: str | None¶
- config: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardWidgetQueryRequest(*, interval_start: datetime | None = None, interval_end: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- interval_start: datetime | None¶
Start of the date range, bound to {{window_start}} in the dashboard saved query. Omit for all time.
- interval_end: datetime | None¶
End of the date range, bound to {{window_end}} in the dashboard saved query. Omit for now.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DashboardWrite(*, project_id: str | None = None, project_name: str | None = None, name: str, type: Literal['multi_project', 'experiments'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- project_name: str | None¶
For project scope, specify either project_id or project_name. If project_name is provided and the project does not exist, it will be created. Ignored when project_id is provided. If neither is provided, the dashboard is created at workspace level.
- name: str¶
- type: Literal['multi_project', 'experiments'] | Any | None¶
- description: str | None¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DataPointDouble(*, time: datetime, value: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- time: datetime¶
- value: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DataPointNumberPublic(*, time: datetime, value: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- time: datetime¶
- value: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetExpansion(*, model: str, sample_count: int | None = None, preserve_fields: List[str] | None = None, variation_instructions: str | None = None, custom_prompt: str | None = None, max_completion_tokens: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model: str¶
The model to use for synthetic data generation
- sample_count: int | None¶
Number of synthetic samples to generate
- preserve_fields: List[str] | None¶
Fields to preserve patterns from original data
- variation_instructions: str | None¶
Additional instructions for data variation
- custom_prompt: str | None¶
Custom prompt to use for generation instead of auto-generated one
- max_completion_tokens: int | None¶
Maximum number of tokens for the LLM response. Required by Anthropic, used as maxOutputTokens for Gemini. If not provided, defaults to 4000 for Anthropic models only.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetExpansionResponse(*, generated_samples: List[DatasetItem] | None = None, model: str | None = None, total_generated: int | None = None, generation_time: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- generated_samples: List[DatasetItem] | None¶
List of generated synthetic dataset items
- model: str | None¶
Model used for generation
- total_generated: int | None¶
Total number of samples generated
- generation_time: datetime | None¶
Generation timestamp
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetExportJobPublic(*, id: str | None = None, dataset_id: str | None = None, dataset_name: str | None = None, status: Literal['PENDING', 'PROCESSING', 'COMPLETED', 'FAILED'] | Any | None = None, file_path: str | None = None, error_message: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, expires_at: datetime | None = None, viewed_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- dataset_id: str | None¶
- dataset_name: str | None¶
- status: Literal['PENDING', 'PROCESSING', 'COMPLETED', 'FAILED'] | Any | None¶
- file_path: str | None¶
- error_message: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- expires_at: datetime | None¶
- viewed_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItem(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItem] | None = None, execution_policy: ExecutionPolicy | None = None, experiment_items: List[ExperimentItem] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummary] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions
- dataset_item_id: str | None¶
Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version
- trace_id: str | None¶
- span_id: str | None¶
- source: Literal['manual', 'trace', 'span', 'sdk'] | Any¶
- data: Dict[str, Any | None]¶
- description: str | None¶
- tags: List[str] | None¶
- evaluators: List[EvaluatorItem] | None¶
- execution_policy: ExecutionPolicy | None¶
- experiment_items: List[ExperimentItem] | None¶
- run_summaries_by_experiment: Dict[str, ExperimentRunSummary] | None¶
- dataset_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemBatch(*, dataset_name: str | None = None, dataset_id: str | None = None, project_name: str | None = None, project_id: str | None = None, items: List[DatasetItem], batch_group_id: str | None = None, copy_from_dataset_id: str | None = None, copy_from_version_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_name: str | None¶
If null, dataset_id must be provided
- dataset_id: str | None¶
If null, dataset_name must be provided
- project_name: str | None¶
Optional. Associates the batch with a project by name. Ignored if project_id is provided.
- project_id: str | None¶
Optional. Associates the batch with a project by ID. Takes precedence over project_name.
- items: List[DatasetItem]¶
- batch_group_id: str | None¶
Optional batch group ID to group multiple batches into a single dataset version. If null, mutates the latest version instead of creating a new one.
- copy_from_dataset_id: str | None¶
Optional. Dataset to read carry-forward rows from when materializing the new version. Required together with copy_from_version_id. When null, carry-forward rows are read from the destination dataset’s prior version.
- copy_from_version_id: str | None¶
Optional. Version within copy_from_dataset_id to read carry-forward rows from. Required together with copy_from_dataset_id.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemCompare(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemCompare] | None = None, execution_policy: ExecutionPolicyCompare | None = None, experiment_items: List[ExperimentItemCompare] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummaryCompare] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions
- dataset_item_id: str | None¶
Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version
- trace_id: str | None¶
- span_id: str | None¶
- source: Literal['manual', 'trace', 'span', 'sdk'] | Any¶
- data: Dict[str, Any | None]¶
- description: str | None¶
- tags: List[str] | None¶
- evaluators: List[EvaluatorItemCompare] | None¶
- execution_policy: ExecutionPolicyCompare | None¶
- experiment_items: List[ExperimentItemCompare] | None¶
- run_summaries_by_experiment: Dict[str, ExperimentRunSummaryCompare] | None¶
- dataset_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelFilters to select dataset items to delete within the specified dataset. Must be used with ‘dataset_id’. Mutually exclusive with ‘item_ids’. Empty array means ‘delete all items in the dataset’.
- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemPageCompare(*, content: List[DatasetItemCompare] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, columns: List[ColumnCompare] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc7ff2a0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[DatasetItemCompare] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- columns: List[ColumnCompare] | None¶
- sortable_by: FieldMetadata object at 0x7725dc7ff2a0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemPagePublic(*, content: List[DatasetItemPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, columns: List[ColumnPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc674460>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[DatasetItemPublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- columns: List[ColumnPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc674460>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemPublic(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemPublic] | None = None, execution_policy: ExecutionPolicyPublic | None = None, experiment_items: List[ExperimentItemPublic] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummaryPublic] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions
- dataset_item_id: str | None¶
Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version
- trace_id: str | None¶
- span_id: str | None¶
- source: Literal['manual', 'trace', 'span', 'sdk'] | Any¶
- data: Dict[str, Any | None]¶
- description: str | None¶
- tags: List[str] | None¶
- evaluators: List[EvaluatorItemPublic] | None¶
- execution_policy: ExecutionPolicyPublic | None¶
- experiment_items: List[ExperimentItemPublic] | None¶
- run_summaries_by_experiment: Dict[str, ExperimentRunSummaryPublic] | None¶
- dataset_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemUpdate(*, input: str | None = None, expected_output: str | None = None, metadata: Dict[str, Any | None] | None = None, data: Dict[str, Any | None] | None = None, description: str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, evaluators: List[EvaluatorItem] | None = None, execution_policy: ExecutionPolicy | None = None, clear_execution_policy: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelDataset item update request
- input: str | None¶
Dataset item input
- expected_output: str | None¶
Dataset item expected output
- metadata: Dict[str, Any | None] | None¶
- data: Dict[str, Any | None] | None¶
- description: str | None¶
Dataset item description
- tags: List[str] | None¶
Tags
- tags_to_add: List[str] | None¶
Tags to add
- tags_to_remove: List[str] | None¶
Tags to remove
- evaluators: List[EvaluatorItem] | None¶
Evaluators
- execution_policy: ExecutionPolicy | None¶
- clear_execution_policy: bool | None¶
When true, clears the item-level execution policy (falls back to dataset-level)
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetItemWrite(*, id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemWrite] | None = None, execution_policy: ExecutionPolicyWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions
- trace_id: str | None¶
- span_id: str | None¶
- source: Literal['manual', 'trace', 'span', 'sdk'] | Any¶
- data: Dict[str, Any | None]¶
- description: str | None¶
- tags: List[str] | None¶
- evaluators: List[EvaluatorItemWrite] | None¶
- execution_policy: ExecutionPolicyWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetPagePublic(*, content: List[DatasetPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc6757c0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[DatasetPublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- sortable_by: FieldMetadata object at 0x7725dc6757c0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetPublic(*, id: str | None = None, name: str, project_id: str | None = None, type: Literal['dataset', 'evaluation_suite'] | Any | None = None, visibility: Literal['private', 'public'] | Any | None = None, tags: List[str] | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, experiment_count: int | None = None, dataset_items_count: int | None = None, optimization_count: int | None = None, most_recent_experiment_at: datetime | None = None, last_created_experiment_at: datetime | None = None, most_recent_optimization_at: datetime | None = None, last_created_optimization_at: datetime | None = None, status: Literal['unknown', 'processing', 'completed', 'failed'] | Any | None = None, latest_version: DatasetVersionSummaryPublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- type: Literal['dataset', 'evaluation_suite'] | Any | None¶
- visibility: Literal['private', 'public'] | Any | None¶
- tags: List[str] | None¶
- description: str | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- experiment_count: int | None¶
- dataset_items_count: int | None¶
- optimization_count: int | None¶
- most_recent_experiment_at: datetime | None¶
- last_created_experiment_at: datetime | None¶
- most_recent_optimization_at: datetime | None¶
- last_created_optimization_at: datetime | None¶
- status: Literal['unknown', 'processing', 'completed', 'failed'] | Any | None¶
- latest_version: DatasetVersionSummaryPublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionDiff(*, from_version: str | None = None, to_version: str | None = None, statistics: DatasetVersionDiffStats | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- from_version: str | None¶
- to_version: str | None¶
- statistics: DatasetVersionDiffStats | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionDiffStats(*, items_added: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc676030>]=None, items_modified: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc676080>]=None, items_deleted: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc6760d0>]=None, items_unchanged: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc676120>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- items_added: FieldMetadata object at 0x7725dc676030>]¶
- items_modified: FieldMetadata object at 0x7725dc676080>]¶
- items_deleted: FieldMetadata object at 0x7725dc6760d0>]¶
- items_unchanged: FieldMetadata object at 0x7725dc676120>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionPagePublic(*, content: List[DatasetVersionPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[DatasetVersionPublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionPublic(*, id: str | None = None, dataset_id: str | None = None, version_hash: str | None = None, tags: List[str] | None = None, is_latest: bool | None = None, version_name: str | None = None, items_total: int | None = None, items_added: int | None = None, items_modified: int | None = None, items_deleted: int | None = None, change_description: str | None = None, metadata: Dict[str, str] | None = None, evaluators: List[EvaluatorItemPublic] | None = None, execution_policy: ExecutionPolicyPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- dataset_id: str | None¶
- version_hash: str | None¶
- tags: List[str] | None¶
- is_latest: bool | None¶
Indicates whether this is the latest version of the dataset
- version_name: str | None¶
Sequential version name formatted as ‘v1’, ‘v2’, etc.
- items_total: int | None¶
Total number of items in this version
- items_added: int | None¶
Number of items added since last version
- items_modified: int | None¶
Number of items modified since last version
- items_deleted: int | None¶
Number of items deleted since last version
- change_description: str | None¶
- metadata: Dict[str, str] | None¶
- evaluators: List[EvaluatorItemPublic] | None¶
Default evaluators for items in this version
- execution_policy: ExecutionPolicyPublic | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionSummary(*, id: str | None = None, version_hash: str | None = None, version_name: str | None = None, change_description: str | None = None, tags: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelSummary of the latest dataset version
- id: str | None¶
Unique identifier of the version
- version_hash: str | None¶
Hash of the version content
- version_name: str | None¶
Sequential version name formatted as ‘v1’, ‘v2’, etc.
- change_description: str | None¶
Description of changes in this version
- tags: List[str] | None¶
Tags associated with this version
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DatasetVersionSummaryPublic(*, id: str | None = None, version_hash: str | None = None, version_name: str | None = None, change_description: str | None = None, tags: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelSummary of the latest dataset version
- id: str | None¶
Unique identifier of the version
- version_hash: str | None¶
Hash of the version content
- version_name: str | None¶
Sequential version name formatted as ‘v1’, ‘v2’, etc.
- change_description: str | None¶
Description of changes in this version
- tags: List[str] | None¶
Tags associated with this version
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DeleteAttachmentsRequest(*, file_names: List[str], entity_type: Literal['trace', 'span'] | Any, entity_id: str, container_id: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- file_names: List[str]¶
- entity_type: Literal['trace', 'span'] | Any¶
- entity_id: str¶
- container_id: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DeleteFeedbackScore(*, name: str, author: str | None = None, source_queue_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- author: str | None¶
- source_queue_id: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.DeleteIdsHolder(*, ids: List[str], **extra_data: Any)¶
Bases:
UniversalBaseModel- ids: List[str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Delta(*, role: str | None = None, content: str | None = None, reasoning_content: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc734910>]=None, tool_calls: ToolCall] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc734960>]=None, function_call: FunctionCall | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc7349b0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: str | None¶
- content: str | None¶
- reasoning_content: FieldMetadata object at 0x7725dc734910>]¶
- tool_calls: FieldMetadata object at 0x7725dc734960>]¶
- function_call: FieldMetadata object at 0x7725dc7349b0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EffortParam(*, accepted: bool | None = None, levels: List[str] | None = None, default: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- accepted: bool | None¶
- levels: List[str] | None¶
- default: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Environment(*, id: str | None = None, name: str, description: str | None = None, color: str | None = None, position: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- description: str | None¶
- color: str | None¶
- position: int | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EnvironmentPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[EnvironmentPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc6776b0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[EnvironmentPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc6776b0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EnvironmentPublic(*, id: str | None = None, name: str, description: str | None = None, color: str | None = None, position: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- description: str | None¶
- color: str | None¶
- position: int | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorCountWithDeviation(*, count: int | None = None, deviation: int | None = None, deviation_percentage: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- count: int | None¶
- deviation: int | None¶
- deviation_percentage: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorCountWithDeviationDetailed(*, count: int | None = None, deviation: int | None = None, deviation_percentage: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- count: int | None¶
- deviation: int | None¶
- deviation_percentage: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorInfo(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- exception_type: str¶
- message: str | None¶
- traceback: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorInfoExperimentItemBulkWriteView(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- exception_type: str¶
- message: str | None¶
- traceback: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorInfoPublic(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- exception_type: str¶
- message: str | None¶
- traceback: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorInfoWrite(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- exception_type: str¶
- message: str | None¶
- traceback: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessage(*, code: int | None = None, message: str | None = None, details: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- code: int | None¶
- message: str | None¶
- details: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessageDetail(*, errors: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- errors: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessageDetailed(*, errors: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- errors: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessageHistory(*, errors: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- errors: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessagePublic(*, code: int | None = None, message: str | None = None, details: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- code: int | None¶
- message: str | None¶
- details: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ErrorMessageWrite(*, errors: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- errors: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EvaluatorItem(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['llm_judge', 'code_metric'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EvaluatorItemCompare(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['llm_judge', 'code_metric'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EvaluatorItemPublic(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModelDefault evaluators for items in this version
- name: str¶
- type: Literal['llm_judge', 'code_metric'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.EvaluatorItemWrite(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['llm_judge', 'code_metric'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExecutionPolicy(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- runs_per_item: int | None¶
- pass_threshold: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExecutionPolicyCompare(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- runs_per_item: int | None¶
- pass_threshold: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExecutionPolicyPublic(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelDefault execution policy for items in this version
- runs_per_item: int | None¶
- pass_threshold: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExecutionPolicyWrite(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- runs_per_item: int | None¶
- pass_threshold: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExistenceResponse(*, exists: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- exists: bool | None¶
Whether the project has at least one matching entity for the given scope
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentExecutionResponse(*, experiments: List[ExperimentInfo] | None = None, total_items: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- experiments: List[ExperimentInfo] | None¶
- total_items: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentGroupAggregationsResponse(*, content: Dict[str, GroupContentWithAggregations] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: Dict[str, GroupContentWithAggregations] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentGroupResponse(*, content: Dict[str, GroupContent] | None = None, details: GroupDetails | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: Dict[str, GroupContent] | None¶
- details: GroupDetails | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentInfo(*, experiment_id: str | None = None, prompt_index: int | None = None, total_items: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- experiment_id: str | None¶
- prompt_index: int | None¶
- total_items: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItem(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, project_name: str | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScore] | None = None, comments: List[Comment] | None = None, total_estimated_cost: float | None = None, duration: float | None = None, usage: Dict[str, int] | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, description: str | None = None, execution_policy: ExecutionPolicy | None = None, assertion_results: List[AssertionResult] | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- experiment_id: str¶
- dataset_item_id: str¶
- trace_id: str¶
- project_id: str | None¶
- project_name: str | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- feedback_scores: List[FeedbackScore] | None¶
- total_estimated_cost: float | None¶
- duration: float | None¶
- usage: Dict[str, int] | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- trace_visibility_mode: Literal['default', 'hidden'] | Any | None¶
- description: str | None¶
- execution_policy: ExecutionPolicy | None¶
- assertion_results: List[AssertionResult] | None¶
- status: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemBulkRecord(*, dataset_item_id: str, evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace: Trace | None = None, spans: List[Span] | None = None, feedback_scores: List[FeedbackScore] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_item_id: str¶
- evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- trace: Trace | None¶
- spans: List[Span] | None¶
- feedback_scores: List[FeedbackScore] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemBulkRecordExperimentItemBulkWriteView(*, dataset_item_id: str, evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace: TraceExperimentItemBulkWriteView | None = None, spans: List[SpanExperimentItemBulkWriteView] | None = None, feedback_scores: List[FeedbackScoreExperimentItemBulkWriteView] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_item_id: str¶
- evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- trace: TraceExperimentItemBulkWriteView | None¶
- spans: List[SpanExperimentItemBulkWriteView] | None¶
- feedback_scores: List[FeedbackScoreExperimentItemBulkWriteView] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemBulkUpload(*, experiment_name: str, dataset_name: str, experiment_id: str | None = None, project_name: str | None = None, items: List[ExperimentItemBulkRecord], **extra_data: Any)¶
Bases:
UniversalBaseModel- experiment_name: str¶
- dataset_name: str¶
- experiment_id: str | None¶
Optional experiment ID. If provided, items will be added to the existing experiment and experimentName will be ignored. If not provided or experiment with that ID doesn’t exist, a new experiment will be created with the given experimentName
- project_name: str | None¶
Project for traces auto-created from items that provide evaluate_task_result (i.e. without an explicit trace). If null, the default project is used; relying on this fallback is deprecated, please provide project_name explicitly.
- items: List[ExperimentItemBulkRecord]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemCompare(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScoreCompare] | None = None, comments: List[CommentCompare] | None = None, total_estimated_cost: float | None = None, duration: float | None = None, usage: Dict[str, int] | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, description: str | None = None, execution_policy: ExecutionPolicyCompare | None = None, assertion_results: List[AssertionResultCompare] | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- experiment_id: str¶
- dataset_item_id: str¶
- trace_id: str¶
- project_id: str | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- feedback_scores: List[FeedbackScoreCompare] | None¶
- comments: List[CommentCompare] | None¶
- total_estimated_cost: float | None¶
- duration: float | None¶
- usage: Dict[str, int] | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- trace_visibility_mode: Literal['default', 'hidden'] | Any | None¶
- description: str | None¶
- execution_policy: ExecutionPolicyCompare | None¶
- assertion_results: List[AssertionResultCompare] | None¶
- status: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemPublic(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- experiment_id: str¶
- dataset_item_id: str¶
- trace_id: str¶
- project_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- trace_visibility_mode: Literal['default', 'hidden'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemReference(*, id: str, name: str, dataset_id: str, dataset_item_id: str, **extra_data: Any)¶
Bases:
UniversalBaseModelExperiment reference with ID, name, dataset ID, and dataset item ID
- id: str¶
Experiment ID
- name: str¶
Experiment name
- dataset_id: str¶
Dataset ID
- dataset_item_id: str¶
Dataset Item ID
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentItemReferencePublic(*, id: str, name: str, dataset_id: str, dataset_item_id: str, **extra_data: Any)¶
Bases:
UniversalBaseModelExperiment reference with ID, name, dataset ID, and dataset item ID
- id: str¶
Experiment ID
- name: str¶
Experiment name
- dataset_id: str¶
Dataset ID
- dataset_item_id: str¶
Dataset Item ID
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ExperimentPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc562b70>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[ExperimentPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc562b70>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentPublic(*, id: str | None = None, dataset_name: str | None = None, dataset_id: str | None = None, project_id: str | None = None, project_name: str | None = None, name: str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None = None, evaluation_method: Literal['dataset', 'evaluation_suite'] | Any | None = None, optimization_id: str | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, comments: List[CommentPublic] | None = None, trace_count: int | None = None, dataset_item_count: int | None = None, created_at: datetime | None = None, duration: PercentageValuesPublic | None = None, total_estimated_cost: float | None = None, total_estimated_cost_avg: float | None = None, usage: Dict[str, float] | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, status: Literal['running', 'completed', 'cancelled', 'failed'] | Any | None = None, finished_at: datetime | None = None, experiment_scores: List[ExperimentScorePublic] | None = None, prompt_version: PromptVersionLinkPublic | None = None, prompt_versions: List[PromptVersionLinkPublic] | None = None, dataset_version_id: str | None = None, dataset_version_summary: DatasetVersionSummaryPublic | None = None, pass_rate: float | None = None, passed_count: int | None = None, total_count: int | None = None, assertion_scores: List[AssertionScoreAveragePublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- dataset_name: str | None¶
- dataset_id: str | None¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- project_name: str | None¶
Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.
- name: str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- tags: List[str] | None¶
- type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None¶
- evaluation_method: Literal['dataset', 'evaluation_suite'] | Any | None¶
- optimization_id: str | None¶
- feedback_scores: List[FeedbackScoreAveragePublic] | None¶
- comments: List[CommentPublic] | None¶
- trace_count: int | None¶
- dataset_item_count: int | None¶
- created_at: datetime | None¶
- duration: PercentageValuesPublic | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_avg: float | None¶
- usage: Dict[str, float] | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- status: Literal['running', 'completed', 'cancelled', 'failed'] | Any | None¶
- finished_at: datetime | None¶
When the run stopped producing items. Unset while it may still produce more, whatever its status
- experiment_scores: List[ExperimentScorePublic] | None¶
- prompt_version: PromptVersionLinkPublic | None¶
- prompt_versions: List[PromptVersionLinkPublic] | None¶
- dataset_version_id: str | None¶
ID of the dataset version this experiment is linked to. If not provided at creation, experiment will be automatically linked to the latest version.
- dataset_version_summary: DatasetVersionSummaryPublic | None¶
- pass_rate: float | None¶
Pass rate for test suite experiments (0.0-1.0). Null for regular experiments.
- passed_count: int | None¶
Number of items that passed for test suite experiments. Null for regular experiments.
- total_count: int | None¶
Total number of items for test suite experiments. Null for regular experiments.
- assertion_scores: List[AssertionScoreAveragePublic] | None¶
Per-assertion average pass rates for test suite experiments. Null for regular experiments.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentRunSummary(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- passed_runs: int | None¶
- total_runs: int | None¶
- status: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentRunSummaryCompare(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- passed_runs: int | None¶
- total_runs: int | None¶
- status: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentRunSummaryPublic(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- passed_runs: int | None¶
- total_runs: int | None¶
- status: Literal['passed', 'failed'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentScore(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentScorePublic(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentScoreWrite(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ExperimentUpdate(*, name: str | None = None, metadata: Dict[str, Any | None] | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None = None, status: Literal['running', 'completed', 'cancelled', 'failed'] | Any | None = None, experiment_scores: List[ExperimentScore] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- metadata: Dict[str, Any | None] | None¶
- tags: List[str] | None¶
Tags
- tags_to_add: List[str] | None¶
Tags to add
- tags_to_remove: List[str] | None¶
Tags to remove
- type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None¶
- status: Literal['running', 'completed', 'cancelled', 'failed'] | Any | None¶
The status of the experiment
- experiment_scores: List[ExperimentScore] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackCreate_Boolean(*, id: str | None = None, name: str, description: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['boolean']¶
- details: Optional[BooleanFeedbackDetailCreate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackCreate_Categorical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['categorical']¶
- details: Optional[CategoricalFeedbackDetailCreate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackCreate_Numerical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['numerical']¶
- details: Optional[NumericalFeedbackDetailCreate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackDefinitionPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[FeedbackObjectPublic_Numerical | FeedbackObjectPublic_Categorical | FeedbackObjectPublic_Boolean] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[FeedbackObjectPublic_Numerical | FeedbackObjectPublic_Categorical | FeedbackObjectPublic_Boolean] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackObjectPublic_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['boolean']¶
- details: Optional[BooleanFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackObjectPublic_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['categorical']¶
- details: Optional[CategoricalFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackObjectPublic_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['numerical']¶
- details: Optional[NumericalFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackPublic_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['boolean']¶
- details: Optional[BooleanFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackPublic_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['categorical']¶
- details: Optional[CategoricalFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackPublic_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['numerical']¶
- details: Optional[NumericalFeedbackDetailPublic]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScore(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntry] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- value_by_author: Dict[str, ValueEntry] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreAverage(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreAverageDetailed(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreAveragePublic(*, name: str, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreBatch(*, scores: List[FeedbackScoreBatchItem], **extra_data: Any)¶
Bases:
UniversalBaseModel- scores: List[FeedbackScoreBatchItem]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreBatchItem(*, project_name: str | None = None, project_id: str | None = None, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, author: str | None = None, source_queue_id: str | None = None, id: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_name: str | None¶
If null, the default project is used
- project_id: str | None¶
- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- author: str | None¶
- source_queue_id: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreBatchItemThread(*, project_name: str | None = None, project_id: str | None = None, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, author: str | None = None, source_queue_id: str | None = None, thread_id: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_name: str | None¶
If null, the default project is used
- project_id: str | None¶
- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- author: str | None¶
- source_queue_id: str | None¶
- thread_id: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreCompare(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryCompare] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- value_by_author: Dict[str, ValueEntryCompare] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreExperimentItemBulkWriteView(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryExperimentItemBulkWriteView] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- value_by_author: Dict[str, ValueEntryExperimentItemBulkWriteView] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreNames(*, scores: List[ScoreName] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScoreNamesPublic(*, scores: List[ScoreNamePublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- scores: List[ScoreNamePublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackScorePublic(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelAggregated feedback scores from all spans in this trace, averaged by score name
- name: str¶
- category_name: str | None¶
- value: float¶
- reason: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any¶
- source_queue_id: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- created_by: str | None¶
- last_updated_by: str | None¶
- value_by_author: Dict[str, ValueEntryPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackUpdate_Boolean(*, id: str | None = None, name: str, description: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['boolean']¶
- details: Optional[BooleanFeedbackDetailUpdate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackUpdate_Categorical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['categorical']¶
- details: Optional[CategoricalFeedbackDetailUpdate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FeedbackUpdate_Numerical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['numerical']¶
- details: Optional[NumericalFeedbackDetailUpdate]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Feedback_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetail | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['boolean']¶
- details: Optional[BooleanFeedbackDetail]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Feedback_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetail | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['categorical']¶
- details: Optional[CategoricalFeedbackDetail]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Feedback_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetail | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['numerical']¶
- details: Optional[NumericalFeedbackDetail]¶
- created_at: Optional[dt.datetime]¶
- created_by: Optional[str]¶
- last_updated_at: Optional[dt.datetime]¶
- last_updated_by: Optional[str]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FlagParam(*, accepted: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- accepted: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Function(*, name: str | None = None, description: str | None = None, strict: bool | None = None, parameters: Dict[str, Dict[str, Any | None]] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- description: str | None¶
- strict: bool | None¶
- parameters: Dict[str, Dict[str, Any | None]] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.FunctionCall(*, name: str | None = None, arguments: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- arguments: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GenerateReportResponse(*, report_id: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc468870>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModelResponse for report generation trigger
- report_id: FieldMetadata object at 0x7725dc468870>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GroupContent(*, label: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- label: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GroupContentWithAggregations(*, label: str | None = None, aggregations: AggregationData | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- label: str | None¶
- aggregations: AggregationData | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GroupDetail(*, group_sorting: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- group_sorting: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GroupDetails(*, groups_details: List[GroupDetail] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- groups_details: List[GroupDetail] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Guardrail(*, id: str | None = None, entity_id: str, secondary_id: str, project_name: str | None = None, project_id: str | None = None, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, result: Literal['passed', 'failed'] | Any, config: Dict[str, Any | None], details: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- entity_id: str¶
- secondary_id: str¶
- project_name: str | None¶
If null, the default project is used
- project_id: str | None¶
- name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- result: Literal['passed', 'failed'] | Any¶
- config: Dict[str, Any | None]¶
- details: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailBatch(*, guardrails: List[Guardrail], **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicy(*, id: str | None = None, name: str, description: str | None = None, execution_scope: Literal['on_request', 'global'] | Any | None = None, rules: List[GuardrailPolicyRule], created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Optional on create, generated when missing, as for prompts and datasets. Ignored on update, where the path names the policy
- name: str¶
The SDK names policies by name, so it is unique in the workspace, ignoring case
- description: str | None¶
- execution_scope: Literal['on_request', 'global'] | Any | None¶
on_request applies the policy when the SDK names it, global applies it to every guardrail built from stored policies in the workspace. Missing or null means on_request
- rules: List[GuardrailPolicyRule]¶
At most one rule per type
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyPagePublic(*, content: List[GuardrailPolicyPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, sortable_by: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[GuardrailPolicyPublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- sortable_by: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyPublic(*, id: str | None = None, name: str, description: str | None = None, execution_scope: Literal['on_request', 'global'] | Any | None = None, rules: List[GuardrailPolicyRulePublic], created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Optional on create, generated when missing, as for prompts and datasets. Ignored on update, where the path names the policy
- name: str¶
The SDK names policies by name, so it is unique in the workspace, ignoring case
- description: str | None¶
- execution_scope: Literal['on_request', 'global'] | Any | None¶
on_request applies the policy when the SDK names it, global applies it to every guardrail built from stored policies in the workspace. Missing or null means on_request
- rules: List[GuardrailPolicyRulePublic]¶
At most one rule per type
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyRule(*, type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModelAt most one rule per type
- type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyRulePublic(*, type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModelAt most one rule per type
- type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyRuleWrite(*, type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModelAt most one rule per type
- type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailPolicyWrite(*, id: str | None = None, name: str, description: str | None = None, execution_scope: Literal['on_request', 'global'] | Any | None = None, rules: List[GuardrailPolicyRuleWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
Optional on create, generated when missing, as for prompts and datasets. Ignored on update, where the path names the policy
- name: str¶
The SDK names policies by name, so it is unique in the workspace, ignoring case
- description: str | None¶
- execution_scope: Literal['on_request', 'global'] | Any | None¶
on_request applies the policy when the SDK names it, global applies it to every guardrail built from stored policies in the workspace. Missing or null means on_request
- rules: List[GuardrailPolicyRuleWrite]¶
At most one rule per type
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailWrite(*, entity_id: str, secondary_id: str, project_name: str | None = None, project_id: str | None = None, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, result: Literal['passed', 'failed'] | Any, config: Dict[str, Any | None], details: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- entity_id: str¶
- secondary_id: str¶
- project_name: str | None¶
If null, the default project is used
- project_id: str | None¶
- name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- result: Literal['passed', 'failed'] | Any¶
- config: Dict[str, Any | None]¶
- details: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailsValidation(*, span_id: str | None = None, checks: List[Check] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- span_id: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailsValidationPublic(*, span_id: str | None = None, checks: List[CheckPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- span_id: str | None¶
- checks: List[CheckPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.GuardrailsValidationResponse(*, validation_passed: bool | None = None, validations: List[ValidationResult], **extra_data: Any)¶
Bases:
UniversalBaseModel- validation_passed: bool | None¶
- validations: List[ValidationResult]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ImageUrl(*, url: str, detail: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- detail: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ImageUrlPublic(*, url: str, detail: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- detail: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ImageUrlWrite(*, url: str, detail: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- detail: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ItemLockInfo(*, active_locks: int | None = None, locked_by: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- active_locks: int | None¶
- locked_by: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.JsonSchema(*, name: str | None = None, strict: bool | None = None, schema_: Dict[str, ~typing.Dict[str, ~typing.Any | None]] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc46b340>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- strict: bool | None¶
- schema_: FieldMetadata object at 0x7725dc46b340>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.KpiCardResponse(*, stats: List[KpiMetric] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.KpiMetric(*, type: Literal['count', 'errors', 'avg_duration', 'total_cost'] | Any | None = None, current_value: float | None = None, previous_value: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: Literal['count', 'errors', 'avg_duration', 'total_cost'] | Any | None¶
- current_value: float | None¶
count is an integer count; errors is a percentage in [0, 100]; avg_duration is milliseconds; total_cost is in USD.
- Type:
Metric value for the current period. Unit depends on type
- previous_value: float | None¶
Metric value for the immediately preceding period of equal length. Same unit as current_value.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcd5e990>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- model: LlmAsJudgeModelParameters¶
- messages: List[LlmAsJudgeMessage]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dcd5e990>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc951020>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessagePublic]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dc951020>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcaf65d0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessageWrite]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dcaf65d0>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessage(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContent] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any¶
- content: str | None¶
- content_array: List[LlmAsJudgeMessageContent] | None¶
- string_content: bool | None¶
- structured_content: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessageContent(*, type: str, text: str | None = None, image_url: ImageUrl | None = None, video_url: VideoUrl | None = None, audio_url: AudioUrl | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- text: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessageContentPublic(*, type: str, text: str | None = None, image_url: ImageUrlPublic | None = None, video_url: VideoUrlPublic | None = None, audio_url: AudioUrlPublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- text: str | None¶
- image_url: ImageUrlPublic | None¶
- video_url: VideoUrlPublic | None¶
- audio_url: AudioUrlPublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessageContentWrite(*, type: str, text: str | None = None, image_url: ImageUrlWrite | None = None, video_url: VideoUrlWrite | None = None, audio_url: AudioUrlWrite | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- text: str | None¶
- image_url: ImageUrlWrite | None¶
- video_url: VideoUrlWrite | None¶
- audio_url: AudioUrlWrite | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessagePublic(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContentPublic] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any¶
- content: str | None¶
- content_array: List[LlmAsJudgeMessageContentPublic] | None¶
- string_content: bool | None¶
- structured_content: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeMessageWrite(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContentWrite] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any¶
- content: str | None¶
- content_array: List[LlmAsJudgeMessageContentWrite] | None¶
- string_content: bool | None¶
- structured_content: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeModelParameters(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, api: Literal['decisions'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- temperature: float | None¶
- seed: int | None¶
- custom_parameters: Dict[str, Any | None] | None¶
- api: Literal['decisions'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeModelParametersPublic(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, api: Literal['decisions'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- temperature: float | None¶
- seed: int | None¶
- custom_parameters: Dict[str, Any | None] | None¶
- api: Literal['decisions'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeModelParametersWrite(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, api: Literal['decisions'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- temperature: float | None¶
- seed: int | None¶
- custom_parameters: Dict[str, Any | None] | None¶
- api: Literal['decisions'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeOutputSchema(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any¶
- description: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeOutputSchemaPublic(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any¶
- description: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LlmAsJudgeOutputSchemaWrite(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any¶
- description: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunner(*, id: str | None = None, name: str | None = None, project_id: str | None = None, status: Literal['pairing', 'connected', 'disconnected'] | Any | None = None, connected_at: datetime | None = None, agents: List[Agent] | None = None, capabilities: List[str] | None = None, checklist: Dict[str, Any | None] | None = None, type: Literal['connect', 'endpoint'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- project_id: str | None¶
- status: Literal['pairing', 'connected', 'disconnected'] | Any | None¶
- connected_at: datetime | None¶
- capabilities: List[str] | None¶
- checklist: Dict[str, Any | None] | None¶
- type: Literal['connect', 'endpoint'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerHeartbeatResponse(*, cancelled_job_ids: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- cancelled_job_ids: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerJob(*, id: str | None = None, runner_id: str | None = None, agent_name: str | None = None, status: Literal['pending', 'running', 'completed', 'failed', 'cancelled'] | Any | None = None, inputs: Dict[str, Any | None] | None = None, result: Dict[str, Any | None] | None = None, error: str | None = None, project_id: str | None = None, trace_id: str | None = None, mask_id: str | None = None, prompt_masks: Dict[str, str] | None = None, blueprint_name: str | None = None, metadata: LocalRunnerJobMetadata | None = None, timeout: int | None = None, created_at: datetime | None = None, started_at: datetime | None = None, completed_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- runner_id: str | None¶
- agent_name: str | None¶
- status: Literal['pending', 'running', 'completed', 'failed', 'cancelled'] | Any | None¶
- inputs: Dict[str, Any | None] | None¶
- result: Dict[str, Any | None] | None¶
- error: str | None¶
- project_id: str | None¶
- trace_id: str | None¶
- mask_id: str | None¶
Deprecated. Use prompt_masks to read one or more mask overlays keyed by prompt id.
- prompt_masks: Dict[str, str] | None¶
Mask overlays to apply during agent execution, keyed by prompt id.
- blueprint_name: str | None¶
- metadata: LocalRunnerJobMetadata | None¶
- timeout: int | None¶
- created_at: datetime | None¶
- started_at: datetime | None¶
- completed_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerJobMetadata(*, dataset_id: str | None = None, dataset_version_id: str | None = None, dataset_item_version_id: str | None = None, dataset_item_id: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_id: str | None¶
- dataset_version_id: str | None¶
- dataset_item_version_id: str | None¶
- dataset_item_id: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerJobPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[LocalRunnerJob] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[LocalRunnerJob] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerLogEntry(*, stream: str, text: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- stream: str¶
- text: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocalRunnerPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[LocalRunner] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[LocalRunner] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LockResponse(*, acquired: bool | None = None, item_id: str | None = None, locked_by: str | None = None, expires_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- acquired: bool | None¶
- item_id: str | None¶
- locked_by: str | None¶
- expires_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LocksResponse(*, locks: Dict[str, ItemLockInfo] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- locks: Dict[str, ItemLockInfo] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LogItem(*, timestamp: datetime | None = None, rule_id: str | None = None, level: Literal['INFO', 'WARN', 'ERROR', 'DEBUG', 'TRACE'] | Any | None = None, message: str | None = None, markers: Dict[str, str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- timestamp: datetime | None¶
- rule_id: str | None¶
- level: Literal['INFO', 'WARN', 'ERROR', 'DEBUG', 'TRACE'] | Any | None¶
- message: str | None¶
- markers: Dict[str, str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LogPage(*, content: List[LogItem] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LogProb(*, token: str | None = None, logprob: float | None = None, bytes: List[int] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- token: str | None¶
- logprob: float | None¶
- bytes: List[int] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.LogProbs(*, content: List[LogProb] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ManualEvaluationRequest(*, project_id: str, entity_ids: List[str], rule_ids: List[str], entity_type: Literal['trace', 'thread', 'span'] | Any, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str¶
Project ID
- entity_ids: List[str]¶
List of entity IDs (trace IDs or thread IDs) to evaluate
- rule_ids: List[str]¶
List of automation rule IDs to apply
- entity_type: Literal['trace', 'thread', 'span'] | Any¶
Type of entity to evaluate (trace or thread)
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ManualEvaluationResponse(*, entities_queued: int | None = None, rules_applied: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- entities_queued: int | None¶
Number of entities queued for evaluation
- rules_applied: int | None¶
Number of rules that will be applied
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Message(*, role: str, content: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModel- role: str¶
- content: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ModelParams(*, temperature: NumberParam | None = None, top_p: NumberParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6df0>]=None, top_k: NumberParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd1d0>]=None, frequency_penalty: NumberParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd220>]=None, presence_penalty: NumberParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6ee0>]=None, max_output_tokens: NumberParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6f30>]=None, stop: FlagParam | None = None, seed: FlagParam | None = None, effort: EffortParam | None = None, tools: ToolsParam | None = None, sampling_exclusive: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6e40>]=None, thinks_by_default: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bd450>]=None, only_route: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6f80>]=None, routes: Dict[str, ~opik.rest_api.types.model_params.ModelParams] | None=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- temperature: Optional[NumberParam]¶
- top_p: typing_extensions.Annotated[Optional[NumberParam], FieldMetadata(alias='topP')]¶
- top_k: typing_extensions.Annotated[Optional[NumberParam], FieldMetadata(alias='topK')]¶
- frequency_penalty: typing_extensions.Annotated[Optional[NumberParam], FieldMetadata(alias='frequencyPenalty')]¶
- presence_penalty: typing_extensions.Annotated[Optional[NumberParam], FieldMetadata(alias='presencePenalty')]¶
- max_output_tokens: typing_extensions.Annotated[Optional[NumberParam], FieldMetadata(alias='maxOutputTokens')]¶
- effort: Optional[EffortParam]¶
- tools: Optional[ToolsParam]¶
- sampling_exclusive: typing_extensions.Annotated[Optional[bool], FieldMetadata(alias='samplingExclusive')]¶
- thinks_by_default: typing_extensions.Annotated[Optional[bool], FieldMetadata(alias='thinksByDefault')]¶
- only_route: typing_extensions.Annotated[Optional[str], FieldMetadata(alias='onlyRoute')]¶
- routes: Optional[Dict[str, 'ModelParams']]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.MultipartUploadPart(*, e_tag: str, part_number: int, **extra_data: Any)¶
Bases:
UniversalBaseModel- e_tag: str¶
- part_number: int¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumberParam(*, accepted: bool | None = None, min: float | None = None, max: float | None = None, default: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- accepted: bool | None¶
- min: float | None¶
- max: float | None¶
- default: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDefinition(*, details: NumericalFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: NumericalFeedbackDetail | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDefinitionCreate(*, details: NumericalFeedbackDetailCreate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: NumericalFeedbackDetailCreate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDefinitionPublic(*, details: NumericalFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: NumericalFeedbackDetailPublic | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDefinitionUpdate(*, details: NumericalFeedbackDetailUpdate | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- details: NumericalFeedbackDetailUpdate | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDetail(*, max: float, min: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- max: float¶
- min: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDetailCreate(*, max: float, min: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- max: float¶
- min: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDetailPublic(*, max: float, min: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- max: float¶
- min: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.NumericalFeedbackDetailUpdate(*, max: float, min: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- max: float¶
- min: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OAuthError(*, error: str | None = None, error_description: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- error: str | None¶
- error_description: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OllamaConnectionTestResponse(*, connected: bool | None = None, version: str | None = None, error_message: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelResponse from Ollama connection test.
- connected: bool | None¶
Whether the connection was successful
- version: str | None¶
Server version (returned even if connection failed or version is incompatible)
- error_message: str | None¶
Error message if connection failed
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OllamaInstanceBaseUrlRequest(*, base_url: str, api_key: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelRequest with Ollama instance base URL for connection testing or model discovery.
- base_url: str¶
Base URL of the Ollama instance. May include /v1 suffix which will be automatically removed for connection testing. For inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.
- api_key: str | None¶
Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OllamaModel(*, name: str, size: int | None = None, digest: str | None = None, modified_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelOllama model information
- name: str¶
Model name
- size: int | None¶
Model size in bytes
- digest: str | None¶
Model digest/hash
- modified_at: datetime | None¶
Model modification date
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OllieReport(*, id: str | None = None, project_id: str | None = None, session_id: str | None = None, content: str | None = None, recommended_actions: Dict[str, Any | None] | None = None, status: Literal['pending', 'completed', 'failed'] | Any | None = None, failure_reason: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str | None¶
- session_id: str | None¶
- content: str | None¶
- recommended_actions: Dict[str, Any | None] | None¶
- status: Literal['pending', 'completed', 'failed'] | Any | None¶
- failure_reason: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OllieReportPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[OllieReport] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[OllieReport] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Optimization(*, id: str | None = None, name: str | None = None, dataset_name: str, project_name: str | None = None, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfig | None = None, error_info: ErrorInfo | None = None, dataset_id: str | None = None, num_trials: int | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, experiment_scores: List[FeedbackScoreAverage] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, baseline_objective_score: float | None = None, best_objective_score: float | None = None, baseline_duration: float | None = None, best_duration: float | None = None, baseline_cost: float | None = None, best_cost: float | None = None, total_optimization_cost: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- dataset_name: str¶
- project_name: str | None¶
Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- objective_name: str¶
- status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- studio_config: OptimizationStudioConfig | None¶
- dataset_id: str | None¶
- num_trials: int | None¶
- feedback_scores: List[FeedbackScoreAverage] | None¶
- experiment_scores: List[FeedbackScoreAverage] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- baseline_objective_score: float | None¶
- best_objective_score: float | None¶
- baseline_duration: float | None¶
- best_duration: float | None¶
- baseline_cost: float | None¶
- best_cost: float | None¶
- total_optimization_cost: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[OptimizationPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc32e2b0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[OptimizationPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc32e2b0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationPublic(*, id: str | None = None, name: str | None = None, dataset_name: str, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfigPublic | None = None, error_info: ErrorInfoPublic | None = None, dataset_id: str | None = None, num_trials: int | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, experiment_scores: List[FeedbackScoreAveragePublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, baseline_objective_score: float | None = None, best_objective_score: float | None = None, baseline_duration: float | None = None, best_duration: float | None = None, baseline_cost: float | None = None, best_cost: float | None = None, total_optimization_cost: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- dataset_name: str¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- objective_name: str¶
- status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- studio_config: OptimizationStudioConfigPublic | None¶
- error_info: ErrorInfoPublic | None¶
- dataset_id: str | None¶
- num_trials: int | None¶
- feedback_scores: List[FeedbackScoreAveragePublic] | None¶
- experiment_scores: List[FeedbackScoreAveragePublic] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- baseline_objective_score: float | None¶
- best_objective_score: float | None¶
- baseline_duration: float | None¶
- best_duration: float | None¶
- baseline_cost: float | None¶
- best_cost: float | None¶
- total_optimization_cost: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationStudioConfig(*, dataset_name: str, prompt: StudioPrompt, llm_model: StudioLlmModel, evaluation: StudioEvaluation, optimizer: StudioOptimizer, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_name: str¶
- prompt: StudioPrompt¶
- llm_model: StudioLlmModel¶
- evaluation: StudioEvaluation¶
- optimizer: StudioOptimizer¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationStudioConfigPublic(*, dataset_name: str, prompt: StudioPromptPublic, llm_model: StudioLlmModelPublic, evaluation: StudioEvaluationPublic, optimizer: StudioOptimizerPublic, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_name: str¶
- prompt: StudioPromptPublic¶
- llm_model: StudioLlmModelPublic¶
- evaluation: StudioEvaluationPublic¶
- optimizer: StudioOptimizerPublic¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationStudioConfigWrite(*, dataset_name: str, prompt: StudioPromptWrite, llm_model: StudioLlmModelWrite, evaluation: StudioEvaluationWrite, optimizer: StudioOptimizerWrite, **extra_data: Any)¶
Bases:
UniversalBaseModel- dataset_name: str¶
- prompt: StudioPromptWrite¶
- llm_model: StudioLlmModelWrite¶
- evaluation: StudioEvaluationWrite¶
- optimizer: StudioOptimizerWrite¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationStudioLog(*, url: str | None = None, last_modified: datetime | None = None, expires_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str | None¶
- last_modified: datetime | None¶
- expires_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.OptimizationWrite(*, id: str | None = None, name: str | None = None, dataset_name: str, project_name: str | None = None, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfigWrite | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- dataset_name: str¶
- project_name: str | None¶
Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- objective_name: str¶
- status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- studio_config: OptimizationStudioConfigWrite | None¶
- error_info: ErrorInfoWrite | None¶
- last_updated_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PageColumns(*, columns: List[Column] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Param(*, name: str, type: str, presence: Literal['required', 'optional'] | Any | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str¶
- type: str¶
- presence: Literal['required', 'optional'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PercentageValueStatPublic(*, value: PercentageValuesPublic | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: PercentageValuesPublic | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PercentageValues(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- p50: float | None¶
- p90: float | None¶
- p99: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PercentageValuesDetailed(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- p50: float | None¶
- p90: float | None¶
- p99: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PercentageValuesPublic(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- p50: float | None¶
- p90: float | None¶
- p99: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Permission(*, permission_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc390fa0>]=None, permission_value: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc8bdcc0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- permission_name: FieldMetadata object at 0x7725dc390fa0>]¶
- permission_value: FieldMetadata object at 0x7725dc8bdcc0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectDetailed(*, id: str | None = None, name: str, visibility: Literal['private', 'public'] | Any | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, last_updated_trace_at: datetime | None = None, feedback_scores: List[FeedbackScoreAverageDetailed] | None = None, duration: PercentageValuesDetailed | None = None, total_estimated_cost: float | None = None, total_estimated_cost_sum: float | None = None, usage: Dict[str, float] | None = None, trace_count: int | None = None, thread_count: int | None = None, guardrails_failed_count: int | None = None, error_count: ErrorCountWithDeviationDetailed | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- visibility: Literal['private', 'public'] | Any | None¶
- description: str | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_trace_at: datetime | None¶
- feedback_scores: List[FeedbackScoreAverageDetailed] | None¶
- duration: PercentageValuesDetailed | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_sum: float | None¶
- usage: Dict[str, float] | None¶
- trace_count: int | None¶
- thread_count: int | None¶
- guardrails_failed_count: int | None¶
- error_count: ErrorCountWithDeviationDetailed | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectMetricResponsePublic(*, project_id: str | None = None, metric_type: Literal['FEEDBACK_SCORES', 'TRACE_COUNT', 'TOKEN_USAGE', 'DURATION', 'COST', 'GUARDRAILS_FAILED_COUNT', 'THREAD_COUNT', 'THREAD_DURATION', 'THREAD_FEEDBACK_SCORES', 'SPAN_FEEDBACK_SCORES', 'SPAN_COUNT', 'SPAN_DURATION', 'SPAN_TOKEN_USAGE', 'TRACE_AVERAGE_DURATION', 'TRACE_ERROR_RATE', 'SPAN_AVERAGE_DURATION', 'SPAN_COST', 'SPAN_ERROR_RATE', 'THREAD_AVERAGE_DURATION', 'THREAD_COST'] | Any | None = None, interval: Literal['HOURLY', 'DAILY', 'WEEKLY', 'TOTAL'] | Any | None = None, results: List[ResultsNumberPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str | None¶
- metric_type: Literal['FEEDBACK_SCORES', 'TRACE_COUNT', 'TOKEN_USAGE', 'DURATION', 'COST', 'GUARDRAILS_FAILED_COUNT', 'THREAD_COUNT', 'THREAD_DURATION', 'THREAD_FEEDBACK_SCORES', 'SPAN_FEEDBACK_SCORES', 'SPAN_COUNT', 'SPAN_DURATION', 'SPAN_TOKEN_USAGE', 'TRACE_AVERAGE_DURATION', 'TRACE_ERROR_RATE', 'SPAN_AVERAGE_DURATION', 'SPAN_COST', 'SPAN_ERROR_RATE', 'THREAD_AVERAGE_DURATION', 'THREAD_COST'] | Any | None¶
- interval: Literal['HOURLY', 'DAILY', 'WEEKLY', 'TOTAL'] | Any | None¶
- results: List[ResultsNumberPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ProjectPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc3924e0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[ProjectPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc3924e0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectPublic(*, id: str | None = None, name: str, visibility: Literal['private', 'public'] | Any | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, last_updated_trace_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- visibility: Literal['private', 'public'] | Any | None¶
- description: str | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_trace_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectReference(*, project_id: str, project_name: str, **extra_data: Any)¶
Bases:
UniversalBaseModelProject reference with ID and name
- project_id: str¶
Project ID
- project_name: str¶
Project name
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectReferencePublic(*, project_id: str, project_name: str, **extra_data: Any)¶
Bases:
UniversalBaseModelProject reference with ID and name
- project_id: str¶
Project ID
- project_name: str¶
Project name
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatItemObjectPublic_Avg(*, name: str | None = None, type: Literal['AVG'] = 'AVG', value: float | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['AVG']¶
- value: Optional[float]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatItemObjectPublic_Count(*, name: str | None = None, type: Literal['COUNT'] = 'COUNT', value: int | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['COUNT']¶
- value: Optional[int]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatItemObjectPublic_Percentage(*, name: str | None = None, type: Literal['PERCENTAGE'] = 'PERCENTAGE', value: PercentageValuesPublic | None = None, **extra_data: Any)¶
Bases:
Base- type: Literal['PERCENTAGE']¶
- value: Optional[PercentageValuesPublic]¶
- model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatsPublic(*, stats: List[ProjectStatItemObjectPublic_Percentage | ProjectStatItemObjectPublic_Count | ProjectStatItemObjectPublic_Avg] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- stats: List[ProjectStatItemObjectPublic_Percentage | ProjectStatItemObjectPublic_Count | ProjectStatItemObjectPublic_Avg] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatsSummary(*, content: List[ProjectStatsSummaryItem] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[ProjectStatsSummaryItem] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProjectStatsSummaryItem(*, project_id: str | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, duration: PercentageValues | None = None, total_estimated_cost: float | None = None, total_estimated_cost_sum: float | None = None, usage: Dict[str, float] | None = None, trace_count: int | None = None, thread_count: int | None = None, guardrails_failed_count: int | None = None, error_count: ErrorCountWithDeviation | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str | None¶
- feedback_scores: List[FeedbackScoreAverage] | None¶
- duration: PercentageValues | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_sum: float | None¶
- usage: Dict[str, float] | None¶
- trace_count: int | None¶
- thread_count: int | None¶
- guardrails_failed_count: int | None¶
- error_count: ErrorCountWithDeviation | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptCacheOptions(*, mode: str | None = None, ttl: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- mode: str | None¶
- ttl: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptDetail(*, id: str | None = None, name: str, project_id: str | None = None, description: str | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, tags: List[str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, version_count: int | None = None, latest_version: PromptVersionDetail | None = None, requested_version: PromptVersionDetail | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- description: str | None¶
- template_structure: Literal['text', 'chat'] | Any | None¶
‘text’ or ‘chat’. Immutable after creation.
- Type:
Template structure type
- tags: List[str] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- version_count: int | None¶
- latest_version: PromptVersionDetail | None¶
- requested_version: PromptVersionDetail | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[PromptPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc20cb90>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[PromptPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc20cb90>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptPublic(*, id: str | None = None, name: str, project_id: str | None = None, description: str | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, tags: List[str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, version_count: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- project_id: str | None¶
Project ID. Takes precedence over project_name when both are provided.
- description: str | None¶
- template_structure: Literal['text', 'chat'] | Any | None¶
‘text’ or ‘chat’. Immutable after creation.
- Type:
Template structure type
- tags: List[str] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- version_count: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptTokensDetails(*, cached_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735a40>]=None, cache_write_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735860>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- cached_tokens: FieldMetadata object at 0x7725dc735a40>]¶
- cache_write_tokens: FieldMetadata object at 0x7725dc735860>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVariant(*, model: str, messages: List[Message], configs: Dict[str, Dict[str, Any | None]] | None = None, prompt_versions: List[PromptVersionLink] | None = None, experiment_name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model: str¶
- configs: Dict[str, Dict[str, Any | None]] | None¶
- prompt_versions: List[PromptVersionLink] | None¶
- experiment_name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersion(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, variables: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
version unique identifier, generated if absent
- prompt_id: str | None¶
- commit: str | None¶
version short unique identifier, generated if absent. it must be 8 characters long
- version_number: str | None¶
sequential version number in the format v<N>; null for masks
- template: str¶
- metadata: Dict[str, Any | None] | None¶
- type: Literal['mustache', 'jinja2', 'python'] | Any | None¶
- version_type: Literal['prompt_version', 'mask'] | Any | None¶
version type discriminator; defaults to prompt_version
- environment: str | None¶
use ‘environments’ instead
- Type:
Deprecated
- environments: List[str] | None¶
- change_description: str | None¶
- tags: List[str] | None¶
- variables: List[str] | None¶
- template_structure: Literal['text', 'chat'] | Any | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionDetail(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, variables: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
version unique identifier, generated if absent
- prompt_id: str | None¶
- commit: str | None¶
version short unique identifier, generated if absent. it must be 8 characters long
- version_number: str | None¶
sequential version number in the format v<N>; null for masks
- template: str¶
- metadata: Dict[str, Any | None] | None¶
- type: Literal['mustache', 'jinja2', 'python'] | Any | None¶
- version_type: Literal['prompt_version', 'mask'] | Any | None¶
version type discriminator; defaults to prompt_version
- environment: str | None¶
use ‘environments’ instead
- Type:
Deprecated
- environments: List[str] | None¶
- change_description: str | None¶
- tags: List[str] | None¶
- variables: List[str] | None¶
- template_structure: Literal['text', 'chat'] | Any | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionLink(*, id: str, commit: str | None = None, version_number: str | None = None, prompt_id: str | None = None, prompt_name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str¶
- commit: str | None¶
- version_number: str | None¶
sequential version number in the format v<N>; null for masks
- prompt_id: str | None¶
- prompt_name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionLinkPublic(*, prompt_version_id: str | None = None, commit: str | None = None, prompt_id: str | None = None, prompt_name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- prompt_version_id: str | None¶
- commit: str | None¶
- prompt_id: str | None¶
- prompt_name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionLinkWrite(*, id: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[PromptVersionPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc20d2c0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[PromptVersionPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc20d2c0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionPublic(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
version unique identifier, generated if absent
- prompt_id: str | None¶
- commit: str | None¶
version short unique identifier, generated if absent. it must be 8 characters long
- version_number: str | None¶
sequential version number in the format v<N>; null for masks
- template: str¶
- metadata: Dict[str, Any | None] | None¶
- type: Literal['mustache', 'jinja2', 'python'] | Any | None¶
- version_type: Literal['prompt_version', 'mask'] | Any | None¶
version type discriminator; defaults to prompt_version
- environment: str | None¶
use ‘environments’ instead
- Type:
Deprecated
- environments: List[str] | None¶
- change_description: str | None¶
- tags: List[str] | None¶
- template_structure: Literal['text', 'chat'] | Any | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.PromptVersionUpdate(*, tags: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelUpdate to apply to prompt versions. Note: Prompt versions are immutable by design. Only organizational properties (such as tags etc.) can be updated. Core properties like template, metadata etc. cannot be modified after creation.
- tags: List[str] | None¶
Tags to set or merge with existing tags. Follows PATCH semantics: - If merge_tags is true, these tags will be added to existing tags. - If merge_tags is false, these tags will replace all existing tags. - null: preserve existing tags (no change). - empty set: clear all tags when merge_tags is false.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderApiKey(*, id: str | None = None, provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any, api_key: str | None = None, name: str | None = None, provider_name: str | None = None, headers: Dict[str, str] | None = None, configuration: Dict[str, str] | None = None, base_url: str | None = None, auth_config: ProviderAuthConfig | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, read_only: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any¶
- api_key: str | None¶
- name: str | None¶
- provider_name: str | None¶
Provider name - required for custom LLM and Bedrock providers to uniquely identify them (e.g., ‘ollama’, ‘vllm’, ‘Bedrock us-east-1’). Must not be blank for custom and Bedrock providers. Should not be set for standard providers (OpenAI, Anthropic, etc.). This requirement is conditional and validation is enforced programmatically.
- headers: Dict[str, str] | None¶
- configuration: Dict[str, str] | None¶
- base_url: str | None¶
- auth_config: ProviderAuthConfig | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- read_only: bool | None¶
If true, this provider is system-managed and cannot be edited or deleted
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderApiKeyPagePublic(*, size: int | None = None, total: int | None = None, content: List[ProviderApiKeyPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc20e670>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- size: int | None¶
- total: int | None¶
- content: List[ProviderApiKeyPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc20e670>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderApiKeyPublic(*, id: str | None = None, provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any, api_key: str | None = None, name: str | None = None, provider_name: str | None = None, headers: Dict[str, str] | None = None, configuration: Dict[str, str] | None = None, base_url: str | None = None, auth_config: ProviderAuthConfigPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, read_only: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any¶
- api_key: str | None¶
- name: str | None¶
- provider_name: str | None¶
Provider name - required for custom LLM and Bedrock providers to uniquely identify them (e.g., ‘ollama’, ‘vllm’, ‘Bedrock us-east-1’). Must not be blank for custom and Bedrock providers. Should not be set for standard providers (OpenAI, Anthropic, etc.). This requirement is conditional and validation is enforced programmatically.
- headers: Dict[str, str] | None¶
- configuration: Dict[str, str] | None¶
- base_url: str | None¶
- auth_config: ProviderAuthConfigPublic | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- read_only: bool | None¶
If true, this provider is system-managed and cannot be edited or deleted
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderAuthConfig(*, token_url: str | None = None, send_as: Literal['form', 'json', 'basic'] | Any | None = None, credentials: List[Credential] | None = None, token_field: str | None = None, expires_field: str | None = None, fallback_ttl_seconds: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelDynamic token auth recipe. Send the ‘__SECRET__’ sentinel as a credential value to keep the stored secret; send an empty object to clear the auth config.
- token_url: str | None¶
Auth service URL the credentials are sent to
- send_as: Literal['form', 'json', 'basic'] | Any | None¶
form body (default), JSON body, or basic auth (client_id/client_secret, or username/password, in an HTTP Basic header; remaining fields in the form body)
- Type:
How credentials are sent
- credentials: List[Credential] | None¶
they read back as the ‘__SECRET__’ sentinel
- Type:
Fields sent to the token URL. Values flagged as secret are write-only
- token_field: str | None¶
Field holding the token in the reply; dot-path for nested replies. A reply that is the bare token itself (plain text or a JSON string) is used as-is and needs fallback_ttl_seconds
- expires_field: str | None¶
Field holding the token lifetime in seconds in the reply; dot-path for nested replies
- fallback_ttl_seconds: int | None¶
Lifetime in seconds assumed when the reply doesn’t state one, capped at one year; 0 disables caching for such replies. A reply-stated lifetime always wins
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderAuthConfigPublic(*, token_url: str | None = None, send_as: Literal['form', 'json', 'basic'] | Any | None = None, credentials: List[CredentialPublic] | None = None, token_field: str | None = None, expires_field: str | None = None, fallback_ttl_seconds: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelDynamic token auth recipe. When set, Opik fetches a short-lived bearer from the configured auth service instead of using a static api_key. Only supported for custom providers. Secret credential values read back masked.
- token_url: str | None¶
Auth service URL the credentials are sent to
- send_as: Literal['form', 'json', 'basic'] | Any | None¶
form body (default), JSON body, or basic auth (client_id/client_secret, or username/password, in an HTTP Basic header; remaining fields in the form body)
- Type:
How credentials are sent
- credentials: List[CredentialPublic] | None¶
they read back as the ‘__SECRET__’ sentinel
- Type:
Fields sent to the token URL. Values flagged as secret are write-only
- token_field: str | None¶
Field holding the token in the reply; dot-path for nested replies. A reply that is the bare token itself (plain text or a JSON string) is used as-is and needs fallback_ttl_seconds
- expires_field: str | None¶
Field holding the token lifetime in seconds in the reply; dot-path for nested replies
- fallback_ttl_seconds: int | None¶
Lifetime in seconds assumed when the reply doesn’t state one, capped at one year; 0 disables caching for such replies. A reply-stated lifetime always wins
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ProviderAuthConfigWrite(*, token_url: str | None = None, send_as: Literal['form', 'json', 'basic'] | Any | None = None, credentials: List[CredentialWrite] | None = None, token_field: str | None = None, expires_field: str | None = None, fallback_ttl_seconds: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelDynamic token auth recipe. When set, Opik fetches a short-lived bearer from the configured auth service instead of using a static api_key. Only supported for custom providers. Secret credential values read back masked.
- token_url: str | None¶
Auth service URL the credentials are sent to
- send_as: Literal['form', 'json', 'basic'] | Any | None¶
form body (default), JSON body, or basic auth (client_id/client_secret, or username/password, in an HTTP Basic header; remaining fields in the form body)
- Type:
How credentials are sent
- credentials: List[CredentialWrite] | None¶
they read back as the ‘__SECRET__’ sentinel
- Type:
Fields sent to the token URL. Values flagged as secret are write-only
- token_field: str | None¶
Field holding the token in the reply; dot-path for nested replies. A reply that is the bare token itself (plain text or a JSON string) is used as-is and needs fallback_ttl_seconds
- expires_field: str | None¶
Field holding the token lifetime in seconds in the reply; dot-path for nested replies
- fallback_ttl_seconds: int | None¶
Lifetime in seconds assumed when the reply doesn’t state one, capped at one year; 0 disables caching for such replies. A reply-stated lifetime always wins
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.RecentActivityItemPublic(*, type: Literal['trace_daily', 'experiment', 'dataset_version', 'test_suite_version', 'alert_event', 'optimization', 'prompt_version'] | Any | None = None, id: str | None = None, name: str | None = None, resource_id: str | None = None, created_by: str | None = None, created_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: Literal['trace_daily', 'experiment', 'dataset_version', 'test_suite_version', 'alert_event', 'optimization', 'prompt_version'] | Any | None¶
- id: str | None¶
- name: str | None¶
- resource_id: str | None¶
- created_by: str | None¶
- created_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.RecentActivityPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[RecentActivityItemPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[RecentActivityItemPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ReportFailure(*, id: str | None = None, type: Literal['agent_insights'] | Any, project_id: str, reason: str, detail: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- type: Literal['agent_insights'] | Any¶
- project_id: str¶
- reason: str¶
- detail: str | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ReportFailurePage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ReportFailure] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[ReportFailure] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ReportPreference(*, project_id: str | None = None, enabled: bool | None = None, schedule_time: str | None = None, custom_prompt: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_id: str | None¶
- enabled: bool | None¶
- schedule_time: str | None¶
- custom_prompt: str | None¶
- created_at: datetime | None¶
- last_updated_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ReportedIssue(*, id: str | None = None, name: str, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, traces_query: str | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any, count: int, total_count: int, users_impacted: int, total_users: int, metadata: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str¶
- description: str | None¶
- cause: str | None¶
- suggested_fix: str | None¶
- traces_query: str | None¶
- severity: Literal['critical', 'high', 'medium', 'low'] | Any¶
- count: int¶
- total_count: int¶
- users_impacted: int¶
- total_users: int¶
- metadata: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Response(*, enrolled: int | None = None, cleared: int | None = None, unknown_project_ids: List[str] | None = None, already_run_project_ids: List[str] | None = None, reset_project_ids: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- enrolled: int | None¶
- cleared: int | None¶
- unknown_project_ids: List[str] | None¶
Ids that match no project
- already_run_project_ids: List[str] | None¶
Ids whose automatic run already happened, so enrolling has no effect
- reset_project_ids: List[str] | None¶
Ids whose automatic run never finished, so clearing forgot it and enrolling them again gives it one more free run
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ResponseFormat(*, type: Literal['text', 'json_object', 'json_schema'] | ~typing.Any | None=None, json_schema: JsonSchema | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc294280>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: Literal['text', 'json_object', 'json_schema'] | Any | None¶
- json_schema: FieldMetadata object at 0x7725dc294280>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Result(*, name: str | None = None, current: float | None = None, previous: float | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- current: float | None¶
- previous: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ResultsNumberPublic(*, name: str | None = None, data: List[DataPointNumberPublic] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- data: List[DataPointNumberPublic] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.RetentionRulePagePublic(*, content: List[RetentionRulePublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- content: List[RetentionRulePublic] | None¶
- page: int | None¶
- size: int | None¶
- total: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.RetentionRulePublic(*, id: str | None = None, workspace_id: str | None = None, project_id: str | None = None, level: Literal['organization', 'workspace', 'project'] | Any | None = None, retention: Literal['short_14d', 'base_60d', 'extended_400d', 'unlimited'] | Any, apply_to_past: bool | None = None, enabled: bool | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, catch_up_cursor: str | None = None, catch_up_done: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- workspace_id: str | None¶
- project_id: str | None¶
- level: Literal['organization', 'workspace', 'project'] | Any | None¶
Computed from projectId and organizationLevel
- retention: Literal['short_14d', 'base_60d', 'extended_400d', 'unlimited'] | Any¶
- apply_to_past: bool | None¶
- enabled: bool | None¶
- created_by: str | None¶
- created_at: datetime | None¶
- last_updated_by: str | None¶
- last_updated_at: datetime | None¶
- catch_up_cursor: str | None¶
Current position of historical data cleanup
- catch_up_done: bool | None¶
Whether historical catch-up is complete
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ScoreCondition(*, score_name: str, operator: Literal['>', '<', '='] | Any, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- score_name: str¶
- operator: Literal['>', '<', '='] | Any¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ScoreConditionPublic(*, score_name: str, operator: Literal['>', '<', '='] | Any, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- score_name: str¶
- operator: Literal['>', '<', '='] | Any¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ScoreConditionWrite(*, score_name: str, operator: Literal['>', '<', '='] | Any, value: float, **extra_data: Any)¶
Bases:
UniversalBaseModel- score_name: str¶
- operator: Literal['>', '<', '='] | Any¶
- value: float¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ScoreName(*, name: str | None = None, type: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- type: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ScoreNamePublic(*, name: str | None = None, type: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- name: str | None¶
- type: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ServiceTogglesConfig(*, python_evaluator_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295b30>], trace_thread_python_evaluator_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc7fef30>], span_llm_as_judge_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295b80>], span_user_defined_metric_python_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc7ff570>], guardrails_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295bd0>], guardrails_validations_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc674e60>], opik_ai_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295c20>], alerts_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc675c20>], welcome_wizard_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc675c70>], export_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc675e50>], cost_intelligence_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc675ea0>], dataset_versioning_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295c70>], dataset_export_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295cc0>], demo_data_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295d10>], openai_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295d60>], anthropic_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc677160>], gemini_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295db0>], openrouter_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc561950>], vertexai_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295e00>], bedrock_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295e50>], customllm_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295ea0>], ollama_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295ef0>], ollie_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc295f40>], agent_insights_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563b60>], agent_insights_guidance_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563b10>], project_homepage_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563c00>], annotation_queue_automation_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563c50>], event_bridge_alerts_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563de0>], default_page_size: ~typing.Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563cf0>] = None, custom_charts_enabled_for_workspace: ~typing.Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc563e80>] = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- python_evaluator_enabled: FieldMetadata object at 0x7725dc295b30>]¶
- trace_thread_python_evaluator_enabled: FieldMetadata object at 0x7725dc7fef30>]¶
- span_llm_as_judge_enabled: FieldMetadata object at 0x7725dc295b80>]¶
- span_user_defined_metric_python_enabled: FieldMetadata object at 0x7725dc7ff570>]¶
- guardrails_enabled: FieldMetadata object at 0x7725dc295bd0>]¶
- guardrails_validations_enabled: FieldMetadata object at 0x7725dc674e60>]¶
- opik_ai_enabled: FieldMetadata object at 0x7725dc295c20>]¶
- alerts_enabled: FieldMetadata object at 0x7725dc675c20>]¶
- welcome_wizard_enabled: FieldMetadata object at 0x7725dc675c70>]¶
- export_enabled: FieldMetadata object at 0x7725dc675e50>]¶
- cost_intelligence_enabled: FieldMetadata object at 0x7725dc675ea0>]¶
- dataset_versioning_enabled: FieldMetadata object at 0x7725dc295c70>]¶
- dataset_export_enabled: FieldMetadata object at 0x7725dc295cc0>]¶
- demo_data_enabled: FieldMetadata object at 0x7725dc295d10>]¶
- openai_provider_enabled: FieldMetadata object at 0x7725dc295d60>]¶
- anthropic_provider_enabled: FieldMetadata object at 0x7725dc677160>]¶
- gemini_provider_enabled: FieldMetadata object at 0x7725dc295db0>]¶
- openrouter_provider_enabled: FieldMetadata object at 0x7725dc561950>]¶
- vertexai_provider_enabled: FieldMetadata object at 0x7725dc295e00>]¶
- bedrock_provider_enabled: FieldMetadata object at 0x7725dc295e50>]¶
- customllm_provider_enabled: FieldMetadata object at 0x7725dc295ea0>]¶
- ollama_provider_enabled: FieldMetadata object at 0x7725dc295ef0>]¶
- ollie_enabled: FieldMetadata object at 0x7725dc295f40>]¶
- agent_insights_enabled: FieldMetadata object at 0x7725dc563b60>]¶
- agent_insights_guidance_enabled: FieldMetadata object at 0x7725dc563b10>]¶
- project_homepage_enabled: FieldMetadata object at 0x7725dc563c00>]¶
- annotation_queue_automation_enabled: FieldMetadata object at 0x7725dc563c50>]¶
- event_bridge_alerts_enabled: FieldMetadata object at 0x7725dc563de0>]¶
- default_page_size: FieldMetadata object at 0x7725dc563cf0>]¶
- custom_charts_enabled_for_workspace: FieldMetadata object at 0x7725dc563e80>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanBatch(*, spans: List[Span], **extra_data: Any)¶
Bases:
UniversalBaseModel- spans: List[Span]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanEnrichmentOptions(*, include_tags: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc296940>]=None, include_feedback_scores: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc296990>]=None, include_comments: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2969e0>]=None, include_usage: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc296a30>]=None, include_metadata: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc5f1360>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModelOptions for enriching span data
- include_tags: FieldMetadata object at 0x7725dc296940>]¶
- include_feedback_scores: FieldMetadata object at 0x7725dc296990>]¶
- include_comments: FieldMetadata object at 0x7725dc2969e0>]¶
- include_usage: FieldMetadata object at 0x7725dc296a30>]¶
- include_metadata: FieldMetadata object at 0x7725dc5f1360>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanExperimentItemBulkWriteView(*, id: str | None = None, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, usage: Dict[str, int] | None = None, error_info: ErrorInfoExperimentItemBulkWriteView | None = None, last_updated_at: datetime | None = None, total_estimated_cost: float | None = None, total_estimated_cost_version: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- parent_span_id: str | None¶
- name: str | None¶
- type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None¶
- start_time: datetime¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- model: str | None¶
- provider: str | None¶
- tags: List[str] | None¶
- usage: Dict[str, int] | None¶
- error_info: ErrorInfoExperimentItemBulkWriteView | None¶
- last_updated_at: datetime | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_version: str | None¶
- ttft: float | None¶
Time to first token in milliseconds
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanLlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc901550>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- model: LlmAsJudgeModelParameters¶
- messages: List[LlmAsJudgeMessage]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dc901550>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanLlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc92ec30>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessagePublic]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dc92ec30>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanLlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcaaf380>], **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessageWrite]¶
- variables: Dict[str, str]¶
- schema_: FieldMetadata object at 0x7725dcaaf380>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[SpanPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2970c0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[SpanPublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc2970c0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanUpdate(*, project_name: str | None = None, project_id: str | None = None, trace_id: str, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, usage: Dict[str, int] | None = None, total_estimated_cost: float | None = None, error_info: ErrorInfo | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_name: str | None¶
If null and project_id not specified, Default Project is assumed
- project_id: str | None¶
If null and project_name not specified, Default Project is assumed
- trace_id: str¶
- parent_span_id: str | None¶
- name: str | None¶
- type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- model: str | None¶
- provider: str | None¶
- tags: List[str] | None¶
Tags
- tags_to_add: List[str] | None¶
Tags to add
- tags_to_remove: List[str] | None¶
Tags to remove
- usage: Dict[str, int] | None¶
- total_estimated_cost: float | None¶
- ttft: float | None¶
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanUserDefinedMetricPythonCode(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanUserDefinedMetricPythonCodePublic(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanUserDefinedMetricPythonCodeWrite(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpanWrite(*, id: str | None = None, project_name: str | None = None, trace_id: str | None = None, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, usage: Dict[str, int] | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, total_estimated_cost: float | None = None, total_estimated_cost_version: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_name: str | None¶
If null, the default project is used
- trace_id: str | None¶
- parent_span_id: str | None¶
- name: str | None¶
- type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None¶
- start_time: datetime¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- model: str | None¶
- provider: str | None¶
- tags: List[str] | None¶
- usage: Dict[str, int] | None¶
- error_info: ErrorInfoWrite | None¶
- last_updated_at: datetime | None¶
- total_estimated_cost: float | None¶
- total_estimated_cost_version: str | None¶
- ttft: float | None¶
Time to first token in milliseconds
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.SpansCountResponse(*, workspaces_spans_count: List[WorkspaceSpansCount] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspaces_spans_count: List[WorkspaceSpansCount] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StartMultipartUploadResponse(*, upload_id: str, pre_sign_urls: List[str], **extra_data: Any)¶
Bases:
UniversalBaseModel- upload_id: str¶
- pre_sign_urls: List[str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StreamOptions(*, include_usage: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f4190>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- include_usage: FieldMetadata object at 0x7725dc2f4190>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioEvaluation(*, metrics: List[StudioMetric], **extra_data: Any)¶
Bases:
UniversalBaseModel- metrics: List[StudioMetric]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioEvaluationPublic(*, metrics: List[StudioMetricPublic], **extra_data: Any)¶
Bases:
UniversalBaseModel- metrics: List[StudioMetricPublic]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioEvaluationWrite(*, metrics: List[StudioMetricWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- metrics: List[StudioMetricWrite]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioLlmModel(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioLlmModelPublic(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioLlmModelWrite(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMessage(*, role: str, content: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: str¶
- content: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMessagePublic(*, role: str, content: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: str¶
- content: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMessageWrite(*, role: str, content: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- role: str¶
- content: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMetric(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMetricPublic(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioMetricWrite(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioOptimizer(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioOptimizerPublic(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioOptimizerWrite(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: str¶
- parameters: Dict[str, Any | None] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioPrompt(*, messages: List[StudioMessage], **extra_data: Any)¶
Bases:
UniversalBaseModel- messages: List[StudioMessage]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioPromptPublic(*, messages: List[StudioMessagePublic], **extra_data: Any)¶
Bases:
UniversalBaseModel- messages: List[StudioMessagePublic]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.StudioPromptWrite(*, messages: List[StudioMessageWrite], **extra_data: Any)¶
Bases:
UniversalBaseModel- messages: List[StudioMessageWrite]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TokenResponse(*, access_token: str | None = None, refresh_token: str | None = None, token_type: str | None = None, expires_in: int | None = None, workspace_id: str | None = None, workspace_name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- access_token: str | None¶
- refresh_token: str | None¶
- token_type: str | None¶
- expires_in: int | None¶
- workspace_id: str | None¶
- workspace_name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TokenUsageNames(*, names: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- names: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Tool(*, type: Literal['function'] | Any | None = None, function: Function | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- type: Literal['function'] | Any | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ToolCall(*, id: str | None = None, index: int | None = None, type: Literal['function'] | Any | None = None, function: FunctionCall | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- index: int | None¶
- type: Literal['function'] | Any | None¶
- function: FunctionCall | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ToolsParam(*, chat_completions: Literal['effortNoneOnly', 'refused'] | ~typing.Any | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6d00>]=None, forced_choice: FlagParam | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc4c6d50>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- chat_completions: FieldMetadata object at 0x7725dc4c6d00>]¶
- forced_choice: FieldMetadata object at 0x7725dc4c6d50>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceBatch(*, traces: List[Trace], **extra_data: Any)¶
Bases:
UniversalBaseModel- traces: List[Trace]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceCountResponse(*, workspaces_traces_count: List[WorkspaceTraceCount] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspaces_traces_count: List[WorkspaceTraceCount] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceEnrichmentOptions(*, include_spans: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f54a0>]=None, include_tags: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f54f0>]=None, include_feedback_scores: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f5540>]=None, include_comments: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f5590>]=None, include_usage: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f55e0>]=None, include_metadata: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc5f1ea0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModelOptions for enriching trace data
- include_spans: FieldMetadata object at 0x7725dc2f54a0>]¶
- include_tags: FieldMetadata object at 0x7725dc2f54f0>]¶
- include_feedback_scores: FieldMetadata object at 0x7725dc2f5540>]¶
- include_comments: FieldMetadata object at 0x7725dc2f5590>]¶
- include_usage: FieldMetadata object at 0x7725dc2f55e0>]¶
- include_metadata: FieldMetadata object at 0x7725dc5f1ea0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceExperimentItemBulkWriteView(*, id: str | None = None, project_name: str | None = None, name: str | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, error_info: ErrorInfoExperimentItemBulkWriteView | None = None, last_updated_at: datetime | None = None, ttft: float | None = None, thread_id: str | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModelPlease provide either none, only one of evaluate_task_result or trace, but never both
- id: str | None¶
- project_name: str | None¶
If null, the default project is used
- name: str | None¶
- start_time: datetime¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- tags: List[str] | None¶
- error_info: ErrorInfoExperimentItemBulkWriteView | None¶
- last_updated_at: datetime | None¶
- ttft: float | None¶
Time to first token in milliseconds
- thread_id: str | None¶
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TracePagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[TracePublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f5d10>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[TracePublic] | None¶
- sortable_by: FieldMetadata object at 0x7725dc2f5d10>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThread(*, id: str | None = None, project_id: str | None = None, thread_model_id: str | None = None, start_time: datetime | None = None, end_time: datetime | None = None, duration: float | None = None, first_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, last_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScore] | None = None, status: Literal['active', 'inactive'] | Any | None = None, number_of_messages: int | None = None, total_estimated_cost: float | None = None, usage: Dict[str, int] | None = None, comments: List[Comment] | None = None, tags: List[str] | None = None, annotation_queues: List[AnnotationQueueReference] | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, created_by: str | None = None, created_at: datetime | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_id: str | None¶
- thread_model_id: str | None¶
- start_time: datetime | None¶
- end_time: datetime | None¶
- duration: float | None¶
- first_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- last_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- feedback_scores: List[FeedbackScore] | None¶
- status: Literal['active', 'inactive'] | Any | None¶
- number_of_messages: int | None¶
- total_estimated_cost: float | None¶
- usage: Dict[str, int] | None¶
- tags: List[str] | None¶
- annotation_queues: List[AnnotationQueueReference] | None¶
Annotation queues this thread is currently an item of
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- created_by: str | None¶
- created_at: datetime | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- field: str | None¶
- operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None¶
- key: str | None¶
- value: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadIdentifier(*, project_name: str | None = None, project_id: str | None = None, thread_id: str, truncate: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_name: str | None¶
- project_id: str | None¶
- thread_id: str¶
- truncate: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadLlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dcaa16d0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- model: LlmAsJudgeModelParameters¶
- messages: List[LlmAsJudgeMessage]¶
- schema_: FieldMetadata object at 0x7725dcaa16d0>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadLlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc9a0d50>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessagePublic]¶
- schema_: FieldMetadata object at 0x7725dc9a0d50>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadLlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc9b76b0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)¶
Bases:
UniversalBaseModel- messages: List[LlmAsJudgeMessageWrite]¶
- schema_: FieldMetadata object at 0x7725dc9b76b0>]¶
- max_cost_usd: float | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[TraceThread] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc2f6670>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- page: int | None¶
- size: int | None¶
- total: int | None¶
- content: List[TraceThread] | None¶
- sortable_by: FieldMetadata object at 0x7725dc2f6670>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadUpdate(*, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- tags: List[str] | None¶
- tags_to_add: List[str] | None¶
- tags_to_remove: List[str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCode(*, metric: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCodePublic(*, metric: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCodeWrite(*, metric: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceUpdate(*, project_name: str | None = None, project_id: str | None = None, name: str | None = None, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, error_info: ErrorInfo | None = None, thread_id: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_name: str | None¶
If null and project_id not specified, Default Project is assumed
- project_id: str | None¶
If null and project_name not specified, Default Project is assumed
- name: str | None¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- tags: List[str] | None¶
Tags
- tags_to_add: List[str] | None¶
Tags to add
- tags_to_remove: List[str] | None¶
Tags to remove
- thread_id: str | None¶
- ttft: float | None¶
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.TraceWrite(*, id: str | None = None, project_name: str | None = None, name: str | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, ttft: float | None = None, thread_id: str | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- project_name: str | None¶
If null, the default project is used
- name: str | None¶
- start_time: datetime¶
- end_time: datetime | None¶
- input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None¶
- tags: List[str] | None¶
- error_info: ErrorInfoWrite | None¶
- last_updated_at: datetime | None¶
- ttft: float | None¶
Time to first token in milliseconds
- thread_id: str | None¶
- source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None¶
- environment: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Usage(*, total_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735b80>]=None, prompt_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735bd0>]=None, prompt_tokens_details: PromptTokensDetails | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735c20>]=None, completion_tokens: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735c70>]=None, completion_tokens_details: CompletionTokensDetails | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc735cc0>]=None, **extra_data: Any)¶
Bases:
UniversalBaseModel- total_tokens: FieldMetadata object at 0x7725dc735b80>]¶
- prompt_tokens: FieldMetadata object at 0x7725dc735bd0>]¶
- prompt_tokens_details: FieldMetadata object at 0x7725dc735c20>]¶
- completion_tokens: FieldMetadata object at 0x7725dc735c70>]¶
- completion_tokens_details: FieldMetadata object at 0x7725dc735cc0>]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.UsageByWorkspaceProjectUserResponse(*, breakdown: List[WorkspaceProjectUserCount] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- breakdown: List[WorkspaceProjectUserCount] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.UsageProjectsResponse(*, projects: List[WorkspaceProjectName] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- projects: List[WorkspaceProjectName] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.UserDefinedMetricPythonCode(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.UserDefinedMetricPythonCodePublic(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.UserDefinedMetricPythonCodeWrite(*, metric: str, arguments: Dict[str, str], **extra_data: Any)¶
Bases:
UniversalBaseModel- metric: str¶
- arguments: Dict[str, str]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValidatedToken(*, user_name: str | None = None, workspace_id: str | None = None, workspace_name: str | None = None, resource: str | None = None, expires_at: datetime | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- user_name: str | None¶
- workspace_id: str | None¶
- workspace_name: str | None¶
- resource: str | None¶
- expires_at: datetime | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValidationDescriptor(*, type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, config: Dict[str, Any | None], **extra_data: Any)¶
Bases:
UniversalBaseModelThe checks to run. Together they must fit in 64 questions to the decision service, asked in up to two calls of 32: each PII class and each topic list is one question, prompt injection is one
- type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- config: Dict[str, Any | None]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValidationResult(*, validation_passed: bool | None = None, type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, validation_config: Dict[str, Any | None], validation_details: Dict[str, Any | None], error: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- validation_passed: bool | None¶
- type: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any¶
- validation_config: Dict[str, Any | None]¶
- validation_details: Dict[str, Any | None]¶
- error: str | None¶
Set when the check could not run; the entry then passes
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValueEntry(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: float | None¶
- reason: str | None¶
- category_name: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any | None¶
- last_updated_at: datetime | None¶
- span_type: str | None¶
- span_id: str | None¶
- source_queue_id: str | None¶
- author: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValueEntryCompare(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: float | None¶
- reason: str | None¶
- category_name: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any | None¶
- last_updated_at: datetime | None¶
- span_type: str | None¶
- span_id: str | None¶
- source_queue_id: str | None¶
- author: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValueEntryExperimentItemBulkWriteView(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: float | None¶
- reason: str | None¶
- category_name: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any | None¶
- last_updated_at: datetime | None¶
- span_type: str | None¶
- span_id: str | None¶
- source_queue_id: str | None¶
- author: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.ValueEntryPublic(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- value: float | None¶
- reason: str | None¶
- category_name: str | None¶
- source: Literal['ui', 'sdk', 'online_scoring'] | Any | None¶
- last_updated_at: datetime | None¶
- span_type: str | None¶
- span_id: str | None¶
- source_queue_id: str | None¶
- author: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.VideoUrl(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.VideoUrlPublic(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.VideoUrlWrite(*, url: str, **extra_data: Any)¶
Bases:
UniversalBaseModel- url: str¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.Webhook(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- url: str¶
- secret_token: str | None¶
- headers: Dict[str, str] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WebhookExamples(*, response_examples: Dict[str, Dict[str, Any | None]] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- response_examples: Dict[str, Dict[str, Any | None]] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WebhookPublic(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- url: str¶
- secret_token: str | None¶
- headers: Dict[str, str] | None¶
- created_at: datetime | None¶
- created_by: str | None¶
- last_updated_at: datetime | None¶
- last_updated_by: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WebhookTestResult(*, status: Literal['success', 'failure'] | Any | None = None, status_code: int | None = None, request_body: str | None = None, error_message: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- status: Literal['success', 'failure'] | Any | None¶
- status_code: int | None¶
- request_body: str | None¶
- error_message: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WebhookWrite(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- url: str¶
- secret_token: str | None¶
- headers: Dict[str, str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WelcomeWizardTracking(*, completed: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- completed: bool | None¶
Whether the welcome wizard has been completed
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceConfiguration(*, timeout_to_mark_thread_as_inactive: str | None = None, truncation_on_tables: bool | None = None, color_map: Dict[str, str] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- timeout_to_mark_thread_as_inactive: str | None¶
Duration in ISO-8601 format (e.g., PT30M for 30 minutes, PT2H for 2 hours, P1D for 1 day). Minimum precision supported is seconds, please use a duration with seconds precision or higher. Also, the max duration allowed is 7 days.
- truncation_on_tables: bool | None¶
true (truncation enabled).
- Type:
Enable or disable data truncation in table views. When disabled, the frontend will limit pagination to prevent performance issues. Default
- color_map: Dict[str, str] | None¶
Workspace-level color map. Maps label names to hex color values (e.g. #FF0000). Max 10000 entries.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceInfo(*, id: str | None = None, name: str | None = None, is_default: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- id: str | None¶
- name: str | None¶
- is_default: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceMetricRequest(*, project_ids: List[str] | None = None, name: str | None = None, interval_start: datetime, interval_end: datetime, start_before_end: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_ids: List[str] | None¶
- name: str | None¶
- interval_start: datetime¶
- interval_end: datetime¶
- start_before_end: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceMetricResponse(*, results: List[Result] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceMetricsSummaryRequest(*, project_ids: List[str] | None = None, interval_start: datetime, interval_end: datetime, start_before_end: bool | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- project_ids: List[str] | None¶
- interval_start: datetime¶
- interval_end: datetime¶
- start_before_end: bool | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceMetricsSummaryResponse(*, results: List[Result] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceNameHolder(*, workspace_name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace_name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceProjectName(*, workspace_id: str | None = None, project_id: str | None = None, name: str | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace_id: str | None¶
- project_id: str | None¶
- name: str | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceProjectUserCount(*, workspace_id: str | None = None, project_id: str | None = None, project_name: str | None = None, user: str | None = None, count: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace_id: str | None¶
- project_id: str | None¶
- project_name: str | None¶
- user: str | None¶
- count: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceSpansCount(*, workspace: str | None = None, span_count: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace: str | None¶
- span_count: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceTraceCount(*, workspace: str | None = None, trace_count: int | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- workspace: str | None¶
- trace_count: int | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class opik.rest_api.types.WorkspaceUserPermissions(*, user_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc171590>]=None, workspace_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7725dc5f2260>]=None, permissions: List[Permission] | None = None, **extra_data: Any)¶
Bases:
UniversalBaseModel- user_name: FieldMetadata object at 0x7725dc171590>]¶
- workspace_name: FieldMetadata object at 0x7725dc5f2260>]¶
- permissions: List[Permission] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].