Skip to content

Commit

Permalink
fix: keyerror issue (#3512)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#3511

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored and yingfeng committed Nov 20, 2024
1 parent 8b4407a commit e559ceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/apps/sdk/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ def fillin_conv(ans):
"document_id": chunk["doc_id"],
"document_name": chunk["docnm_kwd"],
"dataset_id": chunk["kb_id"],
"image_id": chunk["img_id"],
"image_id": chunk.get("img_id", ""),
"similarity": chunk["similarity"],
"vector_similarity": chunk["vector_similarity"],
"term_similarity": chunk["term_similarity"],
"positions": chunk["positions"],
"positions": chunk.get("positions", []),
}
chunk_list.append(new_chunk)
reference["chunks"] = chunk_list
Expand Down

0 comments on commit e559ceb

Please sign in to comment.