-
Notifications
You must be signed in to change notification settings - Fork 303
feat(api): update API spec from langfuse/langfuse 8cdf8a4 #1720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
langfuse/api/commons/types/dataset_item_media_reference.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # This file was auto-generated by Fern from our API Definition. | ||
|
|
||
| import typing | ||
|
|
||
| import pydantic | ||
| import typing_extensions | ||
| from ...core.pydantic_utilities import UniversalBaseModel | ||
| from ...core.serialization import FieldMetadata | ||
| from .dataset_item_media_reference_field import DatasetItemMediaReferenceField | ||
| from .dataset_item_media_reference_media import DatasetItemMediaReferenceMedia | ||
|
|
||
|
|
||
| class DatasetItemMediaReference(UniversalBaseModel): | ||
| field: DatasetItemMediaReferenceField = pydantic.Field() | ||
| """ | ||
| The dataset item field containing the reference | ||
| """ | ||
|
|
||
| reference_string: typing_extensions.Annotated[ | ||
| str, FieldMetadata(alias="referenceString") | ||
| ] = pydantic.Field() | ||
| """ | ||
| The Langfuse media reference string, e.g. `@@@langfuseMedia:type=image/png|id=...|source=bytes@@@` | ||
| """ | ||
|
|
||
| json_path: typing_extensions.Annotated[str, FieldMetadata(alias="jsonPath")] = ( | ||
| pydantic.Field() | ||
| ) | ||
| """ | ||
| JSONPath of the string holding the reference within the field, e.g. `$['image']` | ||
| """ | ||
|
|
||
| media: DatasetItemMediaReferenceMedia = pydantic.Field() | ||
| """ | ||
| The resolved media record. | ||
| """ | ||
|
|
||
| model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( | ||
| extra="allow", frozen=True | ||
| ) |
26 changes: 26 additions & 0 deletions
26
langfuse/api/commons/types/dataset_item_media_reference_field.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # This file was auto-generated by Fern from our API Definition. | ||
|
|
||
| import typing | ||
|
|
||
| from ...core import enum | ||
|
|
||
| T_Result = typing.TypeVar("T_Result") | ||
|
|
||
|
|
||
| class DatasetItemMediaReferenceField(enum.StrEnum): | ||
| INPUT = "input" | ||
| EXPECTED_OUTPUT = "expectedOutput" | ||
| METADATA = "metadata" | ||
|
|
||
| def visit( | ||
| self, | ||
| input: typing.Callable[[], T_Result], | ||
| expected_output: typing.Callable[[], T_Result], | ||
| metadata: typing.Callable[[], T_Result], | ||
| ) -> T_Result: | ||
| if self is DatasetItemMediaReferenceField.INPUT: | ||
| return input() | ||
| if self is DatasetItemMediaReferenceField.EXPECTED_OUTPUT: | ||
| return expected_output() | ||
| if self is DatasetItemMediaReferenceField.METADATA: | ||
| return metadata() | ||
|
wochinge marked this conversation as resolved.
|
||
47 changes: 47 additions & 0 deletions
47
langfuse/api/commons/types/dataset_item_media_reference_media.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # This file was auto-generated by Fern from our API Definition. | ||
|
|
||
| import typing | ||
|
|
||
| import pydantic | ||
| import typing_extensions | ||
| from ...core.pydantic_utilities import UniversalBaseModel | ||
| from ...core.serialization import FieldMetadata | ||
|
|
||
|
|
||
| class DatasetItemMediaReferenceMedia(UniversalBaseModel): | ||
| media_id: typing_extensions.Annotated[str, FieldMetadata(alias="mediaId")] = ( | ||
| pydantic.Field() | ||
| ) | ||
| """ | ||
| The unique langfuse identifier of the media record | ||
| """ | ||
|
|
||
| content_type: typing_extensions.Annotated[ | ||
| str, FieldMetadata(alias="contentType") | ||
| ] = pydantic.Field() | ||
| """ | ||
| The MIME type of the media record | ||
| """ | ||
|
|
||
| content_length: typing_extensions.Annotated[ | ||
| int, FieldMetadata(alias="contentLength") | ||
| ] = pydantic.Field() | ||
| """ | ||
| The size of the media record in bytes | ||
| """ | ||
|
|
||
| url: str = pydantic.Field() | ||
| """ | ||
| The signed download URL of the media record | ||
| """ | ||
|
|
||
| url_expiry: typing_extensions.Annotated[str, FieldMetadata(alias="urlExpiry")] = ( | ||
| pydantic.Field() | ||
| ) | ||
| """ | ||
| The expiry date and time of the download URL | ||
| """ | ||
|
|
||
| model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( | ||
| extra="allow", frozen=True | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.