OpenAI GPT wrapper for translating Piemanese to English. Continuation of piemanese-translator.
Set the environment variables:
export DISCORD_API_TOKEN=...
export DISCORD_USER_IDS=... # comma-separated list of user ids
export OPENAI_API_KEY=...
export OPENAI_PROMPT=... # path to text file or a text string
Start the bot:
python3 bot.py
Build and push image:
gcloud builds submit --pack image=gcr.io/piemanese-translator/bot-job
Then, upload prompt to ~/prompts/prompt.txt
, add volume mounts, and set environment variables accordingly.
Finally, restart the VM instance.