SearxNG meta search api helper (#854)

This is a work in progress PR to track my progres.

## TODO:

- [x]  Get results using the specifed searx host
- [x]  Prioritize returning an  `answer`  or results otherwise
    - [ ] expose the field `infobox` when available
    - [ ] expose `score` of result to help agent's decision
- [ ] expose the `suggestions` field to agents so they could try new
queries if no results are found with the orignial query ?

- [ ] Dynamic tool description for agents ?
- Searx offers many engines and a search syntax that agents can take
advantage of. It would be nice to generate a dynamic Tool description so
that it can be used many times as a tool but for different purposes.

- [x]  Limit number of results
- [ ]   Implement paging
- [x]  Miror the usage of the Google Search tool
- [x] easy selection of search engines
- [x]  Documentation
    - [ ] update HowTo guide notebook on Search Tools
- [ ] Handle async 
- [ ]  Tests

###  Add examples / documentation on possible uses with
 - [ ]  getting factual answers with `!wiki` option and `infoboxes`
 - [ ]  getting `suggestions`
 - [ ]  getting `corrections`

---------

Co-authored-by: blob42 <spike@w530>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
blob42
2023-02-16 07:03:57 +00:00
committed by GitHub
parent e08961ab25
commit 3ecdea8be4
11 changed files with 1010 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
SearxNG Search
=============================
.. automodule:: langchain.utilities.searx_search
:members:
:undoc-members:

View File

@@ -13,6 +13,7 @@ These can largely be grouped into two categories: generic utilities, and then ut
modules/python
modules/serpapi
modules/searx_search
.. toctree::