Giter VIP home page Giter VIP logo

text-gpt-p5-app's Introduction

Text-GPT-p5

A text to p5.js generative editor powered by GPT-3.5 โœจ

  1. takes plain text prompts ๐Ÿ“
  2. makes an OpenAI GPT-3.5 call ๐Ÿค–
  3. converts them into p5.js code ๐ŸŒธ
  4. displays the p5.js sketch ๐Ÿ–ผ๏ธ

It is also a sandbox environment for running p5.js (or any javascript code). You can make direct edits to the generated code, which re-runs the sketch immediately, similar to Glitch or Replit.

Under the hood

A Next.js full-stack app (React, Next API routes).

Node module(s):

  • react-codemirror
  • cors

Getting Started

To get started, clone the repository and install the necessary node modules.

npm install

Environment Variables

Make a copy of the .env.example file, rename it as .env. Enter your OpenAI API key. Specific instructions 5 & 6 here.

The example also includes a NEXT_PUBLIC_REMOTE_API_URL and WHITELISTED_DOMAINS, in case you want to fetch from another server.

Development, Build, Deploy

Next.js defaults. See package.json for commands. Both dev and production are on port 3000.

Acknowledgments ๐Ÿ™

text-gpt-p5-app's People

Contributors

dependabot[bot] avatar mattelim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

text-gpt-p5-app's Issues

Need help in getting "npm start" to work

Describe the feature or improvement you're requesting

Thanks for sharing this application. I can't wait to try it out.
I am new to node.js. I asked ChatGPT how to start up the server and it said that I had to run this:

npm start

but I get errors after clone the repo, cd into the directory and run the command from a shell.

Do you have any suggestions on how to start the server?

Thanks! - Dan McCreary and the MicroSim team (using GenAI to create classroom tools using p5.js)

Additional context

No response

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.