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:
parent
c8b1a564aa
commit
e8d74108a5
1 changed files with 2 additions and 0 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue