class

Llama::ChatMessage

Inherits Reference / Object

Represents a message in a chat conversation

Constructors

new(role : String, content : String)

Creates a new ChatMessage

Parameters:

  • role: The role of the message sender
  • content: The content of the message
Source

Instance methods

content

The content of the message

Source
content=(content : String)

The content of the message

Source
role

The role of the message sender (e.g., "system", "user", "assistant")

Source
role=(role : String)

The role of the message sender (e.g., "system", "user", "assistant")

Source
to_unsafe

Converts to the C structure

Source