How karzix/chatbot_support works
Main Components
• Backend API: Located in the PythonApplication1 folder and implemented with Flask. This component includes various modules such as:
• app.py – the main API entry point.
• convert_to_vector.py and process_docx.py – modules responsible for reading DOCX files and converting them into vector representations.
• search_in_elasticsearch.py – handles searching documents using Elasticsearch.
• test scripts (test.py, testGemini.py, testconnectElasticsearch.py) – for validating functionality.
• Elasticsearch Service: Runs as a Docker container (using provided Docker commands in the README). This external service is used by the API for indexing/search.
• Chrome Extensions: Provided in the folders extension_chatbot and extension_upload. They serve as the user interface for interacting with the chatbot and file upload functions. The index.html, index.js, and manifest.json files in each extension define the frontend behavior.
• External AI Service (Optional): The README references Gemini API integration (with google-generativeai) for supporting language model operations; this should be treated as an external dependency.
• Docker: The Dockerfile in the PythonApplication1 directory indicates that the API may be containerized for deployment.
Relationships and Interactions
• The Elasticsearch service is an external datastore/service running in Docker. Show this as an external system with bi-directional communication to the backend API.
Architectural Patterns and Design Principles
• Separation of Concerns: The project separates file/data processing, search functionalities, and API routing into distinct modules.
• Integration of Microservices/External Services: The use of Dockerized Elasticsearch emphasizes loosely coupled architecture where each component is responsible for a distinct service.
• Modular and Testable Design: Multiple test files suggest the importance of reliability and modular testing.
Relevant Technologies and Frameworks
• Python with Flask and Flask-CORS for API development.
• python-docx, torch, transformers, numpy, and google-generativeai to handle document processing and NLP operations.
• Elasticsearch (accessed via its Python client) for search capabilities.
• Docker to containerize the Elasticsearch instance and possibly the Python API.
• Chrome Extension technology using HTML, JavaScript, and manifest files.