LLM Protocol • Rust AI Agent SDK
LlmProtocol: Protocol for LLM provider implementations.
LlmProtocol
Defined in the protocols module.
Rust AI Agent SDK
Protocol for LLM provider implementations.
Methods
model
fn model(&self) -> &strGet the model name
chat
async fn chat(&self, messages: &[LlmMessage]) -> Result<LlmResponse>Chat with the LLM
Parameters:
| Name | Type |
|---|---|
messages | &[LlmMessage] |
chat_with_tools
async fn chat_with_tools(
&self,
messages: &[LlmMessage],
tools: &[ToolSchema],
) -> Result<LlmResponse>Chat with tools
Parameters:
| Name | Type |
|---|---|
messages | &[LlmMessage] |
tools | &[ToolSchema] |
Source
View on GitHubpraisonai/src/protocols/mod.rs at line 0