mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
litellm-types mirrors litellm/types (chat, Anthropic Messages and Responses websocket data) and litellm-core-utils mirrors litellm/litellm_core_utils (provider resolution, prompt factory, core helpers, call arguments). Route request types move up to their core route module, the transform contracts move into base_llm, and the three duplicated provider error enums become one Error in base_llm/chat/transformation.rs, mirroring BaseLLMException. The empty-text placeholder goes back to the value Python's factory.py uses; the provider extraction had changed it to a single space. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
15 lines
409 B
Rust
15 lines
409 B
Rust
use litellm_host_python::release_count;
|
|
use pyo3::{prelude::*, types::PyDict};
|
|
|
|
#[pyfunction]
|
|
pub(crate) fn gil_stats(py: Python<'_>) -> PyResult<Py<PyAny>> {
|
|
let stats = PyDict::new(py);
|
|
stats.set_item("releases", release_count())?;
|
|
Ok(stats.into_any().unbind())
|
|
}
|
|
|
|
#[cfg(feature = "panic-test")]
|
|
#[pyfunction]
|
|
pub(crate) fn _panic_for_test() {
|
|
panic!("intentional PyO3 panic smoke test");
|
|
}
|