A local, web-based personal assistant that serves as an intelligent notetaking application. The system automatically classifies user input as questions or statements, provides answers to questions using a vector database, and stores statements as notes for future reference.
- Question Detection: Automatically identifies questions using NLP techniques
- Statement Recognition: Captures facts, observations, and personal notes
- Real-time Classification: Shows input type as you type
- Vector Database Integration: Uses ChromaDB for semantic search
- Local LLM Integration: Powered by Ollama for privacy
- Context-Aware Answers: Provides relevant source references
- Metadata Filtering: Filter by source types and tags
- Tag-based Organization: AI-powered tag suggestions
- Search & Filter: Find notes by content or tags
- Export Functionality: Export in Markdown, JSON, or plain text
- Local Storage: All data stored locally for privacy
- Multiple Models: Support for Phi-3 Mini, Mistral 7B, Llama 3.1, and more
- Dynamic Switching: Change models during runtime
- Model Optimization: Automatic quantization and memory management
- Comprehensive Model Information: Display context window size, memory usage, inference speed, and capabilities
- Expandable Model Cards: Detailed view with architecture, quantization, and license information
- Optimized System Prompts: Carefully crafted prompts for better AI responses
- Context-Aware Processing: Intelligent handling of conversation history and knowledge base context
- Human-Readable Tool Output: Clear, natural language descriptions of tool operations
- Intent Classification Integration: Seamless integration of user intent analysis into response generation
- FastAPI: Modern Python web framework
- ChromaDB: Local vector database
- Ollama: Local LLM management
- Sentence Transformers: Text embeddings
- Pydantic: Data validation
- React 18: Modern UI framework
- TypeScript: Type safety
- Tailwind CSS: Utility-first styling
- Vite: Fast build tool
- Lucide React: Beautiful icons
- Memory: 24GB RAM (for optimal performance with 7B models)
- Storage: 10GB free space
- OS: macOS, Linux, or Windows
- Python: 3.8+
- Node.js: 18+
git clone <repository-url>
cd visionFirst, install Ollama from ollama.ai
cd backend
pip install -r requirements.txtcd frontend
npm install# Install the default model (Phi-3 Mini)
ollama pull phi3-mini
# Optional: Install additional models
ollama pull mistral:7b-instruct
ollama pull llama3.1:8b# From the project root directory
./run_tests.sh # Run all tests
./start.sh # Start both backend and frontendcd backend
python3 main.pyThe backend will be available at http://localhost:8000
cd frontend
npm run devThe frontend will be available at http://localhost:3000
Open your browser and navigate to http://localhost:3000
- Type your question in the input area
- The system will automatically classify it as a question
- Click "Ask Question" or press Enter
- View the AI-generated answer with source references
- Type your statement or observation
- The system will classify it as a statement
- Review suggested tags and select relevant ones
- Click "Save Note" to store it
- View Notes: Navigate to the Notes tab
- Search: Use the search bar to find specific notes
- Filter: Click on tags to filter notes
- Export: Use the Settings tab to export notes
- View Models: Check the Settings tab for available models
- Switch Models: Click "Activate" on any model
- Monitor Usage: View system information and model status
POST /api/v1/question- Ask a question and get an answer
POST /api/v1/notes- Create a new noteGET /api/v1/notes- Get all notes
POST /api/v1/suggest-tags- Get tag suggestions for content
GET /api/v1/models- List available modelsPOST /api/v1/models/{model_name}/activate- Activate a model
POST /api/v1/export- Export notes in specified format
Edit backend/app/core/config.py to modify:
- Database paths
- Ollama settings
- Model configurations
- API settings
Edit frontend/src/services/api.ts to change:
- API base URL
- Request headers
- Timeout settings
# From the project root directory
./run_tests.shThis script will:
- Activate the virtual environment
- Run all backend tests using python3
- Provide detailed test results and coverage
cd backend
source venv/bin/activate
# Run specific tests
python3 test_similarity_threshold.py
python3 test_story_generation.py
# Or use the test runner directly
python3 run_tests.pycd backend
# Install development dependencies
pip install -r requirements.txt
# Run with auto-reload
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build-
Ollama Connection Error
- Ensure Ollama is running:
ollama serve - Check if models are installed:
ollama list
- Ensure Ollama is running:
-
Memory Issues
- Use smaller models (Phi-3 Mini instead of 7B models)
- Close other applications to free memory
- Consider model quantization
-
ChromaDB Errors
- Check if the data directory exists and is writable
- Restart the backend to reinitialize the database
-
Frontend Build Issues
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check Node.js version compatibility
- Clear node_modules and reinstall:
-
Model Selection
- Use Phi-3 Mini for real-time interactions
- Use larger models for complex reasoning tasks
-
Memory Management
- Monitor memory usage with Activity Monitor/Task Manager
- Restart the application if memory usage is high
-
Database Optimization
- Regularly export and backup notes
- Clean up old embeddings if needed
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check the troubleshooting section
- Review the API documentation at
http://localhost:8000/docs - Open an issue on GitHub
Note: This application runs completely locally for maximum privacy. All data is stored on your machine and no information is sent to external services.