Skip to content

This is a Discord Bot working as a reading assistant developed on top of Llama-index.

License

Notifications You must be signed in to change notification settings

WENXU-codinglife/ReadingAssisBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Question-Answer Bot: Personal Studying Assistant

This repository contains the code and instructions to build an AI-powered Discord bot that serves as a personal studying assistant. The bot uses LlamaIndex, an open-source Python library, and the discord.py library to provide question-answering capabilities within a Discord server.

Answers based on provided materials

A more detailed tutorial is here.

Getting Started

To set up the Discord bot and run it on your own server, follow these steps:

Prerequisites

  • Python3 installed on your machine
  • Discord account and a personal server
  • A Discord bot in the server and its token
  • OpenAI API key

Installation

  1. Clone the repository:

    git clone https://github.com/WENXU-codinglife/ReadingAssisBot.git
  2. Navigate to the project directory:

    cd ReadingAssisBot
  3. Create a virtual environment:

    python3 -m venv env
  4. Activate the virtual environment:

    For Windows:

    env\Scripts\activate

    For macOS/Linux:

    source env/bin/activate
  5. Install the required dependencies:

    pip install -r requirements.txt

Configuration

  1. Create a .env file in the project root.

  2. Open the .env file and add your OpenAI API key:

    OPENAI_API_KEY=your_api_key_here
    DISCORD_BOT_TOKEN=your_discord_bot_token_here

Running the Bot

python3 RABot.py

Usage

To interact with the bot, you can mention it in a Discord channel and ask questions. The bot will provide answers based on the provided data and materials. Make sure to feed the bot with relevant materials by following the instructions in the article.

License

This project is licensed under the MIT License.

About

This is a Discord Bot working as a reading assistant developed on top of Llama-index.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published