Connect ChatGPT

How to connect ChatGPT to GDevelop 5

There’s nothing built in or created for GDevelop (yet). But here’s a link to a short previous post about it.

Im gonna look into this- theres probably a way with JS
EDIT- you need NodeJS for this so im not sure how this would work, my guess is there is a library somewhere to do this. Not sure though. Ill post again if i find something.

If anything, I have an OpenAI account
And now I need to somehow connect chatGPT to the game and make it so that when I enter messages, ChatGPT gives an answer!

Have you asked ChatGPT how to do this?

4 Likes

Yes, but he is give wrong JavaScript script

Feed it back to ChatGPT; give it the error message and ask it to try again. It isn’t perfect, and sometimes it takes a few iterations to get the code correct.

1 Like

Also note that you need a paid subscription to OpenAI in order to use their API. The first month is free, then you start to pay for it.

Hi,
I have founded a way to do this inside Gdveleop. I have tried it and it basically worked. So I had made a previous chatGPT app in MIT App Inventor and I tried it in the same way with some minor changes and it worked. But I don’t know how I can turn it into an extension and publish it into the Gdevelop extensions. So if somebody is interested in helping me, I would be very happy working with you.

send the extension! NOW!

This is almost there.
I get an error message from the server, which is still better than ‘no message from the server’.

Here an example for how to achieve this, I supose we can close this thread! :partying_face:
https://digi-device-file.itch.io/chatgpt-example-for-gdevelop

2 Likes

Big chunks thanks! Yeaaaaapyyyy

“It’s always nice when it’s nice”

Today I realised this is not only useful for ingame chatbots, but the AI can actually control your game by sending code words like [doSomething] to your game…

1 Like

Voice chat plssssss!:pray:

1 Like

it’s very easy to enable voice chat if you are successful in connecting it with chatGPT Server.
You can just use the text to speech and voice recognition extension for this.

1 Like