This commit is contained in:
hailin 2025-05-10 02:47:52 +08:00
parent f5c9fc0fdd
commit 160afd1744
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def search_docs(request: QueryRequest, user_id: str = Query(..., description="
# 构建 LlamaIndex 检索器
logger.info(f"Loading Faiss vector store from 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.")
index = VectorStoreIndex.from_vector_store(faiss_store, service_context=service_context)