Dataset

@dataclass
class Dataset:
    id: str
    created_at: str
    metadata: Dict
    name: Optional[str] = None
    description: Optional[str] = None
    items: Optional[List[DatasetItemDict]] = None
id
str

The unique identifier of the dataset. This is an immutable field generated when the dataset is created.

created_at
str

The date and time when the dataset was created, expressed in ISO 8601 format.

metadata
Dict

A dictionary containing additional data associated with the dataset. This can include user-defined key-value pairs that provide more context or details about the dataset.

name
Optional[str]

An optional name for the dataset. This can be used to give a descriptive, human-readable title to the dataset for easier identification.

description
Optional[str]

An optional description field that can provide more detailed information about the dataset, such as its purpose, contents, or specific characteristics.

items
Optional[List[DatasetItemDict]]

An optional list of items contained within the dataset. Each item in the list is a dictionary representing a specific data entry in the dataset.

Create a dataset

Params

name
Optional[str]

An optional name for the dataset. This can be used to give a descriptive, human-readable title to the dataset for easier identification.

description
Optional[str]

An optional description field that can provide more detailed information about the dataset, such as its purpose, contents, or specific characteristics.

metadata
Optional[str]

A dictionary containing additional data associated with the dataset. This can include user-defined key-value pairs that provide more context or details about the dataset.

Response

dataset
Dataset

Return a Dataset

Update a dataset

Params

id
str

The unique identifier of the dataset. This is an immutable field generated when the dataset is created.

name
Optional[str]

An optional name for the dataset. This can be used to give a descriptive, human-readable title to the dataset for easier identification.

description
Optional[str]

An optional description field that can provide more detailed information about the dataset, such as its purpose, contents, or specific characteristics.

metadata
Optional[str]

A dictionary containing additional data associated with the dataset. This can include user-defined key-value pairs that provide more context or details about the dataset.

Response

dataset
Dataset

Return a Dataset

Get a dataset

Params

id
str

The unique identifier of the dataset. This is an immutable field generated when the dataset is created.

Response

dataset
Dataset

Return a Dataset

Delete a dataset

Params

id
str

The unique identifier of the dataset. This is an immutable field generated when the dataset is created.

Response

dataset
Dataset

Return a Dataset

DatasetItem

@dataclass
class DatasetItem:
    id: str
    created_at: str
    dataset_id: str
    metadata: Dict
    input: Dict
    expected_output: Optional[Dict] = None
    intermediary_steps: Optional[List[Dict]] = None
id
str

The unique identifier of the dataset item. Each item within a dataset has its own unique ID.

created_at
str

The date and time when the dataset item was created, expressed in ISO 8601 format.

dataset_id
str

The identifier of the dataset to which this item belongs. Links the item to its parent dataset.

metadata
Dict

A dictionary containing additional data associated with this dataset item. This can include specific details relevant to the item.

input
Dict

The input data for this dataset item. Typically contains the parameters or information that forms the LLM request.

expected_output
Optional[Dict]

The optional output data for this dataset item. Represents the result or outcome associated with the item’s input.

intermediary_steps
Optional[List[Dict]]

An optional list of intermediary steps involved in the output. This can include any processing steps or intermediate results. They are automatically generated when using “steps” to build a dataset.

Create a dataset item

Params

dataset_id
str

The identifier of the dataset to which this item belongs.

input
Dict

The input data for this dataset item. Typically contains the parameters or information that forms the LLM request.

expected_output
Optional[Dict]

The optional output data for this dataset item. Represents the result or outcome associated with the item’s input.

metadata
Optional[Dict]

A dictionary containing additional data associated with this dataset item. This can include specific details relevant to the item.

Response

dataset_item
DatasetItem

Return a DatasetItem

Add a step to a dataset

Params

dataset_id
str

The identifier of the dataset to which this item belongs.

step_id
str

The identifier of the step created beforehand.

metadata
Optional[Dict]

A dictionary containing additional data associated with this dataset item. This can include specific details relevant to the item.

Response

dataset_item
DatasetItem

Return a DatasetItem

Get a dataset item

Params

id
str

The unique identifier of the dataset item. Each item within a dataset has its own unique ID.

Response

dataset_item
DatasetItem

Return a DatasetItem

Delete a dataset item

Params

id
str

The unique identifier of the dataset item. Each item within a dataset has its own unique ID.

Response

dataset_item
DatasetItem

Return a DatasetItem