DEV Community

BoopyKiki
BoopyKiki

Posted on

ChatGPT from OpenAI with React Native

Introduction

I started this project "Tell me a story..." mainly to play with ChatGPT from OpenAI. It's a small app that allows you to write a story using the OpenAI API. There are some predefined stories to help your inspiration, and you can also write your own story.

The "Tell me a story..." project on GitHub

This app uses these following API:

Enjoy it! :)

This app has four screens:

  • A tutorial interface that introduces the app.
  • A simple screen that displays the users who have created pictures and illustrations.
  • The screen that allows you to write a predefined story.
  • The screen that allows you to write your own story.

Preview of the App

Write your own Story screen

Read a predefined Story

Requirements

In order to use the API of ChatGPT, you have to create an account Explore the OpenAI API. After that, just create a new secret key API keys.

Installation

$ git clone https://github.com/kiki-le-singe/tell-me-a-story-ai.git <name>
$ cd <name>
$ yarn | npm install
$ npx pod-install
Enter fullscreen mode Exit fullscreen mode

Create a .env file at the root of the project and set this env variable OPENAI_API_KEY=<YOUR_SECRET_KEY>

$ npm run ios
Enter fullscreen mode Exit fullscreen mode

Resources

All the images are taken from Freepik. Those I have chosen have a free license. I just use them to illustrate this app.

They are designed by these authors:

List of authors

All the icons are taken from unDraw.

A big thanks to them for their awesome work!

Top comments (0)