You need to activate the json format to use the API. This can be done by adding the following line to the settings.yml file:search:    formats:        - html        - jsonYou can make sure that the API is working by issuing a curl request to the API endpoint:curl -kLX GET --data-urlencode q='langchain' -d format=json http://localhost:8888This should return a JSON object with the results.Wrappers‚ÄãUtility‚ÄãTo use the wrapper we need to pass the host of the SearxNG instance to the wrapper with:1. the named parameter `searx_host` when creating the instance.2. exporting the environment variable `SEARXNG_HOST`.You can use the wrapper to get results from a SearxNG instance. from langchain.utilities import SearxSearchWrappers = SearxSearchWrapper(searx_host="http://localhost:8888")s.run("what is a large language model?")Tool‚ÄãYou can also load this wrapper as a Tool (to use with an Agent).You can do this with:from langchain.agents import load_toolstools = load_tools(["searx-search"],                    searx_host="http://localhost:8888",                    engines=["github"])Note that we could optionally pass custom engines to use.If you want to obtain results with metadata as json you can use:tools = load_tools(["searx-search-results-json"],                    searx_host="http://localhost:8888",                    num_results=5)Quickly creating tools‚ÄãThis examples showcases a quick way to create multiple tools from the same
This page covers how to use the SearxNG search API within LangChain.
This page covers how to use the SearxNG search API within LangChain. ->: You need to activate the json format to use the API. This can be done by adding the following line to the settings.yml file:search:    formats:        - html        - jsonYou can make sure that the API is working by issuing a curl request to the API endpoint:curl -kLX GET --data-urlencode q='langchain' -d format=json http://localhost:8888This should return a JSON object with the results.Wrappers‚ÄãUtility‚ÄãTo use the wrapper we need to pass the host of the SearxNG instance to the wrapper with:1. the named parameter `searx_host` when creating the instance.2. exporting the environment variable `SEARXNG_HOST`.You can use the wrapper to get results from a SearxNG instance. from langchain.utilities import SearxSearchWrappers = SearxSearchWrapper(searx_host="http://localhost:8888")s.run("what is a large language model?")Tool‚ÄãYou can also load this wrapper as a Tool (to use with an Agent).You can do this with:from langchain.agents import load_toolstools = load_tools(["searx-search"],                    searx_host="http://localhost:8888",                    engines=["github"])Note that we could optionally pass custom engines to use.If you want to obtain results with metadata as json you can use:tools = load_tools(["searx-search-results-json"],                    searx_host="http://localhost:8888",                    num_results=5)Quickly creating tools‚ÄãThis examples showcases a quick way to create multiple tools from the same