Jido.Chat.MessagePage (Jido Chat v1.0.0)

Copy Markdown View Source

Canonical page of normalized messages for thread/channel history.

Summary

Functions

Creates a canonical message page and normalizes message entries.

Returns the Zoi schema for MessagePage.

Types

t()

@type t() :: %Jido.Chat.MessagePage{
  direction: nil | nil | :forward | :backward,
  messages: [
    %Jido.Chat.Message{
      attachments: term(),
      author: term(),
      channel_id: term(),
      created_at: term(),
      external_message_id: term(),
      external_room_id: term(),
      formatted: term(),
      id: term(),
      is_mention: term(),
      metadata: term(),
      raw: term(),
      text: term(),
      thread_id: term(),
      updated_at: term()
    }
  ],
  metadata: map(),
  next_cursor: nil | nil | binary()
}

Functions

new(attrs)

Creates a canonical message page and normalizes message entries.

schema()

Returns the Zoi schema for MessagePage.