This commit is contained in:
parent
f5c9fc0fdd
commit
160afd1744
|
|
@ -34,7 +34,7 @@ def search_docs(request: QueryRequest, user_id: str = Query(..., description="
|
||||||
# 构建 LlamaIndex 检索器
|
# 构建 LlamaIndex 检索器
|
||||||
logger.info(f"Loading Faiss vector store from path: {index_path}")
|
logger.info(f"Loading Faiss vector store from path: {index_path}")
|
||||||
faiss_store = FaissVectorStore.from_persist_path(index_path)
|
faiss_store = FaissVectorStore.from_persist_path(index_path)
|
||||||
service_context = ServiceContext.from_defaults(embed_model=embedder)
|
service_context = ServiceContext.from_defaults(embed_model=embedder, llm=None)
|
||||||
logger.info("Service context created successfully.")
|
logger.info("Service context created successfully.")
|
||||||
|
|
||||||
index = VectorStoreIndex.from_vector_store(faiss_store, service_context=service_context)
|
index = VectorStoreIndex.from_vector_store(faiss_store, service_context=service_context)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue