dependable_faiss_import#

langchain_community.vectorstores.faiss.dependable_faiss_import(no_avx2: bool | None = None) Any[source]#

Import faiss if available, otherwise raise error. If FAISS_NO_AVX2 environment variable is set, it will be considered to load FAISS with no AVX2 optimization.

Parameters:

no_avx2 (bool | None) – Load FAISS strictly with no AVX2 optimization so that the vectorstore is portable and compatible with other devices.

Return type:

Any