ReqLLM.Message (ReqLLM v1.0.0-rc.5)

View Source

Message represents a single conversation message with multi-modal content support.

Content is always a list of ContentPart structs, never a string. This ensures consistent handling across all providers and eliminates polymorphism.

Summary

Types

t()

@type t() :: %ReqLLM.Message{
  content: [ReqLLM.Message.ContentPart.t()],
  metadata: map(),
  name: String.t() | nil,
  role: :user | :assistant | :system | :tool,
  tool_call_id: String.t() | nil,
  tool_calls: [term()] | nil
}

Functions

valid?(arg1)

@spec valid?(t()) :: boolean()