With all the hype around ChatGPT and openAI, I decided to give it a try and build an AI power app on Wix.
The idea was to create an AI-powered assistant for game masters of role-playing games (here dungeons and dragons). By providing a short description of a place (e.g. a hospital for adventurers, a bank managed by elves, or a circus with fantastic beasts), the AI assistant generates a detailed description of the venue via OpenAI's API.
You can test it here:
Going Further
This is a basic content generation for GPT-3 but I wanted to go further, and see if we can generate actionable data with OpenAi that would be compatible with Velo.
I added another feature to generate NPCs (non-playable characters) for the created venue. Based on the venue description, the assistant can generate noteworthy NPCs that are complete with a background history connecting them to the place, as well as a description, level, class and set of abilities. Each character is returned as an object that can be manipulated using Velo and injected into a repeater. The characters are also saved in a collection that can be retrieved later.
Dall-e
OpenAI also provides an API for Dall-e, a text-to-image generator. So I decided to give it a try as well.
When the assistant generates the NPC it also creates a portrait. The portrait is included within the NPC object so it can be rendered within the repeater.
Improvement
Although the AI is quite accurate in generating abilities based on the character's background, I believe there is room for improvement. To take it to the next level, I'm thinking of adding a step to check the validity of the character sheet according to the rules of DND5.
But this goes beyond this proof of concept.
I was able to produce a relatively good app using OpenAI API and Velo by Wix in just a few hours of work. I truly believe this is the future of web development and more broadly mankind.
At Code Enhancement Studio, we are always looking to take on new challenges, so if you have a project that requires the integration of OpenAI & GPT-3, don't hesitate to reach out!
Comments