diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 39623cac69..b0ee5756e1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -39902,33 +39902,19 @@ components: 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 (trace ID or session ID) 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 + oneOf: + - $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem" + - $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem" LLMObsAnnotatedInteractionsDataAttributesResponse: description: Attributes containing the list of annotated interactions. properties: annotated_interactions: description: List of interactions with their annotations. + example: + - annotations: [] + content_id: trace-abc-123 + id: "interaction-456" + type: trace items: $ref: "#/components/schemas/LLMObsAnnotatedInteractionItem" type: array @@ -40110,45 +40096,22 @@ components: type: object LLMObsAnnotationQueueInteractionItem: description: A single interaction to add to an annotation queue. - properties: - content_id: - description: Identifier of the content (trace ID or session ID) for this interaction. - example: "trace-abc-123" - type: string - type: - $ref: "#/components/schemas/LLMObsInteractionType" - required: - - type - - content_id - type: object + oneOf: + - $ref: "#/components/schemas/LLMObsTraceInteractionItem" + - $ref: "#/components/schemas/LLMObsDisplayBlockInteractionItem" 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 (trace ID or session ID) 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 + oneOf: + - $ref: "#/components/schemas/LLMObsTraceInteractionResponseItem" + - $ref: "#/components/schemas/LLMObsDisplayBlockInteractionResponseItem" 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. + example: + - content_id: trace-abc-123 + type: trace items: $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionItem" minItems: 1 @@ -40161,6 +40124,11 @@ components: properties: interactions: description: List of interactions that were processed. + example: + - already_existed: false + content_id: trace-abc-123 + id: "00000000-0000-0000-0000-000000000000" + type: trace items: $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionResponseItem" type: array @@ -40356,6 +40324,144 @@ components: required: - label_schemas type: object + LLMObsContentBlock: + description: |- + A single content block rendered inside a `display_block` interaction. + `type` discriminates which other fields are meaningful: + + - `markdown` / `text`: `content` must be a string. + - `header`: `content` must be a string; `level`, when set, must be one of `sm`, `md`, `lg`, `xl`. + - `json`: `content` must be a well-formed JSON value (object, array, or scalar). + - `image`: `url` is required. + - `widget`: `tileDef` is required (any well-formed JSON; the frontend owns the renderable schema). + - `llmobs_trace`: `traceId` is required; `interactionType`, when set, must be `trace` or `experiment_trace`. + + `height`, when set, must be positive. + properties: + alt: + description: Alternative text for an `image` block. + example: "Example image" + type: string + content: + description: |- + Block payload. A string for `markdown`, `header`, and `text`; an + arbitrary JSON value (object, array, or scalar) for `json`. Omitted + for `image`, `widget`, and `llmobs_trace`. + example: "## Triage Instructions" + height: + description: Optional rendered height. Must be positive when set. + example: 240 + format: int64 + type: integer + interactionType: + $ref: "#/components/schemas/LLMObsContentBlockLLMObsTraceInteractionType" + label: + description: Optional label rendered alongside the block. + example: "Triage Instructions" + type: string + level: + $ref: "#/components/schemas/LLMObsContentBlockHeaderLevel" + tileDef: + description: |- + Tile definition for a `widget` block. Required for `widget`. The + schema is owned by the frontend renderer. + example: + requests: + - queries: + - data_source: metrics + name: q + query: "avg:system.cpu.user{*}" + response_format: timeseries + type: line + viz: timeseries + timeFrame: + $ref: "#/components/schemas/LLMObsContentBlockTimeFrame" + traceId: + description: Trace identifier. Required for `llmobs_trace` blocks. + example: "69fcc2bb0000000003113989d83069ba" + type: string + type: + $ref: "#/components/schemas/LLMObsContentBlockType" + url: + description: URL of the image. Required for `image` blocks. + example: "https://example.com/image.png" + type: string + required: + - type + type: object + LLMObsContentBlockHeaderLevel: + description: Visual size for a `header` block. + enum: + - sm + - md + - lg + - xl + example: md + type: string + x-enum-varnames: + - SM + - MD + - LG + - XL + LLMObsContentBlockLLMObsTraceInteractionType: + description: |- + Upstream interaction type referenced by an `llmobs_trace` block. + Restricted to `trace` or `experiment_trace`. + enum: + - trace + - experiment_trace + example: trace + type: string + x-enum-varnames: + - TRACE + - EXPERIMENT_TRACE + LLMObsContentBlockTimeFrame: + description: Unix-millis time range used by chart blocks. + properties: + end: + description: End of the range, in Unix milliseconds. + example: 1705315800000 + format: int64 + type: integer + start: + description: Start of the range, in Unix milliseconds. + example: 1705312200000 + format: int64 + type: integer + required: + - start + - end + type: object + LLMObsContentBlockType: + description: |- + Discriminator for a single `display_block` content block. Adding a + variant requires coordinated changes in the frontend renderer. + enum: + - markdown + - header + - text + - json + - image + - widget + - llmobs_trace + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + - HEADER + - TEXT + - JSON + - IMAGE + - WIDGET + - LLMOBS_TRACE + LLMObsContentBlocks: + description: |- + List of content blocks that make up a `display_block` interaction. + Must contain at least one block. + items: + $ref: "#/components/schemas/LLMObsContentBlock" + minItems: 1 + type: array LLMObsCursorMeta: description: Pagination cursor metadata. properties: @@ -41266,6 +41372,81 @@ components: required: - data type: object + LLMObsDisplayBlockAnnotatedInteractionItem: + description: A display_block interaction with its associated annotations. + properties: + annotations: + description: List of annotations for this interaction. + items: + $ref: "#/components/schemas/LLMObsAnnotationItem" + type: array + content_id: + description: Server-generated deterministic identifier derived from the block list. + example: "9a87f3e2b1d4c5a6f8b3e2d1c4a7b5f6e3d2a1c4b7e5f8a3d6c2e1b4a7d5f8c2" + type: string + display_block: + $ref: "#/components/schemas/LLMObsContentBlocks" + id: + description: Unique identifier of the interaction. + example: "interaction-456" + type: string + type: + $ref: "#/components/schemas/LLMObsDisplayBlockInteractionType" + required: + - id + - type + - content_id + - annotations + - display_block + type: object + LLMObsDisplayBlockInteractionItem: + description: |- + An interaction whose rendered content is supplied directly as a list + of display blocks. The server generates `content_id` deterministically + from the block list. + properties: + display_block: + $ref: "#/components/schemas/LLMObsContentBlocks" + type: + $ref: "#/components/schemas/LLMObsDisplayBlockInteractionType" + required: + - type + - display_block + type: object + LLMObsDisplayBlockInteractionResponseItem: + description: A display_block interaction result. + properties: + already_existed: + description: Whether this interaction already existed in the queue. + example: false + type: boolean + content_id: + description: Server-generated deterministic identifier derived from the block list. + example: "9a87f3e2b1d4c5a6f8b3e2d1c4a7b5f6e3d2a1c4b7e5f8a3d6c2e1b4a7d5f8c2" + type: string + display_block: + $ref: "#/components/schemas/LLMObsContentBlocks" + id: + description: Unique identifier of the interaction. + example: "00000000-0000-0000-0000-000000000000" + type: string + type: + $ref: "#/components/schemas/LLMObsDisplayBlockInteractionType" + required: + - id + - type + - content_id + - already_existed + - display_block + type: object + LLMObsDisplayBlockInteractionType: + description: Type discriminator for a `display_block` interaction. + enum: + - display_block + example: display_block + type: string + x-enum-varnames: + - DISPLAY_BLOCK LLMObsEventType: description: Resource type for LLM Observability experiment events. enum: @@ -41643,18 +41824,6 @@ components: required: - data type: object - LLMObsInteractionType: - description: Type of interaction in an annotation queue. - enum: - - trace - - experiment_trace - - session - example: trace - type: string - x-enum-varnames: - - TRACE - - EXPERIMENT_TRACE - - SESSION LLMObsLabelSchema: description: Schema definition for a single label in an annotation queue. properties: @@ -41896,6 +42065,78 @@ components: type: string x-enum-varnames: - RECORDS + LLMObsTraceAnnotatedInteractionItem: + description: A trace, experiment trace, or session interaction with its associated annotations. + properties: + annotations: + description: List of annotations for this interaction. + items: + $ref: "#/components/schemas/LLMObsAnnotationItem" + type: array + content_id: + description: Upstream entity identifier supplied by the caller. + example: "trace-abc-123" + type: string + id: + description: Unique identifier of the interaction. + example: "interaction-456" + type: string + type: + $ref: "#/components/schemas/LLMObsTraceInteractionType" + required: + - id + - type + - content_id + - annotations + type: object + LLMObsTraceInteractionItem: + description: An interaction that references an upstream trace, experiment trace, or session. + properties: + content_id: + description: Upstream entity identifier (trace, experiment trace, or session ID). + example: "trace-abc-123" + type: string + type: + $ref: "#/components/schemas/LLMObsTraceInteractionType" + required: + - type + - content_id + type: object + LLMObsTraceInteractionResponseItem: + description: A trace, experiment trace, or session interaction result. + properties: + already_existed: + description: Whether this interaction already existed in the queue. + example: false + type: boolean + content_id: + description: Upstream entity identifier supplied by the caller. + 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/LLMObsTraceInteractionType" + required: + - id + - type + - content_id + - already_existed + type: object + LLMObsTraceInteractionType: + description: Type of an upstream-entity interaction. + enum: + - trace + - experiment_trace + - session + example: trace + type: string + x-enum-varnames: + - TRACE + - EXPERIMENT_TRACE + - SESSION Language: description: Programming language enum: @@ -113835,8 +114076,16 @@ paths: /api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions: post: description: |- - Add one or more interactions (traces or sessions) to an annotation queue. - At least one interaction must be provided. + Add one or more interactions to an annotation queue. At least one + interaction must be provided. Each interaction has a `type`: + + - `trace`, `experiment_trace`, `session`: `content_id` references the + upstream entity; the server fetches the actual content. + - `display_block`: omit `content_id` and provide the rendered content + in `display_block`. The server generates `content_id` as a + deterministic hash of the block list. + + Items of different types can be mixed in a single request. operationId: CreateLLMObsAnnotationQueueInteractions parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -113852,6 +114101,24 @@ paths: - content_id: trace-abc-123 type: trace type: interactions + display_block: + summary: Add a display_block interaction + value: + data: + attributes: + interactions: + - display_block: + - content: "## Triage Instructions" + type: markdown + - content: "Inputs" + level: md + type: header + - content: + experiment_id: abc-123 + label: "Experiments" + type: json + type: display_block + type: interactions schema: $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsRequest" description: Add interactions payload. @@ -113872,6 +114139,21 @@ paths: type: trace id: 00000000-0000-0000-0000-000000000001 type: interactions + display_block: + summary: display_block response + value: + data: + attributes: + interactions: + - already_existed: false + content_id: 9a87f3e2b1d4c5a6f8b3e2d1c4a7b5f6e3d2a1c4b7e5f8a3d6c2e1b4a7d5f8c2 + display_block: + - content: "## Triage Instructions" + type: markdown + id: 00000000-0000-0000-0000-000000000000 + type: display_block + id: 00000000-0000-0000-0000-000000000001 + type: interactions schema: $ref: "#/components/schemas/LLMObsAnnotationQueueInteractionsResponse" description: Created diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index ef362a0afc..019a1a618c 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -17574,6 +17574,41 @@ datadog\_api\_client.v2.model.llm\_obs\_annotation\_schema module :members: :show-inheritance: +datadog\_api\_client.v2.model.llm\_obs\_content\_block module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_content_block + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_content\_block\_header\_level module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_content_block_header_level + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_content\_block\_llm\_obs\_trace\_interaction\_type module +------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_content_block_llm_obs_trace_interaction_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_content\_block\_time\_frame module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_content_block_time_frame + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_content\_block\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_content_block_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.llm\_obs\_cursor\_meta module ----------------------------------------------------------- @@ -18008,6 +18043,34 @@ datadog\_api\_client.v2.model.llm\_obs\_delete\_projects\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.llm\_obs\_display\_block\_annotated\_interaction\_item module +------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_display_block_annotated_interaction_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_display\_block\_interaction\_item module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_display_block_interaction_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_display\_block\_interaction\_response\_item module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_display_block_interaction_response_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_display\_block\_interaction\_type module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_display_block_interaction_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.llm\_obs\_event\_type module ---------------------------------------------------------- @@ -18155,13 +18218,6 @@ datadog\_api\_client.v2.model.llm\_obs\_experiments\_response module :members: :show-inheritance: -datadog\_api\_client.v2.model.llm\_obs\_interaction\_type module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.llm_obs_interaction_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.llm\_obs\_label\_schema module ------------------------------------------------------------ @@ -18274,6 +18330,34 @@ datadog\_api\_client.v2.model.llm\_obs\_record\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.llm\_obs\_trace\_annotated\_interaction\_item module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_trace_annotated_interaction_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_trace\_interaction\_item module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_trace_interaction_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_trace\_interaction\_response\_item module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_trace_interaction_response_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_trace\_interaction\_type module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_trace_interaction_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.log module ---------------------------------------- diff --git a/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions.py b/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions.py index 3c7b8a2359..2d19307f6b 100644 --- a/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions.py +++ b/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi -from datadog_api_client.v2.model.llm_obs_annotation_queue_interaction_item import LLMObsAnnotationQueueInteractionItem from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_data_attributes_request import ( LLMObsAnnotationQueueInteractionsDataAttributesRequest, ) @@ -15,15 +14,16 @@ LLMObsAnnotationQueueInteractionsRequest, ) from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_type import LLMObsAnnotationQueueInteractionsType -from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType +from datadog_api_client.v2.model.llm_obs_trace_interaction_item import LLMObsTraceInteractionItem +from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType body = LLMObsAnnotationQueueInteractionsRequest( data=LLMObsAnnotationQueueInteractionsDataRequest( attributes=LLMObsAnnotationQueueInteractionsDataAttributesRequest( interactions=[ - LLMObsAnnotationQueueInteractionItem( + LLMObsTraceInteractionItem( content_id="trace-abc-123", - type=LLMObsInteractionType.TRACE, + type=LLMObsTraceInteractionType.TRACE, ), ], ), diff --git a/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions_2021594537.py b/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions_2021594537.py new file mode 100644 index 0000000000..3e153c2ae1 --- /dev/null +++ b/examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions_2021594537.py @@ -0,0 +1,47 @@ +""" +Add a display_block interaction returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi +from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_data_attributes_request import ( + LLMObsAnnotationQueueInteractionsDataAttributesRequest, +) +from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_data_request import ( + LLMObsAnnotationQueueInteractionsDataRequest, +) +from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_request import ( + LLMObsAnnotationQueueInteractionsRequest, +) +from datadog_api_client.v2.model.llm_obs_annotation_queue_interactions_type import LLMObsAnnotationQueueInteractionsType +from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock +from datadog_api_client.v2.model.llm_obs_content_block_type import LLMObsContentBlockType +from datadog_api_client.v2.model.llm_obs_display_block_interaction_item import LLMObsDisplayBlockInteractionItem +from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + +body = LLMObsAnnotationQueueInteractionsRequest( + data=LLMObsAnnotationQueueInteractionsDataRequest( + attributes=LLMObsAnnotationQueueInteractionsDataAttributesRequest( + interactions=[ + LLMObsDisplayBlockInteractionItem( + type=LLMObsDisplayBlockInteractionType.DISPLAY_BLOCK, + display_block=[ + LLMObsContentBlock( + type=LLMObsContentBlockType.MARKDOWN, + content="## Triage Instructions", + ), + ], + ), + ], + ), + type=LLMObsAnnotationQueueInteractionsType.INTERACTIONS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_llm_obs_annotation_queue_interactions"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.create_llm_obs_annotation_queue_interactions(queue_id="queue_id", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/llm_observability_api.py b/src/datadog_api_client/v2/api/llm_observability_api.py index f92e8cd67a..83affbd217 100644 --- a/src/datadog_api_client/v2/api/llm_observability_api.py +++ b/src/datadog_api_client/v2/api/llm_observability_api.py @@ -890,8 +890,16 @@ def create_llm_obs_annotation_queue_interactions( ) -> LLMObsAnnotationQueueInteractionsResponse: """Add annotation queue interactions. - Add one or more interactions (traces or sessions) to an annotation queue. - At least one interaction must be provided. + Add one or more interactions to an annotation queue. At least one + interaction must be provided. Each interaction has a ``type`` : + + * ``trace`` , ``experiment_trace`` , ``session`` : ``content_id`` references the + upstream entity; the server fetches the actual content. + * ``display_block`` : omit ``content_id`` and provide the rendered content + in ``display_block``. The server generates ``content_id`` as a + deterministic hash of the block list. + + Items of different types can be mixed in a single request. :param queue_id: The ID of the LLM Observability annotation queue. :type queue_id: str diff --git a/src/datadog_api_client/v2/model/llm_obs_annotated_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_annotated_interaction_item.py index 0658ec11e3..87a2532bad 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotated_interaction_item.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotated_interaction_item.py @@ -3,60 +3,55 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING from datadog_api_client.model_utils import ( - ModelNormal, + ModelComposed, cached_property, ) -if TYPE_CHECKING: - from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - -class LLMObsAnnotatedInteractionItem(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - return { - "annotations": ([LLMObsAnnotationItem],), - "content_id": (str,), - "id": (str,), - "type": (LLMObsInteractionType,), - } - - attribute_map = { - "annotations": "annotations", - "content_id": "content_id", - "id": "id", - "type": "type", - } - - def __init__( - self_, annotations: List[LLMObsAnnotationItem], content_id: str, id: str, type: LLMObsInteractionType, **kwargs - ): +class LLMObsAnnotatedInteractionItem(ModelComposed): + def __init__(self, **kwargs): """ An interaction with its associated annotations. :param annotations: List of annotations for this interaction. :type annotations: [LLMObsAnnotationItem] - :param content_id: Identifier of the content (trace ID or session ID) for this interaction. + :param content_id: Upstream entity identifier supplied by the caller. :type content_id: str :param id: Unique identifier of the interaction. :type id: str - :param type: Type of interaction in an annotation queue. - :type type: LLMObsInteractionType + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + + :param display_block: List of content blocks that make up a `display_block` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] """ super().__init__(kwargs) - self_.annotations = annotations - self_.content_id = content_id - self_.id = id - self_.type = type + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.llm_obs_trace_annotated_interaction_item import ( + LLMObsTraceAnnotatedInteractionItem, + ) + from datadog_api_client.v2.model.llm_obs_display_block_annotated_interaction_item import ( + LLMObsDisplayBlockAnnotatedInteractionItem, + ) + + return { + "oneOf": [ + LLMObsTraceAnnotatedInteractionItem, + LLMObsDisplayBlockAnnotatedInteractionItem, + ], + } diff --git a/src/datadog_api_client/v2/model/llm_obs_annotated_interactions_data_attributes_response.py b/src/datadog_api_client/v2/model/llm_obs_annotated_interactions_data_attributes_response.py index 440f89dae0..5718c2519e 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotated_interactions_data_attributes_response.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotated_interactions_data_attributes_response.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,6 +13,10 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.llm_obs_annotated_interaction_item import LLMObsAnnotatedInteractionItem + from datadog_api_client.v2.model.llm_obs_trace_annotated_interaction_item import LLMObsTraceAnnotatedInteractionItem + from datadog_api_client.v2.model.llm_obs_display_block_annotated_interaction_item import ( + LLMObsDisplayBlockAnnotatedInteractionItem, + ) class LLMObsAnnotatedInteractionsDataAttributesResponse(ModelNormal): @@ -28,7 +32,17 @@ def openapi_types(_): "annotated_interactions": "annotated_interactions", } - def __init__(self_, annotated_interactions: List[LLMObsAnnotatedInteractionItem], **kwargs): + def __init__( + self_, + annotated_interactions: List[ + Union[ + LLMObsAnnotatedInteractionItem, + LLMObsTraceAnnotatedInteractionItem, + LLMObsDisplayBlockAnnotatedInteractionItem, + ] + ], + **kwargs, + ): """ Attributes containing the list of annotated interactions. diff --git a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_item.py index a937764106..7ef54bf709 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_item.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_item.py @@ -3,44 +3,45 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import TYPE_CHECKING from datadog_api_client.model_utils import ( - ModelNormal, + ModelComposed, cached_property, ) -if TYPE_CHECKING: - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - -class LLMObsAnnotationQueueInteractionItem(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - return { - "content_id": (str,), - "type": (LLMObsInteractionType,), - } - - attribute_map = { - "content_id": "content_id", - "type": "type", - } - - def __init__(self_, content_id: str, type: LLMObsInteractionType, **kwargs): +class LLMObsAnnotationQueueInteractionItem(ModelComposed): + def __init__(self, **kwargs): """ A single interaction to add to an annotation queue. - :param content_id: Identifier of the content (trace ID or session ID) for this interaction. + :param content_id: Upstream entity identifier (trace, experiment trace, or session ID). :type content_id: str - :param type: Type of interaction in an annotation queue. - :type type: LLMObsInteractionType + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + + :param display_block: List of content blocks that make up a `display_block` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] """ super().__init__(kwargs) - self_.content_id = content_id - self_.type = type + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.llm_obs_trace_interaction_item import LLMObsTraceInteractionItem + from datadog_api_client.v2.model.llm_obs_display_block_interaction_item import LLMObsDisplayBlockInteractionItem + + return { + "oneOf": [ + LLMObsTraceInteractionItem, + LLMObsDisplayBlockInteractionItem, + ], + } diff --git a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_response_item.py b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_response_item.py index d072f262ab..9b5de0e7c2 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_response_item.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interaction_response_item.py @@ -3,56 +3,55 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import TYPE_CHECKING from datadog_api_client.model_utils import ( - ModelNormal, + ModelComposed, cached_property, ) -if TYPE_CHECKING: - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - -class LLMObsAnnotationQueueInteractionResponseItem(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType - - return { - "already_existed": (bool,), - "content_id": (str,), - "id": (str,), - "type": (LLMObsInteractionType,), - } - - attribute_map = { - "already_existed": "already_existed", - "content_id": "content_id", - "id": "id", - "type": "type", - } - - def __init__(self_, already_existed: bool, content_id: str, id: str, type: LLMObsInteractionType, **kwargs): +class LLMObsAnnotationQueueInteractionResponseItem(ModelComposed): + def __init__(self, **kwargs): """ A single interaction result. :param already_existed: Whether this interaction already existed in the queue. :type already_existed: bool - :param content_id: Identifier of the content (trace ID or session ID) for this interaction. + :param content_id: Upstream entity identifier supplied by the caller. :type content_id: str :param id: Unique identifier of the interaction. :type id: str - :param type: Type of interaction in an annotation queue. - :type type: LLMObsInteractionType + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + + :param display_block: List of content blocks that make up a `display_block` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] """ super().__init__(kwargs) - self_.already_existed = already_existed - self_.content_id = content_id - self_.id = id - self_.type = type + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.llm_obs_trace_interaction_response_item import ( + LLMObsTraceInteractionResponseItem, + ) + from datadog_api_client.v2.model.llm_obs_display_block_interaction_response_item import ( + LLMObsDisplayBlockInteractionResponseItem, + ) + + return { + "oneOf": [ + LLMObsTraceInteractionResponseItem, + LLMObsDisplayBlockInteractionResponseItem, + ], + } diff --git a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_request.py b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_request.py index a08968ab54..49c7b1be91 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_request.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_request.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -15,6 +15,8 @@ from datadog_api_client.v2.model.llm_obs_annotation_queue_interaction_item import ( LLMObsAnnotationQueueInteractionItem, ) + from datadog_api_client.v2.model.llm_obs_trace_interaction_item import LLMObsTraceInteractionItem + from datadog_api_client.v2.model.llm_obs_display_block_interaction_item import LLMObsDisplayBlockInteractionItem class LLMObsAnnotationQueueInteractionsDataAttributesRequest(ModelNormal): @@ -38,7 +40,13 @@ def openapi_types(_): "interactions": "interactions", } - def __init__(self_, interactions: List[LLMObsAnnotationQueueInteractionItem], **kwargs): + def __init__( + self_, + interactions: List[ + Union[LLMObsAnnotationQueueInteractionItem, LLMObsTraceInteractionItem, LLMObsDisplayBlockInteractionItem] + ], + **kwargs, + ): """ Attributes for adding interactions to an annotation queue. diff --git a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_response.py b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_response.py index 9bac3d7835..97d7713cca 100644 --- a/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_response.py +++ b/src/datadog_api_client/v2/model/llm_obs_annotation_queue_interactions_data_attributes_response.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -15,6 +15,10 @@ from datadog_api_client.v2.model.llm_obs_annotation_queue_interaction_response_item import ( LLMObsAnnotationQueueInteractionResponseItem, ) + from datadog_api_client.v2.model.llm_obs_trace_interaction_response_item import LLMObsTraceInteractionResponseItem + from datadog_api_client.v2.model.llm_obs_display_block_interaction_response_item import ( + LLMObsDisplayBlockInteractionResponseItem, + ) class LLMObsAnnotationQueueInteractionsDataAttributesResponse(ModelNormal): @@ -32,7 +36,17 @@ def openapi_types(_): "interactions": "interactions", } - def __init__(self_, interactions: List[LLMObsAnnotationQueueInteractionResponseItem], **kwargs): + def __init__( + self_, + interactions: List[ + Union[ + LLMObsAnnotationQueueInteractionResponseItem, + LLMObsTraceInteractionResponseItem, + LLMObsDisplayBlockInteractionResponseItem, + ] + ], + **kwargs, + ): """ Attributes of the interaction addition response. diff --git a/src/datadog_api_client/v2/model/llm_obs_content_block.py b/src/datadog_api_client/v2/model/llm_obs_content_block.py new file mode 100644 index 0000000000..188d48dae4 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_content_block.py @@ -0,0 +1,177 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_content_block_llm_obs_trace_interaction_type import ( + LLMObsContentBlockLLMObsTraceInteractionType, + ) + from datadog_api_client.v2.model.llm_obs_content_block_header_level import LLMObsContentBlockHeaderLevel + from datadog_api_client.v2.model.llm_obs_content_block_time_frame import LLMObsContentBlockTimeFrame + from datadog_api_client.v2.model.llm_obs_content_block_type import LLMObsContentBlockType + + +class LLMObsContentBlock(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_content_block_llm_obs_trace_interaction_type import ( + LLMObsContentBlockLLMObsTraceInteractionType, + ) + from datadog_api_client.v2.model.llm_obs_content_block_header_level import LLMObsContentBlockHeaderLevel + from datadog_api_client.v2.model.llm_obs_content_block_time_frame import LLMObsContentBlockTimeFrame + from datadog_api_client.v2.model.llm_obs_content_block_type import LLMObsContentBlockType + + return { + "alt": (str,), + "content": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "height": (int,), + "interaction_type": (LLMObsContentBlockLLMObsTraceInteractionType,), + "label": (str,), + "level": (LLMObsContentBlockHeaderLevel,), + "tile_def": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "time_frame": (LLMObsContentBlockTimeFrame,), + "trace_id": (str,), + "type": (LLMObsContentBlockType,), + "url": (str,), + } + + attribute_map = { + "alt": "alt", + "content": "content", + "height": "height", + "interaction_type": "interactionType", + "label": "label", + "level": "level", + "tile_def": "tileDef", + "time_frame": "timeFrame", + "trace_id": "traceId", + "type": "type", + "url": "url", + } + + def __init__( + self_, + type: LLMObsContentBlockType, + alt: Union[str, UnsetType] = unset, + content: Union[Any, UnsetType] = unset, + height: Union[int, UnsetType] = unset, + interaction_type: Union[LLMObsContentBlockLLMObsTraceInteractionType, UnsetType] = unset, + label: Union[str, UnsetType] = unset, + level: Union[LLMObsContentBlockHeaderLevel, UnsetType] = unset, + tile_def: Union[Any, UnsetType] = unset, + time_frame: Union[LLMObsContentBlockTimeFrame, UnsetType] = unset, + trace_id: Union[str, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A single content block rendered inside a ``display_block`` interaction. + ``type`` discriminates which other fields are meaningful: + + * ``markdown`` / ``text`` : ``content`` must be a string. + * ``header`` : ``content`` must be a string; ``level`` , when set, must be one of ``sm`` , ``md`` , ``lg`` , ``xl``. + * ``json`` : ``content`` must be a well-formed JSON value (object, array, or scalar). + * ``image`` : ``url`` is required. + * ``widget`` : ``tileDef`` is required (any well-formed JSON; the frontend owns the renderable schema). + * ``llmobs_trace`` : ``traceId`` is required; ``interactionType`` , when set, must be ``trace`` or ``experiment_trace``. + + ``height`` , when set, must be positive. + + :param alt: Alternative text for an ``image`` block. + :type alt: str, optional + + :param content: Block payload. A string for ``markdown`` , ``header`` , and ``text`` ; an + arbitrary JSON value (object, array, or scalar) for ``json``. Omitted + for ``image`` , ``widget`` , and ``llmobs_trace``. + :type content: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param height: Optional rendered height. Must be positive when set. + :type height: int, optional + + :param interaction_type: Upstream interaction type referenced by an ``llmobs_trace`` block. + Restricted to ``trace`` or ``experiment_trace``. + :type interaction_type: LLMObsContentBlockLLMObsTraceInteractionType, optional + + :param label: Optional label rendered alongside the block. + :type label: str, optional + + :param level: Visual size for a ``header`` block. + :type level: LLMObsContentBlockHeaderLevel, optional + + :param tile_def: Tile definition for a ``widget`` block. Required for ``widget``. The + schema is owned by the frontend renderer. + :type tile_def: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param time_frame: Unix-millis time range used by chart blocks. + :type time_frame: LLMObsContentBlockTimeFrame, optional + + :param trace_id: Trace identifier. Required for ``llmobs_trace`` blocks. + :type trace_id: str, optional + + :param type: Discriminator for a single ``display_block`` content block. Adding a + variant requires coordinated changes in the frontend renderer. + :type type: LLMObsContentBlockType + + :param url: URL of the image. Required for ``image`` blocks. + :type url: str, optional + """ + if alt is not unset: + kwargs["alt"] = alt + if content is not unset: + kwargs["content"] = content + if height is not unset: + kwargs["height"] = height + if interaction_type is not unset: + kwargs["interaction_type"] = interaction_type + if label is not unset: + kwargs["label"] = label + if level is not unset: + kwargs["level"] = level + if tile_def is not unset: + kwargs["tile_def"] = tile_def + if time_frame is not unset: + kwargs["time_frame"] = time_frame + if trace_id is not unset: + kwargs["trace_id"] = trace_id + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_content_block_header_level.py b/src/datadog_api_client/v2/model/llm_obs_content_block_header_level.py new file mode 100644 index 0000000000..290b875a37 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_content_block_header_level.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsContentBlockHeaderLevel(ModelSimple): + """ + Visual size for a `header` block. + + :param value: Must be one of ["sm", "md", "lg", "xl"]. + :type value: str + """ + + allowed_values = { + "sm", + "md", + "lg", + "xl", + } + SM: ClassVar["LLMObsContentBlockHeaderLevel"] + MD: ClassVar["LLMObsContentBlockHeaderLevel"] + LG: ClassVar["LLMObsContentBlockHeaderLevel"] + XL: ClassVar["LLMObsContentBlockHeaderLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsContentBlockHeaderLevel.SM = LLMObsContentBlockHeaderLevel("sm") +LLMObsContentBlockHeaderLevel.MD = LLMObsContentBlockHeaderLevel("md") +LLMObsContentBlockHeaderLevel.LG = LLMObsContentBlockHeaderLevel("lg") +LLMObsContentBlockHeaderLevel.XL = LLMObsContentBlockHeaderLevel("xl") diff --git a/src/datadog_api_client/v2/model/llm_obs_content_block_llm_obs_trace_interaction_type.py b/src/datadog_api_client/v2/model/llm_obs_content_block_llm_obs_trace_interaction_type.py new file mode 100644 index 0000000000..c572990885 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_content_block_llm_obs_trace_interaction_type.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsContentBlockLLMObsTraceInteractionType(ModelSimple): + """ + Upstream interaction type referenced by an `llmobs_trace` block. + Restricted to `trace` or `experiment_trace`. + + :param value: Must be one of ["trace", "experiment_trace"]. + :type value: str + """ + + allowed_values = { + "trace", + "experiment_trace", + } + TRACE: ClassVar["LLMObsContentBlockLLMObsTraceInteractionType"] + EXPERIMENT_TRACE: ClassVar["LLMObsContentBlockLLMObsTraceInteractionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsContentBlockLLMObsTraceInteractionType.TRACE = LLMObsContentBlockLLMObsTraceInteractionType("trace") +LLMObsContentBlockLLMObsTraceInteractionType.EXPERIMENT_TRACE = LLMObsContentBlockLLMObsTraceInteractionType( + "experiment_trace" +) diff --git a/src/datadog_api_client/v2/model/llm_obs_content_block_time_frame.py b/src/datadog_api_client/v2/model/llm_obs_content_block_time_frame.py new file mode 100644 index 0000000000..706fd59938 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_content_block_time_frame.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class LLMObsContentBlockTimeFrame(ModelNormal): + @cached_property + def openapi_types(_): + return { + "end": (int,), + "start": (int,), + } + + attribute_map = { + "end": "end", + "start": "start", + } + + def __init__(self_, end: int, start: int, **kwargs): + """ + Unix-millis time range used by chart blocks. + + :param end: End of the range, in Unix milliseconds. + :type end: int + + :param start: Start of the range, in Unix milliseconds. + :type start: int + """ + super().__init__(kwargs) + + self_.end = end + self_.start = start diff --git a/src/datadog_api_client/v2/model/llm_obs_content_block_type.py b/src/datadog_api_client/v2/model/llm_obs_content_block_type.py new file mode 100644 index 0000000000..dd9564c6d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_content_block_type.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsContentBlockType(ModelSimple): + """ + Discriminator for a single `display_block` content block. Adding a + variant requires coordinated changes in the frontend renderer. + + :param value: Must be one of ["markdown", "header", "text", "json", "image", "widget", "llmobs_trace"]. + :type value: str + """ + + allowed_values = { + "markdown", + "header", + "text", + "json", + "image", + "widget", + "llmobs_trace", + } + MARKDOWN: ClassVar["LLMObsContentBlockType"] + HEADER: ClassVar["LLMObsContentBlockType"] + TEXT: ClassVar["LLMObsContentBlockType"] + JSON: ClassVar["LLMObsContentBlockType"] + IMAGE: ClassVar["LLMObsContentBlockType"] + WIDGET: ClassVar["LLMObsContentBlockType"] + LLMOBS_TRACE: ClassVar["LLMObsContentBlockType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsContentBlockType.MARKDOWN = LLMObsContentBlockType("markdown") +LLMObsContentBlockType.HEADER = LLMObsContentBlockType("header") +LLMObsContentBlockType.TEXT = LLMObsContentBlockType("text") +LLMObsContentBlockType.JSON = LLMObsContentBlockType("json") +LLMObsContentBlockType.IMAGE = LLMObsContentBlockType("image") +LLMObsContentBlockType.WIDGET = LLMObsContentBlockType("widget") +LLMObsContentBlockType.LLMOBS_TRACE = LLMObsContentBlockType("llmobs_trace") diff --git a/src/datadog_api_client/v2/model/llm_obs_display_block_annotated_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_display_block_annotated_interaction_item.py new file mode 100644 index 0000000000..0edb149eb3 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_display_block_annotated_interaction_item.py @@ -0,0 +1,83 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + +class LLMObsDisplayBlockAnnotatedInteractionItem(ModelNormal): + validations = { + "display_block": { + "min_items": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + return { + "annotations": ([LLMObsAnnotationItem],), + "content_id": (str,), + "display_block": ([LLMObsContentBlock],), + "id": (str,), + "type": (LLMObsDisplayBlockInteractionType,), + } + + attribute_map = { + "annotations": "annotations", + "content_id": "content_id", + "display_block": "display_block", + "id": "id", + "type": "type", + } + + def __init__( + self_, + annotations: List[LLMObsAnnotationItem], + content_id: str, + display_block: List[LLMObsContentBlock], + id: str, + type: LLMObsDisplayBlockInteractionType, + **kwargs, + ): + """ + A display_block interaction with its associated annotations. + + :param annotations: List of annotations for this interaction. + :type annotations: [LLMObsAnnotationItem] + + :param content_id: Server-generated deterministic identifier derived from the block list. + :type content_id: str + + :param display_block: List of content blocks that make up a ``display_block`` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] + + :param id: Unique identifier of the interaction. + :type id: str + + :param type: Type discriminator for a ``display_block`` interaction. + :type type: LLMObsDisplayBlockInteractionType + """ + super().__init__(kwargs) + + self_.annotations = annotations + self_.content_id = content_id + self_.display_block = display_block + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_item.py new file mode 100644 index 0000000000..bf93b4e478 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_item.py @@ -0,0 +1,57 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + +class LLMObsDisplayBlockInteractionItem(ModelNormal): + validations = { + "display_block": { + "min_items": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + return { + "display_block": ([LLMObsContentBlock],), + "type": (LLMObsDisplayBlockInteractionType,), + } + + attribute_map = { + "display_block": "display_block", + "type": "type", + } + + def __init__(self_, display_block: List[LLMObsContentBlock], type: LLMObsDisplayBlockInteractionType, **kwargs): + """ + An interaction whose rendered content is supplied directly as a list + of display blocks. The server generates ``content_id`` deterministically + from the block list. + + :param display_block: List of content blocks that make up a ``display_block`` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] + + :param type: Type discriminator for a ``display_block`` interaction. + :type type: LLMObsDisplayBlockInteractionType + """ + super().__init__(kwargs) + + self_.display_block = display_block + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_response_item.py b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_response_item.py new file mode 100644 index 0000000000..1673f294df --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_response_item.py @@ -0,0 +1,81 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + +class LLMObsDisplayBlockInteractionResponseItem(ModelNormal): + validations = { + "display_block": { + "min_items": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock + from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType + + return { + "already_existed": (bool,), + "content_id": (str,), + "display_block": ([LLMObsContentBlock],), + "id": (str,), + "type": (LLMObsDisplayBlockInteractionType,), + } + + attribute_map = { + "already_existed": "already_existed", + "content_id": "content_id", + "display_block": "display_block", + "id": "id", + "type": "type", + } + + def __init__( + self_, + already_existed: bool, + content_id: str, + display_block: List[LLMObsContentBlock], + id: str, + type: LLMObsDisplayBlockInteractionType, + **kwargs, + ): + """ + A display_block interaction result. + + :param already_existed: Whether this interaction already existed in the queue. + :type already_existed: bool + + :param content_id: Server-generated deterministic identifier derived from the block list. + :type content_id: str + + :param display_block: List of content blocks that make up a ``display_block`` interaction. + Must contain at least one block. + :type display_block: [LLMObsContentBlock] + + :param id: Unique identifier of the interaction. + :type id: str + + :param type: Type discriminator for a ``display_block`` interaction. + :type type: LLMObsDisplayBlockInteractionType + """ + super().__init__(kwargs) + + self_.already_existed = already_existed + self_.content_id = content_id + self_.display_block = display_block + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_type.py b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_type.py new file mode 100644 index 0000000000..3e35c35750 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_display_block_interaction_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsDisplayBlockInteractionType(ModelSimple): + """ + Type discriminator for a `display_block` interaction. + + :param value: If omitted defaults to "display_block". Must be one of ["display_block"]. + :type value: str + """ + + allowed_values = { + "display_block", + } + DISPLAY_BLOCK: ClassVar["LLMObsDisplayBlockInteractionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsDisplayBlockInteractionType.DISPLAY_BLOCK = LLMObsDisplayBlockInteractionType("display_block") diff --git a/src/datadog_api_client/v2/model/llm_obs_trace_annotated_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_trace_annotated_interaction_item.py new file mode 100644 index 0000000000..11f35e6eb1 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_trace_annotated_interaction_item.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + +class LLMObsTraceAnnotatedInteractionItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_annotation_item import LLMObsAnnotationItem + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + return { + "annotations": ([LLMObsAnnotationItem],), + "content_id": (str,), + "id": (str,), + "type": (LLMObsTraceInteractionType,), + } + + attribute_map = { + "annotations": "annotations", + "content_id": "content_id", + "id": "id", + "type": "type", + } + + def __init__( + self_, + annotations: List[LLMObsAnnotationItem], + content_id: str, + id: str, + type: LLMObsTraceInteractionType, + **kwargs, + ): + """ + A trace, experiment trace, or session interaction with its associated annotations. + + :param annotations: List of annotations for this interaction. + :type annotations: [LLMObsAnnotationItem] + + :param content_id: Upstream entity identifier supplied by the caller. + :type content_id: str + + :param id: Unique identifier of the interaction. + :type id: str + + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + """ + super().__init__(kwargs) + + self_.annotations = annotations + self_.content_id = content_id + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_trace_interaction_item.py b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_item.py new file mode 100644 index 0000000000..11466236dd --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_item.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + +class LLMObsTraceInteractionItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + return { + "content_id": (str,), + "type": (LLMObsTraceInteractionType,), + } + + attribute_map = { + "content_id": "content_id", + "type": "type", + } + + def __init__(self_, content_id: str, type: LLMObsTraceInteractionType, **kwargs): + """ + An interaction that references an upstream trace, experiment trace, or session. + + :param content_id: Upstream entity identifier (trace, experiment trace, or session ID). + :type content_id: str + + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + """ + super().__init__(kwargs) + + self_.content_id = content_id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_trace_interaction_response_item.py b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_response_item.py new file mode 100644 index 0000000000..f62ac6ba50 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_response_item.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + +class LLMObsTraceInteractionResponseItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType + + return { + "already_existed": (bool,), + "content_id": (str,), + "id": (str,), + "type": (LLMObsTraceInteractionType,), + } + + attribute_map = { + "already_existed": "already_existed", + "content_id": "content_id", + "id": "id", + "type": "type", + } + + def __init__(self_, already_existed: bool, content_id: str, id: str, type: LLMObsTraceInteractionType, **kwargs): + """ + A trace, experiment trace, or session interaction result. + + :param already_existed: Whether this interaction already existed in the queue. + :type already_existed: bool + + :param content_id: Upstream entity identifier supplied by the caller. + :type content_id: str + + :param id: Unique identifier of the interaction. + :type id: str + + :param type: Type of an upstream-entity interaction. + :type type: LLMObsTraceInteractionType + """ + super().__init__(kwargs) + + self_.already_existed = already_existed + self_.content_id = content_id + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_interaction_type.py b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_type.py similarity index 58% rename from src/datadog_api_client/v2/model/llm_obs_interaction_type.py rename to src/datadog_api_client/v2/model/llm_obs_trace_interaction_type.py index ba7a9f53ba..ae360f416a 100644 --- a/src/datadog_api_client/v2/model/llm_obs_interaction_type.py +++ b/src/datadog_api_client/v2/model/llm_obs_trace_interaction_type.py @@ -12,9 +12,9 @@ from typing import ClassVar -class LLMObsInteractionType(ModelSimple): +class LLMObsTraceInteractionType(ModelSimple): """ - Type of interaction in an annotation queue. + Type of an upstream-entity interaction. :param value: Must be one of ["trace", "experiment_trace", "session"]. :type value: str @@ -25,9 +25,9 @@ class LLMObsInteractionType(ModelSimple): "experiment_trace", "session", } - TRACE: ClassVar["LLMObsInteractionType"] - EXPERIMENT_TRACE: ClassVar["LLMObsInteractionType"] - SESSION: ClassVar["LLMObsInteractionType"] + TRACE: ClassVar["LLMObsTraceInteractionType"] + EXPERIMENT_TRACE: ClassVar["LLMObsTraceInteractionType"] + SESSION: ClassVar["LLMObsTraceInteractionType"] @cached_property def openapi_types(_): @@ -36,6 +36,6 @@ def openapi_types(_): } -LLMObsInteractionType.TRACE = LLMObsInteractionType("trace") -LLMObsInteractionType.EXPERIMENT_TRACE = LLMObsInteractionType("experiment_trace") -LLMObsInteractionType.SESSION = LLMObsInteractionType("session") +LLMObsTraceInteractionType.TRACE = LLMObsTraceInteractionType("trace") +LLMObsTraceInteractionType.EXPERIMENT_TRACE = LLMObsTraceInteractionType("experiment_trace") +LLMObsTraceInteractionType.SESSION = LLMObsTraceInteractionType("session") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 33de6c51a8..e1ca9fac28 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3226,6 +3226,13 @@ from datadog_api_client.v2.model.llm_obs_annotation_queue_update_request import LLMObsAnnotationQueueUpdateRequest from datadog_api_client.v2.model.llm_obs_annotation_queues_response import LLMObsAnnotationQueuesResponse from datadog_api_client.v2.model.llm_obs_annotation_schema import LLMObsAnnotationSchema +from datadog_api_client.v2.model.llm_obs_content_block import LLMObsContentBlock +from datadog_api_client.v2.model.llm_obs_content_block_header_level import LLMObsContentBlockHeaderLevel +from datadog_api_client.v2.model.llm_obs_content_block_llm_obs_trace_interaction_type import ( + LLMObsContentBlockLLMObsTraceInteractionType, +) +from datadog_api_client.v2.model.llm_obs_content_block_time_frame import LLMObsContentBlockTimeFrame +from datadog_api_client.v2.model.llm_obs_content_block_type import LLMObsContentBlockType from datadog_api_client.v2.model.llm_obs_cursor_meta import LLMObsCursorMeta from datadog_api_client.v2.model.llm_obs_custom_eval_config_assessment_criteria import ( LLMObsCustomEvalConfigAssessmentCriteria, @@ -3326,6 +3333,14 @@ ) from datadog_api_client.v2.model.llm_obs_delete_projects_data_request import LLMObsDeleteProjectsDataRequest from datadog_api_client.v2.model.llm_obs_delete_projects_request import LLMObsDeleteProjectsRequest +from datadog_api_client.v2.model.llm_obs_display_block_annotated_interaction_item import ( + LLMObsDisplayBlockAnnotatedInteractionItem, +) +from datadog_api_client.v2.model.llm_obs_display_block_interaction_item import LLMObsDisplayBlockInteractionItem +from datadog_api_client.v2.model.llm_obs_display_block_interaction_response_item import ( + LLMObsDisplayBlockInteractionResponseItem, +) +from datadog_api_client.v2.model.llm_obs_display_block_interaction_type import LLMObsDisplayBlockInteractionType from datadog_api_client.v2.model.llm_obs_event_type import LLMObsEventType from datadog_api_client.v2.model.llm_obs_experiment_data_attributes_request import LLMObsExperimentDataAttributesRequest from datadog_api_client.v2.model.llm_obs_experiment_data_attributes_response import ( @@ -3353,7 +3368,6 @@ from datadog_api_client.v2.model.llm_obs_experiment_update_data_request import LLMObsExperimentUpdateDataRequest from datadog_api_client.v2.model.llm_obs_experiment_update_request import LLMObsExperimentUpdateRequest from datadog_api_client.v2.model.llm_obs_experiments_response import LLMObsExperimentsResponse -from datadog_api_client.v2.model.llm_obs_interaction_type import LLMObsInteractionType from datadog_api_client.v2.model.llm_obs_label_schema import LLMObsLabelSchema from datadog_api_client.v2.model.llm_obs_label_schema_type import LLMObsLabelSchemaType from datadog_api_client.v2.model.llm_obs_metric_assessment import LLMObsMetricAssessment @@ -3372,6 +3386,10 @@ from datadog_api_client.v2.model.llm_obs_project_update_request import LLMObsProjectUpdateRequest from datadog_api_client.v2.model.llm_obs_projects_response import LLMObsProjectsResponse from datadog_api_client.v2.model.llm_obs_record_type import LLMObsRecordType +from datadog_api_client.v2.model.llm_obs_trace_annotated_interaction_item import LLMObsTraceAnnotatedInteractionItem +from datadog_api_client.v2.model.llm_obs_trace_interaction_item import LLMObsTraceInteractionItem +from datadog_api_client.v2.model.llm_obs_trace_interaction_response_item import LLMObsTraceInteractionResponseItem +from datadog_api_client.v2.model.llm_obs_trace_interaction_type import LLMObsTraceInteractionType from datadog_api_client.v2.model.language import Language from datadog_api_client.v2.model.launch_darkly_api_key import LaunchDarklyAPIKey from datadog_api_client.v2.model.launch_darkly_api_key_type import LaunchDarklyAPIKeyType @@ -10087,6 +10105,11 @@ "LLMObsAnnotationQueueUpdateRequest", "LLMObsAnnotationQueuesResponse", "LLMObsAnnotationSchema", + "LLMObsContentBlock", + "LLMObsContentBlockHeaderLevel", + "LLMObsContentBlockLLMObsTraceInteractionType", + "LLMObsContentBlockTimeFrame", + "LLMObsContentBlockType", "LLMObsCursorMeta", "LLMObsCustomEvalConfigAssessmentCriteria", "LLMObsCustomEvalConfigAttributes", @@ -10149,6 +10172,10 @@ "LLMObsDeleteProjectsDataAttributesRequest", "LLMObsDeleteProjectsDataRequest", "LLMObsDeleteProjectsRequest", + "LLMObsDisplayBlockAnnotatedInteractionItem", + "LLMObsDisplayBlockInteractionItem", + "LLMObsDisplayBlockInteractionResponseItem", + "LLMObsDisplayBlockInteractionType", "LLMObsEventType", "LLMObsExperimentDataAttributesRequest", "LLMObsExperimentDataAttributesResponse", @@ -10170,7 +10197,6 @@ "LLMObsExperimentUpdateDataRequest", "LLMObsExperimentUpdateRequest", "LLMObsExperimentsResponse", - "LLMObsInteractionType", "LLMObsLabelSchema", "LLMObsLabelSchemaType", "LLMObsMetricAssessment", @@ -10187,6 +10213,10 @@ "LLMObsProjectUpdateRequest", "LLMObsProjectsResponse", "LLMObsRecordType", + "LLMObsTraceAnnotatedInteractionItem", + "LLMObsTraceInteractionItem", + "LLMObsTraceInteractionResponseItem", + "LLMObsTraceInteractionType", "Language", "LaunchDarklyAPIKey", "LaunchDarklyAPIKeyType", diff --git a/tests/v2/features/llm_observability.feature b/tests/v2/features/llm_observability.feature index 639121ad23..20b95487da 100644 --- a/tests/v2/features/llm_observability.feature +++ b/tests/v2/features/llm_observability.feature @@ -8,6 +8,24 @@ Feature: LLM Observability And a valid "appKeyAuth" key in the system And an instance of "LLMObservability" API + @skip @team:DataDog/ml-observability + Scenario: Add a display_block interaction 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": [{"type": "display_block", "display_block": [{"type": "markdown", "content": "## Triage Instructions"}]}]}, "type": "interactions"}} + When the request is sent + Then the response status is 201 Created + + @skip @team:DataDog/ml-observability + Scenario: Add a display_block interaction with an image block missing url 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": [{"type": "display_block", "display_block": [{"type": "image"}]}]}, "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 "Bad Request" response Given operation "CreateLLMObsAnnotationQueueInteractions" enabled