Git Product home page Git Product logo

waspros-'s Introduction

Primus

Chatbot for Telegram Business accounts running on Cloudflare Workers (WIP)

Features

  • AI-powered chatbot using Llama-3-70b model from Groq.com
  • Context-aware conversations
  • Random quote generation
  • Random image retrieval from NASA's image gallery
  • Random sticker sending
  • Random animated emoji sending
  • AI-generated images using Stable Diffusion XL Lightning
  • Wikipedia article summarization
  • Customizable system prompts for AI model
  • Custom Inline keyboard button generations with URLs
  • Cats!
  • Message effects!
  • donation option

Usage

Commands

  • /ask {query}: Get a response from the Llama-3-70b model (with context support)
  • /quote: Get a random quote
  • /img or image (or /img protect): Get a random image from the NASA image gallery
  • /sticker or sticker (or /sticker protect): Get a random sticker
  • /random or random (or /random protect): Get a random animated emoji
  • /gen {prompt} or generate... {prompt}: Generate an image using AI
  • /wiki {query}: Summarize a Wikipedia article
  • /cat: Get a cat fact
  • /url: Send a message with inline keyboard buttons for URLs (photoUrl is optional)
    /url [message text] [photoUrl]
    button_text - button_url
    
  • /set {system prompt}: Set a custom system prompt for the AI model (can be used on @thebotthatsucks_bot) (applies to the sender only use /clear to clear it)
  • /correct {text}: Correct and rewrite text using the Grammarly API (weird api, prefer /ask for this)
  • /clear: Clear the conversation history and custom system prompt.

API Keys

To run this bot, you'll need the following API keys:

  • Cloudflare: Get your API key from the Cloudflare dashboard and ACCOUNT ID
  • Telegram Bot Token: Create a new bot using @BotFather on Telegram and obtain the bot token
  • Groq API Key: Sign up on Groq.com and get your API key
  • NASA API Key: Get your API key from the NASA API website

Make sure to replace the placeholders BOT_TOKEN and API_KEY in the code with your actual API keys.

Usage

Copy the contents of worker.js (Or modify them) and paste in the cloudfare workers dashboard Set the webhook for your bot to your Cloudfare Workers url

Contributing

uh do stuff if you want to idc

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.