Expand description
Core traits and types for the LLM library ecosystem.
This crate provides the foundational abstractions that all LLM providers implement, including traits for chat, completion, streaming, and tool calling, as well as standardized request/response types and error handling.
Re-exports§
Modules§
- config
- Configuration system for LLM providers.
- error
- Error handling for LLM providers.
- traits
- Core traits for LLM providers.
- types
- Core types for LLM requests and responses.
Structs§
- Date
Time - ISO 8601 combined date and time with time zone.
- Duration
- A
Duration
type to represent a span of time, typically used for system timeouts. - HashMap
- A hash map implemented with quadratic probing and SIMD lookup.
- Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
Enums§
- Value
- Represents any valid JSON value.
Traits§
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Error
Error
is a trait representing the basic expectations for error values, i.e., values of typeE
inResult<T, E>
.- Serialize
- A data structure that can be serialized into any data format supported by Serde.
- Stream
- A stream of values produced asynchronously.