pig/ai/message
Types
Unified message type for all conversation participants.
pub type Message {
User(content: String)
System(content: String)
Assistant(
content: String,
tool_calls: List(ToolCall),
thinking: option.Option(Thinking),
stop_reason: option.Option(stop_reason.StopReason),
)
Tool(tool_call_id: String, content: String)
}
Constructors
-
User(content: String) -
System(content: String) -
Assistant( content: String, tool_calls: List(ToolCall), thinking: option.Option(Thinking), stop_reason: option.Option(stop_reason.StopReason), ) -
Tool(tool_call_id: String, content: String)
The role of a message participant.
pub type Role {
UserRole
AssistantRole
SystemRole
ToolRole
}
Constructors
-
UserRole -
AssistantRole -
SystemRole -
ToolRole
A thinking/reasoning block from the assistant.
pub type Thinking {
Thinking(content: String)
}
Constructors
-
Thinking(content: String)