Fix conversation bug in agent session (#4078)

### What problem does this PR solve?

Fix conversation bug in agent session

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-12-18 11:49:25 +08:00
committed by GitHub
parent 00f99ecbd5
commit db74a3ef34
3 changed files with 113 additions and 111 deletions

View File

@ -30,6 +30,8 @@ class Session(Base):
if line.startswith("data:"):
json_data = json.loads(line[5:])
if json_data["data"] is not True:
if json_data["data"].get("running_status"):
continue
answer = json_data["data"]["answer"]
reference = json_data["data"]["reference"]
temp_dict = {