Skip to content

Commit fca66fd

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 6a86230 of spec repo (#3985)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b7181e2 commit fca66fd

3 files changed

Lines changed: 83 additions & 5 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58479,6 +58479,9 @@ components:
5847958479
type: string
5848058480
type: object
5848158481
LLMObsContentBlock:
58482+
anyOf:
58483+
- $ref: '#/components/schemas/LLMObsFrontendContentBlock'
58484+
- $ref: '#/components/schemas/LLMObsLegacyContentBlock'
5848258485
description: |-
5848358486
A single content block rendered inside a `display_block` interaction.
5848458487
`type` discriminates which other fields are meaningful:
@@ -58489,18 +58492,21 @@ components:
5848958492
- `image`: `url` is required.
5849058493
- `widget`: `tileDef` is required (any well-formed JSON; the frontend owns the renderable schema).
5849158494
- `llmobs_trace`: `traceId` is required; `interactionType`, when set, must be `trace` or `experiment_trace`.
58495+
- `frontend`: `code` is required and must be a non-empty string; `label` is optional.
5849258496

5849358497
`height`, when set, must be positive.
5849458498
properties:
5849558499
alt:
5849658500
description: Alternative text for an `image` block.
5849758501
example: "Example image"
5849858502
type: string
58503+
code:
58504+
$ref: '#/components/schemas/LLMObsFrontendContentBlockCode'
5849958505
content:
5850058506
description: |-
5850158507
Block payload. A string for `markdown`, `header`, and `text`; an
5850258508
arbitrary JSON value (object, array, or scalar) for `json`. Omitted
58503-
for `image`, `widget`, and `llmobs_trace`.
58509+
for `image`, `widget`, `llmobs_trace`, and `frontend`.
5850458510
example: "## Triage Instructions"
5850558511
height:
5850658512
description: Optional rendered height. Must be positive when set.
@@ -58510,7 +58516,7 @@ components:
5851058516
interactionType:
5851158517
$ref: '#/components/schemas/LLMObsContentBlockLLMObsTraceInteractionType'
5851258518
label:
58513-
description: Optional label rendered alongside the block.
58519+
description: Optional label rendered alongside a `frontend` block.
5851458520
example: "Triage Instructions"
5851558521
type: string
5851658522
level:
@@ -58598,6 +58604,7 @@ components:
5859858604
- image
5859958605
- widget
5860058606
- llmobs_trace
58607+
- frontend
5860158608
example: markdown
5860258609
type: string
5860358610
x-enum-varnames:
@@ -58608,6 +58615,7 @@ components:
5860858615
- IMAGE
5860958616
- WIDGET
5861058617
- LLMOBS_TRACE
58618+
- FRONTEND
5861158619
LLMObsContentBlocks:
5861258620
description: |-
5861358621
List of content blocks that make up a `display_block` interaction.
@@ -61432,6 +61440,29 @@ components:
6143261440
required:
6143361441
- data
6143461442
type: object
61443+
LLMObsFrontendContentBlock:
61444+
description: Validation requirements for a `frontend` display block.
61445+
properties:
61446+
code:
61447+
$ref: '#/components/schemas/LLMObsFrontendContentBlockCode'
61448+
type:
61449+
$ref: '#/components/schemas/LLMObsFrontendContentBlockType'
61450+
required:
61451+
- code
61452+
type: object
61453+
LLMObsFrontendContentBlockCode:
61454+
description: HTML code rendered by a `frontend` block. Required for `frontend` blocks.
61455+
example: '<div class="status-card">Ready for review</div>'
61456+
minLength: 1
61457+
type: string
61458+
LLMObsFrontendContentBlockType:
61459+
description: Type discriminator for a `frontend` display block.
61460+
enum:
61461+
- frontend
61462+
example: frontend
61463+
type: string
61464+
x-enum-varnames:
61465+
- FRONTEND
6143561466
LLMObsInferenceCode:
6143661467
description: A generated code snippet for running an inference request programmatically.
6143761468
properties:
@@ -62037,6 +62068,32 @@ components:
6203762068
- CATEGORICAL
6203862069
- BOOLEAN
6203962070
- TEXT
62071+
LLMObsLegacyContentBlock:
62072+
description: Validation requirements for an existing non-frontend display block.
62073+
properties:
62074+
type:
62075+
$ref: '#/components/schemas/LLMObsLegacyContentBlockType'
62076+
type: object
62077+
LLMObsLegacyContentBlockType:
62078+
description: Type discriminator for an existing non-frontend display block.
62079+
enum:
62080+
- markdown
62081+
- header
62082+
- text
62083+
- json
62084+
- image
62085+
- widget
62086+
- llmobs_trace
62087+
example: markdown
62088+
type: string
62089+
x-enum-varnames:
62090+
- MARKDOWN
62091+
- HEADER
62092+
- TEXT
62093+
- JSON
62094+
- IMAGE
62095+
- WIDGET
62096+
- LLMOBS_TRACE
6204062097
LLMObsMetricAssessment:
6204162098
description: Assessment result for an Agent Observability experiment metric.
6204262099
enum:
@@ -170490,6 +170547,9 @@ paths:
170490170547
experiment_id: abc-123
170491170548
label: "Experiments"
170492170549
type: json
170550+
- code: '<div class="status-card">Ready for review</div>'
170551+
label: "Review status"
170552+
type: frontend
170493170553
type: display_block
170494170554
type: interactions
170495170555
schema:

‎src/datadog_api_client/v2/model/llm_obs_content_block.py‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727

2828

2929
class LLMObsContentBlock(ModelNormal):
30+
validations = {
31+
"code": {
32+
"min_length": 1,
33+
},
34+
}
35+
3036
@cached_property
3137
def openapi_types(_):
3238
from datadog_api_client.v2.model.llm_obs_content_block_llm_obs_trace_interaction_type import (
@@ -38,6 +44,7 @@ def openapi_types(_):
3844

3945
return {
4046
"alt": (str,),
47+
"code": (str,),
4148
"content": (
4249
bool,
4350
date,
@@ -74,6 +81,7 @@ def openapi_types(_):
7481

7582
attribute_map = {
7683
"alt": "alt",
84+
"code": "code",
7785
"content": "content",
7886
"height": "height",
7987
"interaction_type": "interactionType",
@@ -90,6 +98,7 @@ def __init__(
9098
self_,
9199
type: LLMObsContentBlockType,
92100
alt: Union[str, UnsetType] = unset,
101+
code: Union[str, UnsetType] = unset,
93102
content: Union[Any, UnsetType] = unset,
94103
height: Union[int, UnsetType] = unset,
95104
interaction_type: Union[LLMObsContentBlockLLMObsTraceInteractionType, UnsetType] = unset,
@@ -111,15 +120,19 @@ def __init__(
111120
* ``image`` : ``url`` is required.
112121
* ``widget`` : ``tileDef`` is required (any well-formed JSON; the frontend owns the renderable schema).
113122
* ``llmobs_trace`` : ``traceId`` is required; ``interactionType`` , when set, must be ``trace`` or ``experiment_trace``.
123+
* ``frontend`` : ``code`` is required and must be a non-empty string; ``label`` is optional.
114124
115125
``height`` , when set, must be positive.
116126
117127
:param alt: Alternative text for an ``image`` block.
118128
:type alt: str, optional
119129
130+
:param code: HTML code rendered by a ``frontend`` block. Required for ``frontend`` blocks.
131+
:type code: str, optional
132+
120133
:param content: Block payload. A string for ``markdown`` , ``header`` , and ``text`` ; an
121134
arbitrary JSON value (object, array, or scalar) for ``json``. Omitted
122-
for ``image`` , ``widget`` , and ``llmobs_trace``.
135+
for ``image`` , ``widget`` , ``llmobs_trace`` , and ``frontend``.
123136
:type content: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional
124137
125138
:param height: Optional rendered height. Must be positive when set.
@@ -129,7 +142,7 @@ def __init__(
129142
Restricted to ``trace`` or ``experiment_trace``.
130143
:type interaction_type: LLMObsContentBlockLLMObsTraceInteractionType, optional
131144
132-
:param label: Optional label rendered alongside the block.
145+
:param label: Optional label rendered alongside a ``frontend`` block.
133146
:type label: str, optional
134147
135148
:param level: Visual size for a ``header`` block.
@@ -154,6 +167,8 @@ def __init__(
154167
"""
155168
if alt is not unset:
156169
kwargs["alt"] = alt
170+
if code is not unset:
171+
kwargs["code"] = code
157172
if content is not unset:
158173
kwargs["content"] = content
159174
if height is not unset:

‎src/datadog_api_client/v2/model/llm_obs_content_block_type.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LLMObsContentBlockType(ModelSimple):
1717
Discriminator for a single `display_block` content block. Adding a
1818
variant requires coordinated changes in the frontend renderer.
1919
20-
:param value: Must be one of ["markdown", "header", "text", "json", "image", "widget", "llmobs_trace"].
20+
:param value: Must be one of ["markdown", "header", "text", "json", "image", "widget", "llmobs_trace", "frontend"].
2121
:type value: str
2222
"""
2323

@@ -29,6 +29,7 @@ class LLMObsContentBlockType(ModelSimple):
2929
"image",
3030
"widget",
3131
"llmobs_trace",
32+
"frontend",
3233
}
3334
MARKDOWN: ClassVar["LLMObsContentBlockType"]
3435
HEADER: ClassVar["LLMObsContentBlockType"]
@@ -37,6 +38,7 @@ class LLMObsContentBlockType(ModelSimple):
3738
IMAGE: ClassVar["LLMObsContentBlockType"]
3839
WIDGET: ClassVar["LLMObsContentBlockType"]
3940
LLMOBS_TRACE: ClassVar["LLMObsContentBlockType"]
41+
FRONTEND: ClassVar["LLMObsContentBlockType"]
4042

4143
@cached_property
4244
def openapi_types(_):
@@ -52,3 +54,4 @@ def openapi_types(_):
5254
LLMObsContentBlockType.IMAGE = LLMObsContentBlockType("image")
5355
LLMObsContentBlockType.WIDGET = LLMObsContentBlockType("widget")
5456
LLMObsContentBlockType.LLMOBS_TRACE = LLMObsContentBlockType("llmobs_trace")
57+
LLMObsContentBlockType.FRONTEND = LLMObsContentBlockType("frontend")

0 commit comments

Comments
 (0)