consts.py 2.22 KB
Newer Older
1 2 3
# =============================
# 资料存储数据库配置
# =============================
4
VEC_DB_HOST = '192.168.10.189'
陈正乐 committed
5 6
VEC_DB_DBNAME = 'lae'
VEC_DB_USER = 'postgres'
陈正乐 committed
7 8
VEC_DB_PASSWORD = '111111'
VEC_DB_PORT = '5433'
9 10 11 12

# =============================
# 聊天相关数据库配置
# =============================
13
CHAT_DB_HOST = '192.168.10.189'
文靖昊 committed
14
CHAT_DB_DBNAME = 'lae'
陈正乐 committed
15
CHAT_DB_USER = 'postgres'
陈正乐 committed
16 17
CHAT_DB_PASSWORD = '111111'
CHAT_DB_PORT = '5433'
18 19 20 21

# =============================
# 向量化模型路径配置
# =============================
22
EMBEEDING_MODEL_PATH = 'D:\\work\\py\\LAE\\bge-large-zh-v1.5'
23

tinywell committed
24 25 26
# =============================
# 重排序模型路径配置
# =============================
27
RERANK_MODEL_PATH = 'D:\\work\\py\\LAE\\bge-reranker-large'
tinywell committed
28 29
# RERANK_MODEL_PATH = 'BAAI/bge-reranker-large'

30 31 32
# =============================
# 模型服务URL配置
# =============================
33
LLM_SERVER_URL = '192.168.10.102:8002'
34 35 36 37

# =============================
# FAISS相似性查找配置
# =============================
38
SIMILARITY_SHOW_NUMBER = 10
39
SIMILARITY_THRESHOLD = 0.8
40 41 42 43

# =============================
# FAISS向量库文件存储路径配置
# =============================
44
FAISS_STORE_PATH = 'D:\\work\\py\\LAE\\faiss'
45 46 47 48 49
INDEX_NAME = 'know'

# =============================
# 知识相关资料配置
# =============================
50
KNOWLEDGE_PATH = 'D:\\work\\py\\LAE\\testdoc'
陈正乐 committed
51 52 53 54 55

# =============================
# gradio服务相关配置
# =============================
GR_SERVER_NAME = 'localhost'
陈正乐 committed
56
GR_PORT = 8003
57 58 59 60 61 62 63 64

# =============================
# prompt 配置
# =============================
prompt1 = """'''
{context}
'''
请你根据上述已知资料回答下面的问题,问题如下:
65 66
{question}"""

67 68 69 70 71 72
prompt_enhancement_history_template = """{history}
上面是之前的对话,下面是可参考的内容,参考内容中如果和问题不符合,可以不用参考。
{context}
请结合上述内容回答以下问题,不要提无关内容:
{question}
"""
73 74 75 76
# =============================
# NLP_BERT模型路径配置
# =============================
NLP_BERT_PATH = 'C:\\Users\\15663\\AI\\models\\nlp_bert_document-segmentation_chinese-base'
陈正乐 committed
77 78 79 80

# =============================
# ICON配置
# =============================
陈正乐 committed
81
ICON_PATH = '/app/src/icon'