Omni.Content.Text (Omni v2.0.0)

Copy Markdown View Source

A text content block.

The most common block: text written by a user or by the model. A plain string becomes one wherever message content is built, so you rarely call new/1 yourself.

Struct fields

  • :text - the text
  • :signature - a token some providers attach to their output and expect back on later turns. Omni handles it

Summary

Types

t()

Text content with an optional integrity signature.

Functions

Creates a new text content block from a string, keyword list, or map.

Types

t()

@type t() :: %Omni.Content.Text{signature: String.t() | nil, text: String.t()}

Text content with an optional integrity signature.

Functions

new(text)

@spec new(String.t() | Enumerable.t()) :: t()

Creates a new text content block from a string, keyword list, or map.