(Translated by https://www.hiragana.jp/)
GitHub - LauzHack/apis-telegram: Workshop for making a Telegram bot and using APIs.
Skip to content

LauzHack/apis-telegram

Repository files navigation

Telegram bots and APIs, SLIDES

First used at a mini-hackathon (Nov 11, 2023).

Slides and recordings can be found here: https://go.epfl.ch/telegram-apis

Installation

# 1) create and activate virtual environment
# -- EITHER with conda
conda create -n apis_env python=3.11
conda activate apis_env
# -- OR with venv
python3.11 -m venv apis_env
source apis_env/bin/activate

# 2) install dependencies
(apis_env) pip install -r requirements.txt

Usage

  1. Follow along the slides on making a Telegram bot and APIs: link.
  2. Dive deeper with a specific bot - PaperBoat - to learn about about OpenAI, LangChain, and scrapping: link.

On IC Cluster (RunAI)

From root of this repo, create a pod:

python csub.py -n sandbox
# runai list   # to check the status

# when it is running, connect to pod to be insite a Terminal!
runai exec sandbox -it -- zsh

# clone repo inside home folder
cd /mloscratch/<your_username>
git clone https://github.com/<your username>/apis-telegram.git
cd apis-telegram

# install dependencies
pip install -r requirements.txt

Connecting with VScode: https://github.com/epfml/getting-started-lauzhack/?tab=readme-ov-file#using-vscode

Launching bot!

python3 telegram_gpt.py