Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.51 KB

File metadata and controls

62 lines (40 loc) · 2.51 KB

OpenAI Assistant Telegram Bot Template

Introduction

This repository contains a template project for connecting a Telegram bot to the OpenAI Assistant API. It was developed as a proof of concept during an Hack4AI hosted by https://www.startuphouse.lv/.

It was made by team Orbit8

The core functionality of this bot is to demonstrate how to integrate Telegram with the OpenAI Assistant, making it a versatile starting point for developers looking to create their own AI-powered Telegram bots. The specific actions and responses of the bot can be customized according to the OpenAI Assistant prompts configured by the developer.

Diagram

pako_enqvvg1r2zaq_itcdnabgzw7bhldpnttugx2epovtmeyin1jtdlskp2bzqx_fsfzcv5ib_smn-55nrvnznrkus6ap_yif6evcqnazioxlfgcgysei3kuwrgruq_ydhafoninbrowr1dcwoikvduymkek9muj6nzmzq2vfovcdj4zz4oij2csvie1x2w8qzqijlvqffrhmvr3ttqslepn8bb2nhozf-wkm64tqvxz3qo

Features

  • Template for setting up a Telegram bot integrated with the OpenAI Assistant API. .
  • Simple setup process for quick deployment and testing.

Technologies Used

  • Node.js
  • Telegram Bot API
  • OpenAI Assistant API

Setup and Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/openai-assistant-telegram-bot-node-js.git
  2. Navigate to the project directory:
    cd openai-assistant-telegram-bot-node-js
  3. Install the necessary dependencies:
    npm install
  4. Start the bot:
    npm run start
    The start script will guide you through the setup process, including configuring the necessary API keys and other settings.

Usage

After starting the bot, it will be running and listening for messages. The behavior and responses of the bot can be customized by modifying the OpenAI Assistant prompts within the code. Experiment with different prompts to achieve the desired functionality and interactions.

TODOs

  • what thing we wanted to add was streaming. Currently we wait for full response which is slow. Would be nice to do streaming and already send messages to Telegram as parts come in

Contributing

Contributions to this template are welcome! Please feel free to fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.