Coder Social home page Coder Social logo

ciuzaak / claude-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW
204.0 204.0 89.0 75 KB

Anthropic Claude & Google Bard Bot for Telegram.

License: MIT License

Python 97.37% Shell 1.36% Dockerfile 1.28%
anthropic bard bot chatbot claude claude-ai google-bard gpt telegram telegram-bot

claude-telegram-bot's Introduction

Welcome to Ciuzaak Wong's GitHub! ๐Ÿ‘‹

Hello there! I'm Ciuzaak Wong. Thanks for stopping by my GitHub profile! Here you'll find various projects and repositories related to my research interests. ๐Ÿš€

๐Ÿ“Œ About Me

  • Name: Ciuzaak Wong
  • Contact: ๐Ÿ“ธ Instagram - @ciuzaak

๐Ÿ” Research Interests

  • Computer Vision ๐Ÿ–ผ๏ธ: Delving deep into the world of images, videos, and understanding visual information.
  • AIGC ๐ŸŽฎ: Dedicated to advancing the field and exploring new horizons.

๐Ÿ’Œ Get in Touch

Feel free to reach out to me on Instagram for collaborations, inquiries, or just a friendly chat!


๐Ÿ’ก Remember: The best way to predict the future is to create it. Keep coding and exploring! ๐ŸŒ

Ciuzaak's github stats Top Langs

claude-telegram-bot's People

Contributors

ciuzaak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

claude-telegram-bot's Issues

Bard only access not giving responses

I have access to Bard but not Claude and it doesn't return any response if I change mode using /mode

Any easy way to figure out what exactly is wrong?

๐Ÿ“– Tutorial

Deploy on Zeabur

  1. Fork this repo.

  2. Create a new project in Zeabur.

image-20230519192134168

  1. Add a service from git.

image-20230519192226116

  1. In Variable - Edit Raw Variables, input the following information and save (delete CLAUDE_API or BARD_API if you don't have that):
BOT_TOKEN=your bot token
USER_IDS=user_id1, user_id2,...
CLAUDE_API=your claude api
BARD_API=__Secure-1PSID, __Secure-1PSIDTS
  1. Click Redeploy.

need help

i failed to sign in "https://console.anthropic.com/claude"
erros shows "You do not currently have a valid Anthropic account. You may need to accept your invite: check for an email with the subject โ€œYour invitation to Claude, from Anthropicโ€ and click the link there."

so , is that means i need someonelse' invitation?

Get configuration from environment variables

@ciuzaak Thank you for your excellent work, I have deployed a Telegram bot using your code, it works great!

But I stiil have some problem, for some reason, my deployment platform only supports configurate through environment variables when deploying Github project. So I have to fork this project and modify the way to obtain config , but after doing this, I have to sync with your updates manually every time.

So is it possible to add a way to obtain the config from environment variables? I think it may also help others people like me.

can you add a new feature

Can you add new feature like image understanding if anyone sends images in bard it understand the image can you add it in this bot also

ModuleNotFoundError: No module named 'Bard'

When running my Telegram bot script (bot.py), I encountered a ModuleNotFoundError for the 'Bard' module in the bard_utils.py file. This occurred because the required module was not installed or properly imported.
image

i use wsl ubuntu 22

How do I disable stream?

Hi!
I installed the bot in telegram, but sometimes an error occurs โŒ Error orrured: Flood control exceeded. Retry in 31 seconds. /reset.

I think it's because of the stream function.
How can it be disabled to check it?

Error orrurred, please try again later. Your chat history has been reset.

When I am use Telegram Bot sent massage, error:

"Error orrurred, please try again later. Your chat history has been reset.", 

Error in Docker:

[+] bot started, calling loop!
[e] ('post request failed with status code: 401', {'detail': 'Invalid API Key'}) 

I'm sure my Google Bard cookie __Secure-1PSID value is correct. so how to do?
Thanks.

Help

โŒ Error orrurred: list index out of range. /reset

Error orrurred: 'factualityQueries'.

My bard cookie key is up-to-date. After configuring it in the config file and using the bot for approximately 3 messages, it works fine. However, it consistently responds with the error message 'Error occurred: factualityQueries' afterwards.

Please fix it. Thanks.

Request to Modify Message Sending Functionality in Claude-Telegram-Bot

Hello,

I have been using your Claude-Telegram-Bot and I am quite satisfied with its functionality. However, I have come across a requirement that I believe could be a valuable addition to the bot's capabilities.

Currently, when the bot is required to send a long message (more than 4000 characters) or to forward a code file, it attempts to send it as a text message. This can cause issues due to the maximum limit of characters in a single message imposed by Telegram.

I propose a modification to the bot's sending functionality. When a message exceeds 4000 characters or when a file needs to be forwarded, the bot could write the content to a file and send it as a document instead of a text message.

The modification could look something like this in the code:

def send_message_or_file(update, text):
if len(text) <= 4000:
bot.send_message(chat_id=update.effective_chat.id, text=text)
else:
with open('message.txt', 'w') as f:
f.write(text)
with open('message.txt', 'rb') as doc:
bot.send_document(chat_id=update.effective_chat.id, document=doc)

This function would replace all occurrences of bot.send_message.

I believe this would be a valuable enhancement to the bot's functionality, allowing it to handle longer texts and file forwarding more effectively. Could you consider implementing this change, or guide me through doing it myself if it aligns with the project's direction?

Thank you for considering my suggestion. I look forward to hearing your thoughts.

Best regards,
Ruslan
Projekt Xamelion AG

โŒ Error orrurred: Response code not 200. Response Status is 403

Hey there. I have run the bot but I got the following error:
โŒ Error orrurred: Response code not 200. Response Status is 403. /reset

This is how I set my config.yml file:

telegram:
  bot_token: MY-BOT-TOKEN
  user_ids: [123456789, 987654321]
claude:
  api: # leave it blank if you don't want to use claude
bard:
  api: ZAjHY4Pn_SOMEVALUEwFEw., sidts-SOMEVALUE_LXGRmuSA

As the format says

  • __Secure-1PSID, __Secure-1PSIDTS

This is exactly how I did it but it does not work.
Thanks for your time

can you give a example for config.yml, pls?

hi, can you give a example for config.yml, pls?

my config looks like the following text but it dont works...:

telegram:
bot_token: XXX0496345:AAGnLNDPXXXXKvfhGVaK5UtwQg4bWIUXXXX
user_ids: [6196040247]
claude:
api: CLAUDE_API_KEY # leave it blank if you don't want to use claude
bard:
api: BARD_API_KEY (cwiEUiWHK5jbDqZXXXXXXXXXXnb-5sFeoizjrKnv9RJOxuxVEcXXXXXXXdQ., sidts-CjEBNiGH7qqdwnouZdEexVZALfIGMYHQ_rJkP7S66XXXXXXX)

Help

how allow access to all users?

use '/mode' change bard no response

Hi, Fast Restoration problem:

  1. Telegram send message
/mode
  1. Docker container log error
[+] bot started, calling loop!

[e] 'NoneType' object has no attribute 'group'

My environment:
There is currently no Claude API, so the option is left blank.
Only the Bard API is filled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.