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
fixed: The choices may be empty. (#876)
dashi617421453ffff0d0
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex a652972a2c..9a2eec5d54 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -56,6 +56,7 @@ class Base(ABC):stream=True,**gen_conf)for resp in response:+ if len(resp.choices) == 0:continueif not resp.choices[0].delta.content:continueans += resp.choices[0].delta.contenttotal_tokens += 1