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

### What problem does this PR solve?


### Type of change

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

Co-authored-by: lizheng@ssc-hn.com <lizheng@ssc-hn.com>
This commit is contained in:
Roccat 2024-12-12 19:00:34 +08:00 committed by GitHub
parent c8b1a564aa
commit e8d74108a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,6 +187,8 @@ def completion():
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"),