Giter Site home page Giter Site logo

mortezahtgamer / claude-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sabber-slt/claude-telegram-bot

0.0 0.0 0.0 19 KB

This is a simple Telegram bot that uses the Claude AI API for natural language conversations.

Home Page: https://sabber.dev

JavaScript 93.70% Dockerfile 6.30%

claude-telegram-bot's Introduction

Claude 2 AI Telegram Bot

This is a simple Telegram bot that uses the Claude AI API for natural language conversations.

Since Anthropic has been reluctant to provide API access unless you're a major org, the only way to access Claude is through the unofficial API. Note that this is unstable as they may push breaking changes and there is risk of your account being banned, for which I will not be liable.

Features

  • Starts a new Claude AI conversation when a user first messages the bot
  • Saves the conversation ID to link future messages from the same user
  • Allows deleting the conversation history with the /delete command
  • The app is configured to run in a Docker container for easy deployment and portability

How to install ?

Get sessionKey from the sessionKey cookie via the Claude website.

const claude = new Claude({
  sessionKey: 'YOUR_SESSION_KEY'
});

with docker you should first install docker and docker-compose and then run the following command:

docker-compose up -d
  • Sign up for a Claude AI account and get an API key
  • Second acquire telegram token from the BOTFATHER. Telegram token
  • Clone This repo
  • Cd claude-telegram
  • Put your api keys in .env
  • If you have installed docker in your system just run docker-compose up -d and ignore rest
  • To install all modules yarn
  • To run developer server yarn dev
  • You can install pm2 globally before deploying. yarn add pm2 -g
  • Then run pm2 start index.js

API KEYS

BOT_TOKEN= "your telegram api key"
SESSION= "your claude seesion"

claude-telegram-bot's People

Contributors

sabber-slt avatar

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.