Giter VIP home page Giter VIP logo

uvaliyev / calendar-assist Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 136 KB

An intelligent event scheduling bot powered by OpenAI's GPT-3.5. This bot uses NLP to create calendar events from user-specified details. Currently integrated with Telegram for command reception and Cronofy for event scheduling, Calendar Assist makes planning and organizing your events easier than ever.

License: MIT License

Python 100.00%

calendar-assist's Introduction

Calendar Assist Project

This is a Python project that includes a script to schedule an event on a calendar via a bot on the Telegram platform.

The bot uses the GPT-3.5-turbo model from OpenAI to process natural language commands and convert them into JSON-based calendar event data. This data is then sent to a specific calendar using the Cronofy API.

Screenshot

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.6+
  • pip
  • A Cronofy account for calendar management
  • A Telegram account to setup the bot
  • An OpenAI account for accessing the GPT-3.5-turbo model

Installation

  1. Clone the repo

    git clone https://github.com/qcanser/calendar-assist.git
    
  2. Navigate into the cloned directory

    cd calendar-assist
    
  3. Install the required packages

    pip install -r requirements.txt
    
  4. Set up your environment variables. Create a .env file in the root directory of your project, and update it with your own credentials:

    ACCESS_TOKEN=<your cronofy access token>
    CLIENT_SECRET=<your cronofy client secret>
    CALENDAR_ID=<your cronofy calendar id>
    OPENAI_API=<your OpenAI api key>
    API_ID=<your telegram api id>
    API_HASH=<your telegram api hash>
    BOT_TOKEN=<your telegram bot token>
    ALLOWED_USER=<username of the user allowed to use the bot>
    

Running

Run the Telegram bot with the following command:

python3 pybot.py

Usage

Once the bot is running, you can interact with it on Telegram.

  • Use /start to initiate conversation with the bot.
  • Use /schedule <event details> to schedule an event.

Example:

/schedule Schedule me a Board meeting in the Board room, describing Discuss plans for the next quarter, for July 16, from 21:30 to 23:00 (UTC+6).

The bot will respond with a confirmation after successfully scheduling the event.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

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

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.