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
[Bug]: unnecessary auto-increment calculations in the tokens statistics of the chat model (#2969)
Yinquan WANG445dce436374
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex 1dbf509351..d6589e0ab8 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -68,7 +68,6 @@ class Base(ABC):resp.choices[0].delta.content = ""ans += resp.choices[0].delta.content- total_tokens += 1if not hasattr(resp, "usage") or not resp.usage:total_tokens = (total_tokens