2024-05-13 16:41:49 +00:00
# OpenWebUI-Telegram
🤖 A Telegram bot that integrates with OpenWeb UI's OpenAI compatible APIs to provide chat functionality.
## Configuration
2024-05-20 15:31:07 +00:00
The configuration is loaded a yaml file, en example is provided in `example.yaml` and should be self-explanatory, it has to be stored in `config.yaml` under either:
2024-05-13 16:41:49 +00:00
2024-05-20 15:31:07 +00:00
- current directory
- `data` directory
- `config` directory
- `data/config` directory
2024-05-13 16:41:49 +00:00
## Usage
Only private chat is tested as of now.
### Chatting
If you send messages without a reply, bot treats that as starting a new chat / thread. To continue a chat / thread, reply to the last (or previous) message you want to pick up the conversation from.
### Commands
2024-05-20 15:31:07 +00:00
The bot supports three commands:
2024-05-13 16:41:49 +00:00
1. To set system prompt, use `/reset <system prompt>` .
- The default system prompt is `You are a friendly assistant` .
- Once you set a custom system prompt, it will remain set until you either change it or bot is restarted.
2024-05-20 15:31:07 +00:00
- This takes effect immediately after you set it, even in earlier conversations.
2. To regenerate a response, reply to the message you want to regenerate from and send `/resend` .
2024-05-13 16:41:49 +00:00
- Once the bot is restarted, the conversation history is lost and thread can't be continued.
2024-05-20 15:31:07 +00:00
3. To change the model being used, use `/models` .
- It will present you with the available model, friendly names and basic config.
- Select the model using the inline keyboard.
- This takes effect immediately after you set it, even in earlier conversations.
2024-05-13 16:41:49 +00:00
2024-05-13 16:52:19 +00:00
## How to run
2024-05-13 18:33:02 +00:00
### Docker Compose
2024-05-20 15:31:07 +00:00
Copy the docker-compose.yml in this repo, create your config file in `data/config/config.yaml` and run:
2024-05-13 18:33:02 +00:00
```bash
docker compose up
```
### Shell
2024-05-20 15:31:07 +00:00
In the shell, you can just do:
2024-05-13 16:52:19 +00:00
```bash
2024-05-20 15:31:07 +00:00
make serve
2024-05-13 16:52:19 +00:00
```
2024-05-13 16:41:49 +00:00
## Contributing
Contributions are welcome. Please submit a pull request or create an issue if you have any improvements or suggestions.