Skip to main content

Module driver

Module driver 

Source
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§

AnthropicDriver
Driver for the Anthropic Messages API (api.anthropic.com).
AzureOpenAiDriver
Driver for Azure OpenAI deployments.
BedrockDriver
Driver for AWS Bedrock using the Converse API with SigV4 authentication.
CompletionRequest
A request to the LLM for a completion.
CompletionResponse
The response from an LLM completion.
GeminiDriver
Driver for the Google Gemini (Generative Language) API.
OllamaDriver
Driver for local Ollama instances using the chat API.
OpenAiCompatibleDriver
Driver for OpenAI-compatible chat completions APIs.
StreamChunk
A chunk from a streaming LLM response.
TokenUsage
Token usage statistics for a single completion.
ToolCallDelta
Incremental tool call data in a streaming response.

Enums§

StopReason
Why the model stopped generating.

Traits§

LlmDriver
Abstraction over LLM providers.

Functions§

create_driver
Create an LlmDriver from a ModelConfig.
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.

Type Aliases§

StreamCallback
Callback invoked for each streaming chunk.