NOTEGPT is a Django-based intelligent note management system powered by advanced AI capabilities for semantic search, question-answering, entity recognition, and natural language processing. It leverages cutting-edge models like Sentence-BERT
, DistilBERT
, and RoBERTa
to provide users with highly accurate responses and relevant notes based on their queries. Additionally, NOTEGPT integrates Gemini AI for generating insightful content, offering a powerful chat interface for efficient information retrieval.
- Semantic Search: Retrieve the most relevant notes using
Sentence-BERT
embeddings and cosine similarity. - Question-Answering: Uses
DistilBERT
andRoBERTa
models to answer user queries based on note content. - Named Entity Recognition (NER): Extracts key entities using a pre-trained
BERT
model. - Gemini AI Integration: Provides AI-generated content using Gemini API.
- Chat Interface: Interactive chat system for seamless querying and response.
- Tag Extraction: Extracts top tags from notes using TF-IDF for efficient categorization.
- File Storage: Option to save notes to a file system with timestamped filenames.
- Backend: Django, Python, REST API
- AI Models:
Sentence-BERT
(all-MiniLM-L6-v2
) for semantic searchDistilBERT
andRoBERTa
for question answeringBERT
for named entity recognition- Gemini API for generative AI responses
- Data Science:
sklearn
,sentence-transformers
,transformers
,torch
- Database: MySQL (can be configured to other relational databases)
- Environment Management: Python
dotenv
for environment variables
NOTEGPT/
├── notes/
│ ├── templates/
│ │ └── chat_interface.html
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ ├── admin.py
│ ├── forms.py
│ ├── utils.py
│ ├── tests.py
├── manage.py
├── requirements.txt
├── README.md
├── .env
└── settings.py
- Python 3.8+
- Django 4.2+
- MySQL or other supported relational database
- Gemini API Key for generative AI integration
git clone https://github.com/your-username/NOTEGPT.git
cd NOTEGPT
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
Create a .env
file in the root directory and add your Gemini API key:
GEMINI_API_KEY=your_gemini_api_key
DATABASE_URL=mysql://username:password@localhost:3306/notegpt_db
python manage.py makemigrations
python manage.py migrate
python manage.py shell
from notes.views import load_existing_notes
load_existing_notes()
python manage.py runserver
Visit http://localhost:8000
in your browser.
- Navigate to
/chat-interface/
to interact with the AI-powered chat system. - Type in your query, and the system will fetch relevant notes or generate answers using Gemini AI.
- Use the
/save-note/
endpoint to add new notes:
curl -X POST http://localhost:8000/save-note/ -d "message=Your Note Here"
- Use the
/search-notes/
endpoint to perform semantic searches:
curl -X POST http://localhost:8000/search-notes/ -d "message=Your Search Query"
- URL:
/save-note/
- Method:
POST
- Data:
message
(text content) - Response:
{ "response": "Note saved successfully." }
- URL:
/search-notes/
- Method:
POST
- Data:
message
(query string) - Response:
{ "response": "Relevant answer or notes content." }
- URL:
/query-gemini/
- Method:
POST
- Data:
message
(query string) - Response:
{ "response": "Generated content from Gemini AI." }
- Ensure sensitive keys like
GEMINI_API_KEY
are stored securely in the.env
file. - Django's CSRF protection is enabled for sensitive endpoints.
- Authentication: Adding user authentication to secure notes.
- Enhanced NER: Using advanced models for better entity extraction.
- UI Enhancements: Improving the frontend with a modern, responsive design.
- Integration with Cloud Storage: Option to save notes to cloud platforms like AWS S3.
Contributions are welcome! Please submit a pull request or open an issue on GitHub if you have suggestions or find bugs.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries or support, please reach out to [email protected].
Feel free to customize this template as needed for your project!