(py: Python<'_>, config: MemoryConfig)
| 27 | /// vector index, and prepares the LLM and embedding providers. |
| 28 | #[new] |
| 29 | fn new(py: Python<'_>, config: MemoryConfig) -> PyResult<Self> { |
| 30 | let cfg = config.inner; |
| 31 | let rt = get_runtime(); |
| 32 | |
| 33 | let service = py.allow_threads(|| { |
| 34 | rt.block_on(async move { |
| 35 | graphbit_core::memory::MemoryService::new(cfg) |
| 36 | .await |
| 37 | .map_err(to_py_runtime_error) |
| 38 | }) |
| 39 | })?; |
| 40 | |
| 41 | Ok(Self { |
| 42 | service: Arc::new(service), |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | /// Extract and store facts from conversation messages. |
| 47 | /// |
nothing calls this directly
no test coverage detected