Support function definition and function callback in api #765

Closed
opened 2026-02-21 17:28:19 -05:00 by yindo · 6 comments
Owner

Originally created by @L929333353 on GitHub (Dec 1, 2023).

Description of the new feature / enhancement

Support function definition on prompt edit, and add function call parameters in chat message API response, so we can build wonderful agents by DIFY.

Scenario when this would be used?

When we need build wonderful agents by DIFY.

Supporting information

No response

Originally created by @L929333353 on GitHub (Dec 1, 2023). ### Description of the new feature / enhancement Support function definition on prompt edit, and add function call parameters in chat message API response, so we can build wonderful agents by DIFY. ### Scenario when this would be used? When we need build wonderful agents by DIFY. ### Supporting information _No response_
yindo added the 💪 enhancement label 2026-02-21 17:28:19 -05:00
yindo closed this issue 2026-02-21 17:28:19 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 16, 2023):

Close due to it's no longer active, if you have any questions, you can reopen it.

@github-actions[bot] commented on GitHub (Dec 16, 2023): Close due to it's no longer active, if you have any questions, you can reopen it.
Author
Owner

@ifsheldon commented on GitHub (Dec 18, 2023):

+1. After reading the doc, I still don't know how to define a function and then use it with dify.

@ifsheldon commented on GitHub (Dec 18, 2023): +1. After reading the doc, I still don't know how to define a function and then use it with dify.
Author
Owner

@crazywoola commented on GitHub (Dec 19, 2023):

I have record a video for this BiliBili

@crazywoola commented on GitHub (Dec 19, 2023): I have record a video for this [BiliBili](https://www.bilibili.com/video/BV1UN4y1b7s1/)
Author
Owner

@ifsheldon commented on GitHub (Dec 19, 2023):

@crazywoola What you've done in the video is not function calling per se. I mean you did call a function, but what you've done is fetching external data into a prompt template. Please refer to https://platform.openai.com/docs/assistants/tools/function-calling and https://platform.openai.com/docs/guides/function-calling for function calling that is initiated by an assistant. We want assistants to be able to initiate function calls and return results to them.

@ifsheldon commented on GitHub (Dec 19, 2023): @crazywoola What you've done in the video is not function calling per se. I mean you did call a function, but what you've done is fetching external data into a prompt template. Please refer to https://platform.openai.com/docs/assistants/tools/function-calling and https://platform.openai.com/docs/guides/function-calling for function calling that is initiated by an assistant. We want assistants to be able to initiate function calls and return results to them.
Author
Owner

@wlevene commented on GitHub (Oct 19, 2024):

I had the same problem

@wlevene commented on GitHub (Oct 19, 2024): I had the same problem
Author
Owner

@jianzhichun commented on GitHub (Dec 6, 2024):

The same as me

@jianzhichun commented on GitHub (Dec 6, 2024): The same as me
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#765