Community Library for Unreal Engine

Hey all,

I couldn’t find a community library for accessing the API in Unreal Engine so I built one.

If you find this useful, download a packaged version of the plugin for 4.25 and 4.26 or build it from source. Github Repository
If anyone wants to contribute, Pull Requests are welcome :grin:
Demo Video

Feel free to drop questions or suggestions below,


Very cool! Thanks for this, @KM!


Oh, nice! I haven’t touched UE4 since I built this RPG a couple years back. I’ve not had time to devote to that project for a while.

A Russian company was doing something similar in May 2020, but I think they were using a Russian version of GPT-2 then translated to English? Was a bit rough, but it’s going to be interesting to see how language models are used in gaming.

Thanks for sharing.


Oh wow, @PaulBellow, I wasn’t aware of this. Thanks for sending it!

1 Like

No problem. There’s a US person/company that has dome some NPC work with GPT-3 recently, I believe. I can’t remember the details off-hand.

Personally, I don’t think GPT-3 is ready for prime time yet with games, but it’s very promising. Like, for instance, maybe a smaller model fine-tuned with world lore?

Interesting time to be alive!

ETA: I don’t have a good copy of the video (thanks, YT!!! /s), but I did some tests with an NPC chatbot before OpenAI released their prices and rules for chatbots.


This is tremendously useful. Thank you for building it!

I edited the plugin locally to accept requests to the instruct engines. It could be nice to update the plugin in github, or at least when the instruct engines are out of beta.


I’m still on 4.25, and was getting a warning saying that the plugin has been built for 4.26, but it loads and works appropriately, I think it’s more of a nuisance. I edited EngineVersion in the uplugin file locally to say 4.25.0 and the warning is gone.


What a demonstration loved it


Thanks for this! I’m interested in making tome kind of omnipresent narrator with GPT-3 and Unreal.
Any piece of advice with pluging o resources for the voice narrator? The two things I have to resolve is finding some kind of bot that reads an input text kind of like a human, and also I would like to have some pauses in the reading, so that bot should know when to pause.
Any idea or resource would help.


@PeculiarPath Thank you for your suggestion!

Given your feedback, I have just added the davinci-instruct-beta and curie-instruct-beta engines to the plugin.


For all current and future releases, you can download the pre-built binaries for 4.25, 4.26, and 5.00EA by following a link on the Github page. If you use this method, you won’t have to worry about updating the uplugin when you install it.



@Kenkk I would recommend using a runtime Text-To-Speech (TTS) service such as:

For pauses, I recommend playing around with adding extra punctuation. You could also break up the input text into small pieces and then call the TTS service multiple times with a delay in between calls to make it sound more natural.


Look into
Best text to speech out there, sounds really natural and they have a client, and API and CLI support depending on your needs.
Not free though.


Amazing. Awesome work!


Do you have any plans to add the other data output associated with a completion? id, timestamp, engine & model?

---- Edited: As I seem to be spamming the thread for more than 3 consecutive replies. I’ll refrain from commenting when it doesn’t add to the discussion, probably good form anyhow.

I’m having trouble detecting stop sequences in the Plugin.

I wonder if it’s because stop sequences are actually expecting an Array rather than just a string.

Both the python and curl code snippets in the playground show the parameter as json array


I created an issue on github.


@PeculiarPath Thanks for the input!

With the latest push, I’ve addressed your stop sequence issue, added support for the output data you brought up, and added partial support for log_probs


I don’t know if this is relevant but
I was looking into making my google assistant use punctuation like a comma, to pause, in its speech so it could activate a lengthy response from Alexa and came across this. The assistant recommended ssml
(google this " ssml google assistant speech") commands to make the text to speech engine sound more natural. I don’t know if these commands can be used in this instance. If there was or is a universal input for the speech patterns then you may be able to use these type of commands to make speech patterns unique. Regardless it is a very configurable and well documented list of commands for speech engines. this is my first post on here, hope it helps.