AI Character Question

Hello all!

I hope you’re having a great summer!

So I am making an AI NPC, and am using the httpGPT plug-in. I have runtime voice recognition working, and the UI is working, in the sense that the bot can “hear” me and send the message to ChatGPT. It also responds. The whole system is working except for one thing: its responses are always “one behind” the current message. For example, when I speak to it for the first time, it responds to something as if it’s a response to an unasked, random thing. If I ask it another question, the response is legitimate and appropriate to the previous question I asked. It’s very weird. I’m not sending the message until after the words have been recognized, and the variable has been set, which happens well before I release the talk button.

Anyone else encounter this behavior? I’d love to know how you fixed it. :robot:

Thanks a bunch!

Benny :slightly_smiling_face:

Sounds like Indexing problem.

Yes, it sounds like it, but the responses aren’t stored in an array in advance. I can’t minus one it.

Eh, the API is behind paywall, can’t test myself.

Can you show Question-Answer code?

Hey there @Ben_Blau! I agree with Shun that it sounds like an indexing issue, although it’s possible that the variable being read is not set to the new one until the next had been read and saved. So I agree, we would have to see the code to verify that possibility.

Ok. I’ll clean it up and post it. Thanks.

Great! I’m sure you’re aware (but mostly for the benefit of anyone seeing this in the future),
that when posting any code related to using API keys (especially hot ones like CGPT) double check that your API key isn’t included anywhere as there are already scrapers for them!

Indeed. There are three places that someone could see API keys in this Blueprint. It’s using httpGPT, ElevenVoice, and Convai. But I’ve decided to take a different approach and dumped the code I was asking about.

Understandable! Thanks for the update! I’ll close the thread in that case for tracking. Let us know if you need any help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.