org.llm4s.llmconnect.model.Message
See theMessage companion object
A single turn in an LLM conversation.
Conversations are sequences of Message values passed to org.llm4s.llmconnect.LLMClient. Each concrete subtype corresponds to one participant role: UserMessage, SystemMessage, AssistantMessage, ToolMessage.
content is always a non-null, non-empty string for well-formed messages — use validate or the smart constructors on the Message companion to ensure this invariant. AssistantMessage.content returns "" rather than null when the LLM response contains only tool calls and no text.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
In this article