Giter VIP home page Giter VIP logo

120-gpt-mobile-demo's Introduction

GPT / Mobile Demo (CMPM 120)

A simple demo showing off how OpenAI's ChatGPT and CapacitorJS can be used with Phaser to create a simple, mobile, AI-powered game.

Installation

This project requires a .env file at root which contains the following line :

VITE_OPENAI_API_KEY=your-open-ai-api-key

To get an API key, you will first need to sign up with their developer site and generate the key on the API key page.

Once this is in place, run

npm install to install the node packages required to run the site, then npm run dev to run the site locally on your computer.

Deployment

Online

Because you need an environment variable, deploying on GH pages is not a viable option. However, there are several static site hosts that would be a good fit. I personally prefer Vercel but all of them will support some version of this feature.

As a Native App

This project uses CapacitorJS to convert the site in to a working iOS or Android app. If you would like to do the same to your own app, simply run the following series of npm/npx commands.

npm install @capacitor/core @capacitor/cli
npx cap init 
npm run build
npm install @capacitor/ios @capacitor/android
npx cap add ios // or npx cap add android for the android version of the same.

Credits

Font is Old Newspaper Types by Manfred Klein

120-gpt-mobile-demo's People

Contributors

laffan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.