Skip to content

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

Fix: claude max tokens. (#6484)

Kevin Hu095fc84cf289
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py
index ebcce26a77..1dfdb10683 100644
--- a/rag/llm/chat_model.py
+++ b/rag/llm/chat_model.py
@@ -1443,7 +1443,7 @@ class AnthropicChat(Base):
del gen_conf["presence_penalty"]
if "frequency_penalty" in gen_conf:
del gen_conf["frequency_penalty"]
- gen_conf["max_tokens"] = 8196
+ gen_conf["max_tokens"] = 8192
if "haiku" in self.model_name or "opus" in self.model_name:
gen_conf["max_tokens"] = 4096
@@ -1477,7 +1477,7 @@ class AnthropicChat(Base):
del gen_conf["presence_penalty"]
if "frequency_penalty" in gen_conf:
del gen_conf["frequency_penalty"]
- gen_conf["max_tokens"] = 8196
+ gen_conf["max_tokens"] = 8192
if "haiku" in self.model_name or "opus" in self.model_name:
gen_conf["max_tokens"] = 4096