Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Message
Defined in the LLM module.
Rust AI Agent SDK
A message in a conversation
Fields
| Name | Type | Description |
|---|
role | Role | The role of the message sender |
content | String | The content of the message |
Option | :is_none")] | Tool call ID (for tool responses) |
tool_call_id | Option<String> | Tool call ID (for tool responses) |
Option | :is_none")] | Tool calls made by the assistant |
tool_calls | Option<Vec<ToolCall>> | Tool calls made by the assistant |
Methods
system
fn system(content: impl Into<String>) -> Self
Create a system message
Parameters:
| Name | Type |
|---|
content | impl Into<String> |
user
fn user(content: impl Into<String>) -> Self
Create a user message
Parameters:
| Name | Type |
|---|
content | impl Into<String> |
assistant
fn assistant(content: impl Into<String>) -> Self
Create an assistant message
Parameters:
| Name | Type |
|---|
content | impl Into<String> |
fn tool(tool_call_id: impl Into<String>, content: impl Into<String>) -> Self
Create a tool response message
Parameters:
| Name | Type |
|---|
tool_call_id | impl Into<String> |
content | impl Into<String> |
Source
View on GitHub
praisonai/src/llm/mod.rs at line 39