forked from Archives/langchain
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:
parent
8cd5f65a6f
commit
ad7089a6d0
@ -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. "
|
||||||
|
Loading…
Reference in New Issue
Block a user