Re-exports§
pub use tool_call::FunctionCall;pub use tool_call::ToolCall;pub use tools::Tool;pub use tools::ToolFunction;pub use tools::ToolRegistry;
Modules§
- tool_
call - Tool call parsing and conversion to AgentAction
- tools
- Ollama Tools API support for native function calling
Structs§
- Backend
Config - Backend connection configuration
- Chat
Message - Represents a chat message
- Model
Capabilities - Capability flags advertised by a model adapter.
- Model
Config - Unified model configuration
- Model
Factory - Model factory - creates model instances.
- Model
Response - Response from a model
- Ollama
Options - Ollama-specific options (extracted from backend_options)
- Provider
Profile - Static description of one OpenAI-compatible provider.
- Reasoning
Chunk - A typed chunk of reasoning content emitted during streaming.
- Token
Usage - Token usage statistics
- User
Facing Error - User-facing error information with actionable suggestions
Enums§
- Backend
Error - Backend-specific errors
- Compat
Style - User-friendly string form for
compat = "..."in config.toml when a fully custom provider needs to declare which profile shape to follow. - Config
Error - Configuration errors
- Error
Category - Error categories for visual differentiation
- Message
Role - Model
Error - Top-level error type for all model operations
- Reasoning
Capability - Describes the reasoning controls a model exposes.
- Reasoning
Extraction - Where reasoning content shows up in a streaming response delta.
- Reasoning
Level - Reasoning depth requested for a model call.
- Reasoning
Strategy - How to put
ReasoningLevelonto the wire for a given provider. - Stream
Event - A single event emitted during a streaming model call.
Constants§
- PROVIDER_
REGISTRY - Built-in provider registry. Lookups are case-insensitive on
name. Add a provider here when its quirks fit the existing strategies; add a newReasoningStrategyvariant when a provider needs something the existing ones can’t express.
Traits§
- Model
- Core trait that all model adapters implement.
Functions§
- lookup_
provider - Look up a built-in provider by name. Case-insensitive.
- nearest_
effort - Map a requested reasoning level onto the closest level the model actually supports.
Type Aliases§
- Result
- Result type alias for model operations
- Stream
Callback - Callback invoked once per
StreamEventduring a chat request.