n3d1117 is back! Use this.
2023.3.2 Use official ChatGPT API
A branch for bot to interact with chatgpt official api ( comes with acheong08 )
Customize the configuration by create a file named .env
, then editing the settings as desired:
OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
TELEGRAM_BOT_TOKEN="<YOUR_TELEGRAM_BOT_TOKEN>"
OPENAI_API_KEY
: Your OpenAI api key. Steps to follow
- Create account on OpenAI
- Go to https://platform.openai.com/account/api-keys
- Copy API key
Additional optional configuration values:
OPENAI_MODEL="<ANY_MODEL_AVAILABLE_FROM_OPENAI>" # Defaults to "gpt-3.5-turbo"
Create a file named docker-compose.yml
(same directory as .env
)
services:
chatgpt:
image: sheepgreen/chatgpt
container_name: chatgpt
volumes:
- ./.env:/home/appuser/.env
restart: always
Then run docker-compose up -d
,that's all!