mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-19 11:45:10 +08:00
Fix : p3 level sdk test error for update chat (#12654)
### What problem does this PR solve? fix for update chat failing ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -60,6 +60,12 @@ class Chat(Base):
|
||||
super().__init__(rag, res_dict)
|
||||
|
||||
def update(self, update_message: dict):
|
||||
if not isinstance(update_message, dict):
|
||||
raise Exception("ValueError('`update_message` must be a dict')")
|
||||
if update_message.get("llm") == {}:
|
||||
raise Exception("ValueError('`llm` cannot be empty')")
|
||||
if update_message.get("prompt") == {}:
|
||||
raise Exception("ValueError('`prompt` cannot be empty')")
|
||||
res = self.put(f"/chats/{self.id}", update_message)
|
||||
res = res.json()
|
||||
if res.get("code") != 0:
|
||||
|
||||
Reference in New Issue
Block a user