dify icon indicating copy to clipboard operation
dify copied to clipboard

SearXNG Query Error

Open IAMJOYBO opened this issue 10 months ago • 2 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

v1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

IAMJOYBO avatar Mar 14 '25 19:03 IAMJOYBO

To resolve the PluginInvokeError with a ValidationError in a searxng_search operation when using a self-hosted Dify version 1.0.1 with Docker, you can follow these steps:

  1. Navigate to the plugin directory:

    volumes/plugin_daemon/cwd/langgenius/agent-0.0.9@f16916b704a20067317dbe9030f62aa28f0832021a3ef6d4ce699504074c5e13/.venv/lib64/python3.12/site-packages/dify_plugin/interfaces/agent
    
  2. Modify the __init__.py file by changing the AgentModelConfig class:

    # Change from:
    class AgentModelConfig(LLMModelConfig):
        entity: AIModelEntity
    
    # To:
    class AgentModelConfig(LLMModelConfig):
        entity: Optional[AIModelEntity] = Field(default=None)
    
  3. Restart the plugin daemon container:

    docker restart docker-plugin_daemon-1
    

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

dosubot[bot] avatar Mar 14 '25 19:03 dosubot[bot]

To resolve the PluginInvokeError with a ValidationError in a searxng_search operation when using a self-hosted Dify version 1.0.1 with Docker, you can follow these steps:

  1. Navigate to the plugin directory:

    volumes/plugin_daemon/cwd/langgenius/agent-0.0.9@f16916b704a20067317dbe9030f62aa28f0832021a3ef6d4ce699504074c5e13/.venv/lib64/python3.12/site-packages/dify_plugin/interfaces/agent
    
  2. Modify the __init__.py file by changing the AgentModelConfig class:

    Change from:

    class AgentModelConfig(LLMModelConfig): entity: AIModelEntity

    To:

    class AgentModelConfig(LLMModelConfig): entity: Optional[AIModelEntity] = Field(default=None)

  3. Restart the plugin daemon container: docker restart docker-plugin_daemon-1

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

No Dir Image

Modify SearXNG and restart docker-plugin_daemon-1 ,There is no effect Image

IAMJOYBO avatar Mar 14 '25 19:03 IAMJOYBO

+1

Ero-Cat avatar Mar 19 '25 07:03 Ero-Cat

+1,There is no agent dir

Image

G7b9 avatar Mar 19 '25 11:03 G7b9

我这边发现这个错误是因为调用了google等国外的搜索引擎导致的,但是在SearXNG平台上配置的引擎设置对Dify上的SearXNG插件不适用,后面通过https://blog.csdn.net/kooo_kooo/article/details/146588644 这个文章中的settings.yml配置文件中禁用国外浏览器就可以了,希望对你有帮助

JarBin24 avatar Apr 02 '25 02:04 JarBin24