searx_search: updated tools and doc (#6276)

- Allows using the  same wrapper to create multiple tools
```python
wrapper = SearxSearchWrapper(searx_host="**")
github_tool = SearxSearchResults(name="Github",
                            wrapper=wrapper,
                            kwargs = {
                                "engines": ["github"],
                                })

arxiv_tool = SearxSearchResults(name="Arxiv",
                            wrapper=wrapper,
                            kwargs = {
                                "engines": ["arxiv"]
                                })
```

- Updated link to searx documentation

  Agents / Tools / Toolkits
  - @hwchase17
This commit is contained in:
Chakib Benziane
2023-06-19 02:23:12 +02:00
committed by GitHub
parent e2f36ee608
commit ddd518a161
3 changed files with 32 additions and 7 deletions

View File

@@ -67,4 +67,24 @@ tools = load_tools(["searx-search-results-json"],
num_results=5)
```
For more information on tools, see [this page](/docs/modules/agents/tools/getting_started.md)
#### Quickly creating tools
This examples showcases a quick way to create multiple tools from the same
wrapper.
```python
from langchain.tools.searx_search.tool import SearxSearchResults
wrapper = SearxSearchWrapper(searx_host="**")
github_tool = SearxSearchResults(name="Github", wrapper=wrapper,
kwargs = {
"engines": ["github"],
})
arxiv_tool = SearxSearchResults(name="Arxiv", wrapper=wrapper,
kwargs = {
"engines": ["arxiv"]
})
```
For more information on tools, see [this page](../modules/agents/tools/getting_started.md)