{"id":13456827,"url":"https://github.com/ciuzaak/Claude-Telegram-Bot","last_synced_at":"2025-03-24T11:31:30.990Z","repository":{"id":153041257,"uuid":"623881040","full_name":"ciuzaak/Claude-Telegram-Bot","owner":"ciuzaak","description":"Anthropic Claude \u0026 Google Bard Bot for Telegram.","archived":true,"fork":false,"pushed_at":"2024-03-10T16:25:55.000Z","size":75,"stargazers_count":204,"open_issues_count":12,"forks_count":85,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T00:32:22.294Z","etag":null,"topics":["anthropic","bard","bot","chatbot","claude","claude-ai","google-bard","gpt","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ciuzaak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-05T09:36:52.000Z","updated_at":"2024-10-11T06:45:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"51f01a43-982e-4025-9602-8d7d5a8d5a5e","html_url":"https://github.com/ciuzaak/Claude-Telegram-Bot","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciuzaak%2FClaude-Telegram-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciuzaak%2FClaude-Telegram-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciuzaak%2FClaude-Telegram-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciuzaak%2FClaude-Telegram-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ciuzaak","download_url":"https://codeload.github.com/ciuzaak/Claude-Telegram-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260900,"owners_count":20586496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","bard","bot","chatbot","claude","claude-ai","google-bard","gpt","telegram","telegram-bot"],"created_at":"2024-07-31T08:01:28.469Z","updated_at":"2025-03-24T11:31:30.691Z","avatar_url":"https://github.com/ciuzaak.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Claude \u0026 Bard Telegram Bot\n\nThis is a Telegram bot that intereacts with **Anthropic Claude** and **Google Bard**.\n\n- Obtain APIs: [Claude (official)](https://console.anthropic.com/account/keys) | [Bard (reverse engineered)](https://github.com/acheong08/Bard#authentication)\n\nIf 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.\n\n## Features\n\n- Support of official Claude API and reverse engineered Bard API\n- Support of partial Markdown formatting\n- Send extremely long inputs in segments\n- Resend the question and regenerate the answer\n- Private chat, group chat, independent chat session\n- **Claude only**:\n  - Streaming output\n  - Modify model's version and temperature\n- **Bard only**:\n  - Toogle between different draft responses\n  - View reference links and Google Search keywords\n  - View images from Google Search\n\n|                                                                     Claude                                                                      |                                                             Bard                                                              |\n| :---------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: |\n|                                                ✅ Streaming output \u003cbr\u003e ❌ Access to the Internet                                                 |                                       ❌ Streaming output \u003cbr\u003e ✅ Access to the Internet                                        |\n| \u003cimg src=\"https://user-images.githubusercontent.com/41275670/234178910-422cc3cd-b1bf-4c06-bc51-7c75c0b71b35.gif\" alt=\"demo_claude\" width=\"288\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/41275670/234179231-ed955dec-a75c-432f-9ec1-44c419998ffd.gif\" width=\"288\"\u003e |\n\n## Getting Started\n\n### [Deployment (Zeabur)](https://github.com/ciuzaak/Claude-Telegram-Bot/issues/10#issue-1717101083)\n\n### Deployment (Local)\n\n1. Clone this repository.\n\n2. Configure the bot in the following two ways:\n   1. **Create `config/config.yml`** and fill in the information with reference to `config/config.example.yml`.\n   2. or **Set environment variables:**\n\n      ```bash\n      export BOT_TOKEN=\"your bot token\"\n      export USER_IDS=\"user_id1, user_id2,...\"\n      export CLAUDE_API=\"your claude api\" # ignore it if you don't want to use claude\n      export BARD_API=\"__Secure-1PSID, __Secure-1PSIDTS\" # ignore it if you don't want to use bard\n      ```\n\n    - [How to obtain telegram bot token](https://core.telegram.org/bots/tutorial#obtain-your-bot-token)\n    - [How to obtain telegram user id](https://bigone.zendesk.com/hc/en-us/articles/360008014894-How-to-get-the-Telegram-user-ID-)\n\n3. Start the bot in the following two ways:\n    1. **Docker** (with docker engine pre-installed):\n\n        ```bash\n        docker compose up\n        ```\n\n    2. or **Scripts** (with python \u003e= 3.8 and python3-venv pre-installed):\n\n        ```bash\n        # create the virtual environment\n        bash scripts/setup.sh\n\n        # start the bot\n        bash scripts/run.sh\n        ```\n\n### Usage\n\n#### Commands\n\n- `/id`: get your chat identifier\n- `/start`: start the bot and get help message\n- `/help`: get help message\n- `/reset`: reset the chat history\n- `/settings`: show Claude \u0026 Bard settings\n- `/mode`: switch between Claude and Bard\n- `/model NAME`: change model (**Claude only**)\n  - **Options:**\n            claude-2,\n            claude-instant-1\n- `/temp VALUE`: set temperature (**Claude only**)\n  - **Range:** float in [0, 1]\n  - **Impact:** amount of randomness injected into the response\n  - **Suggestion:** temp closer to 0 for analytical / multiple choice, and temp closer to 1 for creative and generative tasks\n- `/cutoff VALUE`: adjust cutoff (**Claude only**)\n  - **Range:** int \u003e 0\n  - **Impact:**: smaller cutoff indicates higher frequency of streaming output\n  - **Suggestion:** 50 for private chat, 150 for group chat\n- `/seg`: send messages in segments, example below:\n    1. Send `/seg` first\n    2. Paste a long text and send (or send a series of text in segments)\n    3. Input your other questions and send\n    4. Send `/seg` again\n    5. Bot will respond and you can continue the conversation\n- `/retry`: regenerate the answer. Use `/retry TEXT` to modify your last input.\n\n#### Others\n\n- `📝 View other drafts`: click to see other drafts (**Bard Only**)\n- `🔍 Google it`: click to view the search results (**Bard Only**)\n\n## Acknowledgements\n\nThis code is based on [Lakr233's ChatBot-TGLM6B](https://github.com/Lakr233/ChatBot-TGLM6B).\n\nThe client library for Claude API is [anthropics's anthropic-sdk-python](https://github.com/anthropics/anthropic-sdk-python).\n\nThe client library for Bard API is [acheong08's Bard](https://github.com/acheong08/Bard).\n\nHuge thanks to them!!! 🥰🥰🥰\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciuzaak%2FClaude-Telegram-Bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciuzaak%2FClaude-Telegram-Bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciuzaak%2FClaude-Telegram-Bot/lists"}