mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 13:06:03 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user