Closed thucpn closed 1 month ago
Latest commit: eeddc777aa0ad83ded352157ebc88cd3c18af39f
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
The recent updates enhance the modularity and usability of the codebase, particularly for document upload and processing functionalities. Key changes include making specific functions public for wider accessibility, adjusting parameters for new indexing options, and improving metadata management. Collectively, these modifications streamline interactions and strengthen the architecture for better maintainability and flexibility in handling chat-based large language models.
Files | Change Summary |
---|---|
.changeset/cool-jeans-bake.md | Introduces "create-llama" patch to enhance component reusability for chat LLMs, improving code organization and maintainability. |
templates/components/engines/typescript/agent/chat.ts templates/components/engines/typescript/chat/chat.ts |
Changes visibility of generateFilters from private to public by adding export , allowing broader access across modules. |
templates/components/llamaindex/typescript/documents/pipeline.ts | Alters runPipeline parameters, replacing filename with currentIndex (either VectorStoreIndex or LlamaCloudIndex ), simplifying document processing. |
templates/components/llamaindex/typescript/documents/upload.ts | Updates uploadDocument to accept an index parameter, enhancing document metadata management with additional fields for uploads. |
templates/components/vectordbs/typescript/milvus/shared.ts | Modifies checkRequiredEnvVars to accept an optional opts parameter, allowing conditional checks for the MILVUS_COLLECTION environment variable. |
templates/types/streaming/express/src/controllers/chat-upload.controller.ts | Modifies chatUpload to retrieve an index using getDataSource() before calling uploadDocument , enhancing the upload process. |
templates/types/streaming/nextjs/app/api/chat/upload/route.ts | Changes POST function to first retrieve index from getDataSource() , then pass it to uploadDocument , altering the upload workflow. |
templates/types/streaming/nextjs/app/components/ui/chat/chat-input.tsx | Introduces optional requestParams in ChatInput , allowing for enhanced upload configurations. |
templates/types/streaming/nextjs/app/components/ui/chat/hooks/use-file.ts | Updates uploadContent and uploadFile to accept an optional requestParams , improving the flexibility of file uploads and API interactions. |
sequenceDiagram
participant User
participant UploadController
participant DataSource
participant DocumentService
User->>UploadController: Initiate Upload
UploadController->>DataSource: getDataSource()
DataSource-->>UploadController: Return Index
UploadController->>DocumentService: uploadDocument(index, base64)
DocumentService-->>UploadController: Confirm Upload
UploadController-->>User: Upload Successful
🐇 In the code, a change did sprout,
Functions now share, without a doubt.
With indexes and params, oh so bright,
Our uploads now take flight!
A hop, a skip, to organize,
Making code cleaner is quite the prize!
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?
Note: update latest create-llama in PRs: https://github.com/run-llama/chat-llamaindex/pull/101 https://github.com/thucpn/chat-llamaindex/pull/5
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation