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
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@
* owns the renderable schema).
* <li><code>llmobs_trace</code>: <code>traceId</code> is required; <code>interactionType</code>,
* when set, must be <code>trace</code> or <code>experiment_trace</code>.
* <li><code>frontend</code>: <code>code</code> is required and must be a non-empty string; <code>
* label</code> is optional.
* </ul>
*
* <p><code>height</code>, when set, must be positive.
*/
@JsonPropertyOrder({
LLMObsContentBlock.JSON_PROPERTY_ALT,
LLMObsContentBlock.JSON_PROPERTY_CODE,
LLMObsContentBlock.JSON_PROPERTY_CONTENT,
LLMObsContentBlock.JSON_PROPERTY_HEIGHT,
LLMObsContentBlock.JSON_PROPERTY_INTERACTION_TYPE,
Expand All @@ -56,6 +59,9 @@ public class LLMObsContentBlock {
public static final String JSON_PROPERTY_ALT = "alt";
private String alt;

public static final String JSON_PROPERTY_CODE = "code";
private String code;

public static final String JSON_PROPERTY_CONTENT = "content";
private Object content = null;

Expand Down Expand Up @@ -116,6 +122,27 @@ public void setAlt(String alt) {
this.alt = alt;
}

public LLMObsContentBlock code(String code) {
this.code = code;
return this;
}

/**
* HTML code rendered by a <code>frontend</code> block. Required for <code>frontend</code> blocks.
*
* @return code
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCode() {
return code;
}

public void setCode(String code) {
this.code = code;
}

public LLMObsContentBlock content(Object content) {
this.content = content;
return this;
Expand All @@ -124,7 +151,7 @@ public LLMObsContentBlock content(Object content) {
/**
* Block payload. A string for <code>markdown</code>, <code>header</code>, and <code>text</code>;
* an arbitrary JSON value (object, array, or scalar) for <code>json</code>. Omitted for <code>
* image</code>, <code>widget</code>, and <code>llmobs_trace</code>.
* image</code>, <code>widget</code>, <code>llmobs_trace</code>, and <code>frontend</code>.
*
* @return content
*/
Expand Down Expand Up @@ -193,7 +220,7 @@ public LLMObsContentBlock label(String label) {
}

/**
* Optional label rendered alongside the block.
* Optional label rendered alongside a <code>frontend</code> block.
*
* @return label
*/
Expand Down Expand Up @@ -404,6 +431,7 @@ public boolean equals(Object o) {
}
LLMObsContentBlock llmObsContentBlock = (LLMObsContentBlock) o;
return Objects.equals(this.alt, llmObsContentBlock.alt)
&& Objects.equals(this.code, llmObsContentBlock.code)
&& Objects.equals(this.content, llmObsContentBlock.content)
&& Objects.equals(this.height, llmObsContentBlock.height)
&& Objects.equals(this.interactionType, llmObsContentBlock.interactionType)
Expand All @@ -421,6 +449,7 @@ public boolean equals(Object o) {
public int hashCode() {
return Objects.hash(
alt,
code,
content,
height,
interactionType,
Expand All @@ -439,6 +468,7 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LLMObsContentBlock {\n");
sb.append(" alt: ").append(toIndentedString(alt)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" height: ").append(toIndentedString(height)).append("\n");
sb.append(" interactionType: ").append(toIndentedString(interactionType)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public class LLMObsContentBlockType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(
Arrays.asList("markdown", "header", "text", "json", "image", "widget", "llmobs_trace"));
Arrays.asList(
"markdown", "header", "text", "json", "image", "widget", "llmobs_trace", "frontend"));

public static final LLMObsContentBlockType MARKDOWN = new LLMObsContentBlockType("markdown");
public static final LLMObsContentBlockType HEADER = new LLMObsContentBlockType("header");
Expand All @@ -37,6 +38,7 @@ public class LLMObsContentBlockType extends ModelEnum<String> {
public static final LLMObsContentBlockType WIDGET = new LLMObsContentBlockType("widget");
public static final LLMObsContentBlockType LLMOBS_TRACE =
new LLMObsContentBlockType("llmobs_trace");
public static final LLMObsContentBlockType FRONTEND = new LLMObsContentBlockType("frontend");

LLMObsContentBlockType(String value) {
super(value, allowedValues);
Expand Down
Loading
Loading