From b343406e972f934a4b977cc0cc7fe36abbc1ae4e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 13 May 2026 20:28:07 +0000 Subject: [PATCH] Regenerate client from commit 5519b59 of spec repo --- .../en/api/v2/llm-observability/examples.json | 11 +- data/api/v2/full_spec.yaml | 418 +++++++++++++++--- data/api/v2/translate_actions.json | 2 +- 3 files changed, 355 insertions(+), 76 deletions(-) diff --git a/content/en/api/v2/llm-observability/examples.json b/content/en/api/v2/llm-observability/examples.json index 88c14e4d073..5694cf1f8ef 100644 --- a/content/en/api/v2/llm-observability/examples.json +++ b/content/en/api/v2/llm-observability/examples.json @@ -1025,7 +1025,7 @@ "type": "annotated_interactions" } }, - "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for annotated interactions.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes containing the list of annotated interactions.

\n
\n
\n
\n
\n
\n

annotated_interactions [required]

\n
\n

[object]

\n

List of interactions with their annotations.

\n
\n
\n
\n
\n
\n

annotations [required]

\n
\n

[object]

\n

List of annotations for this interaction.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was created.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

Identifier of the user who created the annotation.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the annotation.

\n
\n \n
\n
\n
\n
\n
\n

interaction_id [required]

\n
\n

string

\n

Identifier of the interaction this annotation belongs to.

\n
\n \n
\n
\n
\n
\n
\n

label_values [required]

\n
\n

object

\n

The label values for this annotation.

\n
\n \n
\n
\n
\n
\n
\n

modified_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was last modified.

\n
\n \n
\n
\n
\n
\n
\n

modified_by [required]

\n
\n

string

\n

Identifier of the user who last modified the annotation.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Identifier of the content (trace ID or session ID) for this interaction.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of interaction in an annotation queue. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The queue ID.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotated interactions. \nAllowed enum values: annotated_interactions

\n
\n \n
\n
\n
\n
" + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for annotated interactions.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes containing the list of annotated interactions.

\n
\n
\n
\n
\n
\n

annotated_interactions [required]

\n
\n

[ <oneOf>]

\n

List of interactions with their annotations.

\n
\n
\n
\n
\n
\n

Option 1

\n
\n

object

\n

A trace, experiment trace, or session interaction with its associated annotations.

\n
\n
\n
\n
\n
\n

annotations [required]

\n
\n

[object]

\n

List of annotations for this interaction.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was created.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

Identifier of the user who created the annotation.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the annotation.

\n
\n \n
\n
\n
\n
\n
\n

interaction_id [required]

\n
\n

string

\n

Identifier of the interaction this annotation belongs to.

\n
\n \n
\n
\n
\n
\n
\n

label_values [required]

\n
\n

object

\n

The label values for this annotation.

\n
\n \n
\n
\n
\n
\n
\n

modified_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was last modified.

\n
\n \n
\n
\n
\n
\n
\n

modified_by [required]

\n
\n

string

\n

Identifier of the user who last modified the annotation.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Upstream entity identifier supplied by the caller.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of an upstream-entity interaction. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

Option 2

\n
\n

object

\n

A display_block interaction with its associated annotations.

\n
\n
\n
\n
\n
\n

annotations [required]

\n
\n

[object]

\n

List of annotations for this interaction.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was created.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

Identifier of the user who created the annotation.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the annotation.

\n
\n \n
\n
\n
\n
\n
\n

interaction_id [required]

\n
\n

string

\n

Identifier of the interaction this annotation belongs to.

\n
\n \n
\n
\n
\n
\n
\n

label_values [required]

\n
\n

object

\n

The label values for this annotation.

\n
\n \n
\n
\n
\n
\n
\n

modified_at [required]

\n
\n

date-time

\n

Timestamp when the annotation was last modified.

\n
\n \n
\n
\n
\n
\n
\n

modified_by [required]

\n
\n

string

\n

Identifier of the user who last modified the annotation.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Server-generated deterministic identifier derived from the block list.

\n
\n \n
\n
\n
\n
\n
\n

display_block [required]

\n
\n

[object]

\n

List of content blocks that make up a display_block interaction.\nMust contain at least one block.

\n
\n
\n
\n
\n
\n

alt

\n
\n

string

\n

Alternative text for an image block.

\n
\n \n
\n
\n
\n
\n
\n

content

\n
\n

\n

Block payload. A string for markdown, header, and text; an\narbitrary JSON value (object, array, or scalar) for json. Omitted\nfor image, widget, and llmobs_trace.

\n
\n \n
\n
\n
\n
\n
\n

height

\n
\n

int64

\n

Optional rendered height. Must be positive when set.

\n
\n \n
\n
\n
\n
\n
\n

interactionType

\n
\n

enum

\n

Upstream interaction type referenced by an llmobs_trace block.\nRestricted to trace or experiment_trace. \nAllowed enum values: trace,experiment_trace

\n
\n \n
\n
\n
\n
\n
\n

label

\n
\n

string

\n

Optional label rendered alongside the block.

\n
\n \n
\n
\n
\n
\n
\n

level

\n
\n

enum

\n

Visual size for a header block. \nAllowed enum values: sm,md,lg,xl

\n
\n \n
\n
\n
\n
\n
\n

tileDef

\n
\n

\n

Tile definition for a widget block. Required for widget. The\nschema is owned by the frontend renderer.

\n
\n \n
\n
\n
\n
\n
\n

timeFrame

\n
\n

object

\n

Unix-millis time range used by chart blocks.

\n
\n
\n
\n
\n
\n

end [required]

\n
\n

int64

\n

End of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n

start [required]

\n
\n

int64

\n

Start of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

traceId

\n
\n

string

\n

Trace identifier. Required for llmobs_trace blocks.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Discriminator for a single display_block content block. Adding a\nvariant requires coordinated changes in the frontend renderer. \nAllowed enum values: markdown,header,text,json,image,widget,llmobs_trace

\n
\n \n
\n
\n
\n
\n
\n

url

\n
\n

string

\n

URL of the image. Required for image blocks.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type discriminator for a display_block interaction. \nAllowed enum values: display_block

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The queue ID.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotated interactions. \nAllowed enum values: annotated_interactions

\n
\n \n
\n
\n
\n
" }, "400": { "json": { @@ -1133,7 +1133,7 @@ "type": "interactions" } }, - "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for the interaction addition response.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes of the interaction addition response.

\n
\n
\n
\n
\n
\n

interactions [required]

\n
\n

[object]

\n

List of interactions that were processed.

\n
\n
\n
\n
\n
\n

already_existed [required]

\n
\n

boolean

\n

Whether this interaction already existed in the queue.

\n
\n \n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Identifier of the content (trace ID or session ID) for this interaction.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of interaction in an annotation queue. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The queue ID the interactions were added to.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotation queue interactions. \nAllowed enum values: interactions

\n
\n \n
\n
\n
\n
" + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for the interaction addition response.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes of the interaction addition response.

\n
\n
\n
\n
\n
\n

interactions [required]

\n
\n

[ <oneOf>]

\n

List of interactions that were processed.

\n
\n
\n
\n
\n
\n

Option 1

\n
\n

object

\n

A trace, experiment trace, or session interaction result.

\n
\n
\n
\n
\n
\n

already_existed [required]

\n
\n

boolean

\n

Whether this interaction already existed in the queue.

\n
\n \n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Upstream entity identifier supplied by the caller.

\n
\n \n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of an upstream-entity interaction. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

Option 2

\n
\n

object

\n

A display_block interaction result.

\n
\n
\n
\n
\n
\n

already_existed [required]

\n
\n

boolean

\n

Whether this interaction already existed in the queue.

\n
\n \n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Server-generated deterministic identifier derived from the block list.

\n
\n \n
\n
\n
\n
\n
\n

display_block [required]

\n
\n

[object]

\n

List of content blocks that make up a display_block interaction.\nMust contain at least one block.

\n
\n
\n
\n
\n
\n

alt

\n
\n

string

\n

Alternative text for an image block.

\n
\n \n
\n
\n
\n
\n
\n

content

\n
\n

\n

Block payload. A string for markdown, header, and text; an\narbitrary JSON value (object, array, or scalar) for json. Omitted\nfor image, widget, and llmobs_trace.

\n
\n \n
\n
\n
\n
\n
\n

height

\n
\n

int64

\n

Optional rendered height. Must be positive when set.

\n
\n \n
\n
\n
\n
\n
\n

interactionType

\n
\n

enum

\n

Upstream interaction type referenced by an llmobs_trace block.\nRestricted to trace or experiment_trace. \nAllowed enum values: trace,experiment_trace

\n
\n \n
\n
\n
\n
\n
\n

label

\n
\n

string

\n

Optional label rendered alongside the block.

\n
\n \n
\n
\n
\n
\n
\n

level

\n
\n

enum

\n

Visual size for a header block. \nAllowed enum values: sm,md,lg,xl

\n
\n \n
\n
\n
\n
\n
\n

tileDef

\n
\n

\n

Tile definition for a widget block. Required for widget. The\nschema is owned by the frontend renderer.

\n
\n \n
\n
\n
\n
\n
\n

timeFrame

\n
\n

object

\n

Unix-millis time range used by chart blocks.

\n
\n
\n
\n
\n
\n

end [required]

\n
\n

int64

\n

End of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n

start [required]

\n
\n

int64

\n

Start of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

traceId

\n
\n

string

\n

Trace identifier. Required for llmobs_trace blocks.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Discriminator for a single display_block content block. Adding a\nvariant requires coordinated changes in the frontend renderer. \nAllowed enum values: markdown,header,text,json,image,widget,llmobs_trace

\n
\n \n
\n
\n
\n
\n
\n

url

\n
\n

string

\n

URL of the image. Required for image blocks.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

Unique identifier of the interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type discriminator for a display_block interaction. \nAllowed enum values: display_block

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The queue ID the interactions were added to.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotation queue interactions. \nAllowed enum values: interactions

\n
\n \n
\n
\n
\n
" }, "400": { "json": { @@ -1221,10 +1221,7 @@ "data": { "attributes": { "interactions": [ - { - "content_id": "trace-abc-123", - "type": "trace" - } + {} ] }, "type": "interactions" @@ -1243,7 +1240,7 @@ "type": "interactions" } }, - "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for adding interactions to an annotation queue.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes for adding interactions to an annotation queue.

\n
\n
\n
\n
\n
\n

interactions [required]

\n
\n

[object]

\n

List of interactions to add to the queue. Must contain at least one item.

\n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Identifier of the content (trace ID or session ID) for this interaction.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of interaction in an annotation queue. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotation queue interactions. \nAllowed enum values: interactions

\n
\n \n
\n
\n
\n
" + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data object for adding interactions to an annotation queue.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes for adding interactions to an annotation queue.

\n
\n
\n
\n
\n
\n

interactions [required]

\n
\n

[ <oneOf>]

\n

List of interactions to add to the queue. Must contain at least one item.

\n
\n
\n
\n
\n
\n

Option 1

\n
\n

object

\n

An interaction that references an upstream trace, experiment trace, or session.

\n
\n
\n
\n
\n
\n

content_id [required]

\n
\n

string

\n

Upstream entity identifier (trace, experiment trace, or session ID).

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type of an upstream-entity interaction. \nAllowed enum values: trace,experiment_trace,session

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

Option 2

\n
\n

object

\n

An interaction whose rendered content is supplied directly as a list\nof display blocks. The server generates content_id deterministically\nfrom the block list.

\n
\n
\n
\n
\n
\n

display_block [required]

\n
\n

[object]

\n

List of content blocks that make up a display_block interaction.\nMust contain at least one block.

\n
\n
\n
\n
\n
\n

alt

\n
\n

string

\n

Alternative text for an image block.

\n
\n \n
\n
\n
\n
\n
\n

content

\n
\n

\n

Block payload. A string for markdown, header, and text; an\narbitrary JSON value (object, array, or scalar) for json. Omitted\nfor image, widget, and llmobs_trace.

\n
\n \n
\n
\n
\n
\n
\n

height

\n
\n

int64

\n

Optional rendered height. Must be positive when set.

\n
\n \n
\n
\n
\n
\n
\n

interactionType

\n
\n

enum

\n

Upstream interaction type referenced by an llmobs_trace block.\nRestricted to trace or experiment_trace. \nAllowed enum values: trace,experiment_trace

\n
\n \n
\n
\n
\n
\n
\n

label

\n
\n

string

\n

Optional label rendered alongside the block.

\n
\n \n
\n
\n
\n
\n
\n

level

\n
\n

enum

\n

Visual size for a header block. \nAllowed enum values: sm,md,lg,xl

\n
\n \n
\n
\n
\n
\n
\n

tileDef

\n
\n

\n

Tile definition for a widget block. Required for widget. The\nschema is owned by the frontend renderer.

\n
\n \n
\n
\n
\n
\n
\n

timeFrame

\n
\n

object

\n

Unix-millis time range used by chart blocks.

\n
\n
\n
\n
\n
\n

end [required]

\n
\n

int64

\n

End of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n

start [required]

\n
\n

int64

\n

Start of the range, in Unix milliseconds.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

traceId

\n
\n

string

\n

Trace identifier. Required for llmobs_trace blocks.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Discriminator for a single display_block content block. Adding a\nvariant requires coordinated changes in the frontend renderer. \nAllowed enum values: markdown,header,text,json,image,widget,llmobs_trace

\n
\n \n
\n
\n
\n
\n
\n

url

\n
\n

string

\n

URL of the image. Required for image blocks.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Type discriminator for a display_block interaction. \nAllowed enum values: display_block

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

Resource type for annotation queue interactions. \nAllowed enum values: interactions

\n
\n \n
\n
\n
\n
" } }, "DeleteLLMObsAnnotationQueueInteractions": { diff --git a/data/api/v2/full_spec.yaml b/data/api/v2/full_spec.yaml index 799cc9712d5..da39002e144 100644 --- a/data/api/v2/full_spec.yaml +++ b/data/api/v2/full_spec.yaml @@ -39195,33 +39195,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 @@ -39403,45 +39389,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 @@ -39454,6 +39417,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 @@ -39649,6 +39617,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: @@ -40559,6 +40665,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: @@ -40936,18 +41117,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: @@ -41189,6 +41358,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: @@ -112406,8 +112647,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" @@ -112423,6 +112672,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. @@ -112443,6 +112710,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/data/api/v2/translate_actions.json b/data/api/v2/translate_actions.json index fe84040f433..b3ab4d33e0a 100644 --- a/data/api/v2/translate_actions.json +++ b/data/api/v2/translate_actions.json @@ -2254,7 +2254,7 @@ "summary": "Get annotated queue interactions" }, "CreateLLMObsAnnotationQueueInteractions": { - "description": "Add one or more interactions (traces or sessions) to an annotation queue.\nAt least one interaction must be provided.", + "description": "Add one or more interactions to an annotation queue. At least one\ninteraction must be provided. Each interaction has a `type`:\n\n- `trace`, `experiment_trace`, `session`: `content_id` references the\n upstream entity; the server fetches the actual content.\n- `display_block`: omit `content_id` and provide the rendered content\n in `display_block`. The server generates `content_id` as a\n deterministic hash of the block list.\n\nItems of different types can be mixed in a single request.", "summary": "Add annotation queue interactions", "request_description": "Add interactions payload.", "request_schema_description": "Request to add interactions to an LLM Observability annotation queue."