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

Regarding the model provider's function call support-related issues #10967

Open
4 tasks done
limusen75 opened this issue Nov 22, 2024 · 3 comments
Open
4 tasks done

Regarding the model provider's function call support-related issues #10967

limusen75 opened this issue Nov 22, 2024 · 3 comments
Assignees
Labels
🔨 feat:tools Tools for agent, function call related stuff.

Comments

@limusen75
Copy link

Self Checks

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

Provide a description of requested docs changes

In the model provider list, it is written that OpenAI API-Compatible does not support function calling. However, in the OpenAI API-Compatible settings, there is an option for function calling, and I found that when I select to support function calling, Dify does not send the tools to the model during debugging. On the other hand, when I select not to support function calling, Dify sends the tools to the model in a React way during debugging. Could you please clarify whether the function calling option in OpenAI API-Compatible is a frontend bug or an outdated documentation issue in the model provider list?
微信图片_20241122133152
微信图片_20241122133245

@dosubot dosubot bot added the 🔨 feat:tools Tools for agent, function call related stuff. label Nov 22, 2024
Copy link

dosubot bot commented Nov 22, 2024

@limusen75 Hello there! I'm here to help you with any bugs, questions, or contributions. Let's work together to solve the issue you're facing.

The discrepancy you're observing between the documentation and the actual behavior of the OpenAI API-Compatible settings in Dify might be due to outdated documentation or a frontend issue. The current implementation in Dify does support function calling, as indicated by the presence of options for "function_call" and "tool_call" in the settings. When function calling is enabled, Dify should handle tools differently compared to when it is disabled.

If the documentation states that function calling is not supported, it may need updating to reflect the current capabilities of the platform. On the other hand, if the frontend is not behaving as expected (e.g., not sending tools when function calling is enabled), it could be a bug that needs addressing.

To resolve this, it would be beneficial to verify the documentation's accuracy and ensure that the frontend implementation aligns with the backend capabilities. If the issue persists, it might be worth reporting it for further investigation by the maintainers.

To continue talking to Dosu, mention @dosu.

@crazywoola
Copy link
Member

"""
Invoke large language model
:param model: model name
:param credentials: model credentials
:param prompt_messages: prompt messages
:param model_parameters: model parameters
:param tools: tools for tool calling
:param stop: stop words
:param stream: is stream response
:param user: unique user id
:return: full response or stream response chunk generator result
"""

Maybe the docs is outdated.

@limusen75
Copy link
Author

@crazywoola I'm currently using the OpenAI API-Compatible configuration model llama3.1-70b-Instruct, with function calling enabled. However, when I send a request to the model using Dify, the request does not include the 'tools' parameter. Here are some related test screenshots:
微信图片_20241122162913
微信图片_20241122163723
微信图片_20241122164115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 feat:tools Tools for agent, function call related stuff.
Projects
None yet
Development

No branches or pull requests

3 participants