class
Llama::ChatMessage
- Llama::ChatMessage
- Reference
- Object
Overview
Represents a message in a chat conversation
Defined in:
llama/chat.crConstructors
-
.new(role : String, content : String)
Creates a new ChatMessage
Instance Method Summary
-
#content : String
The content of the message
-
#content=(content : String)
The content of the message
-
#role : String
The role of the message sender (e.g., "system", "user", "assistant")
-
#role=(role : String)
The role of the message sender (e.g., "system", "user", "assistant")
-
#to_unsafe : LibLlama::LlamaChatMessage
Converts to the C structure
Constructor Detail
def self.new(role : String, content : String)
#
Creates a new ChatMessage
Parameters:
- role: The role of the message sender
- content: The content of the message