Skip to content

Commit

Permalink
fixed api error systax
Browse files Browse the repository at this point in the history
  • Loading branch information
isthaison committed Nov 22, 2024
1 parent 3ae9253 commit 918899e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions api/apps/sdk/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ def fillin_conv(ans):
chunk_list = []
for chunk in chunks:
new_chunk = {
"id": chunk["chunk_id"],
"id": chunk.get("chunk_id", ""),
"content": chunk["content_with_weight"],
"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"],
Expand Down Expand Up @@ -408,12 +408,12 @@ def list_session(chat_id,tenant_id):
chunks = conv["reference"][chunk_num]["chunks"]
for chunk in chunks:
new_chunk = {
"id": chunk["chunk_id"],
"content": chunk["content_with_weight"],
"document_id": chunk["doc_id"],
"document_name": chunk["docnm_kwd"],
"dataset_id": chunk["kb_id"],
"image_id": chunk["img_id"],
"id": chunk.get("chunk_id", ""),
"content": chunk.get("content_with_weight", ""),
"document_id": chunk.get("doc_id", ""),
"document_name": chunk.get("docnm_kwd", ""),
"dataset_id": chunk.get("kb_id", ""),
"image_id": chunk.get("img_id", ""),
"similarity": chunk["similarity"],
"vector_similarity": chunk["vector_similarity"],
"term_similarity": chunk["term_similarity"],
Expand Down

0 comments on commit 918899e

Please sign in to comment.