Coder Social home page Coder Social logo

shamspias / customizable-gpt-chatbot Goto Github PK

View Code? Open in Web Editor NEW
345.0 11.0 82.0 235 KB

A dynamic, scalable AI chatbot built with Django REST framework, supporting custom training from PDFs, documents, websites, and YouTube videos. Leveraging OpenAI's GPT-3.5, Pinecone, FAISS, and Celery for seamless integration and performance.

Python 99.56% HTML 0.44%
artificial-intelligence chatbot data-preprocessing django django-rest-framework gpt-3 machine-learning nlp python conversational-ai

customizable-gpt-chatbot's Introduction

Dynamic AI Chatbot with Custom Training Sources

Customizable-gpt-chatbot

This project is a dynamic AI chatbot that can be trained from various sources, such as PDFs, documents, websites, and YouTube videos. It uses a user system with social authentication through Google, and the Django REST framework for its backend. The chatbot leverages OpenAI's GPT-3.5 language model to conduct conversations and is designed for scalability and ease of use.

Features

  • Train chatbot from multiple sources (PDFs, documents, websites, YouTube videos)
  • User system with social authentication through Google
  • Connect with OpenAI GPT-3.5 language model for conversation
  • Use Pinecone and FAISS for vector indexing
  • Employ OpenAI's text-embedding-ada-002 for text embedding
  • Python Langchain library for file processing and text conversion
  • Scalable architecture with separate settings for local, staging, and production environments
  • Dynamic site settings for title and prompt updates
  • Multilingual support
  • PostgreSQL database support
  • Celery task scheduler with Redis and AWS SQS options
  • AWS S3 bucket support for scalable hosting
  • Easy deployment on Heroku or AWS

Technologies

  • Language: Python
  • Framework: Django REST Framework
  • Database: PostgreSQL

Major Libraries:

  • Celery
  • Langchain
  • OpenAI
  • Pinecone
  • FAISS

Requirements

  • Python 3.8 or above
  • Django 4.1 or above
  • Pinecone API Key
  • API key from OpenAI
  • Redis or AWS SQS
  • PostgreSQL database

Future Scope

  • Integration with more third-party services for authentication
  • Support for additional file formats and media types for chatbot training
  • Improved context-awareness in conversations
  • Enhanced multilingual support with automatic language detection
  • Integration with popular messaging platforms and chat applications

How to run

  • Clone the repository. git clone https://github.com/shamspias/customizable-gpt-chatbot
  • Install the required packages by running pip install -r requirements.txt
  • Run celery celery -A config worker --loglevel=info
  • Run the command python manage.py runserver
  • Open http://127.0.0.1:8000/ in your browser

In linux and mac need to install 'sudo apt install python3-dev -y`

  1. Make sure that you have the development libraries for libcurl installed on your system. You can install them by running the following command: sudo apt-get install libcurl4-openssl-dev gcc libssl-dev -y
  2. Make sure that you have the latest version of pip and setuptools installed by running the following command: pip install --upgrade pip setuptools
  3. pip install pycurl

Deployment

The chatbot can be deployed on Heroku or AWS by following the standard procedures for Django deployment on these platforms.

Issues

  • If you don't use AWS SQS then no need to install pycurl and boto3 packages.
  • If you don't use AWS S3 then no need to install django-storages package.

Note

Make sure that you have API key from OpenAI before running the project.

This is just a basic implementation of the project, you can always add more features and customization according to your requirement.

Enjoy!

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.