Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions langfuse/api/dataset_run_items/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def create(
observation_id: typing.Optional[str] = OMIT,
trace_id: typing.Optional[str] = OMIT,
dataset_version: typing.Optional[dt.datetime] = OMIT,
created_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> DatasetRunItem:
"""
Expand Down Expand Up @@ -66,6 +67,9 @@ def create(
If provided, the experiment will use dataset items as they existed at or before this timestamp.
If not provided, uses the latest version of dataset items.

created_at : typing.Optional[dt.datetime]
Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -98,6 +102,7 @@ def create(
observation_id=observation_id,
trace_id=trace_id,
dataset_version=dataset_version,
created_at=created_at,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -185,6 +190,7 @@ async def create(
observation_id: typing.Optional[str] = OMIT,
trace_id: typing.Optional[str] = OMIT,
dataset_version: typing.Optional[dt.datetime] = OMIT,
created_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> DatasetRunItem:
"""
Expand Down Expand Up @@ -213,6 +219,9 @@ async def create(
If provided, the experiment will use dataset items as they existed at or before this timestamp.
If not provided, uses the latest version of dataset items.

created_at : typing.Optional[dt.datetime]
Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -253,6 +262,7 @@ async def main() -> None:
observation_id=observation_id,
trace_id=trace_id,
dataset_version=dataset_version,
created_at=created_at,
request_options=request_options,
)
return _response.data
Expand Down
10 changes: 10 additions & 0 deletions langfuse/api/dataset_run_items/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def create(
observation_id: typing.Optional[str] = OMIT,
trace_id: typing.Optional[str] = OMIT,
dataset_version: typing.Optional[dt.datetime] = OMIT,
created_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[DatasetRunItem]:
"""
Expand Down Expand Up @@ -63,6 +64,9 @@ def create(
If provided, the experiment will use dataset items as they existed at or before this timestamp.
If not provided, uses the latest version of dataset items.

created_at : typing.Optional[dt.datetime]
Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -81,6 +85,7 @@ def create(
"observationId": observation_id,
"traceId": trace_id,
"datasetVersion": dataset_version,
"createdAt": created_at,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -298,6 +303,7 @@ async def create(
observation_id: typing.Optional[str] = OMIT,
trace_id: typing.Optional[str] = OMIT,
dataset_version: typing.Optional[dt.datetime] = OMIT,
created_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[DatasetRunItem]:
"""
Expand Down Expand Up @@ -326,6 +332,9 @@ async def create(
If provided, the experiment will use dataset items as they existed at or before this timestamp.
If not provided, uses the latest version of dataset items.

created_at : typing.Optional[dt.datetime]
Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -344,6 +353,7 @@ async def create(
"observationId": observation_id,
"traceId": trace_id,
"datasetVersion": dataset_version,
"createdAt": created_at,
},
request_options=request_options,
omit=OMIT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class CreateDatasetRunItemRequest(UniversalBaseModel):
If not provided, uses the latest version of dataset items.
"""

created_at: typing_extensions.Annotated[
typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")
] = pydantic.Field(default=None)
"""
Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp.
"""

model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
extra="allow", frozen=True
)
Loading