AI.Message.Assistant (fnord v0.9.40)
View SourceAssistant reply message.
Internal shape (matches the chat-completions raw map shape that existing pattern matches expect):
%AI.Message.Assistant{role: "assistant", content: "<binary>"}Wire shape (built on demand by to_map/1):
%{type: "message", role: "assistant",
content: [%{type: "output_text", text: "..."}]}See AI.Message.User for the rationale on storing content as a binary.
Summary
Functions
Hydrate from a Responses-shaped or legacy chat-completions-shaped map (atom or string keys). Collapses multi-part content lists to a single binary.
Build an assistant message from a binary.