This commit is contained in:
parent
256646f426
commit
979e14430e
|
|
@ -78,6 +78,10 @@ def build_user_index(user_id: str):
|
||||||
# 创建服务上下文
|
# 创建服务上下文
|
||||||
service_context = ServiceContext.from_defaults(embed_model=embed_model, llm=None)
|
service_context = ServiceContext.from_defaults(embed_model=embed_model, llm=None)
|
||||||
|
|
||||||
|
# 直接检查模型嵌入方法是否被调用
|
||||||
|
logger.info(f"Embedding method being used: {embed_model._get_query_embedding('test query')}")
|
||||||
|
|
||||||
|
|
||||||
# 使用 Faiss 向量存储
|
# 使用 Faiss 向量存储
|
||||||
faiss_index = faiss.IndexFlatL2(1024)
|
faiss_index = faiss.IndexFlatL2(1024)
|
||||||
vector_store = FaissVectorStore(faiss_index=faiss_index)
|
vector_store = FaissVectorStore(faiss_index=faiss_index)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue