Multiline text input does not appear in the chat's messages field

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.

I also get this error in the debugger - Even though the data source is exactly the same as I have specified on the repeating groups component level.

Hi Nikhil!

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)

Let me know if this makes sense :slight_smile:

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?

Funnily enough I can see the messages being logged in the app data -

Is your Current User’s Name empty? And did you check your privacy rules as well?

These are the privacy rules. I’m not sure I understand what this means.

The current User’s name should be in the data base as Nikhil

@nikhilisnair

Privacy rules seems to be alright.

Check the following:

  1. You should be logged in. (Either via Debugger or Put a Test Text and show Current User’s Email.)
  2. Ensure in the repeating group for message you are using Current User’s ChatSession’s Messages.
  3. Ensure that you have a text element in the repeating group to display the associated text from the message object.

It none of it work, I would be happy to get on a quick call now to debug this together.

Let me know how it goes.

Thanks @codefree , I’m checking right away.

Hi, a few questions about your tips

  1. 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.
  2. Yes it is. to be specific it’s using Current User’s ChatSession’s: Each Item’s messages.
  3. 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.

@codefree I’d be really happy to jump on a call to debug this together.

This topic was automatically closed after 69 days. New replies are no longer allowed.