You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created an agent in Dify. I've a use-case where I want to open 3 chats of this agent and run chats in them concurrently (Ex: if one chat is thinking or calling some tool it might take time, meanwhile I can go and run another chat). To check if Dify can support this use case, I did the following experiment:
Created a chat asked it to tell me a story about software engineers. Now clicked on "create chat" and basically switched context to a new chat, even before I could submit any request in the new chat, when I click on the old chat's thread, the response (which was previously streaming) had stopped and become blank (see screenshot below for ref):
Tech Insights
I did some tech dive and found the following:
When the user context switches from a running_chat to a different chat, a "stop" API call is made by the UI for the running_chat.
On diving into the api code I figured out that there exist ChatMessageStopAPI and CompletionMessageStopAPI (Ref) implementations.
Questions:
My understanding with this experiment is that, by design Dify can only support 1 chat at a time and even creating a new chat (of the same agent) it will stop any previously running chat (which was let's say streaming a long response) . Is my understanding correct?
If yes, a possible workaround i can think of is just to comment out the "stop" call from the frontend and expect that every thread would keep running. Would this work? If not am I missing something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Context:
I've created an agent in Dify. I've a use-case where I want to open 3 chats of this agent and run chats in them concurrently (Ex: if one chat is thinking or calling some tool it might take time, meanwhile I can go and run another chat). To check if Dify can support this use case, I did the following experiment:
Tech Insights
I did some tech dive and found the following:
api
code I figured out that there exist ChatMessageStopAPI and CompletionMessageStopAPI (Ref) implementations.Questions:
Beta Was this translation helpful? Give feedback.
All reactions