mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Error in dify calling searcxng parameter #53
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 @wang-zero-one on GitHub (Mar 10, 2025).
Self Checks
Dify version
1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
{"searxng_search": {"query": "河2024年热门旅游景区推荐+最新政策", "search_type": "general"}}✔️ Expected Behavior
No response
❌ Actual Behavior
Call the Searxng tool through dify agent
@dosubot[bot] commented on GitHub (Mar 10, 2025):
@wang-zero-one Hello there! I'm here to help you with bug reports, answer questions, and provide support while you wait for a human maintainer. Let's tackle this issue together!
The error you're encountering is a
PluginInvokeErrorrelated to aValidationError. This suggests that the input data for thesearxng_searchparameter is not in the expected format. The error message indicates that the input should be a valid dictionary, but it seems like a tuple is being provided instead.To resolve this issue, ensure that the data you are passing to the
searxng_searchparameter is correctly formatted as a dictionary. Double-check the structure of your JSON input to make sure it aligns with the expected format for thesearxng_searchparameter. If the issue persists, consider reviewing the integration and configuration steps for Searxng with Dify to ensure everything is set up correctly [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
@wang-zero-one commented on GitHub (Mar 10, 2025):
Yes, I understand the meaning, but I'm not sure how to modify configuration information in dify. I can directly call dify using version 0.15.3, so I suspect it's a bug in dify version 1.0.0
@manicwy commented on GitHub (Mar 10, 2025):
It seems like this is indeed a bug, as I encountered the same issue. Could it be that the plugin version has not been updated?
@kenwoodjw commented on GitHub (Mar 10, 2025):
Can you provide the searcxng plugin version, and call searcxng in workflow or agent mode?
@manicwy commented on GitHub (Mar 11, 2025):
The SearXNG plugin version is 0.0.2, installed from the Dify marketplace. The attached screenshot shows the error message when the plugin runs.
@kenwoodjw commented on GitHub (Mar 11, 2025):
Can you try reinstalling the plugin?
@manicwy commented on GitHub (Mar 11, 2025):
I have tried installing it many times, even downgrading to version 0.0.1, but the same issue still persists.
@kenwoodjw commented on GitHub (Mar 11, 2025):
@manicwy How do you start the SearXng container?
@leagend commented on GitHub (Mar 11, 2025):
I also encounter such issue.
I tried the lastest searxng/searxng:2025.3.11+3fe602a46 and searxng/searxng:2025.2.15+d37dc3078 locally with command line "docker run -d -p 8080:8080 --name searxng --restart always searxng/searxng"; I restarted the container by "docker restart searxng" after add "- json " to the "formats" part of /etc/searxng/settings.yml in container.
I can activte the this endpoint by the searxng plugin in dify. But still got the similar Failure.
On the other hand, when I switched to another endpoint which deployed searxng/searxng:2025.2.15+d37dc3078(a version which I failed too),this plugin worked well. While that site was owned by me, I don't know what is the difference, but I am confused why this happened.
@zouxiaodong commented on GitHub (Mar 12, 2025):
@kenwoodjw commented on GitHub (Mar 12, 2025):
@leagend Can you paste the /etc/searxng/settings.yml content to here.
@leagend commented on GitHub (Mar 12, 2025):
I guess the root cause may still comes from searxng side.
I compared mine(while I can ensure that I had configured the search engine with baidu, 360 and sogou) to another public searxng.
it seems that the api invoke still use duckduckgo/google/qwant/startpage for general, while the for science category the engine works well for PRC area.
@leagend commented on GitHub (Mar 12, 2025):
one version I ever used located at:
https://github.com/langgenius/dify/blob/0.15.3/api/core/tools/provider/builtin/searxng/docker/settings.yml
@kenwoodjw commented on GitHub (Mar 12, 2025):
@leagend Can you reference this doc to start container?
https://docs.dify.ai/guides/tools/tool-configuration/searxng
@leagend commented on GitHub (Mar 12, 2025):
while switch science category, it might works. I guess the timeout value maybe another impaction.

@leagend commented on GitHub (Mar 12, 2025):
Sure, I followed that instruction. And you can check my found which I pasted.
@leagend commented on GitHub (Mar 12, 2025):
BTW, api/core/tools/provider/builtin/searxng/docker/settings.yml disappered since v1.0.0 .
@leagend commented on GitHub (Mar 12, 2025):
From the above one,switch to http.post method should be a workable workaround. @kenwoodjw can you fix it ?
payload format likes:
@leagend commented on GitHub (Mar 12, 2025):
Thank you for this information.
---- Replied Message ----
@.>Date3/12/2025 @.>@.>,
@.>SubjectRe: [langgenius/dify] Error in dify calling searcxng parameter (Issue langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
manicwy left a comment (langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
@suxiaojin commented on GitHub (Mar 12, 2025):
I encountered the same error.
@suxiaojin commented on GitHub (Mar 12, 2025):
操作附件在哪里?还有我1.0的版本没有api/core/tools/provider/builtin/searxng/docker/这个目录啊?只有
/api/core/tools/builtin_tool/providers而且很奇怪没有searxng目前,虽然我已经在页面上安装了searxng 0.02版本@leagend commented on GitHub (Mar 12, 2025):
使用0.15.3的配置可能就看不到baidu、360那些新加的国内国内引擎。 所以还是要慎用,还有那个searxng其实也不是完全不能用,你试试分类改为科学,其实是可以成功的。 我使用curl尝试的结果就是程序采用默认参数时,使用的搜索引擎在国内表现不行。
对比页面上的参数发现request里少了关键的一行
-b 'categories=general; language=auto; autocomplete=; favicon_resolver=; image_proxy=0; safesearch=0; theme=simple; results_on_new_tab=0; doi_resolver=oadoi.org; simple_style=auto; center_alignment=0; advanced_search=0; query_in_title=0; infinite_scroll=0; search_on_category_select=1; hotkeys=default; url_formatting=pretty; disabled_plugins=; enabled_plugins=; tokens=; locale=en; disabled_engines="wikipedia__general\054currency__general\054wikidata__general\054duckduckgo__general\054google__general\054lingva__general\054qwant__general\054startpage__general\054dictzone__general\054mymemory translated__general"; enabled_engines="360search__general\054baidu__general\054presearch__general\054sogou__general"; method=GET' \,如果官方能让指定喜欢对应的hash,应该就能fix
---- Replied Message ----
| From | @.> |
| Date | 3/12/2025 22:47 |
| To | @.> |
| Cc | @.>,
@.> |
| Subject | Re: [langgenius/dify] Error in dify calling searcxng parameter (Issue langgenius/dify-official-plugins#642) |
Thank you for this information.
---- Replied Message ----
@.>Date3/12/2025 @.>@.>,
@.>SubjectRe: [langgenius/dify] Error in dify calling searcxng parameter (Issue langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
manicwy left a comment (langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
操作附件在哪里?还有我1.0的版本没有api/core/tools/provider/builtin/searxng/docker/这个目录啊?只有/api/core/tools/builtin_tool/providers 而且很奇怪没有searxng目前,虽然我已经在页面上安装了searxng 0.02版本
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>
suxiaojin left a comment (langgenius/dify-official-plugins#642)
Thank you for this information.
---- Replied Message ----
@.>Date3/12/2025 @.>@.>,
@.>SubjectRe: [langgenius/dify] Error in dify calling searcxng parameter (Issue langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
manicwy left a comment (langgenius/dify-official-plugins#642)
After multiple attempts, finally got it done! You need to copy the files limiter.toml and settings.yml from the searxng 0.15.3 version api/core/tools/provider/builtin/searxng/docker/ directory to the 1.0.0 version and modify the relevant configuration items. See the attachment for details!Special attention should be paid to the use_default_settings item and the engines item.
settings.yml.txt
_20250312175152.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
操作附件在哪里?还有我1.0的版本没有api/core/tools/provider/builtin/searxng/docker/这个目录啊?只有/api/core/tools/builtin_tool/providers 而且很奇怪没有searxng目前,虽然我已经在页面上安装了searxng 0.02版本
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>
@suxiaojin commented on GitHub (Mar 12, 2025):
我的searrxng是自己搭建的,setting.yml里面已经删除了google等国外的引擎。我再openwebui上面使用的联网工具就是searxng,也没问题。现在就是dify 1.0上面使用报错
{"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\"}"}@leagend commented on GitHub (Mar 12, 2025):
This plugin use the default engines configuration which is different to we set on web page.
On the web operation there is an extra header which I highline below :
curl 'http://10.0.16.10:8080/search'
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7'
-H 'Accept-Language: zh-CN,zh;q=0.9'
-H 'Cache-Control: no-cache'
-H 'Connection: keep-alive'
-H 'Content-Type: application/x-www-form-urlencoded'
*-b 'categories=general; language=auto; autocomplete=; favicon_resolver=; image_proxy=0; safesearch=0; theme=simple; results_on_new_tab=0; doi_resolver=oadoi.org; simple_style=auto; center_alignment=0; advanced_search=0; query_in_title=0; infinite_scroll=0; search_on_category_select=1; hotkeys=default; url_formatting=pretty; disabled_plugins=; enabled_plugins=; tokens=; locale=en; disabled_engines="wikipedia__general\054currency__general\054wikidata__general\054duckduckgo__general\054google__general\054lingva__general\054qwant__general\054startpage__general\054dictzone__general\054mymemory translated__general"; enabled_engines="360search__general\054baidu__general\054presearch__general\054sogou__general"; method=POST' *
-H 'Origin: null'
-H 'Pragma: no-cache'
-H 'Upgrade-Insecure-Requests: 1'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36'
--data-raw 'q=%E5%8C%97%E4%BA%AC%E6%9C%89%E5%87%A0%E6%89%80%E4%B8%AD%E5%AD%A6&category_general=1&language=auto&time_range=&safesearch=0&theme=simple&format=json'
--insecure
@812406210 commented on GitHub (Mar 12, 2025):
how to resovle this problem? help !!!
@leagend commented on GitHub (Mar 13, 2025):
Sure!I have a private solution, it is to add cookes for http request.
To rename the end of searxng_personal_plugin.zip from .zip to .difypkg, then try to install plugin from local.
To be attention, since I didn't sign it, so you need to do some extra pre-works, to set
FORCE_VERIFYING_SIGNATURE=falsein your docker/.env, then rundocker compose down && docker compose up -d.If this package installed successfully, you can active it as official one.
How to use it?
Then you can enjor it
@suxiaojin commented on GitHub (Mar 13, 2025):
感谢,按照你的方法成功了 @leagend 。searxng出来的是链接。后面需要跟一个爬虫节点先获取链接,再交给LLM去总结吗?我看你后面直接跟 LLM节点,这个你怎么处理的?
@leagend commented on GitHub (Mar 13, 2025):
just using a simple prompt.
---- Replied Message ----
@.>Date3/13/2025 @.>@.>,
@.>SubjectRe: [langgenius/dify] Error in dify calling searcxng parameter (Issue #15403)
感谢,按照你的方法成功了 @leagend 。searxng出来的是链接。后面需要跟一个爬虫节点先获取链接,再交给LLM去总结吗?我看你后面直接跟 LLM节点,这个你怎么处理的?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
suxiaojin left a comment (langgenius/dify#15403)
感谢,按照你的方法成功了 @leagend 。searxng出来的是链接。后面需要跟一个爬虫节点先获取链接,再交给LLM去总结吗?我看你后面直接跟 LLM节点,这个你怎么处理的?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
@sunkeycc commented on GitHub (Mar 13, 2025):
I’m experiencing the same issue. Thanks to @leagend ‘s solution, it’s now working properly. I hope the official team can resolve this issue completely at their earliest convenience. Thank you all!
@hecongyuan commented on GitHub (Mar 16, 2025):
@leagend thinks,bro
@IAMJOYBO commented on GitHub (Mar 18, 2025):
same Erros,Dify v1.0.0,SearXNG v0.0.2(settings.yaml add json,html)
请求 {"searxng_search": {"query": "哪吒之魔童闹海 实时票房数据", "search_type": "general"}}响应 {"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\"}"}@IAMJOYBO commented on GitHub (Mar 18, 2025):
我也是一样的报错,请问解决了吗?这是什么原因导致的呢
@leagend commented on GitHub (Mar 18, 2025):
你可以试试我的private解决方案。具体问题,你可以研究curl request,观察页面使用的和你使用的差别,我发现的是cookie导致了这个差别。
---- Replied Message ----
@.>Date3/18/2025 @.>@.>,
@.>SubjectRe: [langgenius/dify] Error in dify calling searcxng parameter (Issue langgenius/dify-official-plugins#642)
我的searrxng是自己搭建的,setting.yml里面已经删除了google等国外的引擎。我再openwebui上面使用的联网工具就是searxng,也没问题。现在就是dify 1.0上面使用报错 {"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"}"}
我也是一样的报错,请问解决了吗?这是什么原因导致的呢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
IAMJOYBO left a comment (langgenius/dify-official-plugins#642)
我的searrxng是自己搭建的,setting.yml里面已经删除了google等国外的引擎。我再openwebui上面使用的联网工具就是searxng,也没问题。现在就是dify 1.0上面使用报错 {"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"}"}
我也是一样的报错,请问解决了吗?这是什么原因导致的呢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
@G7b9 commented on GitHub (Mar 19, 2025):
Thank you guys!It works!
@G7b9 commented on GitHub (Mar 19, 2025):
@leagend 请问一下,为啥这个自定义节点在agent里面只显示最后一条搜索结果呀,实际根据searxng确实返回了多个结果,是这个agent的json格式只支持分析一条吗?
@leagend commented on GitHub (Mar 20, 2025):
看起来是agent的问题,使用官方版插件也只有一条:
@jpg1024 commented on GitHub (Mar 27, 2025):
I also encountered this problem, modify v1.1.3, and I don't know how to solve it.