Skip to content

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

Fix the value issue of anthropic (#3351)

shijiefengjun632b23486f8c
diff --git a/conf/llm_factories.json b/conf/llm_factories.json
index a6f69dc3f5..1ce9adb44b 100644
--- a/conf/llm_factories.json
+++ b/conf/llm_factories.json
@@ -2371,8 +2371,8 @@
"model_type": "chat"
},
{
- "llm_name": "claude-instant-1.2",
- "tags": "LLM,CHAT,100k",
+ "llm_name": "claude-3-5-sonnet-20241022",
+ "tags": "LLM,CHAT,200k",
"max_tokens": 102400,
"model_type": "chat"
}
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py
index 9060fd4508..716d020aee 100644
--- a/rag/llm/chat_model.py
+++ b/rag/llm/chat_model.py
@@ -1260,7 +1260,7 @@ class AnthropicChat(Base):
system=self.system,
stream=False,
**gen_conf,
- ).json()
+ ).to_dict()
ans = response["content"][0]["text"]
if response["stop_reason"] == "max_tokens":
ans += (