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

feat: add metadata field to scores #1153

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: add metadata field to scores #1153

wants to merge 5 commits into from

Conversation

davidmc971
Copy link
Member

@davidmc971 davidmc971 commented Mar 25, 2025

Important

Add metadata field to score models and client methods, allowing additional data to be associated with scores.

  • Models:
    • Add metadata field to BaseScore, Score_Numeric, Score_Categorical, Score_Boolean in base_score.py and score.py.
    • Add metadata field to ScoreBody in score_body.py and CreateScoreRequest in create_score_request.py.
    • Add metadata field to GetScoresResponseData_Numeric, GetScoresResponseData_Categorical, GetScoresResponseData_Boolean in get_scores_response_data.py.
  • Client:
    • Add metadata parameter to score() method in client.py.
  • Tests:
    • Update test_core_sdk.py to include metadata in score-related tests.

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

Greptile Summary

Disclaimer: Experimental PR review

This PR uniformly introduces an optional metadata field across score-related models and methods for enhanced contextual data support.

  • Added metadata field to ScoreBody in /langfuse/api/resources/ingestion/types/score_body.py.
  • Integrated metadata into CreateScoreRequest in /langfuse/api/resources/score/types/create_score_request.py and BaseScore in /langfuse/api/resources/commons/types/base_score.py.
  • Updated Score_Numeric, Score_Categorical, and Score_Boolean in /langfuse/api/resources/commons/types/score.py and responses in /langfuse/api/resources/score/types/get_scores_response_data.py.
  • Modified score creation in /langfuse/client.py and corresponding tests in /tests/test_core_sdk.py to reflect the changes.

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

@davidmc971 davidmc971 requested a review from maxdeichmann April 3, 2025 14:19
@davidmc971 davidmc971 marked this pull request as ready for review April 3, 2025 14:19
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.

LGTM

8 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