TypeError: DDGS.text() got an unexpected keyword argument 'max_results' AND HTTPError:
Labels: name: auto:bug, name: area: models

### System Info

langchain: 0.0.346
python: 3.11.7

### Who can help?

_No response_

### Information

- [X] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Error when run:
```
from langchain.tools import DuckDuckGoSearchRun

search = DuckDuckGoSearchRun()

search.run("Obama's first name?")
```



### Expected behavior

I got this error when run:
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[c:\Users\thenh\OneDrive\M](file:///C:/Users/thenh/OneDrive/M)áy tính\demo\test.ipynb Cell 13 line 4
 .....

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain_core\tools.py:337, in BaseTool.run(self, tool_input, verbose, start_color, color, callbacks, tags, metadata, run_name, **kwargs)
    [334](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:334) try:
    [335](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:335)     tool_args, tool_kwargs = self._to_args_and_kwargs(parsed_input)
    [336](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:336)     observation = (
--> [337](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:337)         self._run(*tool_args, run_manager=run_manager, **tool_kwargs)
    [338](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:338)         if new_arg_supported
    [339](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:339)         else self._run(*tool_args, **tool_kwargs)
    [340](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:340)     )
    [341](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:341) except ToolException as e:
    [342](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:342)     if not self.handle_tool_error:

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\tools\ddg_search\tool.py:37, in DuckDuckGoSearchRun._run(self, query, run_manager)
     [31](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:31) def _run(
     [32](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:32)     self,
     [33](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:33)     query: str,
     [34](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:34)     run_manager: Optional[CallbackManagerForToolRun] = None,
     [35](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:35) ) -> str:
     [36](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:36)     """Use the tool."""
---> [37](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:37)     return self.api_wrapper.run(query)

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\utilities\duckduckgo_search.py:81, in DuckDuckGoSearchAPIWrapper.run(self, query)
     [79](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:79) """Run query through DuckDuckGo and return concatenated results."""
     [80](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:80) if self.source == "text":
---> [81](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:81)     results = self._ddgs_text(query)
     [82](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:82) elif self.source == "news":
     [83](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:83)     results = self._ddgs_news(query)

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\utilities\duckduckgo_search.py:48, in DuckDuckGoSearchAPIWrapper._ddgs_text(self, query, max_results)
     [45](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:45) from duckduckgo_search import DDGS
     [47](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:47) with DDGS() as ddgs:
---> [48](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:48)     ddgs_gen = ddgs.text(
     [49](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:49)         query,
     [50](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:50)         region=self.region,
     [51](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:51)         safesearch=self.safesearch,
     [52](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:52)         timelimit=self.time,
     [53](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:53)         max_results=max_results or self.max_results,
     [54](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:54)         backend=self.backend,
     [55](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:55)     )
     [56](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:56)     if ddgs_gen:
     [57](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:57)         return [r for r in ddgs_gen]

TypeError: DDGS.text() got an unexpected keyword argument 'max_results'
```
After remove _`max_results=max_results or self.max_results`_, i still got another error: 
```
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
[c:\Users\thenh\OneDrive\M](file:///C:/Users/thenh/OneDrive/M)áy tính\demo\test.ipynb Cell 13 line 4
      [1](vscode-notebook-cell:/c%3A/Users/thenh/OneDrive/M%C3%A1y%20t%C3%ADnh/demo/test.ipynb#X15sZmlsZQ%3D%3D?line=0) from langchain.tools import DuckDuckGoSearchRun
      [2](vscode-notebook-cell:/c%3A/Users/thenh/OneDrive/M%C3%A1y%20t%C3%ADnh/demo/test.ipynb#X15sZmlsZQ%3D%3D?line=1) search = DuckDuckGoSearchRun()
----> [4](vscode-notebook-cell:/c%3A/Users/thenh/OneDrive/M%C3%A1y%20t%C3%ADnh/demo/test.ipynb#X15sZmlsZQ%3D%3D?line=3) search.run("who is newjeans")

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain_core\tools.py:365, in BaseTool.run(self, tool_input, verbose, start_color, color, callbacks, tags, metadata, run_name, **kwargs)
    [363](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:363) except (Exception, KeyboardInterrupt) as e:
    [364](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:364)     run_manager.on_tool_error(e)
--> [365](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:365)     raise e
    [366](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:366) else:
    [367](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:367)     run_manager.on_tool_end(
    [368](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:368)         str(observation), color=color, name=self.name, **kwargs
    [369](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:369)     )

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain_core\tools.py:337, in BaseTool.run(self, tool_input, verbose, start_color, color, callbacks, tags, metadata, run_name, **kwargs)
    [334](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:334) try:
    [335](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:335)     tool_args, tool_kwargs = self._to_args_and_kwargs(parsed_input)
    [336](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:336)     observation = (
--> [337](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:337)         self._run(*tool_args, run_manager=run_manager, **tool_kwargs)
    [338](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:338)         if new_arg_supported
    [339](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:339)         else self._run(*tool_args, **tool_kwargs)
    [340](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:340)     )
    [341](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:341) except ToolException as e:
    [342](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain_core/tools.py:342)     if not self.handle_tool_error:

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\tools\ddg_search\tool.py:37, in DuckDuckGoSearchRun._run(self, query, run_manager)
     [31](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:31) def _run(
     [32](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:32)     self,
     [33](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:33)     query: str,
     [34](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:34)     run_manager: Optional[CallbackManagerForToolRun] = None,
     [35](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:35) ) -> str:
     [36](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:36)     """Use the tool."""
---> [37](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/tools/ddg_search/tool.py:37)     return self.api_wrapper.run(query)

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\utilities\duckduckgo_search.py:81, in DuckDuckGoSearchAPIWrapper.run(self, query)
     [79](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:79) """Run query through DuckDuckGo and return concatenated results."""
     [80](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:80) if self.source == "text":
---> [81](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:81)     results = self._ddgs_text(query)
     [82](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:82) elif self.source == "news":
     [83](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:83)     results = self._ddgs_news(query)

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\utilities\duckduckgo_search.py:57, in DuckDuckGoSearchAPIWrapper._ddgs_text(self, query, max_results)
     [48](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:48)     ddgs_gen = ddgs.text(
     [49](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:49)         query,
     [50](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:50)         region=self.region,
   (...)
     [54](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:54)         backend=self.backend,
     [55](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:55)     )
     [56](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:56)     if ddgs_gen:
---> [57](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:57)         return [r for r in ddgs_gen]
     [58](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:58) return []

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\langchain\utilities\duckduckgo_search.py:57, in <listcomp>(.0)
     [48](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:48)     ddgs_gen = ddgs.text(
     [49](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:49)         query,
     [50](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:50)         region=self.region,
   (...)
     [54](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:54)         backend=self.backend,
     [55](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:55)     )
     [56](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:56)     if ddgs_gen:
---> [57](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:57)         return [r for r in ddgs_gen]
     [58](file:///C:/Program%20Files/Python311/Lib/site-packages/langchain/utilities/duckduckgo_search.py:58) return []

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\duckduckgo_search\duckduckgo_search.py:150, in DDGS.text(self, keywords, region, safesearch, timelimit, backend)
    [134](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:134) """DuckDuckGo text search generator. Query params: https://duckduckgo.com/params
    [135](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:135) 
    [136](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:136) Args:
   (...)
    [147](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:147) 
    [148](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:148) """
    [149](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:149) if backend == "api":
--> [150](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:150)     yield from self._text_api(keywords, region, safesearch, timelimit)
    [151](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:151) elif backend == "html":
    [152](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:152)     yield from self._text_html(keywords, region, safesearch, timelimit)

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\duckduckgo_search\duckduckgo_search.py:203, in DDGS._text_api(self, keywords, region, safesearch, timelimit)
    [201](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:201) for s in ("0", "20", "70", "120"):
    [202](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:202)     payload["s"] = s
--> [203](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:203)     resp = self._get_url(
    [204](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:204)         "GET", "https://links.duckduckgo.com/d.js", params=payload
    [205](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:205)     )
    [206](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:206)     if resp is None:
    [207](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:207)         break

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\duckduckgo_search\duckduckgo_search.py:89, in DDGS._get_url(self, method, url, **kwargs)
     [87](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:87)         logger.warning(f"_get_url() {url} {type(ex).__name__} {ex}")
     [88](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:88)         if i >= 2 or "418" in str(ex):
---> [89](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:89)             raise ex
     [90](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:90)     sleep(3)
     [91](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:91) return None

File [c:\Program](file:///C:/Program) Files\Python311\Lib\site-packages\duckduckgo_search\duckduckgo_search.py:82, in DDGS._get_url(self, method, url, **kwargs)
     [78](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:78) resp = self._client.request(
     [79](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:79)     method, url, follow_redirects=True, **kwargs
     [80](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:80) )
     [81](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:81) if self._is_500_in_url(str(resp.url)) or resp.status_code == 202:
---> [82](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:82)     raise httpx._exceptions.HTTPError("")
     [83](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:83) resp.raise_for_status()
     [84](file:///C:/Program%20Files/Python311/Lib/site-packages/duckduckgo_search/duckduckgo_search.py:84) if resp.status_code == 200:

HTTPError:
```