mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix: defer faiss C library import to prevent process hang on startup Move top-level `import faiss` from embedding_storage.py to __init__() method, and make the EmbeddingStorage import in vec_db.py lazy. This prevents the faiss C library from being loaded at module import time, which can cause process hang (SIGILL or deadlock) with faiss-cpu 1.14.2 on certain CPU architectures. Ref #8695 * chore: apply review suggestions - Preserve original exception context with `from e` when re-raising ImportError - Move EmbeddingStorage import back to top level in vec_db.py (safe now that faiss is no longer imported at module level in embedding_storage.py) * ci: trigger re-run --------- Co-authored-by: Blueteemo <Blueteemo@users.noreply.github.com>