File Upload
The File Upload feature allows you to enhance your AI Assistant’s knowledge base by uploading various types of documents. This documentation covers how to use the file upload functionality and its key features.
Supported File Types
The system accepts the following file formats:
File Size Limitations
- Maximum file size: 20MB per file
- Files exceeding this limit will be rejected with an error message
How to Upload Files
- Navigate to the AI Configuration section in your WordPress admin panel
- Click on the “File Management” button in the “Train Assistant” section
- In the File Management modal:
- The system provides real-time feedback during the upload process
- Success/error messages are displayed to confirm the upload status
- The upload button is disabled during the upload process to prevent duplicate submissions
– Click “Choose File” or drag and drop your file into the upload area
– Select the file you want to upload
– Click the “Upload File” button
File Management Features
Upload Status Indicators
File List Management
– File name
– Active status indicator
– Delete option to remove files from the assistant
Drag and Drop Support
Best Practices
- File Preparation
– Ensure files are under the 20MB size limit
– Convert files to supported formats before uploading
– Use clear, descriptive filenames
- Content Organization
– Upload files with relevant content for your assistant
– Remove outdated or unnecessary files to maintain optimal performance
– Keep track of uploaded files and their purposes
- File Types Usage
– Use PDF for formatted documents and manuals
– Use TXT/MD for simple text and documentation
– Use JSON for structured data
– Use HTML for web content
– Use DOC/DOCX for rich text documents
Error Handling
Common error messages and solutions:
| Error Message | Solution |
|————–|———-|
| “File size exceeds 20MB limit” | Compress or split the file into smaller parts |
| “Only .txt, .md, .json, .doc, .docx, .pdf, and .html files are allowed” | Convert the file to a supported format |
| “Please select a file to upload” | Ensure a file is selected before clicking upload |
Technical Details
- Files are processed on the server side using WordPress’s file handling system
- AJAX is used for asynchronous file uploads
- Security measures include:
– File type validation
– Size restrictions
– WordPress nonce verification
– User permission checks
Integration with AI Assistant
Uploaded files become part of your AI Assistant’s knowledge base, allowing it to:
- Access and reference uploaded content when responding to queries
- Provide more accurate and context-aware responses
- Use the information to enhance user interactions
Notes
- File uploads require an active assistant configuration
- Files are processed and indexed before becoming available to the assistant
- Large files may take longer to process
- Keep your assistant’s model selection in mind, as some models may have different file handling capabilities
– Ensure files are under the 20MB size limit
– Convert files to supported formats before uploading
– Use clear, descriptive filenames
- Content Organization
- File Types Usage
- Files are processed on the server side using WordPress’s file handling system
- AJAX is used for asynchronous file uploads
- Security measures include:
- Access and reference uploaded content when responding to queries
- Provide more accurate and context-aware responses
- Use the information to enhance user interactions
- File uploads require an active assistant configuration
- Files are processed and indexed before becoming available to the assistant
- Large files may take longer to process
- Keep your assistant’s model selection in mind, as some models may have different file handling capabilities
– Upload files with relevant content for your assistant
– Remove outdated or unnecessary files to maintain optimal performance
– Keep track of uploaded files and their purposes
– Use PDF for formatted documents and manuals
– Use TXT/MD for simple text and documentation
– Use JSON for structured data
– Use HTML for web content
– Use DOC/DOCX for rich text documents
Error Handling
Common error messages and solutions:
| Error Message | Solution |
|————–|———-|
| “File size exceeds 20MB limit” | Compress or split the file into smaller parts |
| “Only .txt, .md, .json, .doc, .docx, .pdf, and .html files are allowed” | Convert the file to a supported format |
| “Please select a file to upload” | Ensure a file is selected before clicking upload |
Technical Details
– File type validation
– Size restrictions
– WordPress nonce verification
– User permission checks
Integration with AI Assistant
Uploaded files become part of your AI Assistant’s knowledge base, allowing it to: