Skip to content

Developed a web app using LLM models, Langchain, and chatbots for PDF interactions. Users upload PDFs and ask questions, receiving instant chatbot responses for efficient content retrieval.

License

Notifications You must be signed in to change notification settings

Amanastel/PDF_Based_Chatbot_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat World

Introduction

This Django project demonstrates how to create a custom user model and define related models for user profiles, PDF documents, and chat messages.

Features

List out the key features of your application.

  • Advanced Chatbot Integration: Utilizes cutting-edge Generative AI and advanced language models to power a chatbot that enables users to interact with uploaded PDF documents.

  • PDF Document Upload: Allows users to upload PDF files, making them accessible for content-based queries.

  • Real-time Responses: Provides real-time chatbot responses to user queries about the content of uploaded PDF documents.

  • Responsive UI: Implements a responsive user interface, ensuring a seamless experience across various devices for enhanced accessibility.

  • Chat History: Designed and implemented a chat history feature, allowing users to revisit previous conversations with the chatbot, fostering a user-friendly interaction.

  • Technology Stack: Employed Python, Django, PyPDF2, chatbot frameworks, LLM, openAI, and natural language processing libraries to architect and develop this solo project, demonstrating proficiency in these industry-standard technologies.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python (3.x) installed on your system.
  • Django installed (pip install Django).
  • Langchain library installed (pip install langchain).
  • PyPDF2 library installed (pip install PyPDF2).
  • OpenAI API key (set it as an environment variable named OPENAI_API_KEY).

Screenshots

Home Page

Home Page

Why choose AI

Our Services Page

Upload PDF Document

Upload PDF Document

Chat History

Chat History

Getting Started

Installation & Getting started

Detailed instructions on how to install, configure, and get the project running.

1. Clone the repository: `git clone https://github.com/amanastel/PDF_Based_Chatbot_AI.git`
2. Navigate to the project directory: `cd PDF_Based_Chatbot_AI`
3. Create a virtual environment: `python3 -m venv venv`
4. Activate the virtual environment: `source venv/bin/activate`
5. Install dependencies: `pip install -r requirements.txt`
6. Apply database migrations: `python manage.py migrate`
7. Create a superuser: `python manage.py createsuperuser`
8. Run the development server: `python manage.py runserver`

APIs Used

  1. Create a superuser to access the admin panel: python manage.py createsuperuser
  2. Start the development server: python manage.py runserver
  3. Access the admin panel at: http://localhost:8000/admin/
  4. Use the admin panel to manage users, profiles, PDF documents, and chat messages.

API Endpoints

  • User Registration: POST /api/register/
  • User Login: POST /api/login/
  • User Profile: GET /api/profile/
  • Upload PDF Document: POST /api/upload-pdf/
  • List PDF Documents: GET /api/pdf-documents/
  • Create Chat Message: POST /api/chat/create/
  • List Chat Messages: GET /api/chat/list/

Custom User Serializer

You can find the CustomUserSerializer in the serializers.py file under the llmApp app directory. This serializer is used for user registration and login.

Models

  • CustomProfile: Represents user profiles with extended fields (phone and address).
  • PDFDocument: Represents uploaded PDF documents associated with users.
  • ChatMessage: Represents chat messages with timestamps.

Technology Stack

List and provide a brief overview of the technologies used in the project.

  • Django
  • Python
  • Langchain
  • MySQL
  • Vue

Contributing

Contributions are welcome! If you find any issues or want to add new features, feel free to open a pull request.

License

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

About

Developed a web app using LLM models, Langchain, and chatbots for PDF interactions. Users upload PDFs and ask questions, receiving instant chatbot responses for efficient content retrieval.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published