Skip to content

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

Fix: Raptor: [Bug]: **ERROR**: Unknown field for GenerationConfig: max_tokens (#8331)

Stephen Hu35034fed7392
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py
index 3e96f75f4e..fbef347818 100644
--- a/rag/llm/chat_model.py
+++ b/rag/llm/chat_model.py
@@ -1217,7 +1217,7 @@ class GeminiChat(Base):
def _clean_conf(self, gen_conf):
for k in list(gen_conf.keys()):
- if k not in ["temperature", "top_p", "max_tokens"]:
+ if k not in ["temperature", "top_p"]:
del gen_conf[k]
return gen_conf