@aiguestdj/openai-extension v1.0.1
AI Guest DJ Open AI Extension
This is the repository for an Open AI extension to work with AI Guest DJ. Using this extension you can create playlists using your own Open AI API key instead of using Chat GPT. In most scenario's it will deliver the playlists faster and it might also be a bit cheaper than using ChatGPT plus.
Docker installation
The easiest way to use this extension is by starting a docker container. Once up and running you will find the instance at http://[ipaddress]:9030. You can change the port number by setting the PORT
environment variable.
Open AI API key
Your Open AI API key is stored as an environment variable of the docker instance. You can find your API keys in your User settings of Open AI.
Binding volume
Binding a volume to the /app/config
folder enables persistant storage of the configuration files. Currently the configuration is used to monitor the last requests made to Open AI.
docker run -d \
-e PORT=9030 \
-e OPENAI_KEY=PASTE_YOUR_OPEN_AI_API_KEY_HERE \
-v /local/directory/:/app/config:rw \
--name=aiguestdj-openai \
--network=host \
--restart on-failure:4 \
aiguestdj/openai-extension
Manual installation
AI Guest DJ is built using NextJS so you should be running node 18
or higher. You can install and run this extension in two different ways.
Local
To install it in a specific folder/project run the following command.
npm install @aiguestdj/openai-extension
To start it use the npx
command.
OPENAI_KEY=PASTE_YOUR_OPEN_AI_API_KEY_HERE npx aiguestdj-openai
Global
To install it globally on your machine, run the following command.
npm install @aiguestdj/openai-extension -g
To start the Open AI extension run the following command. Once up and running you will find the instance at http://[ipaddress]:9030.
OPENAI_KEY=PASTE_YOUR_OPEN_AI_API_KEY_HERE aiguestdj-openai
Change Port number
You can change the port number by setting the PORT
environment variable.
OPENAI_KEY=PASTE_YOUR_OPEN_AI_API_KEY_HERE PORT=9020 aiguestdj-openai
Development
The extension is build using NextJS. So you can also checkout this repo and simply use the next commands like npm run dev
, npm run build
and npm run start
.
3 months ago