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:
6ba3i
2026-01-16 17:47:12 +08:00
committed by GitHub
parent 30bd25716b
commit 59075a0b58

View File

@ -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: