ChatGPT API Python Unreal Engine

I know how to code in Python to some extent, I know a bit of Unreal Engine as well. I wrote a code in Python to get the API key, send text as a compilation prompt, get a response, when the token limit reached clear memory, etc.

What I want to do is, to set the API key from UE5, send the input message, and get the output msg into UE5.

I saw the Python editor script plugin but it seems to be the command line only. I want to connect a blueprint into a Python script with inputs and outputs like I described above.

I found free UE5 plugins like “Chatbot AI Unleashed”, they are useful but lacking a lot of control. For what I want to do I need full control of the chatbot commands.

How are these UE5 plugins made anyway? Is it even possible to write a Python code to make it look like this inside UE5?:

Forget python. :smiley:

Use chat GPT to translate python into C++ code. It will not be easy as chatgpt loves to wander into random dead ends. But it is doable.

Get that code in python, split it into small functions, ask GPT to translate them one by one.

Or if you know python, learn some unreal C++, it is not that hard. Btw. best way to learn C++ for unreal is to ask CHAT gpt for examples. Just keep in mind it makes some silly errors in bigger code.

1 Like

Alright, I guess I can’t be lazy about it and use a language I know already. C++ learning time it is lol
Thanks