Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0-beta.1 agent doesn't work with OpenAI-API-compatible plugin in workflow #13008

Open
5 tasks done
wl102 opened this issue Jan 24, 2025 · 1 comment
Open
5 tasks done
Labels
🐞 bug Something isn't working
Milestone

Comments

@wl102
Copy link

wl102 commented Jan 24, 2025

Self Checks

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

Dify version

1.0.0-beta.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

error log

[NodeRunStartedEvent]
Node ID: 1737517673139
Node Title: Agent-情报分析
Type: agent

[NodeRunFailedEvent]
Node ID: 1737517673139
Node Title: Agent-情报分析
Type: agent
Error: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for FunctionCallingParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}
Inputs: {'instruction': '你是有用的助手,负责查询安全情报信息,你可以使用工具获取外部知识,保证答案的真实、准确性。\n\n\n## 指令\n1. 根据给定的相关信息,查询安全情报信息,如果文本存在多个相关信息,则多次调用工具,并返回一个总结。\n2. 如果查询结果为空,则返回 "没有查询到相关信息"。\n3. 结果使用中文回答,不要输出任何无关的信息。', 'maximum_iterations': '2', 'model': {'mode': 'chat', 'model': 'deepseek-chat', 'model_type': 'llm', 'provider': 'langgenius/openai_api_compatible/openai_api_compatible', 'type': 'model-selector', 'completion_params': {}}, 'query': "查询['10.45.111.68', '10.45.136.7', '8.8.8.8', '10.45.136.6', '10.45.136.3', '10.45.136.4']、['v.beahh.com']、[]、[]的情报信息。", 'tools': [{'enabled': True, 'extra': {'description': ''}, 'parameters': {'ip': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_ip_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'domain': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_domain_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'hash': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_filehash_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'url': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_url_report'}]}
Process Data:
Outputs:

[GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for FunctionCallingParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}
2025-01-24 03:08:57,224.224 INFO [Thread-41241 (process_request_thread)] [_internal.py:97] - 172.18.0.10 - - [24/Jan/2025 03:08:57] "POST /console/api/apps/593d6ab0-13c8-4577-9ddd-e2b1c32ca68a/workflows/draft HTTP/1.1" 200 -

model setting

Image

agent node

agent_strategy_name: function_calling
agent_strategy_provider_name: langgenius/agent/agent

extra

it work when i use langgenius/deepseek plugin.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jan 24, 2025
@crazywoola crazywoola added this to the 1.0 milestone Jan 24, 2025
Copy link

dosubot bot commented Jan 24, 2025

@wl102 Hello there! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

I found a similar unsolved discussion titled "Agent node in workflow run status fails" which might be related to your issue [1].

The error you're encountering, "ValidationError" for FunctionCallingParams, suggests that the model parameter is not being correctly recognized as a valid dictionary or instance of AIModelEntity. This could be due to incorrect configuration or missing details in the model setup.

To address this, ensure that the model parameter in your FunctionCallingParams is correctly structured and includes all necessary fields. The model should be an instance of AgentModelConfig, which is required for the FunctionCallingParams in Dify [2]. Double-check the configuration form for the OpenAI API-compatible service to ensure all fields are correctly filled out, especially the model type and API endpoint.

If the issue persists, consider comparing the configuration with the one that works using the langgenius/deepseek plugin, as it might provide insights into what might be missing or misconfigured in the current setup.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants