Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

3.3.0 | Refactor configure_retriever to be a class #53

Merged
merged 11 commits into from
Mar 10, 2024
Merged

Conversation

Daethyra
Copy link
Owner

@Daethyra Daethyra commented Mar 6, 2024

chore(utility_funcs.py):

Refactored the RetrieveDocuments class to use a more object-oriented approach, introducing methods for loading documents and configuring the retriever. The class now initializes with uploaded files and provides separate methods for loading documents and configuring the retriever. This change enhances readability and maintainability while allowing for better separation of concerns within the class.

…image upscaling and Streamlit UI

Integrate Real-ESRGAN functionality into @2_🖼️_Image_Upscaler.py, replacing @image_upscaler. Update pyproject.toml to version 3.3.0 for FreeStream. This change leverages the latest advancements in image upscaling technology, providing users with a range of customization options within the Streamlit application.
@Daethyra Daethyra added the enhancement New feature or request label Mar 6, 2024
@Daethyra Daethyra added this to the (Page) Upscale Images milestone Mar 6, 2024
@Daethyra Daethyra self-assigned this Mar 6, 2024
@Daethyra Daethyra changed the title chore(upscaling changes): wrote notes on integrating Real-ESRGAN for … 3.3.0 | Integrate Real-ESRGAN as upscaler Mar 6, 2024
Daethyra added 8 commits March 5, 2024 16:48
- Renamed NOTE.MD to Implement-RealESRGAN.MD
- Added create-generation-class.md with initial implementation of RetrieverConfigurator class, which transforms the `configure_retriever` function into a class. The class includes methods for loading documents, splitting documents, creating embeddings and storing in vectordb, defining retriever, getting retriever, and instantiating LLM(`ChatOpenAI`).
Renamed files and folders to adhere to a consistent naming convention. Additionally, updated the GPU ID setting due to limitations on Streamlit Community Cloud.
Refactored the RetrieveDocuments class to use a more object-oriented approach, introducing methods for loading documents and configuring the retriever. The class now initializes with uploaded files and provides separate methods for loading documents and configuring the retriever. This change enhances readability and maintainability while allowing for better separation of concerns within the class.
Reformatted the utility functions in RAGbot.py for better readability and maintainability. Introduced a new class RetrieveDocuments to handle document retrieval, and updated the configuration of the retriever accordingly.

This change aims to improve code organization and make it easier to manage and extend utility functions in the future.
formatted code
@Daethyra Daethyra changed the title 3.3.0 | Integrate Real-ESRGAN as upscaler 3.3.0 | Refactor configure_retriever to be a class Mar 10, 2024
@Daethyra Daethyra marked this pull request as ready for review March 10, 2024 21:39
… constructor

Added type hinting for the `uploaded_files` parameter in the `RetrieveDocuments` class constructor to specify that it should be a list of `Document` objects. This change improves code readability and helps catch potential type-related errors during development.
@Daethyra Daethyra marked this pull request as draft March 10, 2024 21:59
…raph

Adjusted the height of the footer from 42px to 40px for better visual alignment. Also added a margin of 0 to the paragraph within the footer to ensure consistent spacing.
@Daethyra Daethyra marked this pull request as ready for review March 10, 2024 22:09
@Daethyra Daethyra enabled auto-merge March 10, 2024 22:09
@Daethyra Daethyra merged commit 89f3773 into streamlit Mar 10, 2024
2 checks passed
@Daethyra Daethyra deleted the 3.3.0 branch March 11, 2024 01:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant