Bugfix/update doc store naming convention (#3814)

update doc store naming convention
This commit is contained in:
Henry Heng 2025-01-06 03:13:53 +00:00 committed by GitHub
parent 3b13e8345a
commit 4c400301f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -319,7 +319,10 @@ const CustomAssistantConfigurePreview = () => {
const docStoreOption = documentStoreOptions.find((ds) => ds.name === selectedDocumentStores[i].id)
// convert to small case and replace space with underscore
const name = (docStoreOption?.label || '').toLowerCase().replace(/ /g, '_')
const name = (docStoreOption?.label || '')
.toLowerCase()
.replace(/ /g, '_')
.replace(/[^a-z0-9_-]/g, '')
const desc = selectedDocumentStores[i].description || docStoreOption?.description || ''
set(retrieverToolNodeData, 'inputs', {