Roccat [email protected] commited on
Commit
5567588
·
1 Parent(s): 4ba2b4f

Fix: Completion AttributeError: 'list' object has no attribute 'get' (#3999)

Browse files

### What problem does this PR solve?


### Type of change

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

Co-authored-by: [email protected] <[email protected]>

Files changed (1) hide show
  1. api/apps/conversation_app.py +2 -0
api/apps/conversation_app.py CHANGED
@@ -187,6 +187,8 @@ def completion():
187
  return d.get(k1, d.get(k2))
188
 
189
  for ref in conv.reference:
 
 
190
  ref["chunks"] = [{
191
  "id": get_value(ck, "chunk_id", "id"),
192
  "content": get_value(ck, "content", "content_with_weight"),
 
187
  return d.get(k1, d.get(k2))
188
 
189
  for ref in conv.reference:
190
+ if isinstance(ref, list):
191
+ continue
192
  ref["chunks"] = [{
193
  "id": get_value(ck, "chunk_id", "id"),
194
  "content": get_value(ck, "content", "content_with_weight"),