Feat: reference should also be list after 0.20.x (#9582)

### What problem does this PR solve?

In 0.19.0 reference is list,and it should be a list,otherwise last
conversation's reference will be lost

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
天海蒼灆
2025-08-20 13:38:14 +08:00
committed by GitHub
parent 9f9d32d2cd
commit 997627861a

View File

@ -182,7 +182,7 @@ def completion(tenant_id, agent_id, session_id=None, **kwargs):
yield "data:" + json.dumps(ans, ensure_ascii=False) + "\n\n"
conv.message.append({"role": "assistant", "content": txt, "created_at": time.time(), "id": message_id})
conv.reference = canvas.get_reference()
conv.reference.append(canvas.get_reference())
conv.errors = canvas.error
conv.dsl = str(canvas)
conv = conv.to_dict()