From 495322c62a322cdd38c409926938518c91f9ca91 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 9 Apr 2026 07:26:22 +0000 Subject: [PATCH] Regenerate client from commit 5921132 of spec repo --- .generator/schemas/v2/openapi.yaml | 787 ++++++++- features/v2/llm_observability.feature | 155 +- features/v2/undo.json | 60 + .../src/support/scenarios_model_mapping.ts | 65 + services/llm_observability/README.md | 6 +- .../src/v2/LLMObservabilityApi.ts | 1435 ++++++++++++++++- services/llm_observability/src/v2/index.ts | 37 + .../models/LLMObsAnnotatedInteractionItem.ts | 75 + ...tatedInteractionsDataAttributesResponse.ts | 47 + ...LLMObsAnnotatedInteractionsDataResponse.ts | 66 + .../LLMObsAnnotatedInteractionsResponse.ts | 47 + .../models/LLMObsAnnotatedInteractionsType.ts | 9 + .../src/v2/models/LLMObsAnnotationItem.ts | 101 ++ ...ObsAnnotationQueueDataAttributesRequest.ts | 62 + ...bsAnnotationQueueDataAttributesResponse.ts | 110 ++ .../LLMObsAnnotationQueueDataRequest.ts | 57 + .../LLMObsAnnotationQueueDataResponse.ts | 66 + .../LLMObsAnnotationQueueInteractionItem.ts | 56 + ...sAnnotationQueueInteractionResponseItem.ts | 74 + ...nQueueInteractionsDataAttributesRequest.ts | 47 + ...QueueInteractionsDataAttributesResponse.ts | 47 + ...sAnnotationQueueInteractionsDataRequest.ts | 57 + ...AnnotationQueueInteractionsDataResponse.ts | 66 + ...LMObsAnnotationQueueInteractionsRequest.ts | 47 + ...MObsAnnotationQueueInteractionsResponse.ts | 47 + .../LLMObsAnnotationQueueInteractionsType.ts | 9 + .../v2/models/LLMObsAnnotationQueueRequest.ts | 47 + .../models/LLMObsAnnotationQueueResponse.ts | 47 + .../v2/models/LLMObsAnnotationQueueType.ts | 7 + ...otationQueueUpdateDataAttributesRequest.ts | 52 + .../LLMObsAnnotationQueueUpdateDataRequest.ts | 57 + .../LLMObsAnnotationQueueUpdateRequest.ts | 47 + .../models/LLMObsAnnotationQueuesResponse.ts | 47 + ...nQueueInteractionsDataAttributesRequest.ts | 45 + ...eAnnotationQueueInteractionsDataRequest.ts | 57 + ...eleteAnnotationQueueInteractionsRequest.ts | 47 + .../src/v2/models/LLMObsInteractionType.ts | 11 + .../src/v2/models/TypingInfo.ts | 72 + 38 files changed, 4081 insertions(+), 90 deletions(-) create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataAttributesResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsType.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationItem.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsType.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueType.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataAttributesRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsAnnotationQueuesResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsInteractionType.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d235bdcd3db3..e632b11bed71 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -758,6 +758,14 @@ components: schema: example: "my-job" type: string + LLMObsAnnotationQueueIDPathParameter: + description: The ID of the LLM Observability annotation queue. + example: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + in: path + name: queue_id + required: true + schema: + type: string LLMObsDatasetIDPathParameter: description: The ID of the LLM Observability dataset. example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" @@ -36063,6 +36071,386 @@ components: format: int64 type: integer type: object + LLMObsAnnotatedInteractionItem: + description: An interaction with its associated annotations. + properties: + annotations: + description: List of annotations for this interaction. + items: + $ref: "#/components/schemas/LLMObsAnnotationItem" + type: array + content_id: + description: Identifier of the content for this interaction. + example: "trace-abc-123" + type: string + id: + description: Unique identifier of the interaction. + example: "interaction-456" + type: string + type: + $ref: "#/components/schemas/LLMObsInteractionType" + required: + - id + - type + - content_id + - annotations + type: object + LLMObsAnnotatedInteractionsDataAttributesResponse: + description: Attributes containing the list of annotated interactions. + properties: + annotated_interactions: + description: List of interactions with their annotations. + items: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionItem" + type: array + required: + - annotated_interactions + type: object + LLMObsAnnotatedInteractionsDataResponse: + description: Data object for annotated interactions. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsDataAttributesResponse" + id: + description: The queue ID. + example: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotatedInteractionsResponse: + description: Response containing the annotated interactions for an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsDataResponse" + required: + - data + type: object + LLMObsAnnotatedInteractionsType: + description: Resource type for annotated interactions. + enum: + - annotated_interactions + example: annotated_interactions + type: string + x-enum-varnames: + - ANNOTATED_INTERACTIONS + LLMObsAnnotationItem: + description: A single annotation on an interaction. + properties: + created_at: + description: Timestamp when the annotation was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + created_by: + description: Identifier of the user who created the annotation. + example: "00000000-0000-0000-0000-000000000002" + type: string + id: + description: Unique identifier of the annotation. + example: "annotation-789" + type: string + interaction_id: + description: Identifier of the interaction this annotation belongs to. + example: "interaction-456" + type: string + label_values: + additionalProperties: {} + description: The label values for this annotation. + example: + quality: "good" + type: object + modified_at: + description: Timestamp when the annotation was last modified. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + modified_by: + description: Identifier of the user who last modified the annotation. + example: "00000000-0000-0000-0000-000000000002" + type: string + required: + - id + - interaction_id + - label_values + - created_by + - created_at + - modified_by + - modified_at + type: object + LLMObsAnnotationQueueDataAttributesRequest: + description: Attributes for creating an LLM Observability annotation queue. + properties: + description: + description: Description of the annotation queue. + example: "Queue for annotating customer support traces" + type: string + name: + description: Name of the annotation queue. + example: "My annotation queue" + type: string + project_id: + description: Identifier of the project this queue belongs to. + example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + type: string + required: + - name + - project_id + type: object + LLMObsAnnotationQueueDataAttributesResponse: + description: Attributes of an LLM Observability annotation queue. + properties: + created_at: + description: Timestamp when the queue was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + created_by: + description: Identifier of the user who created the queue. + example: "00000000-0000-0000-0000-000000000002" + type: string + description: + description: Description of the annotation queue. + example: "Queue for annotating customer support traces" + type: string + modified_at: + description: Timestamp when the queue was last modified. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + modified_by: + description: Identifier of the user who last modified the queue. + example: "00000000-0000-0000-0000-000000000002" + type: string + name: + description: Name of the annotation queue. + example: "My annotation queue" + type: string + owned_by: + description: Identifier of the user who owns the queue. + example: "00000000-0000-0000-0000-000000000002" + type: string + project_id: + description: Identifier of the project this queue belongs to. + example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + type: string + required: + - name + - project_id + - description + - created_by + - created_at + - modified_by + - modified_at + - owned_by + type: object + LLMObsAnnotationQueueDataRequest: + description: Data object for creating an LLM Observability annotation queue. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueType" + required: + - type + - attributes + type: object + LLMObsAnnotationQueueDataResponse: + description: Data object for an LLM Observability annotation queue. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueDataAttributesResponse" + id: + description: Unique identifier of the annotation queue. + example: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotationQueueInteractionItem: + 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. + example: "trace-abc-123" + type: string + type: + $ref: "#/components/schemas/LLMObsInteractionType" + required: + - type + - content_id + type: object + LLMObsAnnotationQueueInteractionResponseItem: + description: A single interaction result. + properties: + already_existed: + description: Whether this interaction already existed in the queue. + example: false + type: boolean + content_id: + description: Identifier of the content for this interaction. + example: "trace-abc-123" + type: string + id: + description: Unique identifier of the interaction. + example: "00000000-0000-0000-0000-000000000000" + type: string + type: + $ref: "#/components/schemas/LLMObsInteractionType" + required: + - id + - type + - content_id + - already_existed + type: object + LLMObsAnnotationQueueInteractionsDataAttributesRequest: + description: Attributes for adding interactions to an annotation queue. + properties: + interactions: + description: List of interactions to add to the queue. Must contain at least one item. + items: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionItem" + minItems: 1 + type: array + required: + - interactions + type: object + LLMObsAnnotationQueueInteractionsDataAttributesResponse: + description: Attributes of the interaction addition response. + properties: + interactions: + description: List of interactions that were processed. + items: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionResponseItem" + type: array + required: + - interactions + type: object + LLMObsAnnotationQueueInteractionsDataRequest: + description: Data object for adding interactions to an annotation queue. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsType" + required: + - type + - attributes + type: object + LLMObsAnnotationQueueInteractionsDataResponse: + description: Data object for the interaction addition response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsDataAttributesResponse" + id: + description: The queue ID the interactions were added to. + example: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotationQueueInteractionsRequest: + description: Request to add interactions to an LLM Observability annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsDataRequest" + required: + - data + type: object + LLMObsAnnotationQueueInteractionsResponse: + description: Response containing the result of adding interactions to an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsDataResponse" + required: + - data + type: object + LLMObsAnnotationQueueInteractionsType: + description: Resource type for annotation queue interactions. + enum: + - interactions + example: interactions + type: string + x-enum-varnames: + - INTERACTIONS + LLMObsAnnotationQueueRequest: + description: Request to create an LLM Observability annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueDataRequest" + required: + - data + type: object + LLMObsAnnotationQueueResponse: + description: Response containing a single LLM Observability annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueDataResponse" + required: + - data + type: object + LLMObsAnnotationQueueType: + description: Resource type of an LLM Observability annotation queue. + enum: + - queues + example: queues + type: string + x-enum-varnames: + - QUEUES + LLMObsAnnotationQueueUpdateDataAttributesRequest: + description: Attributes for updating an LLM Observability annotation queue. All fields are optional. + properties: + description: + description: Updated description of the annotation queue. + example: "Updated description" + type: string + name: + description: Updated name of the annotation queue. + example: "Updated queue name" + type: string + type: object + LLMObsAnnotationQueueUpdateDataRequest: + description: Data object for updating an LLM Observability annotation queue. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueUpdateDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueType" + required: + - type + - attributes + type: object + LLMObsAnnotationQueueUpdateRequest: + description: Request to update an LLM Observability annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueUpdateDataRequest" + required: + - data + type: object + LLMObsAnnotationQueuesResponse: + description: Response containing a list of LLM Observability annotation queues. + properties: + data: + description: List of annotation queues. + items: + $ref: "#/components/schemas/LLMObsAnnotationQueueDataResponse" + type: array + required: + - data + type: object LLMObsCursorMeta: description: Pagination cursor metadata. properties: @@ -36394,6 +36782,41 @@ components: required: - data type: object + LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest: + description: Attributes for deleting interactions from an annotation queue. + properties: + interaction_ids: + description: List of interaction IDs to delete. Must contain at least one item. + example: + - "00000000-0000-0000-0000-000000000000" + - "00000000-0000-0000-0000-000000000001" + items: + description: An interaction ID to delete. + type: string + minItems: 1 + type: array + required: + - interaction_ids + type: object + LLMObsDeleteAnnotationQueueInteractionsDataRequest: + description: Data object for deleting interactions from an annotation queue. + properties: + attributes: + $ref: "#/components/schemas/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsType" + required: + - type + - attributes + type: object + LLMObsDeleteAnnotationQueueInteractionsRequest: + description: Request to delete interactions from an LLM Observability annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsDeleteAnnotationQueueInteractionsDataRequest" + required: + - data + type: object LLMObsDeleteDatasetRecordsDataAttributesRequest: description: Attributes for deleting records from an LLM Observability dataset. properties: @@ -36903,6 +37326,16 @@ components: required: - data type: object + LLMObsInteractionType: + description: Type of interaction in an annotation queue. + enum: + - trace + - experiment_trace + example: trace + type: string + x-enum-varnames: + - TRACE + - EXPERIMENT_TRACE LLMObsMetricAssessment: description: Assessment result for an LLM Observability experiment metric. enum: @@ -92366,6 +92799,358 @@ paths: operator: OR permissions: - org_management + /api/v2/llm-obs/v1/annotation-queues: + get: + description: |- + List annotation queues. Optionally filter by project ID or queue IDs. These parameters are mutually exclusive. + If neither is provided, all queues in the organization are returned. + operationId: ListLLMObsAnnotationQueues + parameters: + - description: Filter annotation queues by project ID. Cannot be used together with `queueIds`. + in: query + name: projectId + schema: + type: string + - description: Filter annotation queues by queue IDs (comma-separated). Cannot be used together with `projectId`. + in: query + name: queueIds + schema: + items: + type: string + type: array + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueuesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability annotation queues + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Create a new annotation queue. Only `name`, `project_id`, and `description` are accepted. + Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. + operationId: CreateLLMObsAnnotationQueue + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueRequest" + description: Create annotation queue payload. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an LLM Observability annotation queue + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}: + delete: + description: Delete an annotation queue by its ID. + operationId: DeleteLLMObsAnnotationQueue + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + responses: + "204": + description: No Content + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete an LLM Observability annotation queue + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: |- + Partially update an annotation queue. Only `name` and `description` can be updated. + operationId: UpdateLLMObsAnnotationQueue + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueUpdateRequest" + description: Update annotation queue payload. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update an LLM Observability annotation queue + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + 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. + operationId: GetLLMObsAnnotatedInteractions + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get annotated queue interactions + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions: + post: + description: |- + Add one or more interactions (traces) to an annotation queue. + At least one interaction must be provided. + operationId: CreateLLMObsAnnotationQueueInteractions + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsRequest" + description: Add interactions payload. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Add annotation queue interactions + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions/delete: + post: + description: Delete one or more interactions from an annotation queue. + operationId: DeleteLLMObsAnnotationQueueInteractions + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsDeleteAnnotationQueueInteractionsRequest" + description: Delete interactions payload. + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete annotation queue interactions + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/experiments: get: description: List all LLM Observability experiments sorted by creation date, newest first. @@ -115735,7 +116520,7 @@ tags: description: Find out more at url: "https://docs.datadoghq.com/account_management/api-app-keys/" name: Key Management - - description: Manage LLM Observability projects, datasets, dataset records, and experiments via the Experiments API. + - description: Manage LLM Observability projects, datasets, dataset records, experiments, and annotations. name: LLM Observability - description: |- Search your logs and send them to your Datadog platform over HTTP. See the [Log Management page](https://docs.datadoghq.com/logs/) for more information. diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index f1a56f818da5..a39062899886 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -1,13 +1,40 @@ @endpoint(llm-observability) @endpoint(llm-observability-v2) Feature: LLM Observability - Manage LLM Observability projects, datasets, dataset records, and - experiments via the Experiments API. + Manage LLM Observability projects, datasets, dataset records, experiments, + and annotations. Background: Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "LLMObservability" API + @generated @skip @team:DataDog/ml-observability + Scenario: Add annotation queue interactions returns "Bad Request" response + Given operation "CreateLLMObsAnnotationQueueInteractions" enabled + And new "CreateLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interactions": [{"content_id": "trace-abc-123", "type": "trace"}]}, "type": "interactions"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Add annotation queue interactions returns "Created" response + Given operation "CreateLLMObsAnnotationQueueInteractions" enabled + And new "CreateLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interactions": [{"content_id": "trace-abc-123", "type": "trace"}]}, "type": "interactions"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/ml-observability + Scenario: Add annotation queue interactions returns "Not Found" response + Given operation "CreateLLMObsAnnotationQueueInteractions" enabled + And new "CreateLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interactions": [{"content_id": "trace-abc-123", "type": "trace"}]}, "type": "interactions"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Append records to an LLM Observability dataset returns "Bad Request" response Given operation "CreateLLMObsDatasetRecords" enabled @@ -48,6 +75,22 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Create an LLM Observability annotation queue returns "Bad Request" response + Given operation "CreateLLMObsAnnotationQueue" enabled + And new "CreateLLMObsAnnotationQueue" request + And body with value {"data": {"attributes": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Create an LLM Observability annotation queue returns "Created" response + Given operation "CreateLLMObsAnnotationQueue" enabled + And new "CreateLLMObsAnnotationQueue" request + And body with value {"data": {"attributes": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}} + When the request is sent + Then the response status is 201 Created + @generated @skip @team:DataDog/ml-observability Scenario: Create an LLM Observability dataset returns "Bad Request" response Given operation "CreateLLMObsDataset" enabled @@ -221,6 +264,87 @@ Feature: LLM Observability When the request is sent Then the response status is 204 No Content + @generated @skip @team:DataDog/ml-observability + Scenario: Delete an LLM Observability annotation queue returns "No Content" response + Given operation "DeleteLLMObsAnnotationQueue" enabled + And new "DeleteLLMObsAnnotationQueue" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete an LLM Observability annotation queue returns "Not Found" response + Given operation "DeleteLLMObsAnnotationQueue" enabled + And new "DeleteLLMObsAnnotationQueue" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotation queue interactions returns "Bad Request" response + Given operation "DeleteLLMObsAnnotationQueueInteractions" enabled + And new "DeleteLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interaction_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "interactions"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotation queue interactions returns "No Content" response + Given operation "DeleteLLMObsAnnotationQueueInteractions" enabled + And new "DeleteLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interaction_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "interactions"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotation queue interactions returns "Not Found" response + Given operation "DeleteLLMObsAnnotationQueueInteractions" enabled + And new "DeleteLLMObsAnnotationQueueInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"interaction_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "interactions"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get annotated queue interactions returns "Bad Request" response + Given operation "GetLLMObsAnnotatedInteractions" enabled + And new "GetLLMObsAnnotatedInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get annotated queue interactions returns "Not Found" response + Given operation "GetLLMObsAnnotatedInteractions" enabled + And new "GetLLMObsAnnotatedInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get annotated queue interactions returns "OK" response + Given operation "GetLLMObsAnnotatedInteractions" enabled + And new "GetLLMObsAnnotatedInteractions" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability annotation queues returns "Bad Request" response + Given operation "ListLLMObsAnnotationQueues" enabled + And new "ListLLMObsAnnotationQueues" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability annotation queues returns "OK" response + Given operation "ListLLMObsAnnotationQueues" enabled + And new "ListLLMObsAnnotationQueues" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability dataset records returns "Bad Request" response Given operation "ListLLMObsDatasetRecords" enabled @@ -357,6 +481,33 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Update an LLM Observability annotation queue returns "Bad Request" response + Given operation "UpdateLLMObsAnnotationQueue" enabled + And new "UpdateLLMObsAnnotationQueue" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Update an LLM Observability annotation queue returns "Not Found" response + Given operation "UpdateLLMObsAnnotationQueue" enabled + And new "UpdateLLMObsAnnotationQueue" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Update an LLM Observability annotation queue returns "OK" response + Given operation "UpdateLLMObsAnnotationQueue" enabled + And new "UpdateLLMObsAnnotationQueue" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Update an LLM Observability dataset returns "Bad Request" response Given operation "UpdateLLMObsDataset" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 02afc91a4bbe..078ced2bd84f 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3087,6 +3087,66 @@ "type": "idempotent" } }, + "ListLLMObsAnnotationQueues": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "CreateLLMObsAnnotationQueue": { + "tag": "LLM Observability", + "undo": { + "operationId": "DeleteLLMObsAnnotationQueue", + "parameters": [ + { + "name": "queue_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteLLMObsAnnotationQueue": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "UpdateLLMObsAnnotationQueue": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "GetLLMObsAnnotatedInteractions": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "CreateLLMObsAnnotationQueueInteractions": { + "tag": "LLM Observability", + "undo": { + "operationId": "DeleteLLMObsAnnotationQueueInteractions", + "parameters": [ + { + "name": "queue_id", + "source": "path.queue_id" + }, + { + "name": "body", + "template": "{\"data\": {\"type\": \"interactions\", \"attributes\": {\"interaction_ids\": [\"{{ data.attributes.interactions[0].id }}\"]}}}" + } + ], + "type": "unsafe" + } + }, + "DeleteLLMObsAnnotationQueueInteractions": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, "ListLLMObsExperiments": { "tag": "LLM Observability", "undo": { diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 74369c97e1d1..a1b4b0679339 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -7769,6 +7769,71 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "IPAllowlistResponse", }, + "LLMObservabilityApi.V2.ListLLMObsAnnotationQueues": { + projectId: { + type: "string", + format: "", + }, + queueIds: { + type: "Array", + format: "", + }, + operationResponseType: "LLMObsAnnotationQueuesResponse", + }, + "LLMObservabilityApi.V2.CreateLLMObsAnnotationQueue": { + body: { + type: "LLMObsAnnotationQueueRequest", + format: "", + }, + operationResponseType: "LLMObsAnnotationQueueResponse", + }, + "LLMObservabilityApi.V2.DeleteLLMObsAnnotationQueue": { + queueId: { + type: "string", + format: "", + }, + operationResponseType: "{}", + }, + "LLMObservabilityApi.V2.UpdateLLMObsAnnotationQueue": { + queueId: { + type: "string", + format: "", + }, + body: { + type: "LLMObsAnnotationQueueUpdateRequest", + format: "", + }, + operationResponseType: "LLMObsAnnotationQueueResponse", + }, + "LLMObservabilityApi.V2.GetLLMObsAnnotatedInteractions": { + queueId: { + type: "string", + format: "", + }, + operationResponseType: "LLMObsAnnotatedInteractionsResponse", + }, + "LLMObservabilityApi.V2.CreateLLMObsAnnotationQueueInteractions": { + queueId: { + type: "string", + format: "", + }, + body: { + type: "LLMObsAnnotationQueueInteractionsRequest", + format: "", + }, + operationResponseType: "LLMObsAnnotationQueueInteractionsResponse", + }, + "LLMObservabilityApi.V2.DeleteLLMObsAnnotationQueueInteractions": { + queueId: { + type: "string", + format: "", + }, + body: { + type: "LLMObsDeleteAnnotationQueueInteractionsRequest", + format: "", + }, + operationResponseType: "{}", + }, "LLMObservabilityApi.V2.ListLLMObsExperiments": { filterProjectId: { type: "string", diff --git a/services/llm_observability/README.md b/services/llm_observability/README.md index bf1aa620dc8c..6d8a1e151e47 100644 --- a/services/llm_observability/README.md +++ b/services/llm_observability/README.md @@ -2,7 +2,7 @@ ## Description -Manage LLM Observability projects, datasets, dataset records, and experiments via the Experiments API. +Manage LLM Observability projects, datasets, dataset records, experiments, and annotations. ## Navigation @@ -28,7 +28,7 @@ const configuration = createConfiguration(); // Enable unstable operations const configurationOpts = { unstableOperations: { - "LLMObservabilityApi.v2.listLLMObsExperiments": true + "LLMObservabilityApi.v2.listLLMObsAnnotationQueues": true } } @@ -36,7 +36,7 @@ const configuration = createConfiguration(configurationOpts); const apiInstance = new LLMObservabilityApiV2(configuration); const params = {/* parameters */}; -apiInstance.listLLMObsExperiments(params).then((data) => { +apiInstance.listLLMObsAnnotationQueues(params).then((data) => { console.log("API called successfully. Returned data: " + JSON.stringify(data)); }).catch((error) => { console.error("Error calling API: " + error); diff --git a/services/llm_observability/src/v2/LLMObservabilityApi.ts b/services/llm_observability/src/v2/LLMObservabilityApi.ts index 10f705aed965..9bb2c1e77087 100644 --- a/services/llm_observability/src/v2/LLMObservabilityApi.ts +++ b/services/llm_observability/src/v2/LLMObservabilityApi.ts @@ -24,6 +24,13 @@ import { import { TypingInfo } from "./models/TypingInfo"; import { APIErrorResponse } from "./models/APIErrorResponse"; import { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +import { LLMObsAnnotatedInteractionsResponse } from "./models/LLMObsAnnotatedInteractionsResponse"; +import { LLMObsAnnotationQueueInteractionsRequest } from "./models/LLMObsAnnotationQueueInteractionsRequest"; +import { LLMObsAnnotationQueueInteractionsResponse } from "./models/LLMObsAnnotationQueueInteractionsResponse"; +import { LLMObsAnnotationQueueRequest } from "./models/LLMObsAnnotationQueueRequest"; +import { LLMObsAnnotationQueueResponse } from "./models/LLMObsAnnotationQueueResponse"; +import { LLMObsAnnotationQueuesResponse } from "./models/LLMObsAnnotationQueuesResponse"; +import { LLMObsAnnotationQueueUpdateRequest } from "./models/LLMObsAnnotationQueueUpdateRequest"; import { LLMObsDatasetRecordsListResponse } from "./models/LLMObsDatasetRecordsListResponse"; import { LLMObsDatasetRecordsMutationResponse } from "./models/LLMObsDatasetRecordsMutationResponse"; import { LLMObsDatasetRecordsRequest } from "./models/LLMObsDatasetRecordsRequest"; @@ -32,6 +39,7 @@ import { LLMObsDatasetRequest } from "./models/LLMObsDatasetRequest"; import { LLMObsDatasetResponse } from "./models/LLMObsDatasetResponse"; import { LLMObsDatasetsResponse } from "./models/LLMObsDatasetsResponse"; import { LLMObsDatasetUpdateRequest } from "./models/LLMObsDatasetUpdateRequest"; +import { LLMObsDeleteAnnotationQueueInteractionsRequest } from "./models/LLMObsDeleteAnnotationQueueInteractionsRequest"; import { LLMObsDeleteDatasetRecordsRequest } from "./models/LLMObsDeleteDatasetRecordsRequest"; import { LLMObsDeleteDatasetsRequest } from "./models/LLMObsDeleteDatasetsRequest"; import { LLMObsDeleteExperimentsRequest } from "./models/LLMObsDeleteExperimentsRequest"; @@ -56,6 +64,147 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { this.userAgent = buildUserAgent("llm-observability", version); } } + public async createLLMObsAnnotationQueue( + body: LLMObsAnnotationQueueRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.createLLMObsAnnotationQueue" + ] + ) { + throw new Error( + "Unstable operation 'createLLMObsAnnotationQueue' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.createLLMObsAnnotationQueue'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createLLMObsAnnotationQueue"); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.createLLMObsAnnotationQueue", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsAnnotationQueueRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createLLMObsAnnotationQueueInteractions( + queueId: string, + body: LLMObsAnnotationQueueInteractionsRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.createLLMObsAnnotationQueueInteractions" + ] + ) { + throw new Error( + "Unstable operation 'createLLMObsAnnotationQueueInteractions' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.createLLMObsAnnotationQueueInteractions'] = true`", + ); + } + + // verify required parameter 'queueId' is not null or undefined + if (queueId === null || queueId === undefined) { + throw new RequiredError( + "queueId", + "createLLMObsAnnotationQueueInteractions", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "createLLMObsAnnotationQueueInteractions", + ); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions".replace( + "{queue_id}", + encodeURIComponent(String(queueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.createLLMObsAnnotationQueueInteractions", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize( + body, + TypingInfo, + "LLMObsAnnotationQueueInteractionsRequest", + "", + ), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async createLLMObsDataset( projectId: string, body: LLMObsDatasetRequest, @@ -386,6 +535,142 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async deleteLLMObsAnnotationQueue( + queueId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.deleteLLMObsAnnotationQueue" + ] + ) { + throw new Error( + "Unstable operation 'deleteLLMObsAnnotationQueue' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.deleteLLMObsAnnotationQueue'] = true`", + ); + } + + // verify required parameter 'queueId' is not null or undefined + if (queueId === null || queueId === undefined) { + throw new RequiredError("queueId", "deleteLLMObsAnnotationQueue"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}".replace( + "{queue_id}", + encodeURIComponent(String(queueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.deleteLLMObsAnnotationQueue", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteLLMObsAnnotationQueueInteractions( + queueId: string, + body: LLMObsDeleteAnnotationQueueInteractionsRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.deleteLLMObsAnnotationQueueInteractions" + ] + ) { + throw new Error( + "Unstable operation 'deleteLLMObsAnnotationQueueInteractions' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.deleteLLMObsAnnotationQueueInteractions'] = true`", + ); + } + + // verify required parameter 'queueId' is not null or undefined + if (queueId === null || queueId === undefined) { + throw new RequiredError( + "queueId", + "deleteLLMObsAnnotationQueueInteractions", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "deleteLLMObsAnnotationQueueInteractions", + ); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions/delete".replace( + "{queue_id}", + encodeURIComponent(String(queueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.deleteLLMObsAnnotationQueueInteractions", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize( + body, + TypingInfo, + "LLMObsDeleteAnnotationQueueInteractionsRequest", + "", + ), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async deleteLLMObsDatasetRecords( projectId: string, datasetId: string, @@ -647,45 +932,37 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listLLMObsDatasetRecords( - projectId: string, - datasetId: string, - filterVersion?: number, - pageCursor?: string, - pageLimit?: number, + public async getLLMObsAnnotatedInteractions( + queueId: string, _options?: Configuration, ): Promise { const _config = _options || this.configuration; if ( !_config.unstableOperations[ - "LLMObservabilityApi.v2.listLLMObsDatasetRecords" + "LLMObservabilityApi.v2.getLLMObsAnnotatedInteractions" ] ) { throw new Error( - "Unstable operation 'listLLMObsDatasetRecords' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsDatasetRecords'] = true`", + "Unstable operation 'getLLMObsAnnotatedInteractions' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.getLLMObsAnnotatedInteractions'] = true`", ); } - // verify required parameter 'projectId' is not null or undefined - if (projectId === null || projectId === undefined) { - throw new RequiredError("projectId", "listLLMObsDatasetRecords"); - } - - // verify required parameter 'datasetId' is not null or undefined - if (datasetId === null || datasetId === undefined) { - throw new RequiredError("datasetId", "listLLMObsDatasetRecords"); + // verify required parameter 'queueId' is not null or undefined + if (queueId === null || queueId === undefined) { + throw new RequiredError("queueId", "getLLMObsAnnotatedInteractions"); } // Path Params const localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replace("{project_id}", encodeURIComponent(String(projectId))) - .replace("{dataset_id}", encodeURIComponent(String(datasetId))); + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions".replace( + "{queue_id}", + encodeURIComponent(String(queueId)), + ); // Make Request Context const { server, overrides } = _config.getServerAndOverrides( - "LLMObservabilityApi.v2.listLLMObsDatasetRecords", + "LLMObservabilityApi.v2.getLLMObsAnnotatedInteractions", LLMObservabilityApi.operationServers, ); const requestContext = server.makeRequestContext( @@ -701,24 +978,150 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("User-Agent", this.userAgent); } - // Query Params - if (filterVersion !== undefined) { - requestContext.setQueryParam( - "filter[version]", - serialize(filterVersion, TypingInfo, "number", "int64"), - "", - ); - } - if (pageCursor !== undefined) { - requestContext.setQueryParam( - "page[cursor]", - serialize(pageCursor, TypingInfo, "string", ""), - "", - ); - } - if (pageLimit !== undefined) { - requestContext.setQueryParam( - "page[limit]", + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listLLMObsAnnotationQueues( + projectId?: string, + queueIds?: Array, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.listLLMObsAnnotationQueues" + ] + ) { + throw new Error( + "Unstable operation 'listLLMObsAnnotationQueues' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsAnnotationQueues'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.listLLMObsAnnotationQueues", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam( + "projectId", + serialize(projectId, TypingInfo, "string", ""), + "", + ); + } + if (queueIds !== undefined) { + requestContext.setQueryParam( + "queueIds", + serialize(queueIds, TypingInfo, "Array", ""), + "multi", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listLLMObsDatasetRecords( + projectId: string, + datasetId: string, + filterVersion?: number, + pageCursor?: string, + pageLimit?: number, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.listLLMObsDatasetRecords" + ] + ) { + throw new Error( + "Unstable operation 'listLLMObsDatasetRecords' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsDatasetRecords'] = true`", + ); + } + + // verify required parameter 'projectId' is not null or undefined + if (projectId === null || projectId === undefined) { + throw new RequiredError("projectId", "listLLMObsDatasetRecords"); + } + + // verify required parameter 'datasetId' is not null or undefined + if (datasetId === null || datasetId === undefined) { + throw new RequiredError("datasetId", "listLLMObsDatasetRecords"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" + .replace("{project_id}", encodeURIComponent(String(projectId))) + .replace("{dataset_id}", encodeURIComponent(String(datasetId))); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.listLLMObsDatasetRecords", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (filterVersion !== undefined) { + requestContext.setQueryParam( + "filter[version]", + serialize(filterVersion, TypingInfo, "number", "int64"), + "", + ); + } + if (pageCursor !== undefined) { + requestContext.setQueryParam( + "page[cursor]", + serialize(pageCursor, TypingInfo, "string", ""), + "", + ); + } + if (pageLimit !== undefined) { + requestContext.setQueryParam( + "page[limit]", serialize(pageLimit, TypingInfo, "number", "int64"), "", ); @@ -983,6 +1386,76 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async updateLLMObsAnnotationQueue( + queueId: string, + body: LLMObsAnnotationQueueUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.updateLLMObsAnnotationQueue" + ] + ) { + throw new Error( + "Unstable operation 'updateLLMObsAnnotationQueue' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.updateLLMObsAnnotationQueue'] = true`", + ); + } + + // verify required parameter 'queueId' is not null or undefined + if (queueId === null || queueId === undefined) { + throw new RequiredError("queueId", "updateLLMObsAnnotationQueue"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateLLMObsAnnotationQueue"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}".replace( + "{queue_id}", + encodeURIComponent(String(queueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.updateLLMObsAnnotationQueue", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsAnnotationQueueUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async updateLLMObsDataset( projectId: string, datasetId: string, @@ -1273,26 +1746,25 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createLLMObsDataset + * @params response Response returned by the server for a request to createLLMObsAnnotationQueue * @throws ApiException if the response code was not in [200, 299] */ - public async createLLMObsDataset( + public async createLLMObsAnnotationQueue( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 200 || response.httpStatusCode === 201) { - const body: LLMObsDatasetResponse = deserialize( + if (response.httpStatusCode === 201) { + const body: LLMObsAnnotationQueueResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetResponse", - ) as LLMObsDatasetResponse; + "LLMObsAnnotationQueueResponse", + ) as LLMObsAnnotationQueueResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 + response.httpStatusCode === 403 ) { const bodyText = parse(await response.body.text(), contentType); let body: JSONAPIErrorResponse; @@ -1335,12 +1807,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsDatasetResponse = deserialize( + const body: LLMObsAnnotationQueueResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetResponse", + "LLMObsAnnotationQueueResponse", "", - ) as LLMObsDatasetResponse; + ) as LLMObsAnnotationQueueResponse; return body; } @@ -1355,19 +1827,19 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createLLMObsDatasetRecords + * @params response Response returned by the server for a request to createLLMObsAnnotationQueueInteractions * @throws ApiException if the response code was not in [200, 299] */ - public async createLLMObsDatasetRecords( + public async createLLMObsAnnotationQueueInteractions( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 200 || response.httpStatusCode === 201) { - const body: LLMObsDatasetRecordsMutationResponse = deserialize( + if (response.httpStatusCode === 201) { + const body: LLMObsAnnotationQueueInteractionsResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsMutationResponse", - ) as LLMObsDatasetRecordsMutationResponse; + "LLMObsAnnotationQueueInteractionsResponse", + ) as LLMObsAnnotationQueueInteractionsResponse; return body; } if ( @@ -1417,12 +1889,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsDatasetRecordsMutationResponse = deserialize( + const body: LLMObsAnnotationQueueInteractionsResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsMutationResponse", + "LLMObsAnnotationQueueInteractionsResponse", "", - ) as LLMObsDatasetRecordsMutationResponse; + ) as LLMObsAnnotationQueueInteractionsResponse; return body; } @@ -1437,25 +1909,26 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createLLMObsExperiment + * @params response Response returned by the server for a request to createLLMObsDataset * @throws ApiException if the response code was not in [200, 299] */ - public async createLLMObsExperiment( + public async createLLMObsDataset( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200 || response.httpStatusCode === 201) { - const body: LLMObsExperimentResponse = deserialize( + const body: LLMObsDatasetResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsExperimentResponse", - ) as LLMObsExperimentResponse; + "LLMObsDatasetResponse", + ) as LLMObsDatasetResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || - response.httpStatusCode === 403 + response.httpStatusCode === 403 || + response.httpStatusCode === 404 ) { const bodyText = parse(await response.body.text(), contentType); let body: JSONAPIErrorResponse; @@ -1498,12 +1971,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsExperimentResponse = deserialize( + const body: LLMObsDatasetResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsExperimentResponse", + "LLMObsDatasetResponse", "", - ) as LLMObsExperimentResponse; + ) as LLMObsDatasetResponse; return body; } @@ -1518,15 +1991,20 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createLLMObsExperimentEvents + * @params response Response returned by the server for a request to createLLMObsDatasetRecords * @throws ApiException if the response code was not in [200, 299] */ - public async createLLMObsExperimentEvents( + public async createLLMObsDatasetRecords( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 202) { - return; + if (response.httpStatusCode === 200 || response.httpStatusCode === 201) { + const body: LLMObsDatasetRecordsMutationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsMutationResponse", + ) as LLMObsDatasetRecordsMutationResponse; + return body; } if ( response.httpStatusCode === 400 || @@ -1575,7 +2053,13 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: LLMObsDatasetRecordsMutationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsMutationResponse", + "", + ) as LLMObsDatasetRecordsMutationResponse; + return body; } const body = (await response.body.text()) || ""; @@ -1589,10 +2073,162 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createLLMObsProject + * @params response Response returned by the server for a request to createLLMObsExperiment * @throws ApiException if the response code was not in [200, 299] */ - public async createLLMObsProject( + public async createLLMObsExperiment( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200 || response.httpStatusCode === 201) { + const body: LLMObsExperimentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsExperimentResponse", + ) as LLMObsExperimentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsExperimentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsExperimentResponse", + "", + ) as LLMObsExperimentResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createLLMObsExperimentEvents + * @throws ApiException if the response code was not in [200, 299] + */ + public async createLLMObsExperimentEvents( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 202) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createLLMObsProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async createLLMObsProject( response: ResponseContext, ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); @@ -1666,6 +2302,147 @@ export class LLMObservabilityApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueue + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsAnnotationQueue( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueueInteractions + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsAnnotationQueueInteractions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -1866,7 +2643,157 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsProjects + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsProjects(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getLLMObsAnnotatedInteractions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getLLMObsAnnotatedInteractions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsAnnotatedInteractionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotatedInteractionsResponse", + ) as LLMObsAnnotatedInteractionsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsAnnotatedInteractionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotatedInteractionsResponse", + "", + ) as LLMObsAnnotatedInteractionsResponse; + return body; } const body = (await response.body.text()) || ""; @@ -1880,13 +2807,20 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteLLMObsProjects + * @params response Response returned by the server for a request to listLLMObsAnnotationQueues * @throws ApiException if the response code was not in [200, 299] */ - public async deleteLLMObsProjects(response: ResponseContext): Promise { + public async listLLMObsAnnotationQueues( + response: ResponseContext, + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 204) { - return; + if (response.httpStatusCode === 200) { + const body: LLMObsAnnotationQueuesResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotationQueuesResponse", + ) as LLMObsAnnotationQueuesResponse; + return body; } if ( response.httpStatusCode === 400 || @@ -1934,7 +2868,13 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: LLMObsAnnotationQueuesResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotationQueuesResponse", + "", + ) as LLMObsAnnotationQueuesResponse; + return body; } const body = (await response.body.text()) || ""; @@ -2270,6 +3210,88 @@ export class LLMObservabilityApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateLLMObsAnnotationQueue + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateLLMObsAnnotationQueue( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsAnnotationQueueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotationQueueResponse", + ) as LLMObsAnnotationQueueResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsAnnotationQueueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotationQueueResponse", + "", + ) as LLMObsAnnotationQueueResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -2599,6 +3621,27 @@ export class LLMObservabilityApiResponseProcessor { } } +export interface LLMObservabilityApiCreateLLMObsAnnotationQueueRequest { + /** + * Create annotation queue payload. + * @type LLMObsAnnotationQueueRequest + */ + body: LLMObsAnnotationQueueRequest; +} + +export interface LLMObservabilityApiCreateLLMObsAnnotationQueueInteractionsRequest { + /** + * The ID of the LLM Observability annotation queue. + * @type string + */ + queueId: string; + /** + * Add interactions payload. + * @type LLMObsAnnotationQueueInteractionsRequest + */ + body: LLMObsAnnotationQueueInteractionsRequest; +} + export interface LLMObservabilityApiCreateLLMObsDatasetRequest { /** * The ID of the LLM Observability project. @@ -2659,6 +3702,27 @@ export interface LLMObservabilityApiCreateLLMObsProjectRequest { body: LLMObsProjectRequest; } +export interface LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest { + /** + * The ID of the LLM Observability annotation queue. + * @type string + */ + queueId: string; +} + +export interface LLMObservabilityApiDeleteLLMObsAnnotationQueueInteractionsRequest { + /** + * The ID of the LLM Observability annotation queue. + * @type string + */ + queueId: string; + /** + * Delete interactions payload. + * @type LLMObsDeleteAnnotationQueueInteractionsRequest + */ + body: LLMObsDeleteAnnotationQueueInteractionsRequest; +} + export interface LLMObservabilityApiDeleteLLMObsDatasetRecordsRequest { /** * The ID of the LLM Observability project. @@ -2706,6 +3770,27 @@ export interface LLMObservabilityApiDeleteLLMObsProjectsRequest { body: LLMObsDeleteProjectsRequest; } +export interface LLMObservabilityApiGetLLMObsAnnotatedInteractionsRequest { + /** + * The ID of the LLM Observability annotation queue. + * @type string + */ + queueId: string; +} + +export interface LLMObservabilityApiListLLMObsAnnotationQueuesRequest { + /** + * Filter annotation queues by project ID. Cannot be used together with `queueIds`. + * @type string + */ + projectId?: string; + /** + * Filter annotation queues by queue IDs (comma-separated). Cannot be used together with `projectId`. + * @type Array + */ + queueIds?: Array; +} + export interface LLMObservabilityApiListLLMObsDatasetRecordsRequest { /** * The ID of the LLM Observability project. @@ -2813,6 +3898,19 @@ export interface LLMObservabilityApiListLLMObsProjectsRequest { pageLimit?: number; } +export interface LLMObservabilityApiUpdateLLMObsAnnotationQueueRequest { + /** + * The ID of the LLM Observability annotation queue. + * @type string + */ + queueId: string; + /** + * Update annotation queue payload. + * @type LLMObsAnnotationQueueUpdateRequest + */ + body: LLMObsAnnotationQueueUpdateRequest; +} + export interface LLMObservabilityApiUpdateLLMObsDatasetRequest { /** * The ID of the LLM Observability project. @@ -2895,6 +3993,54 @@ export class LLMObservabilityApi { responseProcessor || new LLMObservabilityApiResponseProcessor(); } + /** + * Create a new annotation queue. Only `name`, `project_id`, and `description` are accepted. + * Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. + * @param param The request object + */ + public createLLMObsAnnotationQueue( + param: LLMObservabilityApiCreateLLMObsAnnotationQueueRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createLLMObsAnnotationQueue(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createLLMObsAnnotationQueue( + responseContext, + ); + }); + }); + } + + /** + * Add one or more interactions (traces) to an annotation queue. + * At least one interaction must be provided. + * @param param The request object + */ + public createLLMObsAnnotationQueueInteractions( + param: LLMObservabilityApiCreateLLMObsAnnotationQueueInteractionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createLLMObsAnnotationQueueInteractions( + param.queueId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createLLMObsAnnotationQueueInteractions( + responseContext, + ); + }); + }); + } + /** * Create a new LLM Observability dataset within the specified project. * @param param The request object @@ -3010,6 +4156,52 @@ export class LLMObservabilityApi { }); } + /** + * Delete an annotation queue by its ID. + * @param param The request object + */ + public deleteLLMObsAnnotationQueue( + param: LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.deleteLLMObsAnnotationQueue(param.queueId, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteLLMObsAnnotationQueue( + responseContext, + ); + }); + }); + } + + /** + * Delete one or more interactions from an annotation queue. + * @param param The request object + */ + public deleteLLMObsAnnotationQueueInteractions( + param: LLMObservabilityApiDeleteLLMObsAnnotationQueueInteractionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.deleteLLMObsAnnotationQueueInteractions( + param.queueId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteLLMObsAnnotationQueueInteractions( + responseContext, + ); + }); + }); + } + /** * Delete one or more records from an LLM Observability dataset. * @param param The request object @@ -3102,6 +4294,56 @@ export class LLMObservabilityApi { }); } + /** + * Retrieve all interactions and their annotations for a given annotation queue. + * @param param The request object + */ + public getLLMObsAnnotatedInteractions( + param: LLMObservabilityApiGetLLMObsAnnotatedInteractionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.getLLMObsAnnotatedInteractions( + param.queueId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getLLMObsAnnotatedInteractions( + responseContext, + ); + }); + }); + } + + /** + * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are mutually exclusive. + * If neither is provided, all queues in the organization are returned. + * @param param The request object + */ + public listLLMObsAnnotationQueues( + param: LLMObservabilityApiListLLMObsAnnotationQueuesRequest = {}, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listLLMObsAnnotationQueues( + param.projectId, + param.queueIds, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listLLMObsAnnotationQueues( + responseContext, + ); + }); + }); + } + /** * List all records in an LLM Observability dataset, sorted by creation date, newest first. * @param param The request object @@ -3203,6 +4445,31 @@ export class LLMObservabilityApi { }); } + /** + * Partially update an annotation queue. Only `name` and `description` can be updated. + * @param param The request object + */ + public updateLLMObsAnnotationQueue( + param: LLMObservabilityApiUpdateLLMObsAnnotationQueueRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.updateLLMObsAnnotationQueue( + param.queueId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateLLMObsAnnotationQueue( + responseContext, + ); + }); + }); + } + /** * Partially update an existing LLM Observability dataset within the specified project. * @param param The request object diff --git a/services/llm_observability/src/v2/index.ts b/services/llm_observability/src/v2/index.ts index 34448990c0fd..08d05f750a0b 100644 --- a/services/llm_observability/src/v2/index.ts +++ b/services/llm_observability/src/v2/index.ts @@ -1,17 +1,24 @@ export { + LLMObservabilityApiCreateLLMObsAnnotationQueueRequest, + LLMObservabilityApiCreateLLMObsAnnotationQueueInteractionsRequest, LLMObservabilityApiCreateLLMObsDatasetRequest, LLMObservabilityApiCreateLLMObsDatasetRecordsRequest, LLMObservabilityApiCreateLLMObsExperimentRequest, LLMObservabilityApiCreateLLMObsExperimentEventsRequest, LLMObservabilityApiCreateLLMObsProjectRequest, + LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest, + LLMObservabilityApiDeleteLLMObsAnnotationQueueInteractionsRequest, LLMObservabilityApiDeleteLLMObsDatasetRecordsRequest, LLMObservabilityApiDeleteLLMObsDatasetsRequest, LLMObservabilityApiDeleteLLMObsExperimentsRequest, LLMObservabilityApiDeleteLLMObsProjectsRequest, + LLMObservabilityApiGetLLMObsAnnotatedInteractionsRequest, + LLMObservabilityApiListLLMObsAnnotationQueuesRequest, LLMObservabilityApiListLLMObsDatasetRecordsRequest, LLMObservabilityApiListLLMObsDatasetsRequest, LLMObservabilityApiListLLMObsExperimentsRequest, LLMObservabilityApiListLLMObsProjectsRequest, + LLMObservabilityApiUpdateLLMObsAnnotationQueueRequest, LLMObservabilityApiUpdateLLMObsDatasetRequest, LLMObservabilityApiUpdateLLMObsDatasetRecordsRequest, LLMObservabilityApiUpdateLLMObsExperimentRequest, @@ -25,6 +32,32 @@ export { APIErrorResponse } from "./models/APIErrorResponse"; export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem"; export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource"; export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +export { LLMObsAnnotatedInteractionItem } from "./models/LLMObsAnnotatedInteractionItem"; +export { LLMObsAnnotatedInteractionsDataAttributesResponse } from "./models/LLMObsAnnotatedInteractionsDataAttributesResponse"; +export { LLMObsAnnotatedInteractionsDataResponse } from "./models/LLMObsAnnotatedInteractionsDataResponse"; +export { LLMObsAnnotatedInteractionsResponse } from "./models/LLMObsAnnotatedInteractionsResponse"; +export { LLMObsAnnotatedInteractionsType } from "./models/LLMObsAnnotatedInteractionsType"; +export { LLMObsAnnotationItem } from "./models/LLMObsAnnotationItem"; +export { LLMObsAnnotationQueueDataAttributesRequest } from "./models/LLMObsAnnotationQueueDataAttributesRequest"; +export { LLMObsAnnotationQueueDataAttributesResponse } from "./models/LLMObsAnnotationQueueDataAttributesResponse"; +export { LLMObsAnnotationQueueDataRequest } from "./models/LLMObsAnnotationQueueDataRequest"; +export { LLMObsAnnotationQueueDataResponse } from "./models/LLMObsAnnotationQueueDataResponse"; +export { LLMObsAnnotationQueueInteractionItem } from "./models/LLMObsAnnotationQueueInteractionItem"; +export { LLMObsAnnotationQueueInteractionResponseItem } from "./models/LLMObsAnnotationQueueInteractionResponseItem"; +export { LLMObsAnnotationQueueInteractionsDataAttributesRequest } from "./models/LLMObsAnnotationQueueInteractionsDataAttributesRequest"; +export { LLMObsAnnotationQueueInteractionsDataAttributesResponse } from "./models/LLMObsAnnotationQueueInteractionsDataAttributesResponse"; +export { LLMObsAnnotationQueueInteractionsDataRequest } from "./models/LLMObsAnnotationQueueInteractionsDataRequest"; +export { LLMObsAnnotationQueueInteractionsDataResponse } from "./models/LLMObsAnnotationQueueInteractionsDataResponse"; +export { LLMObsAnnotationQueueInteractionsRequest } from "./models/LLMObsAnnotationQueueInteractionsRequest"; +export { LLMObsAnnotationQueueInteractionsResponse } from "./models/LLMObsAnnotationQueueInteractionsResponse"; +export { LLMObsAnnotationQueueInteractionsType } from "./models/LLMObsAnnotationQueueInteractionsType"; +export { LLMObsAnnotationQueueRequest } from "./models/LLMObsAnnotationQueueRequest"; +export { LLMObsAnnotationQueueResponse } from "./models/LLMObsAnnotationQueueResponse"; +export { LLMObsAnnotationQueuesResponse } from "./models/LLMObsAnnotationQueuesResponse"; +export { LLMObsAnnotationQueueType } from "./models/LLMObsAnnotationQueueType"; +export { LLMObsAnnotationQueueUpdateDataAttributesRequest } from "./models/LLMObsAnnotationQueueUpdateDataAttributesRequest"; +export { LLMObsAnnotationQueueUpdateDataRequest } from "./models/LLMObsAnnotationQueueUpdateDataRequest"; +export { LLMObsAnnotationQueueUpdateRequest } from "./models/LLMObsAnnotationQueueUpdateRequest"; export { LLMObsCursorMeta } from "./models/LLMObsCursorMeta"; export { LLMObsDatasetDataAttributesRequest } from "./models/LLMObsDatasetDataAttributesRequest"; export { LLMObsDatasetDataAttributesResponse } from "./models/LLMObsDatasetDataAttributesResponse"; @@ -49,6 +82,9 @@ export { LLMObsDatasetType } from "./models/LLMObsDatasetType"; export { LLMObsDatasetUpdateDataAttributesRequest } from "./models/LLMObsDatasetUpdateDataAttributesRequest"; export { LLMObsDatasetUpdateDataRequest } from "./models/LLMObsDatasetUpdateDataRequest"; export { LLMObsDatasetUpdateRequest } from "./models/LLMObsDatasetUpdateRequest"; +export { LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest } from "./models/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest"; +export { LLMObsDeleteAnnotationQueueInteractionsDataRequest } from "./models/LLMObsDeleteAnnotationQueueInteractionsDataRequest"; +export { LLMObsDeleteAnnotationQueueInteractionsRequest } from "./models/LLMObsDeleteAnnotationQueueInteractionsRequest"; export { LLMObsDeleteDatasetRecordsDataAttributesRequest } from "./models/LLMObsDeleteDatasetRecordsDataAttributesRequest"; export { LLMObsDeleteDatasetRecordsDataRequest } from "./models/LLMObsDeleteDatasetRecordsDataRequest"; export { LLMObsDeleteDatasetRecordsRequest } from "./models/LLMObsDeleteDatasetRecordsRequest"; @@ -82,6 +118,7 @@ export { LLMObsExperimentType } from "./models/LLMObsExperimentType"; export { LLMObsExperimentUpdateDataAttributesRequest } from "./models/LLMObsExperimentUpdateDataAttributesRequest"; export { LLMObsExperimentUpdateDataRequest } from "./models/LLMObsExperimentUpdateDataRequest"; export { LLMObsExperimentUpdateRequest } from "./models/LLMObsExperimentUpdateRequest"; +export { LLMObsInteractionType } from "./models/LLMObsInteractionType"; export { LLMObsMetricAssessment } from "./models/LLMObsMetricAssessment"; export { LLMObsMetricScoreType } from "./models/LLMObsMetricScoreType"; export { LLMObsProjectDataAttributesRequest } from "./models/LLMObsProjectDataAttributesRequest"; diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts new file mode 100644 index 000000000000..093eb53d54b8 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionItem.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationItem } from "./LLMObsAnnotationItem"; +import { LLMObsInteractionType } from "./LLMObsInteractionType"; + +/** + * An interaction with its associated annotations. + */ +export class LLMObsAnnotatedInteractionItem { + /** + * List of annotations for this interaction. + */ + "annotations": Array; + /** + * Identifier of the content for this interaction. + */ + "contentId": string; + /** + * Unique identifier of the interaction. + */ + "id": string; + /** + * Type of interaction in an annotation queue. + */ + "type": LLMObsInteractionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + annotations: { + baseName: "annotations", + type: "Array", + required: true, + }, + contentId: { + baseName: "content_id", + type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsInteractionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotatedInteractionItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataAttributesResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataAttributesResponse.ts new file mode 100644 index 000000000000..e7cccbaf9f3d --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataAttributesResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotatedInteractionItem } from "./LLMObsAnnotatedInteractionItem"; + +/** + * Attributes containing the list of annotated interactions. + */ +export class LLMObsAnnotatedInteractionsDataAttributesResponse { + /** + * List of interactions with their annotations. + */ + "annotatedInteractions": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + annotatedInteractions: { + baseName: "annotated_interactions", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotatedInteractionsDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataResponse.ts new file mode 100644 index 000000000000..56c9a5f480ad --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsDataResponse.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotatedInteractionsDataAttributesResponse } from "./LLMObsAnnotatedInteractionsDataAttributesResponse"; +import { LLMObsAnnotatedInteractionsType } from "./LLMObsAnnotatedInteractionsType"; + +/** + * Data object for annotated interactions. + */ +export class LLMObsAnnotatedInteractionsDataResponse { + /** + * Attributes containing the list of annotated interactions. + */ + "attributes": LLMObsAnnotatedInteractionsDataAttributesResponse; + /** + * The queue ID. + */ + "id": string; + /** + * Resource type for annotated interactions. + */ + "type": LLMObsAnnotatedInteractionsType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotatedInteractionsDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotatedInteractionsType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotatedInteractionsDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsResponse.ts new file mode 100644 index 000000000000..c4a9595a5e9d --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotatedInteractionsDataResponse } from "./LLMObsAnnotatedInteractionsDataResponse"; + +/** + * Response containing the annotated interactions for an annotation queue. + */ +export class LLMObsAnnotatedInteractionsResponse { + /** + * Data object for annotated interactions. + */ + "data": LLMObsAnnotatedInteractionsDataResponse; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotatedInteractionsDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotatedInteractionsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsType.ts b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsType.ts new file mode 100644 index 000000000000..950d4839b74c --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotatedInteractionsType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type for annotated interactions. + */ +export type LLMObsAnnotatedInteractionsType = + | typeof ANNOTATED_INTERACTIONS + | UnparsedObject; +export const ANNOTATED_INTERACTIONS = "annotated_interactions"; diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationItem.ts new file mode 100644 index 000000000000..29dbbb65dbbd --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationItem.ts @@ -0,0 +1,101 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * A single annotation on an interaction. + */ +export class LLMObsAnnotationItem { + /** + * Timestamp when the annotation was created. + */ + "createdAt": Date; + /** + * Identifier of the user who created the annotation. + */ + "createdBy": string; + /** + * Unique identifier of the annotation. + */ + "id": string; + /** + * Identifier of the interaction this annotation belongs to. + */ + "interactionId": string; + /** + * The label values for this annotation. + */ + "labelValues": { [key: string]: any }; + /** + * Timestamp when the annotation was last modified. + */ + "modifiedAt": Date; + /** + * Identifier of the user who last modified the annotation. + */ + "modifiedBy": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + interactionId: { + baseName: "interaction_id", + type: "string", + required: true, + }, + labelValues: { + baseName: "label_values", + type: "{ [key: string]: any; }", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedBy: { + baseName: "modified_by", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesRequest.ts new file mode 100644 index 000000000000..c688d17dd0b7 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesRequest.ts @@ -0,0 +1,62 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for creating an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueDataAttributesRequest { + /** + * Description of the annotation queue. + */ + "description"?: string; + /** + * Name of the annotation queue. + */ + "name": string; + /** + * Identifier of the project this queue belongs to. + */ + "projectId": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesResponse.ts new file mode 100644 index 000000000000..28c4070dde08 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataAttributesResponse.ts @@ -0,0 +1,110 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueDataAttributesResponse { + /** + * Timestamp when the queue was created. + */ + "createdAt": Date; + /** + * Identifier of the user who created the queue. + */ + "createdBy": string; + /** + * Description of the annotation queue. + */ + "description": string; + /** + * Timestamp when the queue was last modified. + */ + "modifiedAt": Date; + /** + * Identifier of the user who last modified the queue. + */ + "modifiedBy": string; + /** + * Name of the annotation queue. + */ + "name": string; + /** + * Identifier of the user who owns the queue. + */ + "ownedBy": string; + /** + * Identifier of the project this queue belongs to. + */ + "projectId": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + required: true, + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedBy: { + baseName: "modified_by", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + ownedBy: { + baseName: "owned_by", + type: "string", + required: true, + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataRequest.ts new file mode 100644 index 000000000000..97d62810e0ed --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataRequest.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueDataAttributesRequest } from "./LLMObsAnnotationQueueDataAttributesRequest"; +import { LLMObsAnnotationQueueType } from "./LLMObsAnnotationQueueType"; + +/** + * Data object for creating an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueDataRequest { + /** + * Attributes for creating an LLM Observability annotation queue. + */ + "attributes": LLMObsAnnotationQueueDataAttributesRequest; + /** + * Resource type of an LLM Observability annotation queue. + */ + "type": LLMObsAnnotationQueueType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotationQueueDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataResponse.ts new file mode 100644 index 000000000000..3b3274b3bbfa --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueDataResponse.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueDataAttributesResponse } from "./LLMObsAnnotationQueueDataAttributesResponse"; +import { LLMObsAnnotationQueueType } from "./LLMObsAnnotationQueueType"; + +/** + * Data object for an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueDataResponse { + /** + * Attributes of an LLM Observability annotation queue. + */ + "attributes": LLMObsAnnotationQueueDataAttributesResponse; + /** + * Unique identifier of the annotation queue. + */ + "id": string; + /** + * Resource type of an LLM Observability annotation queue. + */ + "type": LLMObsAnnotationQueueType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotationQueueDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts new file mode 100644 index 000000000000..69f8534c5fd0 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionItem.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsInteractionType } from "./LLMObsInteractionType"; + +/** + * A single interaction to add to an annotation queue. + */ +export class LLMObsAnnotationQueueInteractionItem { + /** + * Identifier of the content (such as trace ID) for this interaction. + */ + "contentId": string; + /** + * Type of interaction in an annotation queue. + */ + "type": LLMObsInteractionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + contentId: { + baseName: "content_id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsInteractionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts new file mode 100644 index 000000000000..5c56c37fa17a --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionResponseItem.ts @@ -0,0 +1,74 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsInteractionType } from "./LLMObsInteractionType"; + +/** + * A single interaction result. + */ +export class LLMObsAnnotationQueueInteractionResponseItem { + /** + * Whether this interaction already existed in the queue. + */ + "alreadyExisted": boolean; + /** + * Identifier of the content for this interaction. + */ + "contentId": string; + /** + * Unique identifier of the interaction. + */ + "id": string; + /** + * Type of interaction in an annotation queue. + */ + "type": LLMObsInteractionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + alreadyExisted: { + baseName: "already_existed", + type: "boolean", + required: true, + }, + contentId: { + baseName: "content_id", + type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsInteractionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionResponseItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesRequest.ts new file mode 100644 index 000000000000..75f0a300a627 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionItem } from "./LLMObsAnnotationQueueInteractionItem"; + +/** + * Attributes for adding interactions to an annotation queue. + */ +export class LLMObsAnnotationQueueInteractionsDataAttributesRequest { + /** + * List of interactions to add to the queue. Must contain at least one item. + */ + "interactions": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + interactions: { + baseName: "interactions", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesResponse.ts new file mode 100644 index 000000000000..d45a96da35df --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataAttributesResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionResponseItem } from "./LLMObsAnnotationQueueInteractionResponseItem"; + +/** + * Attributes of the interaction addition response. + */ +export class LLMObsAnnotationQueueInteractionsDataAttributesResponse { + /** + * List of interactions that were processed. + */ + "interactions": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + interactions: { + baseName: "interactions", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataRequest.ts new file mode 100644 index 000000000000..da98d669c678 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataRequest.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionsDataAttributesRequest } from "./LLMObsAnnotationQueueInteractionsDataAttributesRequest"; +import { LLMObsAnnotationQueueInteractionsType } from "./LLMObsAnnotationQueueInteractionsType"; + +/** + * Data object for adding interactions to an annotation queue. + */ +export class LLMObsAnnotationQueueInteractionsDataRequest { + /** + * Attributes for adding interactions to an annotation queue. + */ + "attributes": LLMObsAnnotationQueueInteractionsDataAttributesRequest; + /** + * Resource type for annotation queue interactions. + */ + "type": LLMObsAnnotationQueueInteractionsType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotationQueueInteractionsDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueInteractionsType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataResponse.ts new file mode 100644 index 000000000000..c9d94d510afb --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsDataResponse.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionsDataAttributesResponse } from "./LLMObsAnnotationQueueInteractionsDataAttributesResponse"; +import { LLMObsAnnotationQueueInteractionsType } from "./LLMObsAnnotationQueueInteractionsType"; + +/** + * Data object for the interaction addition response. + */ +export class LLMObsAnnotationQueueInteractionsDataResponse { + /** + * Attributes of the interaction addition response. + */ + "attributes": LLMObsAnnotationQueueInteractionsDataAttributesResponse; + /** + * The queue ID the interactions were added to. + */ + "id": string; + /** + * Resource type for annotation queue interactions. + */ + "type": LLMObsAnnotationQueueInteractionsType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotationQueueInteractionsDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueInteractionsType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsRequest.ts new file mode 100644 index 000000000000..a866556efd31 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionsDataRequest } from "./LLMObsAnnotationQueueInteractionsDataRequest"; + +/** + * Request to add interactions to an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueInteractionsRequest { + /** + * Data object for adding interactions to an annotation queue. + */ + "data": LLMObsAnnotationQueueInteractionsDataRequest; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotationQueueInteractionsDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsResponse.ts new file mode 100644 index 000000000000..2f0c4177b0f2 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionsDataResponse } from "./LLMObsAnnotationQueueInteractionsDataResponse"; + +/** + * Response containing the result of adding interactions to an annotation queue. + */ +export class LLMObsAnnotationQueueInteractionsResponse { + /** + * Data object for the interaction addition response. + */ + "data": LLMObsAnnotationQueueInteractionsDataResponse; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotationQueueInteractionsDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueInteractionsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsType.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsType.ts new file mode 100644 index 000000000000..709ff8d87db7 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueInteractionsType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type for annotation queue interactions. + */ +export type LLMObsAnnotationQueueInteractionsType = + | typeof INTERACTIONS + | UnparsedObject; +export const INTERACTIONS = "interactions"; diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueRequest.ts new file mode 100644 index 000000000000..e8419ecb8746 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueDataRequest } from "./LLMObsAnnotationQueueDataRequest"; + +/** + * Request to create an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueRequest { + /** + * Data object for creating an LLM Observability annotation queue. + */ + "data": LLMObsAnnotationQueueDataRequest; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotationQueueDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueResponse.ts new file mode 100644 index 000000000000..d2ef689076c6 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueDataResponse } from "./LLMObsAnnotationQueueDataResponse"; + +/** + * Response containing a single LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueResponse { + /** + * Data object for an LLM Observability annotation queue. + */ + "data": LLMObsAnnotationQueueDataResponse; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotationQueueDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueType.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueType.ts new file mode 100644 index 000000000000..74ec35a0f8d8 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type of an LLM Observability annotation queue. + */ +export type LLMObsAnnotationQueueType = typeof QUEUES | UnparsedObject; +export const QUEUES = "queues"; diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataAttributesRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataAttributesRequest.ts new file mode 100644 index 000000000000..05758d659578 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataAttributesRequest.ts @@ -0,0 +1,52 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for updating an LLM Observability annotation queue. All fields are optional. + */ +export class LLMObsAnnotationQueueUpdateDataAttributesRequest { + /** + * Updated description of the annotation queue. + */ + "description"?: string; + /** + * Updated name of the annotation queue. + */ + "name"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueUpdateDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataRequest.ts new file mode 100644 index 000000000000..bcab677a04fe --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateDataRequest.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueType } from "./LLMObsAnnotationQueueType"; +import { LLMObsAnnotationQueueUpdateDataAttributesRequest } from "./LLMObsAnnotationQueueUpdateDataAttributesRequest"; + +/** + * Data object for updating an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueUpdateDataRequest { + /** + * Attributes for updating an LLM Observability annotation queue. All fields are optional. + */ + "attributes": LLMObsAnnotationQueueUpdateDataAttributesRequest; + /** + * Resource type of an LLM Observability annotation queue. + */ + "type": LLMObsAnnotationQueueType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsAnnotationQueueUpdateDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueUpdateDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateRequest.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateRequest.ts new file mode 100644 index 000000000000..dc9aac23f241 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueueUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueUpdateDataRequest } from "./LLMObsAnnotationQueueUpdateDataRequest"; + +/** + * Request to update an LLM Observability annotation queue. + */ +export class LLMObsAnnotationQueueUpdateRequest { + /** + * Data object for updating an LLM Observability annotation queue. + */ + "data": LLMObsAnnotationQueueUpdateDataRequest; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsAnnotationQueueUpdateDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueueUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsAnnotationQueuesResponse.ts b/services/llm_observability/src/v2/models/LLMObsAnnotationQueuesResponse.ts new file mode 100644 index 000000000000..461bcda8e595 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsAnnotationQueuesResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueDataResponse } from "./LLMObsAnnotationQueueDataResponse"; + +/** + * Response containing a list of LLM Observability annotation queues. + */ +export class LLMObsAnnotationQueuesResponse { + /** + * List of annotation queues. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsAnnotationQueuesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest.ts b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest.ts new file mode 100644 index 000000000000..c36d19a007a5 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for deleting interactions from an annotation queue. + */ +export class LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest { + /** + * List of interaction IDs to delete. Must contain at least one item. + */ + "interactionIds": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + interactionIds: { + baseName: "interaction_ids", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataRequest.ts b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataRequest.ts new file mode 100644 index 000000000000..75daebf2a4bb --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsDataRequest.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsAnnotationQueueInteractionsType } from "./LLMObsAnnotationQueueInteractionsType"; +import { LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest } from "./LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest"; + +/** + * Data object for deleting interactions from an annotation queue. + */ +export class LLMObsDeleteAnnotationQueueInteractionsDataRequest { + /** + * Attributes for deleting interactions from an annotation queue. + */ + "attributes": LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest; + /** + * Resource type for annotation queue interactions. + */ + "type": LLMObsAnnotationQueueInteractionsType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsAnnotationQueueInteractionsType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeleteAnnotationQueueInteractionsDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsRequest.ts b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsRequest.ts new file mode 100644 index 000000000000..cfc2333d7628 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeleteAnnotationQueueInteractionsRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsDeleteAnnotationQueueInteractionsDataRequest } from "./LLMObsDeleteAnnotationQueueInteractionsDataRequest"; + +/** + * Request to delete interactions from an LLM Observability annotation queue. + */ +export class LLMObsDeleteAnnotationQueueInteractionsRequest { + /** + * Data object for deleting interactions from an annotation queue. + */ + "data": LLMObsDeleteAnnotationQueueInteractionsDataRequest; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsDeleteAnnotationQueueInteractionsDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeleteAnnotationQueueInteractionsRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsInteractionType.ts b/services/llm_observability/src/v2/models/LLMObsInteractionType.ts new file mode 100644 index 000000000000..9a5cb228e7ee --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsInteractionType.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of interaction in an annotation queue. + */ +export type LLMObsInteractionType = + | typeof TRACE + | typeof EXPERIMENT_TRACE + | UnparsedObject; +export const TRACE = "trace"; +export const EXPERIMENT_TRACE = "experiment_trace"; diff --git a/services/llm_observability/src/v2/models/TypingInfo.ts b/services/llm_observability/src/v2/models/TypingInfo.ts index 53dcdb676ec6..b2cff42730fa 100644 --- a/services/llm_observability/src/v2/models/TypingInfo.ts +++ b/services/llm_observability/src/v2/models/TypingInfo.ts @@ -4,6 +4,29 @@ import { APIErrorResponse } from "./APIErrorResponse"; import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource"; import { JSONAPIErrorResponse } from "./JSONAPIErrorResponse"; +import { LLMObsAnnotatedInteractionItem } from "./LLMObsAnnotatedInteractionItem"; +import { LLMObsAnnotatedInteractionsDataAttributesResponse } from "./LLMObsAnnotatedInteractionsDataAttributesResponse"; +import { LLMObsAnnotatedInteractionsDataResponse } from "./LLMObsAnnotatedInteractionsDataResponse"; +import { LLMObsAnnotatedInteractionsResponse } from "./LLMObsAnnotatedInteractionsResponse"; +import { LLMObsAnnotationItem } from "./LLMObsAnnotationItem"; +import { LLMObsAnnotationQueueDataAttributesRequest } from "./LLMObsAnnotationQueueDataAttributesRequest"; +import { LLMObsAnnotationQueueDataAttributesResponse } from "./LLMObsAnnotationQueueDataAttributesResponse"; +import { LLMObsAnnotationQueueDataRequest } from "./LLMObsAnnotationQueueDataRequest"; +import { LLMObsAnnotationQueueDataResponse } from "./LLMObsAnnotationQueueDataResponse"; +import { LLMObsAnnotationQueueInteractionItem } from "./LLMObsAnnotationQueueInteractionItem"; +import { LLMObsAnnotationQueueInteractionResponseItem } from "./LLMObsAnnotationQueueInteractionResponseItem"; +import { LLMObsAnnotationQueueInteractionsDataAttributesRequest } from "./LLMObsAnnotationQueueInteractionsDataAttributesRequest"; +import { LLMObsAnnotationQueueInteractionsDataAttributesResponse } from "./LLMObsAnnotationQueueInteractionsDataAttributesResponse"; +import { LLMObsAnnotationQueueInteractionsDataRequest } from "./LLMObsAnnotationQueueInteractionsDataRequest"; +import { LLMObsAnnotationQueueInteractionsDataResponse } from "./LLMObsAnnotationQueueInteractionsDataResponse"; +import { LLMObsAnnotationQueueInteractionsRequest } from "./LLMObsAnnotationQueueInteractionsRequest"; +import { LLMObsAnnotationQueueInteractionsResponse } from "./LLMObsAnnotationQueueInteractionsResponse"; +import { LLMObsAnnotationQueueRequest } from "./LLMObsAnnotationQueueRequest"; +import { LLMObsAnnotationQueueResponse } from "./LLMObsAnnotationQueueResponse"; +import { LLMObsAnnotationQueueUpdateDataAttributesRequest } from "./LLMObsAnnotationQueueUpdateDataAttributesRequest"; +import { LLMObsAnnotationQueueUpdateDataRequest } from "./LLMObsAnnotationQueueUpdateDataRequest"; +import { LLMObsAnnotationQueueUpdateRequest } from "./LLMObsAnnotationQueueUpdateRequest"; +import { LLMObsAnnotationQueuesResponse } from "./LLMObsAnnotationQueuesResponse"; import { LLMObsCursorMeta } from "./LLMObsCursorMeta"; import { LLMObsDatasetDataAttributesRequest } from "./LLMObsDatasetDataAttributesRequest"; import { LLMObsDatasetDataAttributesResponse } from "./LLMObsDatasetDataAttributesResponse"; @@ -27,6 +50,9 @@ import { LLMObsDatasetUpdateDataAttributesRequest } from "./LLMObsDatasetUpdateD import { LLMObsDatasetUpdateDataRequest } from "./LLMObsDatasetUpdateDataRequest"; import { LLMObsDatasetUpdateRequest } from "./LLMObsDatasetUpdateRequest"; import { LLMObsDatasetsResponse } from "./LLMObsDatasetsResponse"; +import { LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest } from "./LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest"; +import { LLMObsDeleteAnnotationQueueInteractionsDataRequest } from "./LLMObsDeleteAnnotationQueueInteractionsDataRequest"; +import { LLMObsDeleteAnnotationQueueInteractionsRequest } from "./LLMObsDeleteAnnotationQueueInteractionsRequest"; import { LLMObsDeleteDatasetRecordsDataAttributesRequest } from "./LLMObsDeleteDatasetRecordsDataAttributesRequest"; import { LLMObsDeleteDatasetRecordsDataRequest } from "./LLMObsDeleteDatasetRecordsDataRequest"; import { LLMObsDeleteDatasetRecordsRequest } from "./LLMObsDeleteDatasetRecordsRequest"; @@ -70,10 +96,14 @@ import { LLMObsProjectsResponse } from "./LLMObsProjectsResponse"; export const TypingInfo: ModelTypingInfo = { enumsMap: { + LLMObsAnnotatedInteractionsType: ["annotated_interactions"], + LLMObsAnnotationQueueInteractionsType: ["interactions"], + LLMObsAnnotationQueueType: ["queues"], LLMObsDatasetType: ["datasets"], LLMObsEventType: ["events"], LLMObsExperimentSpanStatus: ["ok", "error"], LLMObsExperimentType: ["experiments"], + LLMObsInteractionType: ["trace", "experiment_trace"], LLMObsMetricAssessment: ["pass", "fail"], LLMObsMetricScoreType: ["score", "categorical", "boolean", "json"], LLMObsProjectType: ["projects"], @@ -94,6 +124,42 @@ export const TypingInfo: ModelTypingInfo = { JSONAPIErrorItem: JSONAPIErrorItem, JSONAPIErrorItemSource: JSONAPIErrorItemSource, JSONAPIErrorResponse: JSONAPIErrorResponse, + LLMObsAnnotatedInteractionItem: LLMObsAnnotatedInteractionItem, + LLMObsAnnotatedInteractionsDataAttributesResponse: + LLMObsAnnotatedInteractionsDataAttributesResponse, + LLMObsAnnotatedInteractionsDataResponse: + LLMObsAnnotatedInteractionsDataResponse, + LLMObsAnnotatedInteractionsResponse: LLMObsAnnotatedInteractionsResponse, + LLMObsAnnotationItem: LLMObsAnnotationItem, + LLMObsAnnotationQueueDataAttributesRequest: + LLMObsAnnotationQueueDataAttributesRequest, + LLMObsAnnotationQueueDataAttributesResponse: + LLMObsAnnotationQueueDataAttributesResponse, + LLMObsAnnotationQueueDataRequest: LLMObsAnnotationQueueDataRequest, + LLMObsAnnotationQueueDataResponse: LLMObsAnnotationQueueDataResponse, + LLMObsAnnotationQueueInteractionItem: LLMObsAnnotationQueueInteractionItem, + LLMObsAnnotationQueueInteractionResponseItem: + LLMObsAnnotationQueueInteractionResponseItem, + LLMObsAnnotationQueueInteractionsDataAttributesRequest: + LLMObsAnnotationQueueInteractionsDataAttributesRequest, + LLMObsAnnotationQueueInteractionsDataAttributesResponse: + LLMObsAnnotationQueueInteractionsDataAttributesResponse, + LLMObsAnnotationQueueInteractionsDataRequest: + LLMObsAnnotationQueueInteractionsDataRequest, + LLMObsAnnotationQueueInteractionsDataResponse: + LLMObsAnnotationQueueInteractionsDataResponse, + LLMObsAnnotationQueueInteractionsRequest: + LLMObsAnnotationQueueInteractionsRequest, + LLMObsAnnotationQueueInteractionsResponse: + LLMObsAnnotationQueueInteractionsResponse, + LLMObsAnnotationQueueRequest: LLMObsAnnotationQueueRequest, + LLMObsAnnotationQueueResponse: LLMObsAnnotationQueueResponse, + LLMObsAnnotationQueueUpdateDataAttributesRequest: + LLMObsAnnotationQueueUpdateDataAttributesRequest, + LLMObsAnnotationQueueUpdateDataRequest: + LLMObsAnnotationQueueUpdateDataRequest, + LLMObsAnnotationQueueUpdateRequest: LLMObsAnnotationQueueUpdateRequest, + LLMObsAnnotationQueuesResponse: LLMObsAnnotationQueuesResponse, LLMObsCursorMeta: LLMObsCursorMeta, LLMObsDatasetDataAttributesRequest: LLMObsDatasetDataAttributesRequest, LLMObsDatasetDataAttributesResponse: LLMObsDatasetDataAttributesResponse, @@ -121,6 +187,12 @@ export const TypingInfo: ModelTypingInfo = { LLMObsDatasetUpdateDataRequest: LLMObsDatasetUpdateDataRequest, LLMObsDatasetUpdateRequest: LLMObsDatasetUpdateRequest, LLMObsDatasetsResponse: LLMObsDatasetsResponse, + LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest: + LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest, + LLMObsDeleteAnnotationQueueInteractionsDataRequest: + LLMObsDeleteAnnotationQueueInteractionsDataRequest, + LLMObsDeleteAnnotationQueueInteractionsRequest: + LLMObsDeleteAnnotationQueueInteractionsRequest, LLMObsDeleteDatasetRecordsDataAttributesRequest: LLMObsDeleteDatasetRecordsDataAttributesRequest, LLMObsDeleteDatasetRecordsDataRequest: