Telegram chat bot for accessing various LLM services in one place
632
A delightful Telegram AI chat bot powered for aggregating models and API providers. đ
If you're not sure where to start, check out cheahjs/free-llm-api-resourcesâ for a wealth of LLM API resources, and visit Telegram Botsâ for guidance on creating your own bot.
/path/to/data:mkdir -p /path/to/data
Create a configuration file config.toml in /path/to/data. The configuration file's name must be config.toml, not any other name. Please refer to asset/example_config.tomlâ for an example configuration.
Run the Docker container (replace /path/to/data with the real data directory path):
sudo docker run -d \
--name ichigod \
-v /path/to/data:/etc/ichigod \
-e ICHIGOD_DATA_DIR=/etc/ichigod \
--restart unless-stopped \
dockerrewired/ichigo-bot:latest
/chat - Chat with Ichigo (Can be omitted in private messages)/new - Start a new conversation/set - Switch to a different model/list - Show available models/list_prompts - List available system prompts/undo - Remove last conversation round/stop - Stop the current response/set_temp - Set text completion temperature/set_prompt - Set system prompt/help - Get the list of commandsAdmin Commands:
/get_config - View current configuration/set_config - Update configuration and shutdown/clear - Clear data/tidy - Auto delete sessions and chat records whose IDs no longer existtelegramify-markdown package installedmake build
That's it! Assume the built binary is /project_root/target/ichigod.
/usr/bin and grant necessary permissions:# Example commands
sudo chmod a+rx /project_root/target/ichigod
sudo cp -f /project_root/target/ichigod /usr/bin/ichigod
/etc/ichigod:# Example commands
sudo mkdir -p /etc/ichigod
Create a configuration file config.toml in /etc/ichigod. The configuration file's name must be config.toml, not any other name. Please refer to asset/example_config.tomlâ for an example configuration.
Create a Python virtual environment with telegramify-markdown installed in /etc/ichigod/venv:
# Example commands
cd /etc/ichigod
python3 -m venv venv
source venv/bin/activate
pip install telegramify-markdown
/etc/systemd/system/ichigod.service:# Example service unit
[Unit]
Description=Ichigo Telegram Bot Service
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/ichigod
Restart=always
RestartSec=5
Environment="ICHIGOD_DATA_DIR=/etc/ichigod"
Environment="PATH=/etc/ichigod/venv/bin"
[Install]
WantedBy=multi-user.target
# Example commands
sudo systemctl daemon-reload
sudo systemctl enable ichigod
sudo systemctl start ichigod
# Example commands
sudo journalctl -u ichigod.service | tail -8
# Example outputs
# <redacted> systemd[1]: Started ichigod.service - Ichigo Telegram Bot Service.
# <redacted> ichigod[202711]: <redacted> INFO starting ichigod
# <redacted> ichigod[202711]: <redacted> INFO initializing bot service
# <redacted> ichigod[202711]: <redacted> INFO bot API client initialized username=<redacted> debug_mode=false
Development commands:
make dev # Run in development mode
make debug # Run with debugger
make build # Build for current platform
make build_x64 # Build for Linux x64
The bot looks for config.toml in these locations:
$ICHIGOD_DATA_DIR/etc/ichigod/$HOME/.config/ichigod/Content type
Image
Digest
sha256:a2efe0724âĻ
Size
28.9 MB
Last updated
over 1 year ago
docker pull dockerrewired/ichigo-bot