Go to file
Sid Sun e6b7b57394 Introduce /models command to change model mid-conversation
Signed-off-by: Sid Sun <sid@sidsun.com>
2024-05-20 21:01:07 +05:30
cmd Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
pkg/bot Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
store Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
.gitignore Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
Dockerfile refactor MessageLink: clean up unused prop and optimize insert message 2024-05-16 00:44:09 +05:30
LICENSE Create LICENSE 2024-05-13 22:13:38 +05:30
Makefile remove unused const 2024-05-14 00:07:36 +05:30
README.md Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
docker-compose.yml Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
example.yaml Introduce /models command to change model mid-conversation 2024-05-20 21:01:07 +05:30
go.mod Use viper for config 2024-05-13 21:41:41 +05:30
go.sum Use viper for config 2024-05-13 21:41:41 +05:30

README.md

OpenWebUI-Telegram

🤖 A Telegram bot that integrates with OpenWeb UI's OpenAI compatible APIs to provide chat functionality.

Configuration

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:

  • current directory
  • data directory
  • config directory
  • data/config directory

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

The bot supports three commands:

  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.
    • 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.
    • Once the bot is restarted, the conversation history is lost and thread can't be continued.
  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.

How to run

Docker Compose

Copy the docker-compose.yml in this repo, create your config file in data/config/config.yaml and run:

docker compose up

Shell

In the shell, you can just do:

make serve

Contributing

Contributions are welcome. Please submit a pull request or create an issue if you have any improvements or suggestions.