Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 62 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57962,6 +57962,9 @@ components:
type: string
type: object
LLMObsContentBlock:
anyOf:
- $ref: '#/components/schemas/LLMObsFrontendContentBlock'
- $ref: '#/components/schemas/LLMObsLegacyContentBlock'
description: |-
A single content block rendered inside a `display_block` interaction.
`type` discriminates which other fields are meaningful:
Expand All @@ -57972,18 +57975,21 @@ components:
- `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`.
- `frontend`: `code` is required and must be a non-empty string; `label` is optional.

`height`, when set, must be positive.
properties:
alt:
description: Alternative text for an `image` block.
example: "Example image"
type: string
code:
$ref: '#/components/schemas/LLMObsFrontendContentBlockCode'
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`.
for `image`, `widget`, `llmobs_trace`, and `frontend`.
example: "## Triage Instructions"
height:
description: Optional rendered height. Must be positive when set.
Expand All @@ -57993,7 +57999,7 @@ components:
interactionType:
$ref: '#/components/schemas/LLMObsContentBlockLLMObsTraceInteractionType'
label:
description: Optional label rendered alongside the block.
description: Optional label rendered alongside a `frontend` block.
example: "Triage Instructions"
type: string
level:
Expand Down Expand Up @@ -58081,6 +58087,7 @@ components:
- image
- widget
- llmobs_trace
- frontend
example: markdown
type: string
x-enum-varnames:
Expand All @@ -58091,6 +58098,7 @@ components:
- IMAGE
- WIDGET
- LLMOBS_TRACE
- FRONTEND
LLMObsContentBlocks:
description: |-
List of content blocks that make up a `display_block` interaction.
Expand Down Expand Up @@ -60915,6 +60923,29 @@ components:
required:
- data
type: object
LLMObsFrontendContentBlock:
description: Validation requirements for a `frontend` display block.
properties:
code:
$ref: '#/components/schemas/LLMObsFrontendContentBlockCode'
type:
$ref: '#/components/schemas/LLMObsFrontendContentBlockType'
required:
- code
type: object
LLMObsFrontendContentBlockCode:
description: HTML code rendered by a `frontend` block. Required for `frontend` blocks.
example: '<div class="status-card">Ready for review</div>'
minLength: 1
type: string
LLMObsFrontendContentBlockType:
description: Type discriminator for a `frontend` display block.
enum:
- frontend
example: frontend
type: string
x-enum-varnames:
- FRONTEND
LLMObsInferenceCode:
description: A generated code snippet for running an inference request programmatically.
properties:
Expand Down Expand Up @@ -61520,6 +61551,32 @@ components:
- CATEGORICAL
- BOOLEAN
- TEXT
LLMObsLegacyContentBlock:
description: Validation requirements for an existing non-frontend display block.
properties:
type:
$ref: '#/components/schemas/LLMObsLegacyContentBlockType'
type: object
LLMObsLegacyContentBlockType:
description: Type discriminator for an existing non-frontend display block.
enum:
- markdown
- header
- text
- json
- image
- widget
- llmobs_trace
example: markdown
type: string
x-enum-varnames:
- MARKDOWN
- HEADER
- TEXT
- JSON
- IMAGE
- WIDGET
- LLMOBS_TRACE
LLMObsMetricAssessment:
description: Assessment result for an Agent Observability experiment metric.
enum:
Expand Down Expand Up @@ -169960,6 +170017,9 @@ paths:
experiment_id: abc-123
label: "Experiments"
type: json
- code: '<div class="status-card">Ready for review</div>'
label: "Review status"
type: frontend
type: display_block
type: interactions
schema:
Expand Down
4 changes: 4 additions & 0 deletions packages/datadog-api-client-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5715,6 +5715,8 @@ export { LLMObsExperimentUpdateDataAttributesRequest } from "./models/LLMObsExpe
export { LLMObsExperimentUpdateDataRequest } from "./models/LLMObsExperimentUpdateDataRequest";
export { LLMObsExperimentUpdateRequest } from "./models/LLMObsExperimentUpdateRequest";
export { LLMObsExperimentUser } from "./models/LLMObsExperimentUser";
export { LLMObsFrontendContentBlock } from "./models/LLMObsFrontendContentBlock";
export { LLMObsFrontendContentBlockType } from "./models/LLMObsFrontendContentBlockType";
export { LLMObsInferenceCode } from "./models/LLMObsInferenceCode";
export { LLMObsInferenceContent } from "./models/LLMObsInferenceContent";
export { LLMObsInferenceContentValue } from "./models/LLMObsInferenceContentValue";
Expand All @@ -5733,6 +5735,8 @@ export { LLMObsIntegrationName } from "./models/LLMObsIntegrationName";
export { LLMObsInternalReasoning } from "./models/LLMObsInternalReasoning";
export { LLMObsLabelSchema } from "./models/LLMObsLabelSchema";
export { LLMObsLabelSchemaType } from "./models/LLMObsLabelSchemaType";
export { LLMObsLegacyContentBlock } from "./models/LLMObsLegacyContentBlock";
export { LLMObsLegacyContentBlockType } from "./models/LLMObsLegacyContentBlockType";
export { LLMObsMetricAssessment } from "./models/LLMObsMetricAssessment";
export { LLMObsMetricScoreType } from "./models/LLMObsMetricScoreType";
export { LLMObsOpenAIMetadata } from "./models/LLMObsOpenAIMetadata";
Expand Down
13 changes: 11 additions & 2 deletions packages/datadog-api-client-v2/models/LLMObsContentBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* - `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`.
* - `frontend`: `code` is required and must be a non-empty string; `label` is optional.
*
* `height`, when set, must be positive.
*/
Expand All @@ -28,10 +29,14 @@ export class LLMObsContentBlock {
* Alternative text for an `image` block.
*/
"alt"?: string;
/**
* HTML code rendered by a `frontend` block. Required for `frontend` blocks.
*/
"code"?: string;
/**
* 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`.
* for `image`, `widget`, `llmobs_trace`, and `frontend`.
*/
"content"?: any;
/**
Expand All @@ -44,7 +49,7 @@ export class LLMObsContentBlock {
*/
"interactionType"?: LLMObsContentBlockLLMObsTraceInteractionType;
/**
* Optional label rendered alongside the block.
* Optional label rendered alongside a `frontend` block.
*/
"label"?: string;
/**
Expand Down Expand Up @@ -94,6 +99,10 @@ export class LLMObsContentBlock {
baseName: "alt",
type: "string",
},
code: {
baseName: "code",
type: "string",
},
content: {
baseName: "content",
type: "any",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type LLMObsContentBlockType =
| typeof IMAGE
| typeof WIDGET
| typeof LLMOBS_TRACE
| typeof FRONTEND
| UnparsedObject;
export const MARKDOWN = "markdown";
export const HEADER = "header";
Expand All @@ -27,3 +28,4 @@ export const JSON = "json";
export const IMAGE = "image";
export const WIDGET = "widget";
export const LLMOBS_TRACE = "llmobs_trace";
export const FRONTEND = "frontend";
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* 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 2020-Present Datadog, Inc.
*/
import { LLMObsFrontendContentBlockType } from "./LLMObsFrontendContentBlockType";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Validation requirements for a `frontend` display block.
*/
export class LLMObsFrontendContentBlock {
/**
* HTML code rendered by a `frontend` block. Required for `frontend` blocks.
*/
"code": string;
/**
* Type discriminator for a `frontend` display block.
*/
"type"?: LLMObsFrontendContentBlockType;

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
code: {
baseName: "code",
type: "string",
required: true,
},
type: {
baseName: "type",
type: "LLMObsFrontendContentBlockType",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return LLMObsFrontendContentBlock.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* 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 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* Type discriminator for a `frontend` display block.
*/

export type LLMObsFrontendContentBlockType = typeof FRONTEND | UnparsedObject;
export const FRONTEND = "frontend";
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* 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 2020-Present Datadog, Inc.
*/
import { LLMObsLegacyContentBlockType } from "./LLMObsLegacyContentBlockType";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Validation requirements for an existing non-frontend display block.
*/
export class LLMObsLegacyContentBlock {
/**
* Type discriminator for an existing non-frontend display block.
*/
"type"?: LLMObsLegacyContentBlockType;

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
type: {
baseName: "type",
type: "LLMObsLegacyContentBlockType",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return LLMObsLegacyContentBlock.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* 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 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* Type discriminator for an existing non-frontend display block.
*/

export type LLMObsLegacyContentBlockType =
| typeof MARKDOWN
| typeof HEADER
| typeof TEXT
| typeof JSON
| typeof IMAGE
| typeof WIDGET
| typeof LLMOBS_TRACE
| UnparsedObject;
export const MARKDOWN = "markdown";
export const HEADER = "header";
export const TEXT = "text";
export const JSON = "json";
export const IMAGE = "image";
export const WIDGET = "widget";
export const LLMOBS_TRACE = "llmobs_trace";
Loading
Loading