Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amanastel/pdf_based_chatbot_ai
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.
https://github.com/amanastel/pdf_based_chatbot_ai
ai artificial-intelligence chatbot chatgpt django github langchain llm machine-learning mysql openai python
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/amanastel/pdf_based_chatbot_ai
- Owner: Amanastel
- License: mit
- Created: 2023-08-29T20:20:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-28T20:54:11.000Z (about 1 year ago)
- Last Synced: 2024-05-01T12:38:52.047Z (10 months ago)
- Topics: ai, artificial-intelligence, chatbot, chatgpt, django, github, langchain, llm, machine-learning, mysql, openai, python
- Language: Python
- Homepage: https://drive.google.com/file/d/1bqwJzsjXrEI8prPFzoPNaAwY4DugmXfQ/view
- Size: 17 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/Amanastel/PDF_Based_Chatbot_AI/blob/main/assets/Screenshot1.png?raw=true)### Why choose AI
![Our Services Page](https://github.com/Amanastel/PDF_Based_Chatbot_AI/blob/main/assets/Screenshot2.png?raw=true)### Upload PDF Document
![Upload PDF Document](https://github.com/Amanastel/PDF_Based_Chatbot_AI/blob/main/assets/Screenshot6.png?raw=true)### Chat History
![Chat History](https://github.com/Amanastel/PDF_Based_Chatbot_AI/blob/main/assets/Screenshot5.png?raw=true)## Getting Started
## Installation & Getting started
Detailed instructions on how to install, configure, and get the project running.```bash
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](LICENSE) file for details.