Code example for integrating Max 8 to elektron.live platform.
See more docs at https://github.com/elektronstudio/docs
-
Add the following objects and patches to the
example_max_chat
patch: -
Update
examples_max.js
from this page https://raw.githubusercontent.com/elektronstudio/example_max/master/example_max.js -
Create openai.com account, add billing info and Generate a API key https://platform.openai.com/account/api-keys. Copy the key to clipboard.
-
Create a file in the same directory as the examples_max.js, called
.env
-
Add a OpenAI API key to this file in the following format:
OPENAI_API_KEY=sk-w7YoV..rest...of...the...key
-
Run
script npm install
command in the patch -
Run
script start
command -
Add questions to the
gptinput
box, click on the box and wait the answer to appear ingptoutput
box.