Skip to content

Commit

Permalink
Fix: Completion AttributeError: 'list' object has no attribute 'get' (#…
Browse files Browse the repository at this point in the history
…3999)

### 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]>
  • Loading branch information
lizheng419 and [email protected] authored Dec 12, 2024
1 parent c8b1a56 commit e8d7410
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/apps/conversation_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def get_value(d, k1, k2):
return d.get(k1, d.get(k2))

for ref in conv.reference:
if isinstance(ref, list):
continue
ref["chunks"] = [{
"id": get_value(ck, "chunk_id", "id"),
"content": get_value(ck, "content", "content_with_weight"),
Expand Down

0 comments on commit e8d7410

Please sign in to comment.