feat: add metadata field to scores #1153
Open
+41
−9
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.
Important
Add
metadata
field to score models and client methods, allowing additional data to be associated with scores.metadata
field toBaseScore
,Score_Numeric
,Score_Categorical
,Score_Boolean
inbase_score.py
andscore.py
.metadata
field toScoreBody
inscore_body.py
andCreateScoreRequest
increate_score_request.py
.metadata
field toGetScoresResponseData_Numeric
,GetScoresResponseData_Categorical
,GetScoresResponseData_Boolean
inget_scores_response_data.py
.metadata
parameter toscore()
method inclient.py
.test_core_sdk.py
to includemetadata
in score-related tests.This description was created by
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.
/langfuse/api/resources/ingestion/types/score_body.py
./langfuse/api/resources/score/types/create_score_request.py
and BaseScore in/langfuse/api/resources/commons/types/base_score.py
./langfuse/api/resources/commons/types/score.py
and responses in/langfuse/api/resources/score/types/get_scores_response_data.py
./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 👍/👎!