Experiment

class opik.api_objects.experiment.experiment.Experiment(id: str, name: str | None, dataset_name: str, rest_client: OpikApi, prompt: Prompt | None = None)

Bases: object

__init__(id: str, name: str | None, dataset_name: str, rest_client: OpikApi, prompt: Prompt | None = None) None
property id: str
property dataset_id: str
property name: str
insert(experiment_items_references: List[ExperimentItemReferences]) None

Creates a new experiment item by linking the existing trace and dataset item.

Parameters:

experiment_items_references – The list of ExperimentItemReferences objects, containing trace id and dataset item id to link together into experiment item.

Returns:

None

get_items() List[ExperimentItemContent]
Returns:

the list with contents of existing experiment items.

Return type:

List[ExperimentItemContent]