Bot "forgets" previous messages (Several conversation ids for the same interaction)
I just noticed this issue in my app. Somehow, the
However, at some point the
Below, you will find an example conversation. I've omitted the actual messages because of privacy concerns. After each user message a text bubble is being used for debugging. It prints the current values of the
You'll notice that after user message 7, the
[
user message 5]
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: a1642f44-da81-4efc-80ec-e58385031b77
----------------------------------------
[
bot response 5]
[
user message 6]
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: a1642f44-da81-4efc-80ec-e58385031b77
----------------------------------------
[
bot response 6]
[
user message 7]
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id:
----------------------------------------
[
bot response 7]
[
user message 8]
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: b41df4c7-bca1-4314-b245-3db3e9dcb7ca
----------------------------------------
[
bot response 8: Hello, how can I help you?
]
conversation_id changes during the interaction for no apparent reason. The app uses Dify as the AI engine. There's only one Dify block running in a loop. It gets the user_id created at the start of the flow and automatically generates a conversation_id, which should be used throughout the interaction.However, at some point the
conversation_id variable is reset, effectively splitting the conversation history.Below, you will find an example conversation. I've omitted the actual messages because of privacy concerns. After each user message a text bubble is being used for debugging. It prints the current values of the
user_id and the conversation_id variables.You'll notice that after user message 7, the
conversation_id variable becomes empty.Example Conversation
Previous messages[
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: a1642f44-da81-4efc-80ec-e58385031b77
----------------------------------------
[
[
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: a1642f44-da81-4efc-80ec-e58385031b77
----------------------------------------
[
[
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id:
----------------------------------------
[
[
----------------------------------------
DEBUG
user_id: l67hlo5o6gb2xmaqbew5oac5
conversation_id: b41df4c7-bca1-4314-b245-3db3e9dcb7ca
----------------------------------------
[

