Enable ChatGPT Via OpenAI API's on Yellow AI

Hey Guys!

I am planning to integrate ChatGPT with Yellow AI Bot where there are a lot of students who need help in terms of learning so I am planning to help them with the bot.

So, I am planning to integrate the bot and when I use the API node. I am getting this as response.

	"id": "cmpl-6Zzi56bmBvFPuGtLA5MdVQWhdOCuG",
	"object": "text_completion",
	"created": 1674036713,
	"model": "text-davinci-003",
	"choices": [
			"text": "\n\nThis is indeed a test",
			"index": 0,
			"logprobs": null,
			"finish_reason": "length"
	"usage": {
		"prompt_tokens": 5,
		"completion_tokens": 7,
		"total_tokens": 12

Now, I am planning to get the choices[0].text but I am not able to fetch the response and I have tried almost everything reading the documentation so can I please get the help on this.



If you’re using a function to pull out the data - standard JS format of response.choices[0].text should work.

If you’re trying to parse and fetch this data directly after the API call from within the bot flow (without a function) — then you can use the format {{{variables.apiResponse.choices.0.text}}}

within the bot flow, you can’t parse using choices[0] — it has to be choices.0

Hey @gautham

I tried this method but it’s not working for me for some reason.


Attaching the screenshots above & it’s not working I will also create a support ticket for the same.


in the screenshot, it shows that you’re writing {{apiResponse.choic…}}
the correct format is {{{variables.apiResponse.choices.0.text}}}

Hi Gautham, Thank for the solution. now we are able to fetch the response.
But its incomplete/few lines of solution. You can refer the screenshot.

how can we get complete solution. Please help us!


Hey @gaurav you can increase the Max words in the GPT prompt and then you will be able to view the complete text.

1 Like

Thank you Jayesh! yeah its working now after increasing the Max Words.

Hi ,
I’m facing the same issue although the format i used in the bot is as below : {{{variables.var1_obj.choices.0.text}}}

Unable to get the response.

Hello Jayesh,

I am not getting response from GPT-3. please help to get this fix.

I am sharing you the bot access

Hey @gaurav I have cross-checked it once. There is some integration issue with the chat GPT.
Try re-connect it again and check the details once properly.

Thanks for the quick response
Yes @Jayesh_Rana I have created a new flow as well as integrated again with new API key still it is not working.

Why it is triggering fallback?

Please check if you have created any chatgpt flow whether it is working or not. It may be instance issue.

Hey @gaurav go to sandbox over there I have created a dummy data table in DB over there you can see that GPT is throwing 4xx or 5xx errors I’m storing it over there. Have a look over there you will be able to understand from there.