mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
SearXNG query error #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TalkIsCheapGiveMeMoney on GitHub (Mar 23, 2025).
Self Checks
Dify version
1.1.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
已使用
searxng_search
请求
{"searxng_search": {"query": "合肥天气"}}
响应
{"searxng_search": "tool invoke error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for SessionMessage\ndata\n Input should be a valid dictionary [type=dict_type, input_value=('type', \u003cMessageType.TEXT: 'text'\u003e), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.8/v/dict_type"}"}
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Mar 23, 2025):
@TalkIsCheapGiveMeMoney Hello there! I'm here to help you with any bugs, questions, or contributions you have for SearXNG. I'm an expert bot and can assist you while you wait for a human maintainer.
I found a similar closed issue related to the
PluginInvokeErrorwith aValidationErrorin asearxng_searchoperation when using a self-hosted Dify version with Docker. The suggested solution is to modify theAgentModelConfigclass in the__init__.pyfile to make theentityfield optional. Here are the steps:Navigate to the plugin directory:
Modify the
__init__.pyfile by changing theAgentModelConfigclass:Restart the plugin daemon container:
This should address the validation error you're encountering [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@mu-dan commented on GitHub (Mar 23, 2025):
你这dify还能接入searxng啊,我这自从searxng更新之后,dify就不能接入了,一接入就报错
@TalkIsCheapGiveMeMoney commented on GitHub (Mar 23, 2025):
It has been changed ,but does not work
@TalkIsCheapGiveMeMoney commented on GitHub (Mar 23, 2025):
修改 searxng配置文件 把 limiter 改为false
@mu-dan commented on GitHub (Mar 24, 2025):
这个确实是,
感谢感谢
@mu-dan commented on GitHub (Mar 24, 2025):
1.0.0版本之前好像还可以正常使用的,主要现在不清楚是searxng的配置问题还是说dify的对接searxng插件的问题,有点毫无头绪
@sjtuck commented on GitHub (Mar 24, 2025):
i met the same problem. everything works well on 0.15.3, but does not work on 1.1.2.
PluginInvokeError: {"args":{},"error_type":"ToolProviderCredentialValidationError","message":"HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /?q=SearXNG\u0026format=json\u0026categories=general (Caused by NewConnectionError('\u003curllib3.connection.HTTPConnection object at 0x7f760a3581d0\u003e: Failed to establish a new connection: [Errno 111] Connection refused'))"}
@felipechang commented on GitHub (Mar 27, 2025):
Try changing the server limiter to false on the SearXNG settings
@mu-dan commented on GitHub (Mar 28, 2025):
The landlord has already fed back this solution, through this solution, you can make dify connect to searxng, but it can't be used, and the main problem is the same as the landlord's feedback
@sunkunkun commented on GitHub (Apr 1, 2025):
I encountered the same problem as the landlord's feedback
请求
{"searxng_search": {"query": "今日重要新闻"}}
响应
{"searxng_search": "tool invoke error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for SessionMessage\ndata\n Input should be a valid dictionary [type=dict_type, input_value=('type', \u003cMessageType.TEXT: 'text'\u003e), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.8/v/dict_type"}"}
@JarBin24 commented on GitHub (Apr 1, 2025):
我这边发现这个错误是因为调用了google等国外的搜索引擎导致的,但是在SearXNG平台上配置的引擎设置对Dify上的SearXNG插件不适用,后面通过https://blog.csdn.net/kooo_kooo/article/details/146588644 这个文章中的settings.yml配置文件中禁用国外浏览器就可以了,希望对你有帮助
@mu-dan commented on GitHub (Apr 1, 2025):
原来要修改配置文件啊,感谢感谢,我去实验一下
It turned out that I was going to modify the configuration file.,Thank you.,I'm going to experiment.
@mu-dan commented on GitHub (Apr 1, 2025):
感谢感谢,已经可以了

@capsshift commented on GitHub (Apr 2, 2025):
解决这个问题的关键就是docker中的settings.yaml文件中的配置,这个折腾了我好久。终于在https://blog.csdn.net/kooo_kooo/article/details/146588644得到解决。
其实不用那么可麻烦。只需要docker中的searxng能正常运行,直接把settings.yaml文件替换了,就解决问题。
@creaplus commented on GitHub (Apr 6, 2025):
It's fine if I make SEARXNG_BASE_URL and the host I actually use consistent. Do not use localhost
After configuring the same host in the dify, the authorization can be successfully completed.