api http return error (#3941)

api http  return error when content is not found


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

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
so95 2024-12-10 08:04:24 +07:00 committed by GitHub
parent 255f4ccffc
commit 60486ecde5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ def structure_answer(conv, ans, message_id, session_id):
chunk_list = [{
"id": chunk["chunk_id"],
"content": chunk["content"],
"content": chunk.get("content") if chunk.get("content") else chunk.get("content_with_content"),
"document_id": chunk["doc_id"],
"document_name": chunk["docnm_kwd"],
"dataset_id": chunk["kb_id"],