Skip to content

Commit 2c2be93

Browse files
authored
support claude 4 sonnet (#235)
Signed-off-by: ChengZi <[email protected]>
1 parent 6b09885 commit 2c2be93

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
---
1212

13-
DeepSearcher combines cutting-edge LLMs (OpenAI o3, Qwen3, DeepSeek, Grok 3, Claude 3.7 Sonnet, Llama 4, QwQ, etc.) and Vector Databases (Milvus, Zilliz Cloud etc.) to perform search, evaluation, and reasoning based on private data, providing highly accurate answer and comprehensive report. This project is suitable for enterprise knowledge management, intelligent Q&A systems, and information retrieval scenarios.
13+
DeepSearcher combines cutting-edge LLMs (OpenAI o3, Qwen3, DeepSeek, Grok 3, Claude 4 Sonnet, Llama 4, QwQ, etc.) and Vector Databases (Milvus, Zilliz Cloud etc.) to perform search, evaluation, and reasoning based on private data, providing highly accurate answer and comprehensive report. This project is suitable for enterprise knowledge management, intelligent Q&A systems, and information retrieval scenarios.
1414

1515
![Architecture](./assets/pic/deep-searcher-arch.png)
1616

@@ -154,7 +154,7 @@ result = query("Write a report about xxx.") # Your question here
154154
<details>
155155
<summary>Example (Claude)</summary>
156156
<p> Make sure you have prepared your ANTHROPIC API KEY as an env variable <code>ANTHROPIC_API_KEY</code>.</p>
157-
<pre><code>config.set_provider_config("llm", "Anthropic", {"model": "claude-3-7-sonnet-latest"})</code></pre>
157+
<pre><code>config.set_provider_config("llm", "Anthropic", {"model": "claude-sonnet-4-0"})</code></pre>
158158
<p> More details about Anthropic Claude: https://docs.anthropic.com/en/home </p>
159159
</details>
160160

@@ -485,7 +485,7 @@ Click on the button "Try it out", it allows you to fill the parameters and direc
485485
**Q1**: Why I failed to parse LLM output format / How to select the LLM?
486486

487487

488-
**A1**: Small LLMs struggle to follow the prompt to generate a desired response, which usually cause the format parsing problem. A better practice is to use large reasoning models e.g. deepseek-r1 671b, OpenAI o-series, Claude 3.7 sonnet, etc. as your LLM.
488+
**A1**: Small LLMs struggle to follow the prompt to generate a desired response, which usually cause the format parsing problem. A better practice is to use large reasoning models e.g. deepseek-r1 671b, OpenAI o-series, Claude 4 sonnet, etc. as your LLM.
489489

490490
---
491491

deepsearcher/llm/anthropic_llm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class Anthropic(BaseLLM):
1717
client: The Anthropic client instance.
1818
"""
1919

20-
def __init__(self, model: str = "claude-3-7-sonnet-latest", max_tokens: int = 8192, **kwargs):
20+
def __init__(self, model: str = "claude-sonnet-4-0", max_tokens: int = 8192, **kwargs):
2121
"""
2222
Initialize an Anthropic language model client.
2323
2424
Args:
25-
model (str, optional): The model identifier to use. Defaults to "claude-3-7-sonnet-latest".
25+
model (str, optional): The model identifier to use. Defaults to "claude-sonnet-4-0".
2626
max_tokens (int, optional): The maximum number of tokens to generate. Defaults to 8192.
2727
**kwargs: Additional keyword arguments to pass to the Anthropic client.
2828
- api_key: Anthropic API key. If not provided, uses ANTHROPIC_API_KEY environment variable.

docs/configuration/llm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ config.set_provider_config("llm", "(LLMName)", "(Arguments dict)")
1414
|----------|-------------|------------|
1515
| **OpenAI** | OpenAI's API for GPT models | o1-mini, GPT-4 |
1616
| **DeepSeek** | DeepSeek AI offering | deepseek-reasoner, coder |
17-
| **Anthropic** | Anthropic's Claude models | claude-3-opus, claude-3-sonnet |
17+
| **Anthropic** | Anthropic's Claude models | claude-sonnet-4-0 |
1818
| **Gemini** | Google's Gemini models | gemini-1.5-pro, gemini-2.0-flash |
1919
| **XAI** | X.AI's Grok models | grok-2-latest |
2020
| **Ollama** | Local LLM deployment | llama3, qwq, etc. |
@@ -81,7 +81,7 @@ config.set_provider_config("llm", "DeepSeek", {"model": "deepseek-reasoner"})
8181
??? example "Claude"
8282

8383
```python
84-
config.set_provider_config("llm", "Anthropic", {"model": "claude-3-7-sonnet-latest"})
84+
config.set_provider_config("llm", "Anthropic", {"model": "claude-sonnet-4-0"})
8585
```
8686
*Requires `ANTHROPIC_API_KEY` environment variable*
8787

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
## ✨ Overview
2323

24-
DeepSearcher combines cutting-edge LLMs (OpenAI o1, o3-mini, DeepSeek, Grok 3, Claude 3.7 Sonnet, Llama 4, QwQ, etc.) and Vector Databases (Milvus, Zilliz Cloud etc.) to perform search, evaluation, and reasoning based on private data, providing highly accurate answers and comprehensive reports.
24+
DeepSearcher combines cutting-edge LLMs (OpenAI o1, o3-mini, DeepSeek, Grok 3, Claude 4 Sonnet, Llama 4, QwQ, etc.) and Vector Databases (Milvus, Zilliz Cloud etc.) to perform search, evaluation, and reasoning based on private data, providing highly accurate answers and comprehensive reports.
2525

2626
> **Perfect for:** Enterprise knowledge management, intelligent Q&A systems, and information retrieval scenarios.
2727

0 commit comments

Comments
 (0)