Skip to content
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(models): update fern api #1071

Merged
merged 5 commits into from
Jan 13, 2025
Merged

chore(models): update fern api #1071

merged 5 commits into from
Jan 13, 2025

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jan 13, 2025

Important

Renamed package from langfuse.api to langfuse, updated imports across multiple files, changed start_date field to datetime, and updated documentation.

  • Package Rename:
    • Renamed package from langfuse.api to langfuse across multiple files, including client.py in comments, dataset_items, datasets, health, ingestion, media, metrics, models, observations, projects, prompts, score, score_configs, sessions, and trace.
  • Field Type Change:
    • Changed start_date field from date to datetime in CreateModelRequest and Model.
  • Documentation:
    • Updated README.md and reference.md to reflect package rename and usage changes.

This description was created by Ellipsis for 62e41ac. It will automatically update as commits are pushed.

Copy link

@greptile-apps greptile-apps bot left a 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 PR updates the Fern API integration across the Langfuse Python SDK, making several key changes:

  • Simplified import paths by removing the 'api' namespace, changing from langfuse.api to langfuse and langfuse.api.client to langfuse.client throughout documentation and examples
  • Made the unit field optional in CreateModelRequest by adding a default value of None
  • Added content_type parameter to media upload requests
  • Added data model documentation links to improve API reference clarity
  • Updated core module paths from langfuse.api.core to langfuse.core in test files

The changes primarily focus on import path restructuring and documentation improvements while maintaining backward compatibility.

25 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

langfuse/api/README.md Show resolved Hide resolved
Copy link

@greptile-apps greptile-apps bot left a 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

(updates since last review)

This PR updates the start_date field type in the Model class from dt.date to dt.datetime, enabling more granular time-based filtering of model definitions.

  • Changed start_date type in /langfuse/api/resources/commons/types/model.py from dt.date to dt.datetime for finer temporal control
  • Updated corresponding field in /langfuse/api/resources/models/types/create_model_request.py to maintain type consistency

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp enabled auto-merge (squash) January 13, 2025 19:25
@hassiebp hassiebp disabled auto-merge January 13, 2025 19:28
@hassiebp hassiebp merged commit 1b7a2ab into main Jan 13, 2025
8 of 9 checks passed
@hassiebp hassiebp deleted the chore-models-fern-update branch January 13, 2025 19:28
Copy link

@greptile-apps greptile-apps bot left a 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

(updates since last review)

Based on the provided information, I'll summarize the key changes in this PR that haven't been mentioned in previous reviews:

The PR makes several significant changes to the Langfuse Python SDK:

  • Changed unit field in CreateModelRequest to be optional without validation logic, which could potentially impact model pricing calculations
  • Updated all import paths in example code blocks across multiple client files to maintain consistency with the package rename
  • Added proper datetime serialization configuration in the Model class to handle the new start_date field type
  • Maintained error handling and core functionality across all client implementations while updating package structure

Key points to consider:

  • Making the unit field optional without validation logic could lead to issues if the unit is required for certain model types
  • The datetime change for start_date appears to be properly implemented with correct serialization handling
  • The package rename changes are consistently applied across all documentation and example code

These changes complement the previous reviews while highlighting new aspects of the implementation that warrant attention.

24 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant