Message
Represents a message exchanged in a chat with LLM. Messages can be categorized by their type and role, denoting the purpose and source of the message.
Represents both a message from LLM and a message to LLM from user or environment.
Inheritors
Types
Link copied to clipboard
data class Assistant(val content: String, val metaInfo: ResponseMetaInfo, val mediaContent: MediaContent? = null, val finishReason: String? = null) : Message.Response
Represents a message generated by the assistant as a response.
Link copied to clipboard
Represents a request message in the chat.
Link copied to clipboard
Represents a response message in the chat.
Link copied to clipboard
Defines the role of the message in the chat (e.g., system, user, assistant, tool).
Link copied to clipboard
Represents a system-generated message.
Link copied to clipboard
Represents messages exchanged with tools, either as calls or results.
Link copied to clipboard
data class User(val content: String, val metaInfo: RequestMetaInfo, val mediaContent: List<MediaContent> = emptyList()) : Message.Request
Represents a message sent by the user as a request.