GPT-Powered-AI-Document-Chatbot-Creator is a web app leveraging GPT-3.5-turbo and Text-Embedding-ADA-002 to process user-uploaded documents and generate intelligent chatbot responses to questions. Efficiently extract knowledge from documents and get accurate answers using AI-driven techniques.
GPT Powered AI Document Chatbot Creator is a web application that allows users to upload PDF and other document files, processes the documents' content, and provides answers to users' questions based on the information from the uploaded documents. The application uses OpenAI's GPT-3.5-turbo for processing questions and Text-Embedding-ADA-002 for embedding text, as well as Pinecone for vector similarity search.
This project is designed to provide an easy-to-use interface for users to upload and manage their documents while getting accurate and relevant answers to their questions based on the content of the uploaded documents. The application leverages cutting-edge AI technology to provide a seamless and efficient user experience.
git clone https://github.com/shamspias/document_ai_qa.git
cd document_ai_qa
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp example.env .env
# Django settings
SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
DJANGO_SETTINGS_MODULE=document_ai_qa.settings.local
# Database settings
DB_NAME=db_name
DB_USER=db_user
DB_PASSWORD=db_password
DB_HOST=db_host
DB_PORT=db_port
# OpenAI API
OPENAI_API_KEY=your-openai-api-key
# Pinecone API
PINECONE_API_KEY=your-pinecone-api-key
# Celery settings
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0
# Email
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=''
EMAIL_PORT=587
EMAIL_FROM=""
SITE_URL=http://localhost:8000
# CORS
CSRF_COOKIE_SECURE=True
SESSION_COOKIE_SECURE=True
CSRF_COOKIE_HTTPONLY=False
SESSION_COOKIE_HTTPONLY=True
SESSION_COOKIE_SAMESITE="None"
CSRF_COOKIE_SAMESITE="None"
CORS_ALLOW_CREDENTIALS=True
CORS_ORIGIN_ALLOW_ALL=False
CSRF_COOKIE_NAME="csrftoken"
CORS_ALLOWED_ORIGINS=http://127.0.0.1:3000,http://localhost:3000
# GENERALS
AUTH_USER_MODEL=users.User
LANGUAGE_CODE="en-us"
APPEND_SLASH=True
TIME_ZONE='UTC'
USE_I18N=True
USE_TZ=True
USE_L10N=True
# Social
FACEBOOK_KEY=''
FACEBOOK_SECRET=''
GOOGLE_KEY=''
GOOGLE_SECRET=''
# Other API
OPEN_AI_KEY=''
SENTRY_DSN=''
# AWS
AWS_ACCESS_KEY=''
AWS_SECRET_KEY=''
REGION_NAME=''
QUEUE_NAME=''
DJANGO_AWS_STORAGE_BUCKET_NAME=''
# Admin Site Config
ADMIN_SITE_HEADER="Chatbot builder"
ADMIN_SITE_TITLE="Chatbot Builder Dashboard"
ADMIN_SITE_INDEX="Chatbot Builder Dashboard"
python manage.py migrate
python manage.py runserver
Visit http://localhost:8000/ in your browser to access the application.
The following API endpoints are available in the GPT-Powered-AI-Document-Chatbot-Creator application:
User registration
/api/auth/register/
POST
{ "username": "your_username", "password": "your_password", "email": "[email protected]" }
User login
/api/auth/login/
POST
{ "username": "your_username", "password": "your_password" }
Upload a document
/api/documents/
POST
{"title": "document_title", "file": file_upload}
List all documents
/api/documents/
GET
Retrieve a document
/api/documents/<document_id>/
GET
Delete a document
/api/documents/<document_id>/
DELETE
Ask a question
/api/questions/
POST
{ "question": "your_question" }
Please note that the actual endpoints in your project might vary depending on the specific implementation. Refer to the project's source code and documentation for more detailed information on the available API endpoints and their usage.
For more detailed usage instructions, please refer to the application's documentation.