feat(api): update API spec from langfuse/langfuse 270f036 #728
+7
−0
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
observationIdfilter toGetScoresRequestand updateScoreV2class to handle it.observationIdparameter toGetScoresRequestfor filtering scores by observation IDs.ScoreV2class inClient.tsto handleobservationIdin query parameters.GetScoresRequest.tsto documentobservationIdusage.This description was created by
for d1af653. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Overview
Greptile Summary
Adds support for filtering V2 scores by observation IDs. This updates the generated
GetScoresRequesttype to include an optionalobservationId(documented as a comma-separated list) and forwards that value throughScoreV2.get()into the request query parameters forGET /api/public/v2/scores.Confidence Score: 5/5
observationIdis provided.Important Files Changed
observationIdtoGetScoresRequestdestructuring and forwards it as a query parameter inScoreV2.get().observationId?: stringfilter (documented as comma-separated IDs) to the GetScoresRequest interface.Sequence Diagram
sequenceDiagram participant U as User Code participant C as Langfuse JS Client participant S as ScoreV2 participant API as Langfuse API U->>C: client.scoreV2.get({ observationId, ... }) C->>S: ScoreV2.get(request, options) S->>S: Build queryParameters incl. observationId S->>API: GET /api/public/v2/scores?observationId=... API-->>S: 200 GetScoresResponse S-->>U: data + rawResponse