Closed marcusschiesser closed 4 weeks ago
Latest commit: 6a47c9bee597feb7b6b4f67248ce2694d10035dc
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This update enhances the application's file management by resolving visibility issues for files in subfolders, improving user access to data. It simplifies configuration through a centralized data directory definition and refines URL generation for file access. These changes collectively promote maintainability and flexibility in handling file paths, ensuring robust data management across the application.
Files | Change Summary |
---|---|
.changeset/good-oranges-cover.md |
Introduced patch "create-llama" to display files in 'data' subfolders, enhancing file management. |
templates/components/loaders/python/file.py |
Removed data_dir from FileLoaderConfig for simpler initialization; updated get_file_documents to use DATA_DIR . |
templates/types/streaming/fastapi/app/config.py |
Added DATA_DIR constant for centralized data directory management. |
templates/types/streaming/fastapi/app/api/routers/models.py |
Enhanced get_url_from_metadata to handle file paths robustly using DATA_DIR . |
templates/types/streaming/fastapi/main.py |
Modified mount_static_files to use DATA_DIR for improved configurability. |
templates/components/llamaindex/typescript/streaming/events.ts |
Updated getNodeUrl to generate URLs using DATA_DIR , improving flexibility for file scenarios. |
templates/types/streaming/nextjs/app/api/files/[...slug]/route.ts |
Adjusted file path logic in the GET function to utilize DATA_DIR , enhancing path resolution. |
sequenceDiagram
participant User
participant App
participant FileLoader
User->>App: Request file access
App->>FileLoader: Retrieve files from DATA_DIR
FileLoader->>App: Return files
App->>User: Display files
🐇 "In the world of code, where files do roam,
A patch was made to bring them home.
With paths now clear and access bright,
We're hopping along in pure delight!
Data flows freely, like carrots in spring,
A joyful change, let the rabbit sing!" 🥕
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
DATA_DIR
constant for easier configuration of data-related operations.Bug Fixes
Improvements
DATA_DIR
constant.