mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
Every other crate names its error Error. The format crates already re-exported it under that name, so only the inference crate and a few importers change
34 lines
812 B
Rust
34 lines
812 B
Rust
pub mod context;
|
|
pub mod diagnostic;
|
|
|
|
pub mod caching;
|
|
pub mod error;
|
|
pub mod outbound;
|
|
pub mod provider;
|
|
pub mod resources;
|
|
|
|
pub use error::Error;
|
|
|
|
#[derive(Clone, Default)]
|
|
pub struct CallOptions {
|
|
pub cache: Option<litellm_cache_response::CachePolicy>,
|
|
pub observers: Option<litellm_host::observation::ObservationSender>,
|
|
}
|
|
|
|
impl From<Option<litellm_host::observation::ObservationSender>> for CallOptions {
|
|
fn from(observers: Option<litellm_host::observation::ObservationSender>) -> Self {
|
|
Self {
|
|
cache: None,
|
|
observers,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<litellm_cache_response::CachePolicy> for CallOptions {
|
|
fn from(cache: litellm_cache_response::CachePolicy) -> Self {
|
|
Self {
|
|
cache: Some(cache),
|
|
observers: None,
|
|
}
|
|
}
|
|
}
|