Expand description
LLM client abstraction layer
Provides a unified interface for interacting with LLM providers (Anthropic Claude, OpenAI, and OpenAI-compatible providers).
Re-exports§
pub use anthropic::AnthropicClient;pub use factory::create_client_with_config;pub use factory::LlmConfig;pub use http::default_http_client;pub use http::HttpClient;pub use http::HttpResponse;pub use http::StreamingHttpResponse;pub use openai::OpenAiClient;
Modules§
- anthropic
- Anthropic Claude LLM client
- factory
- LLM client factory
- http
- HTTP utilities and abstraction for LLM API calls
- openai
- OpenAI-compatible LLM client
Structs§
- Attachment
- Image attachment for multi-modal messages.
- Image
Source - Image source for the
ContentBlock::Imagevariant. - LlmResponse
- LLM response
- Message
- Message in conversation
- Secret
String - A string wrapper that redacts its value in Debug and Display output. Prevents API keys from leaking into logs and error messages.
- Token
Usage - Token usage statistics
- Tool
Call - Tool call from LLM
- Tool
Definition - Tool definition for LLM
Enums§
- Content
Block - Message content types
- Stream
Event - Streaming event from LLM
- Tool
Result Content - Content within a tool result — either text or an image.
- Tool
Result Content Field - The
contentfield of aToolResultblock.
Traits§
- LlmClient
- LLM client trait