Framework-agnostic conversion helpers for turning chat history into AI-ready messages.
Summary
Functions
Converts normalized chat messages into AI-friendly role/content maps.
Types
@type ai_content_part() :: map()
@type ai_message() :: %{role: String.t(), content: String.t() | [ai_content_part()]}
Functions
@spec to_ai_messages([Jido.Chat.Message.t() | map()], keyword() | map()) :: [ ai_message() ]
Alias for to_messages/2.
@spec to_messages([Jido.Chat.Message.t() | map()], keyword() | map()) :: [ ai_message() ]
Converts normalized chat messages into AI-friendly role/content maps.
Options stay Elixir-native by default, but Chat SDK-style camelCase aliases are accepted to make cross-port migration less brittle:
include_namesorincludeNamestransformortransformMessageunsupported_attachmentoronUnsupportedAttachmentfetch_attachmentorfetchAttachment