Getting the ChatGTP API output to be displayed in a RG

Hi everyone, looking for a bit of help on Bubble & Chat GPT integration.
I’ve set up the Open AI API and I’m able to push a request to Chat GPT based on some user inputs.

How can I get the ChatGTP API output to be displayed in a RG?

A great many thanks for your help.
Bernard

You can add to the GPT prompt since u’re displaying an array of data to give the response as list… Then you can ref. that in the RG and display it.

Airdev has a pretty good guide: https://build.airdev.co/wiki/how-to-implement-openai-chat-gpt-bubble-application

Are you using ‘Chat’ or ‘Assistants’? (or something else)? (I’d recommend Assistants over Chat in most cases)

Hi Adam.,Think we’re currently using Chat. What’s the secret sauce for Assistant might work best ?

Thank you George, will dive in :slight_smile:

Tank you Geesonofgee. How does your solution to ask for the output as a Bubble list translates into a prompt instruction ?

When you’re setting up the workflow, u’ll simply add at the end of your prompt that GPT should give its response as a list;

you should have something like this:

[“This is a great insight, thank you for sharing!”,“I completely agree with your point.”,“This was very informative, thanks!”,“I have a different perspective on this.”,“Can you elaborate more on this topic?”,“This is exactly what I was looking for.”]

say my prompt was to generate array of comment as and I want them to be as a list.
and this response, you can easily display it in a RG