Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix error in exception (#2694)

Kevin Hu0a7654c74708
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py
index 479f6fe6d1..11956ad81a 100644
--- a/rag/llm/chat_model.py
+++ b/rag/llm/chat_model.py
@@ -1340,7 +1340,7 @@ class GoogleChat(Base):
+ response["usage"]["output_tokens"],
)
except Exception as e:
- return ans + "\n**ERROR**: " + str(e), 0
+ return "\n**ERROR**: " + str(e), 0
else:
self.client._system_instruction = self.system
if "max_tokens" in gen_conf: