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.
MockLlmProvider
Defined in the LLM module.
Rust AI Agent SDK
Mock LLM provider for testing (no API calls)
Fields
| Name | Type | Description |
|---|
model | String | - |
responses | std::sync::Mutex<Vec<String>> | - |
tool_calls | std::sync::Mutex<Vec<Vec<ToolCall>>> | - |
Methods
new
Create a new mock provider
add_response
fn add_response(&self, response: impl Into<String>) -> ()
Add a response to return (FIFO queue)
Parameters:
| Name | Type |
|---|
response | impl Into<String> |
fn add_tool_calls(&self, calls: Vec<ToolCall>) -> ()
Add tool calls to return with next response
Parameters:
| Name | Type |
|---|
calls | Vec<ToolCall> |
with_response
fn with_response(response: impl Into<String>) -> Self
Create with a single response
Parameters:
| Name | Type |
|---|
response | impl Into<String> |
Source
View on GitHub
praisonai/src/llm/mod.rs at line 393