mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
30 lines
686 B
Rust
30 lines
686 B
Rust
mod binding;
|
|
mod callback;
|
|
mod config;
|
|
mod embedder;
|
|
mod facade;
|
|
mod future;
|
|
mod handle;
|
|
mod native;
|
|
mod request;
|
|
mod resolver;
|
|
mod semantic;
|
|
mod semantic_step;
|
|
|
|
use litellm_cache::Error;
|
|
use pyo3::{
|
|
exceptions::{PyNotImplementedError, PyRuntimeError, PyValueError},
|
|
prelude::*,
|
|
};
|
|
|
|
pub(crate) use self::{
|
|
binding::ResolvedCache, handle::CacheTestHandle, resolver::CacheTestResolver,
|
|
};
|
|
|
|
fn cache_error(error: Error) -> PyErr {
|
|
match error {
|
|
Error::InvalidEntry => PyValueError::new_err(error.to_string()),
|
|
Error::UnsupportedOperation => PyNotImplementedError::new_err(error.to_string()),
|
|
_ => PyRuntimeError::new_err(error.to_string()),
|
|
}
|
|
}
|