Skip to main content

llm

Rust AI Agent SDK LLM Provider abstraction for PraisonAI This module provides the LLM provider trait and implementations. Uses rig-core for multi-provider support (OpenAI, Anthropic, Ollama, etc.)

Import

use praisonai::llm::*;

Classes

Message

A message in a conversation

ToolCallFunction

Function details within a tool call

ToolCall

A tool call made by the LLM

LlmResponse

LLM response

Usage

Token usage statistics

LlmConfig

LLM configuration

OpenAiProvider

OpenAI-compatible LLM provider

MockLlmProvider

Mock LLM provider for testing (no API calls)

LlmProvider

Trait for LLM providers

Role

Message role in a conversation

Rust LLM

Rust Providers

Rust Failover