AI Approach Chat is a sophisticated web application that combines the power of Google's Gemini AI with document processing capabilities. The system allows users to upload documents (PDF, DOCX, PPTX), processes them into searchable chunks, and enables AI-powered conversations that can reference information from these documents.
- 🔐 User Authentication: Secure login and registration system
- 💬 AI Chat Interface: Intuitive chat interface powered by Google's Gemini AI
- 📄 Document Processing: Upload and process various document types (PDF, DOCX, PPTX)
- 🔍 Vector Search: Semantic search capabilities using vector embeddings
- 💾 Conversation Memory: Persistent conversation history with context retention
- 🔄 Multiple Chat Modes: General chat and document-specific chat modes
- 📱 Responsive Design: Works on desktop and mobile devices
- Backend: Python, Flask
- AI: Google Generative AI (Gemini)
- Vector Database: FAISS for efficient similarity search
- Document Processing: Custom processing pipeline for various document formats
- Frontend: HTML, CSS, JavaScript
- Authentication: Session-based authentication
- Python 3.9 or higher
- Google Gemini API key
- Modern web browser
-
Clone the repository:
git clone https://github.com/AIApproach/AI-Approach-Chat.git cd AI-Approach-Chat -
Create and activate a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root (you can copy from.env.example):GEMINI_API_KEY=your_gemini_api_key_here FLASK_SECRET_KEY=your_secret_key_here -
Run the application:
python app.py
-
Open your browser and navigate to
http://localhost:5000
The application can be configured through environment variables in the .env file:
GEMINI_API_KEY: Your Google Gemini API key (you can get it from Google AI Studio)FLASK_SECRET_KEY: Secret key for Flask session encryption
├── app.py # Main Flask application
├── data/ # Data storage
│ ├── chunks/ # Document chunks
│ ├── conversations/ # Conversation history
│ ├── files/ # Uploaded files
│ ├── memories/ # Conversation memory
│ ├── sessions/ # User sessions
│ ├── uploads/ # Temporary upload storage
│ ├── users/ # User data
│ └── vectors/ # Vector embeddings
├── requirements.txt # Python dependencies
├── static/ # Static assets
│ ├── css/ # Stylesheets
│ ├── icon/ # Icons
│ └── js/ # JavaScript files
├── templates/ # HTML templates
└── utils/ # Utility modules
├── chat_manager.py # Chat functionality
├── file_processor.py # Document processing
├── session_manager.py # Session management
└── vector_store.py # Vector database operations
- Register/Login: Create an account or log in to an existing one
- Upload Documents: Click the upload button to add documents to your library
- Create Conversation: Start a new conversation, optionally selecting documents to reference
- Chat with AI: Interact with the AI, asking questions about your documents or general topics
- View History: Access your conversation history from the sidebar
Built with ❤️ by the AI Approach Engineer Alaadin