Fix bugs in agent api and update api document (#3996)

### What problem does this PR solve?

Fix bugs in agent api and update api document

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-12-13 10:25:52 +08:00
committed by GitHub
parent 68d46b2a1e
commit 1ecb687c51
9 changed files with 351 additions and 57 deletions

View File

@ -29,7 +29,7 @@ class Session(Base):
raise Exception(json_data["message"])
if line.startswith("data:"):
json_data = json.loads(line[5:])
if not json_data["data"]:
if json_data["data"] is not True:
answer = json_data["data"]["answer"]
reference = json_data["data"]["reference"]
temp_dict = {