Captured input sent to API as "0"

I’m trying to set up an Alexa chatbot with ChatGPT, as described in the YouTube video “Use ChatGPT inside your Alexa For FREE - Step-by-Step Tutorial”. Ultimately I’d like to say “Alexa, ask ChatGPT [whatever]” and have [whatever] passed directly to the ChatGPT API for a response.

Here is my current flow structure:


Capture entire user reply to {Query}

POST {Query} to ChatGPT API

Capture response to {APIreply}

Speak {APIreply}

I know the API connection is set up correctly, because when I directly test the {Query} variable (using the “Send Request” modal that returns JSON), the response from the API contains the correct answer. Also, when I test the whole flow, the speech-to-text transcribes my voice accurately, and the voice at the end reads the response from ChatGPT. However, whether I speak the question or type it in the chat window, the voice always replies as if I had sent the API “0”. I can even change the API request to “Describe the history of {Query}” and it will respond with the history of the numeral zero. So everything appears to be working, it just fails to transfer my captured user input to the API.

According to comments from the YouTube video I mentioned, the problem was a bug that has since been reported and fixed, but it still seems to be happening for me. Any ideas where the disconnect is here?

1 Like

Quick update: I was just trying the Capture Step live prototype here:

And it seems to do the same thing – the bot asks a question, I speak, my words are transcribed accurately, but the bot responds as if it didn’t understand. So I guess the problem is more widespread than just my project.

Update: I was finally able to get this working by copying the Capture Step Component template, deleting everything except the part that captures the {claim} variable, and then recreating the rest of my original flow around it. Still not sure why that works – the live prototype I linked before is still broken. Very strange.

Did you ever figure out what was the original cause of your issue? I am also creating a chatbot connected to the ChatGPT API. When I use the “Send Request” option on the API block, it works just fine, but when I run a test it returns “0” (zero). I’d rather not have to start from scratch using the template if you already found out what the original cause was. Thanks!!

Did you create the variable you use in your Capture step?