-
Notifications
You must be signed in to change notification settings - Fork 104
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
chore: upgrade fern #901
base: main
Are you sure you want to change the base?
chore: upgrade fern #901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disclaimer: Experimental PR review
PR Summary
This pull request upgrades the Fern-generated code in the langfuse-python repository, focusing on improving compatibility with both Pydantic v1 and v2 while enhancing overall functionality and type safety.
- Introduced AsyncFernLangfuse and FernLangfuse classes in client.py, providing both synchronous and asynchronous interfaces for the Langfuse API
- Added new serialization module (serialization.py) for handling type annotations and field metadata, improving type handling across the SDK
- Implemented a new query encoding mechanism in query_encoder.py to flatten and encode complex query structures for API requests
- Significantly refactored http_client.py to include robust error handling, retry logic, and support for additional request options
- Updated multiple resource type files (e.g., base_score.py, dataset.py) to use UniversalBaseModel, ensuring compatibility with both Pydantic versions
30 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
input: typing.Optional[typing.Optional[typing.Any]] = None | ||
expected_output: typing.Optional[typing.Optional[typing.Any]] = pydantic.Field( | ||
alias="expectedOutput", default=None | ||
) | ||
metadata: typing.Optional[typing.Any] = None | ||
source_trace_id: typing.Optional[str] = pydantic_v1.Field( | ||
metadata: typing.Optional[typing.Optional[typing.Any]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Double Optional wrapping for 'input', 'expected_output', and 'metadata' fields. This might be unintentional and could lead to unexpected behavior.
return active() | ||
if self is DatasetStatus.ARCHIVED: | ||
return archived() | ||
DatasetStatus = typing.Union[typing.Literal["ACTIVE", "ARCHIVED"], typing.Any] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Removal of visit method may break existing code that relies on it.
No description provided.