- Chat with AI using text or voice messages
- Keeps conversation context
- Simple command system
Chat with the bot on Telegram and use these commands:
/start
: Begin chatting/prompt
: Enter a custom text prompt or just send a voice message/clear
: Reset conversation/commands
: See available commands
You'll need:
- Go 1.22+
- OpenAI API key
- Telegram Bot Token
Steps:
- Clone the repo
- Run
go mod download
- Set your API keys as env variables or set via .env (see "envexample")
- Build with
go build -o gpt-helper .
- Run it:
./gpt-helper
- Build:
docker build -t gpt-helper .
- Run:
docker run -d --name gpt-helper \ -e OPENAI_API_KEY=your_key \ -e TELEGRAM_BOT_TOKEN=your_token \ gpt-helper
That's it! The bot should be up and running.
You can adjust these in telegram/bot.go
:
maxSessionCtxLength
: Max messages in contextrequestTimeout
: API request timeout