Spaces:
Sleeping
Sleeping
Commit History
-
Refactor Qdrant integration and update dependencies
- Simplified Qdrant vector database implementation by removing unnecessary ID mappings and using text hashing for unique IDs. - Updated docker-compose.yml to utilize environment variable for Qdrant configuration. - Added langchain-qdrant dependency in pyproject.toml and uv.lock to support new features. - Refactored API main.py to create vector database instances using the updated VectorDatabase class.6d817f0 -
Refactor LangSmith run logging to use updated API methods
- Updated the LangSmithTracer class to replace deprecated run_create method with create_run for logging document retrieval and RAG generation runs. - Enhanced logging messages to remove run ID details, focusing on successful logging actions instead. - Improved code clarity and maintainability by aligning with the latest API specifications.ac39032 -
Enhance Dockerfile and application configuration for improved functionality
- Added environment variables for LangChain and LangSmith integration in docker-compose.yml to support enhanced tracing and project management. - Updated Dockerfile to streamline the frontend build process and optimize dependency installation, ensuring a more efficient multi-stage build. - Refactored API main.py to utilize LangChain's prompt templates and integrated LangSmith utilities for better logging and tracing capabilities. - Removed outdated requirements.txt file to simplify dependency management, consolidating all necessary packages within pyproject.toml. - Adjusted frontend component to correctly handle streamed text responses, improving user experience during chat interactions.d3dec26
-
Add non-root user and update permissions in Dockerfile
- Created a non-root user 'appuser' to enhance security by running the application with limited privileges. - Set ownership and permissions for the application and logs directory to ensure proper access control. - Switched to the non-root user before starting the application, aligning with best practices for container security.eb54d76 -
Update Dockerfile to improve application structure and logging
- Adjusted API file copy path to /app/api/ for better organization. - Created a logs directory to facilitate logging management. - Updated the CMD instruction to start the application with the correct path to the main module.29e8e4d -
Add logging configuration and integrate logging into API endpoints
- Introduced a new logging configuration module to set up logging for the application, including file and console handlers. - Integrated logging into the FastAPI application, capturing detailed information about request processing, including upload and query operations. - Enhanced the RAG pipeline with logging for vector search execution, context retrieval, and response generation, improving traceability and debugging capabilities. - Added logging for error handling in the pipeline to capture exceptions and processing times, facilitating better monitoring and performance analysis.57e7c3d -
Implement cookie-less session management and user ID handling for Hugging Face Spaces compatibility
- Introduced cookie-less session management by storing user IDs in localStorage and transmitting them via HTTP headers and URL parameters. - Updated FastAPI endpoints to retrieve user IDs from headers and query parameters, ensuring backward compatibility with cookie-based implementations. - Enhanced the RAG pipeline to accept user IDs for tracking in Hugging Face deployments. - Modified frontend to include user ID in all API requests using an axios interceptor, improving session management across the application. - Updated documentation to reflect changes in session management and user ID handling.8190e40 -
Enhance Qdrant collection management with error handling and async support
- Improved the _ensure_collection and _async_ensure_collection methods to include detailed error handling and fallback creation of collections. - Added print statements for better visibility of collection creation status. - Updated the abuild_from_list method to ensure the collection exists before inserting data, enhancing reliability. - Implemented error handling during point insertion to recreate collections if necessary, ensuring data integrity.57dd0f3 -
Remove version specification from docker-compose.yml as it is no longer needed for the Qdrant service integration.
18b5712
-
Refactor vector database integration to use Qdrant and update related configurations
- Replaced VectorDatabase with QdrantVectorDatabase across the application for improved vector similarity search. - Updated docker-compose.yml to include Qdrant service with necessary configurations. - Enhanced README.md to document Qdrant integration and its configuration options. - Added new method in EmbeddingModel to retrieve embedding dimensions. - Adjusted API and service files to accommodate Qdrant settings and ensure compatibility.ed6feab -
Update version to 0.3.0 and enhance CHANGELOG with new features and improvements
- Added Docker deployment support with multi-stage build. - Fixed linting errors in chat router and improved error handling for session validation. - Enhanced chat history management and updated documentation in code comments. - Updated all Python dependencies and improved Docker container efficiency. - Enhanced user experience with a cleaner UI and fixed streaming response formatting.a19adbc
-
Refactor user session management and prompt handling in FastAPI and frontend
- Improved user session management by optimizing cookie handling for user IDs and prompt templates. - Refined FastAPI endpoints for better performance in retrieving, updating, and resetting user-specific prompts. - Enhanced frontend logic to streamline user identification and prompt editing features. - Updated Chat and DocumentSummary components to ensure efficient API requests with user ID integration. - Further improved user experience by simplifying prompt management processes.73641c0 -
Implement user session management and prompt customization in FastAPI and frontend
- Introduced user session management with unique user IDs stored in cookies, allowing for personalized prompt templates. - Added new endpoints in FastAPI for retrieving, updating, and resetting user-specific prompts. - Enhanced the frontend to identify users on app load and integrate prompt editing capabilities. - Updated Chat and DocumentSummary components to include user ID in API requests, ensuring personalized responses. - Improved overall user experience by allowing users to manage their prompts effectively.5d28468 -
Enhance API versioning and frontend integration
- Added API versioning information in FastAPI, including a new `/version` endpoint to provide version and build date details. - Updated the frontend to fetch and display API version information, enhancing user awareness of the current API status. - Improved footer layout in the App component to include API version and operational status indicators.8928541 -
Update project title and enhance dark mode styling
- Changed project title from "RAG Chat" to "Quick Understand" in App and Chat components for improved clarity. - Added darker background styling for headers in dark mode to enhance visual consistency and user experience.ac3613d -
Enhance styling and typography in frontend components
- Added custom font size and line height variables in CSS for better typography control. - Updated Tailwind configuration to include new font sizes and line heights. - Refined markdown content styles to utilize new typography settings, improving readability. - Adjusted Chat component styles for consistent text sizing and improved user experience.c8a9031 -
Implement streaming response feature in FastAPI and enhance Chat component for real-time updates
- Added new `/stream` endpoint in FastAPI to handle real-time query responses using Server-Sent Events (SSE). - Updated Chat component to support streaming responses, including handling of partial data and completion events. - Enhanced message rendering to display streamed content dynamically, with support for thinking and answer sections. - Improved state management for EventSource connections to ensure proper cleanup and error handling during streaming.d1d56a2
-
Update README.md to reflect project title change and enhance clarity in Q&A sections
- Changed project title from "DeployPythonicRAG" to "RAG Chat" and updated the associated emoji. - Improved clarity in answers for questions regarding streaming support and user session necessity, emphasizing user experience and data isolation. - Added detailed insights on application limitations in the context of user feedback.01b6cde -
Update Docker configuration to change application port and environment variables
- Changed the exposed port from 8000 to 7860 in both Dockerfile and docker-compose.yml. - Updated environment variables to set PORT and HOST for the application. - Adjusted CMD in Dockerfile to reflect the new port for the application startup.97eff50 -
Enhance Chat component with structured response formatting and thinking process display
- Updated the system prompt to include guidelines for formatting responses with reasoning and final answers. - Implemented a helper function to parse and extract thinking and answer sections from AI responses. - Enhanced message handling in the Chat component to support formatted responses, including toggling the display of the thinking process. - Improved message rendering to conditionally show thinking and answer sections based on formatting.de8c812 -
Implement quiz generation feature in Chat component
- Added new models for quiz question handling in the FastAPI backend, including `QuizQuestion`, `GenerateQuizRequest`, and `GenerateQuizResponse`. - Introduced `/generate-quiz` endpoint to create multiple-choice quiz questions based on uploaded document content. - Enhanced Chat component to detect user requests for quizzes and manage quiz generation, display, and results. - Implemented fallback questions for scenarios where quiz generation fails or insufficient questions are produced. - Updated frontend to include quiz prompt and results display, improving user interaction and engagement.026d850 -
Add document summary endpoint and enhance vector database functionality
- Introduced `get_all_texts` method in `VectorDatabase` to retrieve all stored text documents. - Added new `DocumentSummaryRequest` and `DocumentSummaryResponse` models for handling document summary requests in the FastAPI application. - Implemented `/document-summary` endpoint to generate structured summaries from uploaded documents, including key topics, entities, word cloud data, and document structure. - Enhanced frontend to integrate document summary display and settings management for improved user experience. - Updated global CSS with styles for word cloud visualization.8ae8586 -
Enhance Chat component with improved question selection and display
- Updated the Chat component to better handle user-selected questions from uploaded files. - Improved the rendering of document descriptions and associated questions for a more intuitive user experience. - Refactored state management to streamline question selection and input updates.6d2f36b -
Refactor App and Chat components for improved layout and user experience
- Updated the App component to enhance layout responsiveness and added flex properties for better alignment. - Improved the Chat component's structure for consistent styling and overflow handling. - Introduced thin scrollbar styles in global CSS for a more modern look. - Enhanced FileManager component with minimum height and improved button styles for better usability.24bbad4 -
Refactor App component to manage multiple file uploads and enhance file selection
- Introduced `FileManager` component to handle uploaded files and allow users to select active files. - Replaced previous state management for file uploads with a more structured approach using an array of uploaded files. - Updated UI to conditionally render file upload form and file details based on the upload state. - Enhanced user experience by allowing users to switch between uploaded files and view associated details and suggested questions.f6a89c3 -
Added markdown support
2dde49f -
Enhance UI with theme support and improved styling
- Integrated `ThemeProvider` and `ThemeToggle` for dynamic theme switching in the application. - Updated `App` component layout for better responsiveness and user experience. - Enhanced `Chat`, `FileUpload`, and global styles with transitions and improved accessibility features. - Added custom scrollbar styles and animations for a smoother user interface. - Improved button and input interactions with visual feedback during uploads and processing.47bd0d6 -
Implement asynchronous response generation and enhance file upload processing
- Added `acreate_single_response` method to `ChatOpenAI` for non-streamed asynchronous responses. - Updated file upload handling in `main.py` to generate document descriptions and suggested questions using the new method. - Modified frontend components to display document descriptions and suggested questions, allowing users to select questions for chat input. - Enhanced `Chat` component to handle selected questions and update input accordingly.d62d58c -
Enhance Dockerfile and frontend structure for RAG application
- Added a multi-stage build in Dockerfile for frontend using Node.js. - Updated package.json with new dependencies and devDependencies for improved styling and functionality. - Removed unused CSS files and integrated Tailwind CSS for styling. - Refactored FileUpload and Chat components to utilize new UI components and improve user experience. - Added error handling and progress indication during file uploads.102c540
-
Refactor Dockerfile and update README for FastAPI RAG application
- Changed base image to Python 3.13 and adjusted working directory. - Updated dependency installation process and application start command. - Enhanced README with project structure, requirements, and local running instructions for both backend and frontend.7a1c9d6 -
Merge branch 'main' of hf.co:spaces/mafzaal/Quick-Understand
e2dc74c -
initial commit
Verified signature27129f0
-
Initial Pythonic RAG Commit
2b61f9d