-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(kb): handle larger files in the kb #2324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR improves handling of larger files in the knowledge base by extending processing timeouts and adding direct upload support for medium-sized files. Key Changes:
The changes are well-structured and address the core issue of handling larger files through multiple complementary improvements. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant UploadHook as use-knowledge-upload
participant API as /api/files
participant Storage as S3/Azure Blob
participant Processor as Document Processor
Client->>UploadHook: uploadFiles(files)
UploadHook->>UploadHook: Check file size
alt File > 50MB (Large File)
UploadHook->>API: Request multipart upload
API-->>UploadHook: uploadId + part URLs
UploadHook->>Storage: Upload parts in chunks (8MB)
Storage-->>UploadHook: ETags
UploadHook->>API: Complete multipart upload
API-->>UploadHook: File URL
else File <= 50MB with directUploadSupported
UploadHook->>API: Request presigned URL
API-->>UploadHook: Presigned URL + headers
UploadHook->>Storage: Direct PUT with file
Storage-->>UploadHook: Success
UploadHook->>API: Confirm upload
API-->>UploadHook: File URL
else File <= 50MB without presigned
UploadHook->>API: Upload through API
API->>Storage: Store file
API-->>UploadHook: File URL
end
UploadHook->>Processor: Trigger processing
Processor->>Processor: Process document (up to 10 min timeout)
alt Processing exceeds 10 minutes
Processor->>Processor: Mark as failed (timeout)
else Processing completes
Processor-->>Client: Document ready
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, no comments
|
@greptile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, no comments
Summary
Type of Change
Testing
Tested manually
Checklist