feat: add FE changes for captain pdf support for faq generation (#12115)
Linked PR https://github.com/chatwoot/chatwoot/pull/12113 ## Linear Link https://linear.app/chatwoot/issue/CW-4515/upload-pdfs-to-captain ## Description This PR adds support for PDF file uploads to the Captain document knowledge base system. The feature enables users to upload PDF files directly to the knowledge base for FAQ generation and document processing, expanding beyond the existing URL-based document ingestion. ## Type of change - [ ] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Unit Tests - Manually via UI ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b0112a2869
commit
2f3b4ad215
@@ -807,6 +807,58 @@
|
||||
"ERROR_MESSAGE": "Unable to update portal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PDF_UPLOAD": {
|
||||
"TITLE": "Upload PDF Document",
|
||||
"DESCRIPTION": "Upload a PDF document to automatically generate FAQs using AI",
|
||||
"DRAG_DROP_TEXT": "Drag and drop your PDF file here, or click to select",
|
||||
"SELECT_FILE": "Select PDF File",
|
||||
"ADDITIONAL_CONTEXT_LABEL": "Additional Context (Optional)",
|
||||
"ADDITIONAL_CONTEXT_PLACEHOLDER": "Provide any additional context or instructions for FAQ generation...",
|
||||
"UPLOADING": "Uploading...",
|
||||
"UPLOAD": "Upload & Process",
|
||||
"CANCEL": "Cancel",
|
||||
"ERROR_INVALID_TYPE": "Please select a valid PDF file",
|
||||
"ERROR_FILE_TOO_LARGE": "File size must be less than 512MB",
|
||||
"ERROR_UPLOAD_FAILED": "Failed to upload PDF. Please try again."
|
||||
},
|
||||
"PDF_DOCUMENTS": {
|
||||
"TITLE": "PDF Documents",
|
||||
"DESCRIPTION": "Manage uploaded PDF documents and generate FAQs from them",
|
||||
"UPLOAD_PDF": "Upload PDF",
|
||||
"UPLOAD_FIRST_PDF": "Upload your first PDF",
|
||||
"UPLOADED_BY": "Uploaded by",
|
||||
"GENERATE_FAQS": "Generate FAQs",
|
||||
"GENERATING": "Generating...",
|
||||
"CONFIRM_DELETE": "Are you sure you want to delete {filename}?",
|
||||
"EMPTY_STATE": {
|
||||
"TITLE": "No PDF documents yet",
|
||||
"DESCRIPTION": "Upload PDF documents to automatically generate FAQs using AI"
|
||||
},
|
||||
"STATUS": {
|
||||
"UPLOADED": "Ready",
|
||||
"PROCESSING": "Processing",
|
||||
"PROCESSED": "Completed",
|
||||
"FAILED": "Failed"
|
||||
}
|
||||
},
|
||||
"CONTENT_GENERATION": {
|
||||
"TITLE": "Content Generation",
|
||||
"DESCRIPTION": "Upload PDF documents to automatically generate FAQ content using AI",
|
||||
"UPLOAD_TITLE": "Upload PDF Document",
|
||||
"DRAG_DROP": "Drag and drop your PDF file here, or click to select",
|
||||
"SELECT_FILE": "Select PDF File",
|
||||
"UPLOADING": "Processing document...",
|
||||
"UPLOAD_SUCCESS": "Document processed successfully!",
|
||||
"UPLOAD_ERROR": "Failed to upload document. Please try again.",
|
||||
"INVALID_FILE_TYPE": "Please select a valid PDF file",
|
||||
"FILE_TOO_LARGE": "File size must be less than 512MB",
|
||||
"GENERATED_CONTENT": "Generated FAQ Content",
|
||||
"PUBLISH_SELECTED": "Publish Selected",
|
||||
"PUBLISHING": "Publishing...",
|
||||
"FROM_DOCUMENT": "From document",
|
||||
"NO_CONTENT": "No generated content available. Upload a PDF document to get started.",
|
||||
"LOADING": "Loading generated content..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -701,11 +701,28 @@
|
||||
"ERROR_MESSAGE": "There was an error creating the document, please try again."
|
||||
},
|
||||
"FORM": {
|
||||
"TYPE": {
|
||||
"LABEL": "Document Type",
|
||||
"URL": "URL",
|
||||
"PDF": "PDF File"
|
||||
},
|
||||
"URL": {
|
||||
"LABEL": "URL",
|
||||
"PLACEHOLDER": "Enter the URL of the document",
|
||||
"ERROR": "Please provide a valid URL for the document"
|
||||
},
|
||||
"PDF_FILE": {
|
||||
"LABEL": "PDF File",
|
||||
"CHOOSE_FILE": "Choose PDF file",
|
||||
"ERROR": "Please select a PDF file",
|
||||
"HELP_TEXT": "Maximum file size: 10MB",
|
||||
"INVALID_TYPE": "Please select a valid PDF file",
|
||||
"TOO_LARGE": "File size exceeds 10MB limit"
|
||||
},
|
||||
"NAME": {
|
||||
"LABEL": "Document Name (Optional)",
|
||||
"PLACEHOLDER": "Enter a name for the document"
|
||||
},
|
||||
"ASSISTANT": {
|
||||
"LABEL": "Assistant",
|
||||
"PLACEHOLDER": "Select the assistant",
|
||||
|
||||
Reference in New Issue
Block a user