Files
chatgpt-telegram-bot/.env.example
2023-03-14 19:04:39 +01:00

39 lines
1.3 KiB
Plaintext

# Your OpenAI API key
OPENAI_API_KEY="XXX"
# Your Telegram bot token obtained using @BotFather
TELEGRAM_BOT_TOKEN="XXX"
# Comma separated list of telegram user IDs, or * to allow all
ALLOWED_TELEGRAM_USER_IDS="USER_ID_1,USER_ID_2"
# A system message that sets the tone and controls the behavior of the assistant
ASSISTANT_PROMPT="You are a helpful assistant."
# Whether to show OpenAI token usage information after each response
SHOW_USAGE=false
# Upper bound on how many tokens the ChatGPT API will return
MAX_TOKENS=1200
# Max number of messages to keep in memory, after which the conversation will be summarised
MAX_HISTORY_SIZE=10
# Max minutes a conversation will live, after which the conversation will be reset to avoid excessive token usage
MAX_CONVERSATION_AGE_MINUTES=180
# Whether to answer to voice messages with the transcript or with a ChatGPT response of the transcript
VOICE_REPLY_WITH_TRANSCRIPT_ONLY=true
# Group Trigger Keyword
GROUP_TRIGGER_KEYWORD=""
# USD-price per 1000 tokens for cost information in usage statistics, see https://openai.com/pricing
TOKEN_PRICE=0.002
# USD-prices per image for the sizes 256x256,512x512,1024x1024 for cost information in usage statistics
IMAGE_PRICES="0.016,0.018,0.02"
# USD-price for 1 minute of audio transcription for cost information in usage statistics
TRANSCRIPTION_PRICE=0.006