ciuzaak / Claude-Telegram-Bot

Anthropic Claude & Google Bard Bot for Telegram.
MIT License
204 stars 85 forks source link

Switch to Claude3 models #29

Open moritzfl opened 7 months ago

moritzfl commented 7 months ago

This PR applies changes that make the switch to the new API needed for Claude3 models and removes support for the old models.

If you deem it to be necessary, we could do a conditional switch for older models to continue supporting them.

I had no luck with just doing a drop-in replacement of claude-instant-1.2 and claude-2.1 as the messages API generated far too much and continued the conversation by inserting futher questions from "H" (Human) and "A" (Anthrophic) without any of my doing.

tfactor2 commented 6 months ago

+1, @ciuzaak any plans to merge?

moritzfl commented 6 months ago

I have tried to use this bot with my changes "in production" for a week or so. While my initial tests were successful, I experienced errors in the middle of an answer sometimes. I was not aware of those issues or I would not have opened this PR.

So this might need further investigation before this PR gets merged.

In the end, I did implement my own chatbot from scratch in Java with vision support (only Claude 3 though). I am not sure whether I want to maintain it long term though and thus it is a private repository for now.

However, this does take away some motivation for me to further put in work here. I am willing to do so but only if a PR is in fact something that is wanted for this project.