Chat SDK-style normalized message model.
Summary
Functions
Creates a normalized message from canonical incoming payload.
Builds a message from serialized map data.
Creates a normalized message from map input.
Returns the Zoi schema for Message.
Serializes the message into a plain map with a revivable type marker.
Types
@type t() :: %Jido.Chat.Message{ attachments: [ %Jido.Chat.Media{ duration: term(), filename: term(), height: term(), kind: term(), media_type: term(), metadata: term(), size_bytes: term(), url: term(), width: term() } ], author: nil | nil | %Jido.Chat.Author{ full_name: term(), is_bot: term(), is_me: term(), metadata: term(), user_id: term(), user_name: term() }, channel_id: nil | nil | binary(), created_at: nil | nil | any(), external_message_id: nil | nil | binary(), external_room_id: nil | nil | any(), formatted: nil | nil | binary(), id: binary(), is_mention: boolean(), metadata: map(), raw: nil | nil | any(), text: nil | nil | binary(), thread_id: nil | nil | binary(), updated_at: nil | nil | any() }
Functions
@spec from_incoming( Jido.Chat.Incoming.t(), keyword() ) :: t()
Creates a normalized message from canonical incoming payload.
Builds a message from serialized map data.
Creates a normalized message from map input.
Returns the Zoi schema for Message.
Serializes the message into a plain map with a revivable type marker.