fix: fixed the problem that the api will be called directly after selecting the chat assistant picture (#1034)

### What problem does this PR solve?

fix: fixed the problem that the api will be called directly after
selecting the chat assistant picture #1033

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-06-03 13:42:56 +08:00
committed by GitHub
parent cc064040a2
commit 9517a27844
3 changed files with 10 additions and 13 deletions

View File

@ -31,6 +31,7 @@ def set_dialog():
req = request.json
dialog_id = req.get("dialog_id")
name = req.get("name", "New Dialog")
icon = req.get("icon", "")
description = req.get("description", "A helpful Dialog")
top_n = req.get("top_n", 6)
top_k = req.get("top_k", 1024)
@ -90,7 +91,8 @@ def set_dialog():
"top_k": top_k,
"rerank_id": rerank_id,
"similarity_threshold": similarity_threshold,
"vector_similarity_weight": vector_similarity_weight
"vector_similarity_weight": vector_similarity_weight,
"icon": icon,
}
if not DialogService.save(**dia):
return get_data_error_result(retmsg="Fail to new a dialog!")