提供对话上下文索引

This commit is contained in:
2026-04-10 12:47:39 +00:00
parent 8e39e609cc
commit d4e6142131
10 changed files with 267 additions and 90 deletions

View File

@@ -5,6 +5,10 @@ from functools import lru_cache
class Settings(BaseSettings):
# FAISS 配置(已优化为你的 LLM 相似问题缓存场景)
FAISS_DIM: int = 1024 # 根据你的 embedding 模型修改e.g. bge-large=1024, text-embedding-3-large=3072
FAISS_INDEX_DIR: str = "indexes"
FAISS_GLOBAL_DIR: str = "global"
FAISS_CONVERSATION_DIR: str = "conversations"
FAISS_GLOBAL_INDEX_NAME: str = "global_qa.index"
FAISS_INDEX_PATH: str = "faiss_index.bin"
FAISS_INDEX_TYPE: str = "HNSW" # 默认改为 HNSW最推荐