(id: &str)
| 44 | /// This should be called when the `LlmConfig` is no longer needed to free resources. |
| 45 | #[cfg(feature = "python")] |
| 46 | pub fn unregister_python_instance(id: &str) -> bool { |
| 47 | if let Ok(mut registry) = PYTHON_INSTANCE_REGISTRY.lock() { |
| 48 | registry.remove(id).is_some() |
| 49 | } else { |
| 50 | false |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /// Configuration for different LLM providers |
| 55 | #[derive(Debug, Clone, Serialize, Deserialize)] |