Function
register_llm_request_intercept
(
name: &str,
priority: i32,
break_chain: bool,
callable: Py<PyAny>,
)
Source from the content-addressed store, hash-verified
| 1088 | /// If ``break_chain`` is ``True``, no lower-priority intercepts run after this one. |
| 1089 | #[pyfunction] |
| 1090 | fn register_llm_request_intercept( |
| 1091 | name: &str, |
| 1092 | priority: i32, |
| 1093 | break_chain: bool, |
| 1094 | callable: Py<PyAny>, |
| 1095 | ) -> PyResult<()> { |
| 1096 | core_registry_api::register_llm_request_intercept( |
| 1097 | name, |
| 1098 | priority, |
| 1099 | break_chain, |
| 1100 | py_callable::wrap_py_llm_request_intercept_fn(callable), |
| 1101 | ) |
| 1102 | .map_err(to_py_err) |
| 1103 | } |
| 1104 | |
| 1105 | /// Remove a previously registered LLM request intercept. |
| 1106 | #[pyfunction] |