api http return error (#3941)
Browse filesapi http return error when content is not found
- [x] Bug Fix (non-breaking change which fixes an issue)
---------
Co-authored-by: Kevin Hu <[email protected]>
api/db/services/conversation_service.py
CHANGED
@@ -58,7 +58,7 @@ def structure_answer(conv, ans, message_id, session_id):
|
|
58 |
|
59 |
chunk_list = [{
|
60 |
"id": chunk["chunk_id"],
|
61 |
-
"content": chunk
|
62 |
"document_id": chunk["doc_id"],
|
63 |
"document_name": chunk["docnm_kwd"],
|
64 |
"dataset_id": chunk["kb_id"],
|
|
|
58 |
|
59 |
chunk_list = [{
|
60 |
"id": chunk["chunk_id"],
|
61 |
+
"content": chunk.get("content") if chunk.get("content") else chunk.get("content_with_content"),
|
62 |
"document_id": chunk["doc_id"],
|
63 |
"document_name": chunk["docnm_kwd"],
|
64 |
"dataset_id": chunk["kb_id"],
|