From 148088a58877e0f2acd91c79ec43aeb6146d112d Mon Sep 17 00:00:00 2001 From: Isaac Francisco <78627776+isahers1@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:29:47 -0700 Subject: [PATCH] docs: duckduckgosearch options listed (#22568) Co-authored-by: Bagatur --- .../utilities/duckduckgo_search.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/libs/community/langchain_community/utilities/duckduckgo_search.py b/libs/community/langchain_community/utilities/duckduckgo_search.py index d258726896..2797f385d8 100644 --- a/libs/community/langchain_community/utilities/duckduckgo_search.py +++ b/libs/community/langchain_community/utilities/duckduckgo_search.py @@ -15,11 +15,26 @@ class DuckDuckGoSearchAPIWrapper(BaseModel): """ region: Optional[str] = "wt-wt" + """ + See https://pypi.org/project/duckduckgo-search/#regions + """ safesearch: str = "moderate" + """ + Options: strict, moderate, off + """ time: Optional[str] = "y" + """ + Options: d, w, m, y + """ max_results: int = 5 - backend: str = "api" # which backend to use in DDGS.text() (api, html, lite) - source: str = "text" # which function to use in DDGS (DDGS.text() or DDGS.news()) + backend: str = "api" + """ + Options: api, html, lite + """ + source: str = "text" + """ + Options: text, news + """ class Config: """Configuration for this pydantic object."""