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_chatpatch: -
Update
examples_max.jsfrom 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 installcommand in the patch -
Run
script startcommand -
Add questions to the
gptinputbox, click on the box and wait the answer to appear ingptoutputbox.
