This commit is contained in:
Billy Bao 2025-11-20 10:29:05 +08:00
parent 1c06ec39ca
commit e5e79da76c
2 changed files with 2 additions and 1 deletions

View file

@ -69,7 +69,7 @@ class Document(Base):
response = res.json()
actual_keys = set(response.keys())
if actual_keys == error_keys:
raise Exception(res.get("message"))
raise Exception(response.get("message"))
else:
return res.content
except json.JSONDecodeError:

View file

@ -80,6 +80,7 @@ class Session(Base):
def _structure_answer(self, json_data):
answer = ""
if self.__session_type == "agent":
answer = json_data["data"]["content"]
elif self.__session_type == "chat":