fix disable and enable llm setting in dialog (#616)

### What problem does this PR solve?
#614 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh
2024-04-30 11:04:14 +08:00
committed by GitHub
parent 4c1476032d
commit 674b3aeafd
5 changed files with 29 additions and 22 deletions

View File

@ -35,13 +35,7 @@ def set_dialog():
top_n = req.get("top_n", 6)
similarity_threshold = req.get("similarity_threshold", 0.1)
vector_similarity_weight = req.get("vector_similarity_weight", 0.3)
llm_setting = req.get("llm_setting", {
"temperature": 0.1,
"top_p": 0.3,
"frequency_penalty": 0.7,
"presence_penalty": 0.4,
"max_tokens": 215
})
llm_setting = req.get("llm_setting", {})
default_prompt = {
"system": """你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。回答需要考虑聊天历史。
以下是知识库:

View File

@ -67,7 +67,7 @@ def get_rag_python_directory(*args):
def get_home_cache_dir():
dir = os.path.join(os.path.expanduser('~'), ".raglow")
dir = os.path.join(os.path.expanduser('~'), ".ragflow")
try:
os.mkdir(dir)
except OSError as error: