Skip to main content

LlmMessage

Defined in the protocols module.
Rust AI Agent SDK An LLM message.

Fields

NameTypeDescription
roleStringMessage role
contentStringMessage content

Methods

system

fn system(content: impl Into<String>) -> Self
Create a system message Parameters:
NameType
contentimpl Into&lt;String&gt;

user

fn user(content: impl Into<String>) -> Self
Create a user message Parameters:
NameType
contentimpl Into&lt;String&gt;

assistant

fn assistant(content: impl Into<String>) -> Self
Create an assistant message Parameters:
NameType
contentimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/protocols/mod.rs at line 164