Class: DatadogAPIClient::V2::LLMObsContentBlock

Inherits:
Object
  • Object
show all
Includes:
BaseGenericModel
Defined in:
lib/datadog_api_client/v2/models/llm_obs_content_block.rb

Overview

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.

Instance Attribute Summary collapse

Method Summary

Methods included from BaseGenericModel

included

Instance Attribute Details

#additional_propertiesObject

Returns the value of attribute additional_properties.



72
73
74
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 72

def additional_properties
  @additional_properties
end

#altObject

Alternative text for an ‘image` block.



35
36
37
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 35

def alt
  @alt
end

#contentObject

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`.



40
41
42
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 40

def content
  @content
end

#heightObject

Optional rendered height. Must be positive when set.



43
44
45
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 43

def height
  @height
end

#interaction_typeObject

Upstream interaction type referenced by an ‘llmobs_trace` block. Restricted to `trace` or `experiment_trace`.



47
48
49
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 47

def interaction_type
  @interaction_type
end

#labelObject

Optional label rendered alongside the block.



50
51
52
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 50

def label
  @label
end

#levelObject

Visual size for a ‘header` block.



53
54
55
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 53

def level
  @level
end

#tile_defObject

Tile definition for a ‘widget` block. Required for `widget`. The schema is owned by the frontend renderer.



57
58
59
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 57

def tile_def
  @tile_def
end

#time_frameObject

Unix-millis time range used by chart blocks.



60
61
62
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 60

def time_frame
  @time_frame
end

#trace_idObject

Trace identifier. Required for ‘llmobs_trace` blocks.



63
64
65
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 63

def trace_id
  @trace_id
end

#typeObject

Discriminator for a single ‘display_block` content block. Adding a variant requires coordinated changes in the frontend renderer.



67
68
69
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 67

def type
  @type
end

#urlObject

URL of the image. Required for ‘image` blocks.



70
71
72
# File 'lib/datadog_api_client/v2/models/llm_obs_content_block.rb', line 70

def url
  @url
end