Expand description
LLM driver trait and provider implementations.
The LlmDriver trait abstracts over different LLM providers so the
fighter loop is provider-agnostic. Concrete implementations handle the
wire format differences between Anthropic, OpenAI-compatible APIs, etc.
Structs§
- Anthropic
Driver - Driver for the Anthropic Messages API (api.anthropic.com).
- Azure
Open AiDriver - Driver for Azure OpenAI deployments.
- Bedrock
Driver - Driver for AWS Bedrock using the Converse API with SigV4 authentication.
- Completion
Request - A request to the LLM for a completion.
- Completion
Response - The response from an LLM completion.
- Gemini
Driver - Driver for the Google Gemini (Generative Language) API.
- Ollama
Driver - Driver for local Ollama instances using the chat API.
- Open
AiCompatible Driver - Driver for OpenAI-compatible chat completions APIs.
- Token
Usage - Token usage statistics for a single completion.
Enums§
- Stop
Reason - Why the model stopped generating.
Traits§
- LlmDriver
- Abstraction over LLM providers.
Functions§
- create_
driver - Create an
LlmDriverfrom aModelConfig. - create_
driver_ with_ client - Create a driver from config with an optional shared
reqwest::Client. - strip_
thinking_ tags - Strip reasoning/thinking tags from LLM responses.