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

funcation calling failed for xinference with qwen model #10878

Open
5 tasks done
cyflhn opened this issue Nov 20, 2024 · 4 comments
Open
5 tasks done

funcation calling failed for xinference with qwen model #10878

cyflhn opened this issue Nov 20, 2024 · 4 comments
Labels
🤖 feat:agent Agent related topics 🔨 feat:tools Tools for agent, function call related stuff. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@cyflhn
Copy link
Contributor

cyflhn commented Nov 20, 2024

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

0.10.

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

bug for ollama provider:
1. add ollama provider in dify model settings.
2. launch a model with ollama
3. create an agent app in dify
4. check agent mode for this app.

bug for xinference provider:

  1. add xinference provider in dify model settings
  2. launch a qwen2.5 model with xinference.
  3. create an agent app in dify
  4. add a tool in this agent app.
  5. run this agent app.

✔️ Expected Behavior

for ollama provider
the agent mode should be function calling.
for xinference provider
the agent app runs ok with correct function calling result.

❌ Actual Behavior

for ollama provider
the agent mode is always reAct.
for xinference provider
the agent app could not run with tool integrated. There is an error showing that the parameter was incorrect with function calling for qwen model.

@dosubot dosubot bot added 🔨 feat:tools Tools for agent, function call related stuff. 🤖 feat:agent Agent related topics labels Nov 20, 2024
Copy link

dosubot bot commented Nov 20, 2024

Hello @cyflhn! I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's work together to solve this issue.

For the issues you're experiencing:

  1. Ollama Provider: The Ollama provider in Dify's agent mode does not support function calling, which is why the agent mode defaults to ReAct. This is a known limitation when using the Ollama provider [1].

  2. Xinference Provider with Qwen Model: There is a known issue with function calling for the qwen model in the xinference provider, where incorrect parameter errors can occur. Unfortunately, specific troubleshooting steps or solutions for this issue are not detailed in the available documentation. You might want to check if there are any updates or patches that address this problem in the repository or related discussions [2].

If you haven't already, you might want to look into any recent updates or community discussions that might provide a workaround or solution for these issues.

To continue talking to Dosu, mention @dosu.

@crazywoola
Copy link
Member

Please report these in 2 issues, or you can just remove Ollama part. We have a pull request opened #10784 already. You can remove things related in you pull request.

@crazywoola crazywoola changed the title ollama provider does not support function calling for agent mode, funcation calling failed for xinference with qwen model funcation calling failed for xinference with qwen model Nov 20, 2024
@cyflhn
Copy link
Contributor Author

cyflhn commented Nov 20, 2024

Please report these in 2 issues, or you can just remove Ollama part. We have a pull request opened #10784 already. You can remove things related in you pull request.

I have also make a pr related to this bug

Copy link

dosubot bot commented Dec 21, 2024

Hi, @cyflhn. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • You reported a bug with the xinference provider when using the qwen model in a self-hosted Dify setup.
  • The issue involves errors due to incorrect parameters for function calling.
  • @crazywoola suggested separating issues or removing the Ollama part, referencing pull request feat: support function call for ollama block chat api #10784.
  • You confirmed making a pull request related to this bug.

Next Steps

  • Please let me know if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 feat:agent Agent related topics 🔨 feat:tools Tools for agent, function call related stuff. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants