fix: change ddg to DDGS (#6480)

This commit updates the duckduckgo search utility by using a more
accurate name in the import statement.
This commit is contained in:
Zeeland 2023-06-21 01:15:05 +08:00 committed by GitHub
parent 8cd5f65a6f
commit ad7089a6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ class DuckDuckGoSearchAPIWrapper(BaseModel):
def validate_environment(cls, values: Dict) -> Dict: def validate_environment(cls, values: Dict) -> Dict:
"""Validate that python package exists in environment.""" """Validate that python package exists in environment."""
try: try:
from duckduckgo_search import ddg # noqa: F401 from duckduckgo_search import DDGS # noqa: F401
except ImportError: except ImportError:
raise ValueError( raise ValueError(
"Could not import duckduckgo-search python package. " "Could not import duckduckgo-search python package. "