Skip to content

Commit 86ed32e

Browse files
authored
feat(kb): added json/yaml parser+chunker, added dedicated csv chunker (#1539)
* feat(kb): added json/yaml parser+chunker, added dedicated csv chunker * ack PR comments * improved kb upload
1 parent 0e83894 commit 86ed32e

File tree

27 files changed

+1793
-856
lines changed

27 files changed

+1793
-856
lines changed

.github/workflows/docs-embeddings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
env:
3333
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
3434
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
35-
run: bun run scripts/process-docs-embeddings.ts --clear
35+
run: bun run scripts/process-docs.ts --clear

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/edit-chunk-modal/edit-chunk-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export function EditChunkModal({
312312
<Button
313313
onClick={handleSaveContent}
314314
disabled={!isFormValid || isSaving || !hasUnsavedChanges || isNavigating}
315-
className='bg-[var(--brand-primary-hex)] font-[480] text-muted-foreground shadow-[0_0_0_0_var(--brand-primary-hex)] transition-all duration-200 hover:bg-[var(--brand-primary-hover-hex)] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]'
315+
className='bg-[var(--brand-primary-hex)] font-[480] text-white shadow-[0_0_0_0_var(--brand-primary-hex)] transition-all duration-200 hover:bg-[var(--brand-primary-hover-hex)] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]'
316316
>
317317
{isSaving ? (
318318
<>

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/upload-modal/upload-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function UploadModal({
6464
return `File "${file.name}" is too large. Maximum size is 100MB.`
6565
}
6666
if (!ACCEPTED_FILE_TYPES.includes(file.type)) {
67-
return `File "${file.name}" has an unsupported format. Please use PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, or HTML files.`
67+
return `File "${file.name}" has an unsupported format. Please use PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML, JSON, YAML, or YML files.`
6868
}
6969
return null
7070
}
@@ -193,8 +193,8 @@ export function UploadModal({
193193
{isDragging ? 'Drop files here!' : 'Drop files here or click to browse'}
194194
</p>
195195
<p className='text-muted-foreground text-xs'>
196-
Supports PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML (max 100MB
197-
each)
196+
Supports PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML, JSON, YAML,
197+
YML (max 100MB each)
198198
</p>
199199
</div>
200200
</div>

apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function CreateModal({ open, onOpenChange, onKnowledgeBaseCreated }: Crea
158158
// Check file type
159159
if (!ACCEPTED_FILE_TYPES.includes(file.type)) {
160160
setFileError(
161-
`File ${file.name} has an unsupported format. Please use PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, or HTML.`
161+
`File ${file.name} has an unsupported format. Please use PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML, JSON, YAML, or YML.`
162162
)
163163
hasError = true
164164
continue
@@ -501,8 +501,8 @@ export function CreateModal({ open, onOpenChange, onKnowledgeBaseCreated }: Crea
501501
: 'Drop files here or click to browse'}
502502
</p>
503503
<p className='text-muted-foreground text-xs'>
504-
Supports PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML (max
505-
100MB each)
504+
Supports PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, MD, PPT, PPTX, HTML,
505+
JSON, YAML, YML (max 100MB each)
506506
</p>
507507
</div>
508508
</div>

0 commit comments

Comments
 (0)