Skip to content
Closed
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
9 changes: 0 additions & 9 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@
IngestionEvent_ObservationCreate,
IngestionEvent_ObservationUpdate,
IngestionEvent_ScoreCreate,
IngestionEvent_SdkLog,
IngestionEvent_SpanCreate,
IngestionEvent_SpanUpdate,
IngestionEvent_TraceCreate,
Expand All @@ -319,8 +318,6 @@
OptionalObservationBody,
ScoreBody,
ScoreEvent,
SdkLogBody,
SdkLogEvent,
TraceBody,
TraceEvent,
UpdateEventBody,
Expand Down Expand Up @@ -669,7 +666,6 @@
"IngestionEvent_ObservationCreate": ".ingestion",
"IngestionEvent_ObservationUpdate": ".ingestion",
"IngestionEvent_ScoreCreate": ".ingestion",
"IngestionEvent_SdkLog": ".ingestion",
"IngestionEvent_SpanCreate": ".ingestion",
"IngestionEvent_SpanUpdate": ".ingestion",
"IngestionEvent_TraceCreate": ".ingestion",
Expand Down Expand Up @@ -820,8 +816,6 @@
"Score_Correction": ".commons",
"Score_Numeric": ".commons",
"Score_Text": ".commons",
"SdkLogBody": ".ingestion",
"SdkLogEvent": ".ingestion",
"ServiceProviderConfig": ".scim",
"ServiceUnavailableError": ".health",
"Session": ".commons",
Expand Down Expand Up @@ -1124,7 +1118,6 @@ def __dir__():
"IngestionEvent_ObservationCreate",
"IngestionEvent_ObservationUpdate",
"IngestionEvent_ScoreCreate",
"IngestionEvent_SdkLog",
"IngestionEvent_SpanCreate",
"IngestionEvent_SpanUpdate",
"IngestionEvent_TraceCreate",
Expand Down Expand Up @@ -1275,8 +1268,6 @@ def __dir__():
"Score_Correction",
"Score_Numeric",
"Score_Text",
"SdkLogBody",
"SdkLogEvent",
"ServiceProviderConfig",
"ServiceUnavailableError",
"Session",
Expand Down
11 changes: 11 additions & 0 deletions langfuse/api/comments/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..commons.types.comment import Comment
Expand Down Expand Up @@ -36,6 +37,7 @@ def create(
object_id: str,
content: str,
author_user_id: typing.Optional[str] = OMIT,
object_start_time: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreateCommentResponse:
"""
Expand All @@ -58,6 +60,9 @@ def create(
author_user_id : typing.Optional[str]
The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown.

object_start_time : typing.Optional[dt.datetime]
The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result.

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

Expand Down Expand Up @@ -90,6 +95,7 @@ def create(
object_id=object_id,
content=content,
author_user_id=author_user_id,
object_start_time=object_start_time,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -221,6 +227,7 @@ async def create(
object_id: str,
content: str,
author_user_id: typing.Optional[str] = OMIT,
object_start_time: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreateCommentResponse:
"""
Expand All @@ -243,6 +250,9 @@ async def create(
author_user_id : typing.Optional[str]
The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown.

object_start_time : typing.Optional[dt.datetime]
The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result.

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

Expand Down Expand Up @@ -283,6 +293,7 @@ async def main() -> None:
object_id=object_id,
content=content,
author_user_id=author_user_id,
object_start_time=object_start_time,
request_options=request_options,
)
return _response.data
Expand Down
11 changes: 11 additions & 0 deletions langfuse/api/comments/raw_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing
from json.decoder import JSONDecodeError

Expand Down Expand Up @@ -34,6 +35,7 @@ def create(
object_id: str,
content: str,
author_user_id: typing.Optional[str] = OMIT,
object_start_time: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[CreateCommentResponse]:
"""
Expand All @@ -56,6 +58,9 @@ def create(
author_user_id : typing.Optional[str]
The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown.

object_start_time : typing.Optional[dt.datetime]
The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result.

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

Expand All @@ -72,6 +77,7 @@ def create(
"objectId": object_id,
"content": content,
"authorUserId": author_user_id,
"objectStartTime": object_start_time,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -398,6 +404,7 @@ async def create(
object_id: str,
content: str,
author_user_id: typing.Optional[str] = OMIT,
object_start_time: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[CreateCommentResponse]:
"""
Expand All @@ -420,6 +427,9 @@ async def create(
author_user_id : typing.Optional[str]
The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown.

object_start_time : typing.Optional[dt.datetime]
The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result.

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

Expand All @@ -436,6 +446,7 @@ async def create(
"objectId": object_id,
"content": content,
"authorUserId": author_user_id,
"objectStartTime": object_start_time,
},
request_options=request_options,
omit=OMIT,
Expand Down
8 changes: 8 additions & 0 deletions langfuse/api/comments/types/create_comment_request.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import pydantic
Expand Down Expand Up @@ -42,6 +43,13 @@ class CreateCommentRequest(UniversalBaseModel):
The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown.
"""

object_start_time: typing_extensions.Annotated[
typing.Optional[dt.datetime], FieldMetadata(alias="objectStartTime")
] = pydantic.Field(default=None)
"""
The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result.
"""

model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
extra="allow", frozen=True
)
6 changes: 4 additions & 2 deletions langfuse/api/commons/types/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ class Dataset(UniversalBaseModel):
"""

input_schema: typing_extensions.Annotated[
typing.Optional[typing.Any], FieldMetadata(alias="inputSchema")
typing.Optional[typing.Dict[str, typing.Any]],
FieldMetadata(alias="inputSchema"),
] = pydantic.Field(default=None)
"""
JSON Schema for validating dataset item inputs
"""

expected_output_schema: typing_extensions.Annotated[
typing.Optional[typing.Any], FieldMetadata(alias="expectedOutputSchema")
typing.Optional[typing.Dict[str, typing.Any]],
FieldMetadata(alias="expectedOutputSchema"),
] = pydantic.Field(default=None)
"""
JSON Schema for validating dataset item expected outputs
Expand Down
16 changes: 8 additions & 8 deletions langfuse/api/datasets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def create(
name: str,
description: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Any] = OMIT,
expected_output_schema: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
expected_output_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Dataset:
"""
Expand All @@ -135,10 +135,10 @@ def create(

metadata : typing.Optional[typing.Any]

input_schema : typing.Optional[typing.Any]
input_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema.

expected_output_schema : typing.Optional[typing.Any]
expected_output_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema.

request_options : typing.Optional[RequestOptions]
Expand Down Expand Up @@ -448,8 +448,8 @@ async def create(
name: str,
description: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Any] = OMIT,
expected_output_schema: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
expected_output_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Dataset:
"""
Expand All @@ -463,10 +463,10 @@ async def create(

metadata : typing.Optional[typing.Any]

input_schema : typing.Optional[typing.Any]
input_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema.

expected_output_schema : typing.Optional[typing.Any]
expected_output_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema.

request_options : typing.Optional[RequestOptions]
Expand Down
16 changes: 8 additions & 8 deletions langfuse/api/datasets/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ def create(
name: str,
description: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Any] = OMIT,
expected_output_schema: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
expected_output_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Dataset]:
"""
Expand All @@ -265,10 +265,10 @@ def create(

metadata : typing.Optional[typing.Any]

input_schema : typing.Optional[typing.Any]
input_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema.

expected_output_schema : typing.Optional[typing.Any]
expected_output_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema.

request_options : typing.Optional[RequestOptions]
Expand Down Expand Up @@ -934,8 +934,8 @@ async def create(
name: str,
description: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Any] = OMIT,
expected_output_schema: typing.Optional[typing.Any] = OMIT,
input_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
expected_output_schema: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Dataset]:
"""
Expand All @@ -949,10 +949,10 @@ async def create(

metadata : typing.Optional[typing.Any]

input_schema : typing.Optional[typing.Any]
input_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema.

expected_output_schema : typing.Optional[typing.Any]
expected_output_schema : typing.Optional[typing.Dict[str, typing.Any]]
JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema.

request_options : typing.Optional[RequestOptions]
Expand Down
6 changes: 4 additions & 2 deletions langfuse/api/datasets/types/create_dataset_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ class CreateDatasetRequest(UniversalBaseModel):
description: typing.Optional[str] = None
metadata: typing.Optional[typing.Any] = None
input_schema: typing_extensions.Annotated[
typing.Optional[typing.Any], FieldMetadata(alias="inputSchema")
typing.Optional[typing.Dict[str, typing.Any]],
FieldMetadata(alias="inputSchema"),
] = pydantic.Field(default=None)
"""
JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema.
"""

expected_output_schema: typing_extensions.Annotated[
typing.Optional[typing.Any], FieldMetadata(alias="expectedOutputSchema")
typing.Optional[typing.Dict[str, typing.Any]],
FieldMetadata(alias="expectedOutputSchema"),
] = pydantic.Field(default=None)
"""
JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema.
Expand Down
Loading
Loading