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 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
-
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 -
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
-
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 -
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
-
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