feat(api): update API spec from langfuse/langfuse fa072d0 #718
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
expandMetadataparameter toObservationsV2API for retrieving full metadata values for specified keys.expandMetadataparameter toGetObservationsV2Requestto allow retrieval of full metadata values for specified keys.__getManymethod inClient.tsto handleexpandMetadataparameter, adding it to query parameters if provided.GetObservationsV2Request.tsto describeexpandMetadatausage and provide examples.Client.tsto reflect metadata truncation behavior andexpandMetadatausage.This description was created by
for f5fbf7d. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Added
expandMetadataparameter to the observations V2 API endpoint to allow retrieving non-truncated metadata values for specific keys.expandMetadatastring parameter accepting comma-separated list of metadata keysConfidence Score: 5/5
Important Files Changed
expandMetadataoptional parameter with clear documentation for retrieving non-truncated metadata valuesexpandMetadataparameter into API client, updated docs, and added proper query parameter handlingSequence Diagram
sequenceDiagram participant Client participant ObservationsV2 participant API as /api/public/v2/observations Client->>ObservationsV2: getMany(request) Note over Client,ObservationsV2: request includes optional expandMetadata ObservationsV2->>ObservationsV2: Destructure request parameters Note over ObservationsV2: Extract expandMetadata from request ObservationsV2->>ObservationsV2: Build query params alt expandMetadata is provided ObservationsV2->>ObservationsV2: Add expandMetadata to _queryParams end ObservationsV2->>API: GET with query parameters Note over API: Returns observations with metadata<br/>- Truncated to 200 chars by default<br/>- Full values for keys in expandMetadata API-->>ObservationsV2: ObservationsV2Response ObservationsV2-->>Client: Return response