Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ObservationsV2 {
* - `basic` - name, level, statusMessage, version, environment, bookmarked, public, userId, sessionId
* - `time` - completionStartTime, createdAt, updatedAt
* - `io` - input, output
* - `metadata` - metadata
* - `metadata` - metadata (truncated to 200 chars by default, use `expandMetadata` to get full values)
* - `model` - providedModelName, internalModelId, modelParameters
* - `usage` - usageDetails, costDetails, totalCost
* - `prompt` - promptId, promptName, promptVersion
Expand Down Expand Up @@ -113,6 +113,7 @@ export class ObservationsV2 {
): Promise<core.WithRawResponse<LangfuseAPI.ObservationsV2Response>> {
const {
fields,
expandMetadata,
limit,
cursor,
parseIoAsJson,
Expand All @@ -136,6 +137,10 @@ export class ObservationsV2 {
_queryParams["fields"] = fields;
}

if (expandMetadata != null) {
_queryParams["expandMetadata"] = expandMetadata;
}

if (limit != null) {
_queryParams["limit"] = limit.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ export interface GetObservationsV2Request {
* Example: "basic,usage,model"
*/
fields?: string;
/**
* Comma-separated list of metadata keys to return non-truncated.
* By default, metadata values over 200 characters are truncated.
* Use this parameter to retrieve full values for specific keys.
* Example: "key1,key2"
*/
expandMetadata?: string;
/** Number of items to return per page. Maximum 1000, default 50. */
limit?: number;
/** Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page. */
Expand Down
Loading