Claude & Bard Telegram Bot
This is a Telegram bot that intereacts with Anthropic Claude and Google Bard.
Before using this bot, you need to apply for access credentials for Claude and Bard respectively:
-
Obtain APIs: Claude (official) | Bard (reverse engineered)
If you only have access to one of the models, you can still continue to use this bot. Some functions may be limited due to lack of authorization for the other model.
Features
- Support of official Claude API and reverse engineered Bard API (command:
/mode
to switch between them) - Claude's streaming output (command:
/cutoff
to adjust the frequency of streaming, defaults to 50) - Modify Claude's model (defaults to v1.3) and temperature (defaults to 1) (commands:
/model
and/temp
) - Show reference links and Google search keywords from Bard's answers (button:
🔍 Google it
) - Switch between different drafts provided by Bard's answers (button:
📝 View other drafts
) - Support of partial Markdown
- Private chat, group chat, independent chat session,
invitation mode
Claude | Bard |
---|---|
✅ Non-English ✅ Streaming output ❌ Access to the Internet |
❌ Non-English ❌ Streaming output ✅ Access to the Internet |
![]() |
![]() |
Usage
-
Clone this repository.
-
Fill in
config/config.yml
with reference toconfig/config.example.yml
. -
Start the bot by:
-
Docker (with docker engine and docker-compose pre-installed):
docker-compose up --build
-
Scripts (with python >= 3.8 and python3-venv pre-installed):
# create the virtual environment bash scripts/setup.sh # start the bot bash scripts/run.sh
-
Acknowledgements
This code is based on Lakr233's ChatBot-TGLM6B.
The client library for Claude API is anthropics's anthropic-sdk-python.
The client library for Bard API is acheong08's Bard.
Huge thanks to them!!! 🥰🥰🥰