Expand description
LLM clients for the openai and anthropic wire protocols.
Re-exports§
pub use crate::retry::RetryPolicy;pub use crate::retry::Retryable;pub use crate::retry::with_retry;
Structs§
- Anthropic
Client - Client for the
anthropicprotocol (/messages). - Completion
- A parsed completion.
- Completion
Request - A single-turn completion request. The model is bound to the client.
- Open
AiClient - Client for the
openaiprotocol (/chat/completions,/embeddings). - Reasoning
- Reasoning extracted from a response.
- Usage
- Token counts reported by the provider.
Enums§
- LlmError
- Errors from an LLM provider.
- Protocol
Client - A client for one of the two wire protocols.
- Setup
Error - Errors while building a client from the configuration.
Traits§
- LlmClient
- A chat model bound to one provider and one model ID.
Functions§
- connect
- Builds the client for
role: resolves the provider’s API key (literal or Vault reference) and usespipeline.request_timeout_secsas request timeout. A provider withoutapi_keygets no auth header, which suits local servers.