ArchAstro.SDK.Types.AIMessage (archastro v0.3.2)

Copy Markdown

A single message in an AI conversation, following the OpenAI-compatible chat format. Used in both request inputs and completion responses.

Summary

Types

t()

@type t() :: %ArchAstro.SDK.Types.AIMessage{
  content: String.t() | ArchAstro.SDK.Unset.t(),
  content_parts:
    [%{optional(String.t()) => ArchAstro.SDK.JSON.t()}]
    | ArchAstro.SDK.Unset.t(),
  resume_token: String.t() | ArchAstro.SDK.Unset.t(),
  role: String.t(),
  structured_output: ArchAstro.SDK.JSON.t() | ArchAstro.SDK.Unset.t(),
  tool_calls: [ArchAstro.SDK.Types.AIToolCall.t()] | ArchAstro.SDK.Unset.t(),
  tool_results: [ArchAstro.SDK.Types.AIToolResult.t()] | ArchAstro.SDK.Unset.t()
}

Functions

from_map(data)

@spec from_map(ArchAstro.SDK.JSON.object()) :: t()

matches?(value)

@spec matches?(ArchAstro.SDK.JSON.t()) :: boolean()

to_map(value)

@spec to_map(t()) :: ArchAstro.SDK.JSON.object()