Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1130748

Browse files
basnijholtKludex
andauthored
duckduckgo-search is renamed toddgs (#2172)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
1 parentc325b7c commit1130748

File tree

6 files changed

+41
-21
lines changed

6 files changed

+41
-21
lines changed

‎docs/common-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PydanticAI ships with native tools that can be used to enhance your agent's capa
55
##DuckDuckGo Search Tool
66

77
The DuckDuckGo search tool allows you to search the web for information. It is built on top of the
8-
[DuckDuckGo API](https://github.com/deedy5/duckduckgo_search).
8+
[DuckDuckGo API](https://github.com/deedy5/ddgs).
99

1010
###Installation
1111

‎docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pip/uv-add "pydantic-ai-slim[openai]"
5454
*`groq` — installs`groq`[PyPI ↗](https://pypi.org/project/groq){:target="_blank"}
5555
*`mistral` — installs`mistralai`[PyPI ↗](https://pypi.org/project/mistralai){:target="_blank"}
5656
*`cohere` - installs`cohere`[PyPI ↗](https://pypi.org/project/cohere){:target="_blank"}
57-
*`duckduckgo` - installs`duckduckgo-search`[PyPI ↗](https://pypi.org/project/duckduckgo-search){:target="_blank"}
57+
*`duckduckgo` - installs`ddgs`[PyPI ↗](https://pypi.org/project/ddgs){:target="_blank"}
5858
*`tavily` - installs`tavily-python`[PyPI ↗](https://pypi.org/project/tavily-python){:target="_blank"}
5959

6060
See the[models](models/index.md) documentation for information on which optional dependencies are required for each model.

‎docs/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ If you'd like to use a tool from LangChain's [community tool library](https://py
732732

733733
You will need to install the`langchain-community` package and any others required by the tool in question.
734734

735-
Here is how you can use the LangChain`DuckDuckGoSearchRun` tool, which requires the`duckduckgo-search` package:
735+
Here is how you can use the LangChain`DuckDuckGoSearchRun` tool, which requires the`ddgs` package:
736736

737737
```python {test="skip"}
738738
from langchain_community.toolsimport DuckDuckGoSearchRun

‎pydantic_ai_slim/pydantic_ai/common_tools/duckduckgo.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
frompydantic_ai.toolsimportTool
1010

1111
try:
12-
fromduckduckgo_searchimportDDGS
12+
try:
13+
fromddgsimportDDGS
14+
exceptImportError:# Fallback for older versions of ddgs
15+
fromduckduckgo_searchimportDDGS
1316
exceptImportErroras_import_error:
1417
raiseImportError(
15-
'Please install `duckduckgo-search` to use the DuckDuckGo search tool, '
18+
'Please install `ddgs` to use the DuckDuckGo search tool, '
1619
'you can use the `duckduckgo` optional group — `pip install "pydantic-ai-slim[duckduckgo]"`'
1720
)from_import_error
1821

‎pydantic_ai_slim/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ groq = ["groq>=0.19.0"]
7070
mistral = ["mistralai>=1.2.5"]
7171
bedrock = ["boto3>=1.37.24"]
7272
# Tools
73-
duckduckgo = ["duckduckgo-search>=7.0.0"]
73+
duckduckgo = ["ddgs>=9.0.0"]
7474
tavily = ["tavily-python>=0.5.0"]
7575
# CLI
7676
cli = ["rich>=13","prompt-toolkit>=3","argcomplete>=3.5.0"]
@@ -88,6 +88,7 @@ dev = [
8888
"devtools>=0.12.2",
8989
"coverage[toml]>=7.6.2",
9090
"dirty-equals>=0.9.0",
91+
"duckduckgo-search>=7.0.0",
9192
"inline-snapshot>=0.19.3",
9293
"pytest>=8.3.3",
9394
"pytest-examples>=0.0.14",

‎uv.lock

Lines changed: 31 additions & 15 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp