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
fix: ERROR: 'CompletionUsage' object has no attribute 'get' (#1736)
Wang Baoling74ebc497c1c3
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex 9337bd6bf1..fb6fca8b21 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -183,7 +183,7 @@ class BaiChuanChat(Base):if resp.choices[0].finish_reason == "stop":if not resp.choices[0].delta.content:continue- total_tokens = resp.usage.get('total_tokens', 0)+ total_tokens = resp.usage.total_tokensif not resp.choices[0].delta.content:continueans += resp.choices[0].delta.content