diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2dc5dce2c0ac..dfe28385c5a7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38202,7 +38202,7 @@ components: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array content_id: - description: Identifier of the content for this interaction. + description: Identifier of the content (trace ID or session ID) for this interaction. example: "trace-abc-123" type: string id: @@ -38405,7 +38405,7 @@ components: description: A single interaction to add to an annotation queue. properties: content_id: - description: Identifier of the content (such as trace ID) for this interaction. + description: Identifier of the content (trace ID or session ID) for this interaction. example: "trace-abc-123" type: string type: @@ -38422,7 +38422,7 @@ components: example: false type: boolean content_id: - description: Identifier of the content for this interaction. + description: Identifier of the content (trace ID or session ID) for this interaction. example: "trace-abc-123" type: string id: @@ -39941,11 +39941,13 @@ components: enum: - trace - experiment_trace + - session example: trace type: string x-enum-varnames: - TRACE - EXPERIMENT_TRACE + - SESSION LLMObsLabelSchema: description: Schema definition for a single label in an annotation queue. properties: @@ -109649,7 +109651,7 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions: get: - description: Retrieve all interactions and their annotations for a given annotation queue. + description: Retrieve all interactions (traces and sessions) and their annotations for a given annotation queue. operationId: GetLLMObsAnnotatedInteractions parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -109710,7 +109712,7 @@ paths: /api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions: post: description: |- - Add one or more interactions (traces) to an annotation queue. + Add one or more interactions (traces or sessions) to an annotation queue. At least one interaction must be provided. operationId: CreateLLMObsAnnotationQueueInteractions parameters: diff --git a/services/llm_observability/src/v2/LLMObservabilityApi.ts b/services/llm_observability/src/v2/LLMObservabilityApi.ts index 718936416671..f8b0ec270bf0 100644 --- a/services/llm_observability/src/v2/LLMObservabilityApi.ts +++ b/services/llm_observability/src/v2/LLMObservabilityApi.ts @@ -4775,7 +4775,7 @@ export class LLMObservabilityApi { } /** - * Add one or more interactions (traces) to an annotation queue. + * Add one or more interactions (traces or sessions) to an annotation queue. * At least one interaction must be provided. * @param param The request object */ @@ -5075,7 +5075,7 @@ export class LLMObservabilityApi { } /** - * Retrieve all interactions and their annotations for a given annotation queue. + * Retrieve all interactions (traces and sessions) and their annotations for a given annotation queue. * @param param The request object */ public getLLMObsAnnotatedInteractions( diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts index 093eb53d54b8..2a87e467dcfe 100644 --- a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts @@ -12,7 +12,7 @@ export class LLMObsAnnotatedInteractionItem { */ "annotations": Array; /** - * Identifier of the content for this interaction. + * Identifier of the content (trace ID or session ID) for this interaction. */ "contentId": string; /** diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts index 69f8534c5fd0..7168dc04ae67 100644 --- a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts @@ -7,7 +7,7 @@ import { LLMObsInteractionType } from "./LLMObsInteractionType"; */ export class LLMObsAnnotationQueueInteractionItem { /** - * Identifier of the content (such as trace ID) for this interaction. + * Identifier of the content (trace ID or session ID) for this interaction. */ "contentId": string; /** diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts index 5c56c37fa17a..5d0bfbdd3650 100644 --- a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts @@ -11,7 +11,7 @@ export class LLMObsAnnotationQueueInteractionResponseItem { */ "alreadyExisted": boolean; /** - * Identifier of the content for this interaction. + * Identifier of the content (trace ID or session ID) for this interaction. */ "contentId": string; /** diff --git a/services/llm_observability/src/v2/models/LLMObsInteractionType.ts b/services/llm_observability/src/v2/models/LLMObsInteractionType.ts index 9a5cb228e7ee..d495b4d8cc0d 100644 --- a/services/llm_observability/src/v2/models/LLMObsInteractionType.ts +++ b/services/llm_observability/src/v2/models/LLMObsInteractionType.ts @@ -6,6 +6,8 @@ import { UnparsedObject } from "@datadog/datadog-api-client"; export type LLMObsInteractionType = | typeof TRACE | typeof EXPERIMENT_TRACE + | typeof SESSION | UnparsedObject; export const TRACE = "trace"; export const EXPERIMENT_TRACE = "experiment_trace"; +export const SESSION = "session"; diff --git a/services/llm_observability/src/v2/models/TypingInfo.ts b/services/llm_observability/src/v2/models/TypingInfo.ts index 4b37e187bacb..f78f044fe2be 100644 --- a/services/llm_observability/src/v2/models/TypingInfo.ts +++ b/services/llm_observability/src/v2/models/TypingInfo.ts @@ -141,7 +141,7 @@ export const TypingInfo: ModelTypingInfo = { LLMObsEventType: ["events"], LLMObsExperimentSpanStatus: ["ok", "error"], LLMObsExperimentType: ["experiments"], - LLMObsInteractionType: ["trace", "experiment_trace"], + LLMObsInteractionType: ["trace", "experiment_trace", "session"], LLMObsLabelSchemaType: ["score", "categorical", "boolean", "text"], LLMObsMetricAssessment: ["pass", "fail"], LLMObsMetricScoreType: ["score", "categorical", "boolean", "json"],