RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fixes KeyError: 'content' when using stream=False (#4944)
Peterson Alves042f4c90c6bf
diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.pyindex e30bfedd8a..d3993b63da 100644--- a/api/db/services/dialog_service.py+++ b/api/db/services/dialog_service.py@@ -372,8 +372,8 @@ def chat(dialog, messages, stream=True, **kwargs):yield decorate_answer(answer)else:answer = chat_mdl.chat(prompt, msg[1:], gen_conf)- logging.debug("User: {}|Assistant: {}".format(- msg[-1]["content"], answer))+ user_content = msg[-1].get("content", "[content not available]")+ logging.debug("User: {}|Assistant: {}".format(user_content, answer))res = decorate_answer(answer)res["audio_binary"] = tts(tts_mdl, answer)yield res