mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-30 06:43:27 +00:00
* refactor(rust-bridge): detect Python-only features in the catalog instead of Rust declines * refactor(rust-bridge): split and document route-specific detectors --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
21 lines
624 B
Rust
21 lines
624 B
Rust
mod native;
|
|
mod python;
|
|
mod selection;
|
|
|
|
pub(crate) use native::NativeCacheHandle;
|
|
pub(crate) use python::{CacheCall, PythonCache};
|
|
pub(crate) use selection::{Cached, Selection, configure, configured_native};
|
|
|
|
use litellm_cache::Error;
|
|
use pyo3::{
|
|
exceptions::{PyNotImplementedError, PyRuntimeError, PyValueError},
|
|
prelude::*,
|
|
};
|
|
|
|
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()),
|
|
}
|
|
}
|