【bug】searchxng搜索报错Searx API returned an error
在使用开源搜索引擎时候报错:
ValueError: ('Searx API returned an error: ', '<!doctype html>\n<html lang=en>\n<title>403 Forbidden</title>\n<h1>Forbidden</h1>\n<p>You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.</p>\n')
只需要将searxng文件夹下的setttings.yml改为下面即可,就是格式问题
# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
use_default_settings: true
server:# base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.ymlsecret_key: "hb123456" # change this!limiter: false # enable this when running the instance for a public usage on the internetimage_proxy: true
search:formats:- html- json
ui:static_use_hash: true
redis:url: redis://redis:6379/0
参考文献:
https://github.com/langchain-ai/langchain/issues/855
https://stackoverflow.com/questions/77253870/langchain-search-tools-valueerror-searx-api-returned-an-error-too-many-r