Giter VIP home page Giter VIP logo

zhdk-ai-workshop-bot's Introduction

Manual

Preparation

Clone the repository and paste your API-keys in the ".env-sampel" file, and rename it to ".env". You are going to need the following keys. For more information on how to use environmental variables see here.

Telegram key and bot configuration

A big thanks to zapisnicar for the description.

  1. Create Telegram bot:

    Search for user @BotFather in the Telegram app. Type /help in BotFather chat and wait for the reply. Type in the chat:

    /newbot

    or select /newbot command from the Help text. Answer a few setup questions:

    • Name of your bot? Write anything you like, that info will be shown in the contact details. For example:

    Dead Parrot

    • Username for your bot? Must have _bot at the end, use only Latin characters, numbers or underscore signs, for example:

    deadparrot_bot

    BotFather will give you an HTTP API token, remember it and keep SECRET! Example:

    1234567890:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    You should also consider turning the "group privacy" off. This can be done through @BotFather within Telegram. This allows the bot to have access to all messages from the group. See here.

  2. Create a new Telegram group in the web or mobile application and add the new bot to your group.

    https://web.telegram.org/

OpenAI Key

Check out the explanation on howtogeek.

HF Access Token

Check out the explanation on huggingface.

Installation

Install the required npm modules within the project folder.

npm install
npm i nodemon

Run the script with the following command.

npm run start

The bot should now be running and also provide a local backend for configuration on Port 3000. Open this link in any browser you prefer and set your desired context.

To make the bot fully work you must set a main group for scheduling actions. Therefore open Telegram, create a group, add your bot, and post /link. The group is now linked to the bot, which is allowing the bot to send messages to the group without prior interaction. You can change the main group at any time.

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.