Fix error message for image access. (#3936)

### What problem does this PR solve?

#3883

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-12-09 15:24:58 +08:00
committed by GitHub
parent 044afa83d1
commit afe82feb57
3 changed files with 12 additions and 6 deletions

View File

@ -47,6 +47,8 @@ class ConversationService(CommonService):
def structure_answer(conv, ans, message_id, session_id):
reference = ans["reference"]
if not isinstance(reference, dict):
reference = {}
temp_reference = deepcopy(ans["reference"])
if not conv.reference:
conv.reference.append(temp_reference)