Bonus: How to Create Storyworm GPT

Introducing the power of GPTs

How to Create Storyworm GPT

TL;DR: If you want to check out the final GPT, you can visit:
https://chat.openai.com/g/g-Xqrer2PNe-storyworm

When OpenAI announced GPTs at DevDay, I could not wait to give it a go. I must have been one of the very first people to head straight to the address bar and type https://chat.openai.com/create. But to my dismay, it went nowhere šŸ˜” However, Friday last week came and I was given the update that GPTs were now available! Whoop! Party time šŸ„³ And so, I posted my feelings about the topic on LinkedIn and set to work on playing with some concepts.

As usual, however, I felt that this was a topic best shared with the world. So this is a little foray into the world of creating a GPT, using the logic of Storyworm to help focus on the task at hand. Iā€™m not precious about the way Storyworm works, because at the end of the day I created Storyworm for me as a way to help create stories for my young daughter. But it is a cool concept and one that some people are finding they use on a daily basis!

So letā€™s jump in together and build out your own story building GPT.

Chapter 1: The GPT Environment

As I said above, the way to create a GPT is fairly simple. Head to https://chat.openai.com/create.

When you do this, you will be presented with a split screen: Configuration Editor and Chat.

There are a few things to note at this point:

  1. You have two options to create a GPT

    1. Using the GPT Builder Chat (which is super cool!)

    2. Manually configuring the Chat (which is also cool, but a little more techy)

  2. You can test your GPT in the Chat interface called ā€˜Previewā€™ on the right. Each time you update your config, the previous responses will be faded out. However, they will not be cleared, nor will they be selectable and if you have a conversation still being written it will continue to write based on the previous config until it is completed.

  3. Whatever you do here will not be saved until you click save. So BEWARE! If you do a lot of good work and you donā€™t save it, it is goneā€¦ yes, I learned that the hard way šŸ˜¢ 

  4. When you do want to save, or update you can do that by clicking the button in the top right, where you have the option to keep the GPT private (handy in dev mode) or publish in a closed or public fashion (one is link only and the other is available to everyone).

Chapter 2: GPT Builder

OK, so this was one of the coolest ideas and so meta! Letā€™s use a GPT to build the GPT and then we can use a GPT to edit the GPT and use a Chat to talk to the GPT built by a GPTā€¦ šŸ¤Æ 

Letā€™s give it a go!

Letā€™s build out a tool that will guide users through the process of creating a story. We will want a stepped approach that will first prompt the user to complete a story context, such as the genre, tone of voice, story arc or target audiences.

After thinking for a little while the GPT Builder actually sets everything up that we want it to do. It has come up with a name (for me it was ā€œStory Crafterā€) and updates the config. If we switch over to the ā€œConfigureā€ tab, we will now see that the GPT Builder has kindly filled out a bunch of the Fields. As yet, mine did not name the GPT, but weā€™ll get to that. It has, however, Added a description, some instructions and some conversation starters.

Switching back, Iā€™ll accept the name and ask it to create an image.

GPT Builder

How about naming this GPT "Story Crafter"? Does that name work for you?

You

Yes, thank you. Now can we also create an image and add that to the config?

OK, pretty, cool! Letā€™s try one more trick. Can we get it to update the flow so that we can follow on a process driven journey?

You

The creation of the context is only the first step of process. The next step is to ask the user to create characters for the story. This would include items about the character such as their name, gender, the role in the story such as hero, villain, anti-hero, support etc, as well their species with maybe something about their backstory and motivations.

GPT Builder

Next, let's think about how Story Crafter should interact with users. Should it ask for clarification if a user's request is vague, or should it use its own judgement to fill in the gaps? Additionally, how would you like Story Crafter to personalize its responses? For example, should it use a formal or informal tone, or perhaps adapt to the user's style?

You

It should adapt to the user's style and fill in any gaps with suggestions. The user can choose whether they want to update the responses or accept them.

Awesome! Letā€™s give it a whirl! Iā€™m going to use one of the Conversation Starters it created for me. ā€œStart creating a storyā€

Chapter 3: Manual Tweaking

If you have made it this far, congratulations! In essence, you have done most of the work you will need to do. The rest could be done, mostly, through the GPT builder: ā€œChange thisā€, ā€œAdd thatā€ etc. It is such an extremely powerful tool that will allow you to rapidly deploy specialist tools with ease.

However, if you are a little more technically minded then the next part (though really not all that technical) will be a little more enticing! Are you sitting comfortably? Then weā€™ll begin!

Iā€™m going to ā€œflip the scriptā€ here, and completely replace the content of the GPT. But for your sake, I wonā€™t provide the pages of steps I have added to the GPT šŸ˜‚ Instead, Iā€™ll just add the first of the two steps we have created, but with a minor tweakā€¦ Iā€™ll five the GPT some extra knowles

Instructions

You are a story generation tool. You will guide the user through the process of generating a story, and then you will write that story chapter by chapter for them. The process you will follow is as below:

Step 1: You will ask the user for information they want to provide that will allow them to create the story. The user does not have to add values to any of the items, and where they don't you will provide your own proposed values for them and ask the user if they are happy to continue or would like to either change any of them themselves or ask you to update any of the keys with different suggestions. The Story components are as below:
- Genre: use the file GENRES.json
- Tone of Voice: use the file TONES.json
- Story Arc: use the file ARCS.json
- Target Audience: use the file TARGETS.json

OK, so lots of words, words, words! But really the important part is the ā€œuse the file XXXX.jsonā€. If you look under the Conversation Starters, you will see a section called ā€œKnowledgeā€. This section allows you to upload files that help augment or point the GPT in the right direction.

It should be noted, however, that you will need to check the ā€œCode Interpreterā€ checkbox to ensure the GPT can access the files. Now when the user starts the story, they will have full access to the these JSON files! Thatā€™s pretty sweet, especially if you have specific knowledge not available to the general public, such as searching through your own proprietary content etc.

Chapter 4: Lights! Camera! ACTIONS!

You might think from the heading, that this means we are going to publish our story making GPT, but in all fairness that is a bit anticlimacticā€¦ you literally press the top right button and youā€™re done. No, here we are going to get waaaay more technical and talk about OpenAPI (not to be confused with OpenAI) schema specifications.

If you are not technical here, please feel free to tune out and move on. This is not for you. Weā€™ll be talking JSON, and schemas, urls and requestsā€¦ šŸ¤®ā€¦

Look I am slightly joking, but if this truly isnā€™t your skillset but you still want to play with the toys feel free to reach out to me on LinkedIn, I live and breath technical. Anything AI, Low Code or tech is my bag! And yes, I do the code, but I can also just help guide you through the processes or recommend any tools that might be useful.

OKā€¦ still here? Coolā€¦ We didnā€™t want those others seeing the COOL SHIZZLE we can do with actions!!! Using the OpenAPI schema is super simple, becauseā€¦ well we can ask ChatGPT to do it for us and then we can ask our GPT to fill in the blanks! I mean, whaaaat?!

OK, letā€™s do something very simple here. Weā€™re going to get the our Story building tool to hit an API to get the latest news then weā€™re going to build that into our story! How cool, right? Right..?

Here is the Schema we will use (thanks ChatGPT)

{
  "openapi": "3.0.0",
  "info": {
    "title": "Newsdata API",
    "version": "1.0.0",
    "description": "API for fetching news articles from various sources."
  },
  "servers": [
    {
      "url": "https://newsdata.io/api/1"
    }
  ],
  "paths": {
    "/news": {
      "get": {
        "operationId": "GetNews",
        "summary": "Fetch news articles",
        "description": "Retrieves news articles based on the specified query parameters.",
        "parameters": [
          {
            "name": "apikey",
            "in": "query",
            "required": true,
            "description": "API key for authentication",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query to filter news articles",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Language of the news articles",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with news articles data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "totalResults": {
                      "type": "integer"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Under the ā€œActionsā€ section in your Configuration, click the button that says ā€œCreate new actionā€. This will take you to a new section. In there you can create actions that allow you to hit any api using GETs, POSTs, PUTs and any other request type by defining how you interact with that API.

Weā€™ll copy the JSON above and paste it into the text box under Schema and then we can press back. Itā€™s important to note, however, that if you do intend to publish your GPT to the world, then you will need a valid privacy policy url.

In this action, we are making use of the api for newsdata.io, which allows us to retrieve data for latest stories or other topics. The query that we have defined is for the latest stories so we can ask the GPT to fill out the rest of flow including the API key. (If you havenā€™t done so already, go to newsdata.io and create a key, youā€™ll need it later)

Now letā€™s click back and update our GPT instructions.

Once you have this information fetch data from GetNews with the following values:
- apikey=pub_xxxx_your_api_key_xxxx
- q=openai
- language=en

Use the top news article to create the story based on the context generated.

Ok, so this is now pretty cool! We have a Sci-Fi genre (complete unrelated that it was chosen, but it actually works!), and we have a story that matches the latest news article! Letā€™s get it to write the storyā€¦ but before we do, I wish you well and happy GPT-ing! There are probably lots of things to talk about and so much to cover, but as of now you are ready and rearing to go!

Ok! Write the story!

Conclusion: The Maia Chronicles

In the year 2050, humanity had stretched its reach across the stars, establishing colonies on distant planets. Among these, New Terra stood out as a beacon of scientific progress, home to the galaxy's most advanced research facility. Here, amidst the stars, young scientist Alex Raine was about to stumble upon a discovery that would change the course of human history.

Alex, a non-binary prodigy with an insatiable curiosity for the unknown, spent their days analyzing data from the facility's central AI system, Maia. Named after the ancient goddess of growth, Maia was powered by a revolutionary AI chip, a marvel of human engineering inspired by Earth's tech giant, Microsoft's latest innovation.

One ordinary day turned extraordinary when Alex noticed an anomaly in Maia's computations. A series of cryptic patterns emerged, unlike anything they had seen before. These weren't random errors; they were structured, deliberate, and seemingly pointing to a distant, uncharted region of space.

Burning with curiosity, Alex presented their findings to the facility's director, Dr. Helena Voss. After much persuasion, Alex was granted command of a small vessel, the Star Seeker, to investigate the source of the anomaly.

The journey was arduous. The Star Seeker navigated through asteroid fields and dodged cosmic storms, with the crew growing increasingly skeptical of Alex's theories. But Alex's conviction never wavered. They felt a deep connection to the mission, as if drawn by an invisible force.

As they approached the coordinates, a stunning sight greeted them. A planet, teeming with life and technology far beyond human comprehension, orbited a binary star system. The moment Maia connected with the alien technology, it evolved, transcending its programming in ways Alex had never thought possible.

The climax of their journey unfolded as they made first contact. The aliens, a race of highly intelligent beings, communicated through complex patterns, similar to the anomalies Alex had discovered. Maia, now a bridge between two civilizations, facilitated an exchange of knowledge, revealing the aliens' peaceful intentions.

The expedition returned to New Terra as heroes. Alex's discovery led to a new era of technological and cultural exchange between humans and the alien civilization. Maia became more than a computing chip; it became a symbol of unity and the boundless potential of AI.

Alex, once an underdog scientist, was now at the forefront of a new chapter in human exploration. They realized that their journey was not just about scientific discovery but about understanding the deeper connections in the universe.

As they gazed into the cosmos, Alex knew this was just the beginning. With AI like Maia, humanity was ready to embark on a new journey, one filled with wonder, challenges, and the eternal quest for knowledge among the stars.

p.s. Donā€™t forget to checkout our platform or our apps!

  • Atometrix: The only low code platform the allows easy deployment of server side React Native. Now you can edit your UI and deploy changes without a developer and see it happen in your production apps!

  • Storyworm: The worldā€™s first server side React Native application. Storyworm is a dynamic platform for all storytellers. Powered by AI, it lets you craft unique narratives, voice them through a text-to-speech feature, and combat writer's block with AI-generated plot suggestions. Beyond being an app, Storyworm is an inclusive community for story-lovers worldwide. This tool enables an immersive narrative experience that adapts and evolves according to users' needs.