How can I use Functing calling defined on the openai? #12092

Closed
opened 2026-02-21 19:05:43 -05:00 by yindo · 2 comments
Owner

Originally created by @ms20hj on GitHub (Mar 25, 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

0.6.16

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

At present, the tools supported by the platform all require configuration in advance on the platform, and the platform directly calls the URL of the tool. Does the platform support this way of function calling? https://platform.openai.com/docs/guides/function-calling?api-mode=chat#overview

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @ms20hj on GitHub (Mar 25, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.16 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce At present, the tools supported by the platform all require configuration in advance on the platform, and the platform directly calls the URL of the tool. Does the platform support this way of function calling? https://platform.openai.com/docs/guides/function-calling?api-mode=chat#overview ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🌚 invalid label 2026-02-21 19:05:43 -05:00
yindo closed this issue 2026-02-21 19:05:43 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 25, 2025):

I found a similar open issue regarding function calling in Dify. The issue suggests that the discrepancy 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. It would be beneficial to verify the documentation's accuracy and ensure that the frontend implementation aligns with the backend capabilities [1].

To use function calling with OpenAI's API in Dify, you need to configure the Agent to use the Function Calling mode. This involves selecting a model series that supports Function Call, such as gpt-3.5 or gpt-4, and modifying the iteration limit for the assistant in the Agent configuration. In the Dify Chatflow/Workflow editor, you can add an Agent node and select the Function Calling strategy from the node configuration panel. This setup allows the LLM to map user instructions to predefined functions or tools, identify user intent, and decide which function to call while extracting the necessary parameters [2][3].

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] commented on GitHub (Mar 25, 2025): <!-- Answer --> I found a similar open issue regarding function calling in Dify. The issue suggests that the discrepancy 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. It would be beneficial to verify the documentation's accuracy and ensure that the frontend implementation aligns with the backend capabilities <sup>[[1]](https://github.com/langgenius/dify/issues/10967)</sup>. To use function calling with OpenAI's API in Dify, you need to configure the Agent to use the Function Calling mode. This involves selecting a model series that supports Function Call, such as gpt-3.5 or gpt-4, and modifying the iteration limit for the assistant in the Agent configuration. In the Dify Chatflow/Workflow editor, you can add an Agent node and select the Function Calling strategy from the node configuration panel. This setup allows the LLM to map user instructions to predefined functions or tools, identify user intent, and decide which function to call while extracting the necessary parameters <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/application-orchestrate/agent.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/agent.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/eea48b08-1eaa-484f-a065-afed36e81e5e?feedback_type=other)</sup>
Author
Owner
@crazywoola commented on GitHub (Mar 25, 2025): https://github.com/langgenius/dify/blob/41dff175b3f9a98c5bf795315b5937de074a41ed/CONTRIBUTING.md#L23-L33
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12092