langchain.utilities.searx_search.SearxSearchWrapper¶
class langchain.utilities.searx_search.SearxSearchWrapper[source]¶
Bases: BaseModel
Wrapper for Searx API.
To use you need to provide the searx host by passing the named parameter
searx_host or exporting the environment variable SEARX_HOST.
In some situations you might want to disable SSL verification, for example
if you are running searx locally. You can do this by passing the named parameter
unsecure. You can also pass the host url scheme as http to disable SSL.
Example
from langchain.utilities import SearxSearchWrapper
searx = SearxSearchWrapper(searx_host="http://localhost:8888")
Example with SSL disabled:from langchain.utilities import SearxSearchWrapper
# note the unsecure parameter is not needed if you pass the url scheme as
# http
searx = SearxSearchWrapper(searx_host="http://localhost:8888",
                                        unsecure=True)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param aiosession: Optional[Any] = None¶
param categories: Optional[List[str]] = []¶
param engines: Optional[List[str]] = []¶
param headers: Optional[dict] = None¶
param k: int = 10¶
param params: dict [Optional]¶
param query_suffix: Optional[str] = ''¶
param searx_host: str = ''¶
param unsecure: bool = False¶
async aresults(query: str, num_results: int, engines: Optional[List[str]] = None, query_suffix: Optional[str] = '', **kwargs: Any) → List[Dict][source]¶