Sycophant.Message.Content.Text (sycophant v0.4.2)

Copy Markdown

Text content part for multimodal messages.

Used when a message contains a mix of text and other content types like images. For text-only messages, pass a plain string to the message constructors instead.

Examples

iex> %Sycophant.Message.Content.Text{text: "Describe this image"}
#Sycophant.Message.Content.Text<"Describe this image">

Summary

Functions

Deserializes a text content part from a plain map.

Types

t()

@type t() :: %Sycophant.Message.Content.Text{text: String.t()}

Functions

from_map(map)

@spec from_map(map()) :: t()

Deserializes a text content part from a plain map.