Closed thucpn closed 3 months ago
Latest commit: d54fe0adea4c2f707ca38af3068e13873e2e096d
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 introduces a new API endpoint for fetching file data, enhances the chat component to handle and display PDF files, and includes support for serving static files in a FastAPI application. Additionally, new dependencies have been added to facilitate these features.
File(s) | Change Summary |
---|---|
templates/types/streaming/nextjs/app/api/data/[path]/route.ts |
Introduces an API endpoint for retrieving file data from the ./data folder based on the provided path slug. |
templates/types/streaming/nextjs/app/components/ui/chat/chat-sources.tsx |
Enhances the ChatSources component to handle and display PDF files, includes new imports, and updates the rendering logic. |
templates/types/streaming/nextjs/app/components/ui/chat/widgets/PdfDialog.tsx |
Introduces the PdfDialog component for displaying PDF content within a drawer. |
templates/types/streaming/nextjs/app/components/ui/lib/url.ts |
Adds a function getStaticFileDataUrl to generate a URL for file data based on the input filename. |
templates/types/streaming/nextjs/package.json |
Adds new dependencies vaul and @llamaindex/pdf-viewer . |
templates/types/streaming/fastapi/main.py |
Adds serving of static files from the /data endpoint using app.mount . |
In bytes and bits, we weave our tale,
With endpoints new, our code sets sail.
PDFs now within our reach,
In drawers snug, they do beseech.
FastAPI serves with grace and flair,
Data flows through springtime air.
🐇✨
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
PdfDialog
component to display PDF content within a drawer.ChatSources
component to aggregate and display nodes by URL or file path.Enhancements
ChatSources
rendering logic to differentiate between PDFs and other sources.Dependencies
vaul
version0.9.1
and@llamaindex/pdf-viewer
version1.1.1
to dependencies.Backend
/data
endpoint in FastAPI.