mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: Optimize edge check & incorrect parameter usage (#11396)
### What problem does this PR solve? Fix: incorrect parameter usage #8084 Fix: Optimize edge check #10851 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -69,7 +69,7 @@ class Document(Base):
|
|||||||
response = res.json()
|
response = res.json()
|
||||||
actual_keys = set(response.keys())
|
actual_keys = set(response.keys())
|
||||||
if actual_keys == error_keys:
|
if actual_keys == error_keys:
|
||||||
raise Exception(res.get("message"))
|
raise Exception(response.get("message"))
|
||||||
else:
|
else:
|
||||||
return res.content
|
return res.content
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
|
|||||||
@ -80,6 +80,7 @@ class Session(Base):
|
|||||||
|
|
||||||
|
|
||||||
def _structure_answer(self, json_data):
|
def _structure_answer(self, json_data):
|
||||||
|
answer = ""
|
||||||
if self.__session_type == "agent":
|
if self.__session_type == "agent":
|
||||||
answer = json_data["data"]["content"]
|
answer = json_data["data"]["content"]
|
||||||
elif self.__session_type == "chat":
|
elif self.__session_type == "chat":
|
||||||
|
|||||||
Reference in New Issue
Block a user