Expand description
§Module: Providers
§Responsibility
Provides built-in LLM inference integrations behind the LlmProvider trait.
Optional feature flags gate each provider:
anthropic— Anthropic Messages APIopenai— OpenAI Chat Completions API (and compatible endpoints)
§Guarantees
LlmProvideris an async, object-safe trait- Both providers are
Send + Syncand usable behindArc<dyn LlmProvider> - Non-panicking: all operations return
Result
§Feature Gate
This module is only compiled when the providers feature (or a sub-feature) is enabled.
Structs§
- Anthropic
Provider - Built-in provider for the Anthropic Messages API.
- Completion
Options - Options for a completion request, passed to
LlmProvider::complete_with_options. - Open
AiProvider - Built-in provider for the OpenAI Chat Completions API.
Traits§
- LlmProvider
- Abstraction over an LLM inference endpoint.