Closed xiangpingjiang closed 7 months ago
🤖
Hello again, @xiangpingjiang! It's great to see you back and reaching out. Hope you've been well!
Based on the context provided, it seems that the isFunctionCall
prop in the Dify codebase is used to determine the Agent Mode. If isFunctionCall
is true, the Agent Mode is set to Function Calling. If isFunctionCall
is false, the Agent Mode should be set to ReAct.
However, you mentioned that you're only seeing the Function Calling option and not the ReAct option. This suggests that the isFunctionCall
prop is always true when the component is rendered.
To resolve this issue, you would need to investigate why isFunctionCall
is always true. This could be due to a variety of reasons, such as a bug in the code that sets the isFunctionCall
prop, or a problem with the state management in the application.
Unfortunately, without more information about the Dify codebase and how the isFunctionCall
prop is being set, it's difficult for me to provide a more specific solution. If you could provide more details about how the isFunctionCall
prop is being set and managed, I might be able to provide a more targeted solution.
As for the ReAct option, it's possible that it was removed or not yet implemented in the version of Dify you're using (v0.5.6). You might want to check the release notes or the commit history of the Dify repository to see if there's any mention of the ReAct option being removed or not yet implemented.
I hope this helps! If you have any more questions or need further clarification, feel free to ask.
Can you add a screenshot as well? The information you provide seems not enough for us to infer what's going on here.
By default it only has tools function opened. If you want to add more features. Please click add features button below.
hello @crazywoola What should I do if I want set the ReAct mode for my Agent Assistant?
hello @crazywoola What should I do if I want set the ReAct mode for my Agent Assistant?
Well you should wait for the new version I think.
@crazywoola Is there an issue to track the feature ?
cc @Yeuoly
hello @crazywoola What should I do if I want set the ReAct mode for my Agent Assistant?
Well you should wait for the new version I think.
Here it is.
That's our design, we will force all models support Function Calling to use it instead of ReAct, I guess you want to do some tests with different models, or is there any scenarios require it? I think Function calling could have a better performance.
@Yeuoly Yes, I want to do a test. But Are you sure that Function calling has better performance for all models?
follow the doc https://docs.dify.ai/user-guide/creating-dify-apps/prompt-engineering/agent-assistant#agent-settings For model series that do not support Function Calling, we have implemented the ReAct inference framework to achieve similar effects.
Then you can try to read our source code and do some simple modifications here https://github.com/langgenius/dify/blob/main/api/core/app_runner/assistant_app_runner.py#L205
You can just make all models use AssistantCotApplicationRunner
so did you decide to abandon the ReAct feature ?
It's not abandoned I thought, you can find React mode if you change the model to Gemini Pro if you want, people use Dify for production wants a better performance, and as for the model supports Function calling in Dify, Function Calling does have a better performance.
@Yeuoly But Gemini Pro supports also Function calling https://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/function-calling .
Dify didn't support Function Calling for Gemini Pro?
@Yeuoly But Gemini Pro supports also Function calling https://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/function-calling .
Dify didn't support Function Calling for Gemini Pro?
It does support fc in Gemini Pro.
ok, so which models we can use ReAct mode in dify ?
@Yeuoly But Gemini Pro supports also Function calling https://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/function-calling . Dify didn't support Function Calling for Gemini Pro?
It does support fc in Gemini Pro.
There is an issue in generativeai causes function call does not work now https://github.com/langchain-ai/langchain/discussions/17621
Hi, @xiangpingjiang,
I'm helping the team manage their backlog and am marking this issue as stale. From what I understand, the issue was reported regarding the Agent Mode of gpt-3.5-turbo in Dify version 0.5.6, which only had the option for Function Calling instead of both Function Calling and ReAct as expected. The conversation in the comments led to the resolution, where Yeuoly explained the design decision to force all models to support Function Calling instead of ReAct.
Could you please confirm if this issue is still relevant to the latest version of the repository? If it is, please let the team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you!
Self Checks
Dify version
0.5.6
Cloud or Self Hosted
Cloud
Steps to reproduce
Use the Agent Assistant and set the Agent Assistant. Agent Mode just has Function Calling
✔️ Expected Behavior
there are two options , Function Calling and ReAct
❌ Actual Behavior
just one option Function Calling