Skip to content
jchwengerPublic

About

p5.js with the OpenAI API

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

p5.GPT

Originally presented during a Computational Arts MA/MFA Workshop at Goldsmiths College, London, June 2023, by Iris Colomb & Jérémie Wenger. More info in the repo Machines Poétiques 2023.

Starter code

Openai: ChatGPT & Dall-e

A websocket app with with NodeJS, Express, SocketIO and P5js using the API from OpenAI through the openai NPM module.

Press ¬ to toggle the UI.

Click on completion to get ChatGPT to continue the text in the prompt textarea (system is ignored, both the prompt textarea and the sketch are filled with the prompt and the completion). In the picture below, the original prompt is highlighted.

openai, chatgpt completion

Click on chat to get ChatGPT to continue the text in the prompt textarea, while following instructions in the system textarea.

openai, chatgpt chat style

Note: giving examples of what you want usually helps a lot (especially for models prior to GPT-4).

openai, chatgpt chat wordmaking

Click on image to request an image from Dall-e following the text in the prompt textarea (system is ignored).

openai, dall-e

About

p5.js with the OpenAI API

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages