Skip to content

Commit d02fc76

Browse files
authored
removed doc and docx and added txt to allowed file types (opendatahub-io#5700)
1 parent 22dbce4 commit d02fc76

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

packages/gen-ai/bff/openapi/src/gen-ai.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ components:
14461446
file:
14471447
type: string
14481448
format: binary
1449-
description: File to upload (max 512MB, supports PDF, TXT, DOC, etc.)
1449+
description: File to upload (max 512MB, supports PDF, TXT, CSV)
14501450
vector_store_id:
14511451
type: string
14521452
example: 'vs_abc123-def456'

packages/gen-ai/frontend/src/app/Chatbot/const.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ export const FILE_UPLOAD_CONFIG = {
4747
MAX_FILES_IN_VECTOR_STORE: 10, // Maximum number of files allowed in vector store
4848
ALLOWED_FILE_TYPES: {
4949
'application/pdf': ['.pdf'],
50-
'application/msword': ['.doc'],
51-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': ['.docx'],
5250
'text/csv': ['.csv'],
51+
'text/plain': ['.txt'],
5352
},
54-
ACCEPTED_EXTENSIONS: '.pdf,.doc,.docx,.csv',
53+
ACCEPTED_EXTENSIONS: '.pdf,.csv,.txt',
5554
} as const;
5655

5756
// Error handling constants

packages/gen-ai/frontend/src/app/Chatbot/sourceUpload/ChatbotSourceUploadPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const ChatbotSourceUploadPanel: React.FC<ChatbotSourceUploadPanelProps> = ({
109109
</Button>
110110
</div>
111111
<div className="pf-v6-c-multiple-file-upload__info">
112-
Upload up to 10 PDF, DOC or CSV files. Maximum size{' '}
112+
Upload up to 10 PDF, CSV or TXT files. Maximum size{' '}
113113
{FILE_UPLOAD_CONFIG.MAX_FILE_SIZE / (1024 * 1024)} mb per file.
114114
</div>
115115
<input

0 commit comments

Comments
 (0)