langchain
langchain copied to clipboard
SearxNG meta search api helper
This is a work in progress PR to track my progres.
TODO:
-
[x] Get results using the specifed searx host
-
[x] Prioritize returning an
answeror results otherwise- [ ] expose the field
infoboxwhen available - [ ] expose
scoreof result to help agent's decision - [ ] expose the
suggestionsfield to agents so they could try new queries if no results are found with the orignial query ?
- [ ] expose the field
-
[ ] 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
!wikioption andinfoboxes - [ ] getting
suggestions - [ ] getting
corrections
I made the wrapper easy to use like google and serpapi, I also tried to cover as much details in the documentation and example notebook.
I also added a note for those who use or run a self hosted instance with an API rate limiter, I proposed a patch to searx here
It was tough getting the linting to pass, there where many linting packages that didn't instally automatically with poetry and I had to manually add them and the docstring requirements are too strict.
@hwchase17 feel free to merge anytime, I will improve the wrapper in the future on separate PRs as I keep using it. I am already exclusively using Searx anywhere google, serpapi or any search engine is required.