Hi I’m building an AI chatbot interface. I have a multiline input field to type out messages. However it fails to appear in the messages field upon hitting Send.
I have a repeating group to display all messages from the chat session. The data source for this is set to the 'Current user’s Chat Sessions:each item’s messages. I suppose this displays a list of messages from the current chat session.
In the work flow, Upon hitting the send message button, I first create a new message, and then display it in the repeating group. But this doesnt yield any results.
Instead of displaying list in RepeatingGroup, why not set the data source for that RepeatingGroup? That way, whenever you create a new thing in your DB, it’ll be reflected there automaitcally without you having to do anything (since Bubble communicates DB changes via websockets, which happens instantaneously)
Hi Zeroic, thanks for the tip. It makes sense and I’ve removed that last step in the workflow. I thought I needed it because of these instructions where it tells me to ‘add the newly created message to the messages field’.
However, even after removing that step, I still don’t see my messages appearing in the messages field. You can see here the data source specified on the repeating group component.
I also see this bit of info in the debugger which may not be related but I find it strange. The data field ‘sender’ in the create new message step of the workflow is empty. Even though I Specified the sender to be the current user’s name. Could it be something to do with the message not gettting registered to this user’s ChatSession?
How can I do this? Where should I ‘put a test text’? When i send text through the input the message gets logged in my app data but the sender name (Nikhil) is not getting logged.
Yes it is. to be specific it’s using Current User’s ChatSession’s: Each Item’s messages.
I added a text element into the repeating group and I can see that it populates all the repeating groups with that dummy text. But I don’t see the message appear when I test the workflow. Also, I’m not sure how to distinguish between the message sent from the Sender and the message that I would receive back from GPT Since there is only One repeating group for all the messages.