Skip to content

Commit 4c40030

Browse files
authored
Bugfix/update doc store naming convention (#3814)
update doc store naming convention
1 parent 3b13e83 commit 4c40030

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/ui/src/views/assistants/custom/CustomAssistantConfigurePreview.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ const CustomAssistantConfigurePreview = () => {
319319

320320
const docStoreOption = documentStoreOptions.find((ds) => ds.name === selectedDocumentStores[i].id)
321321
// convert to small case and replace space with underscore
322-
const name = (docStoreOption?.label || '').toLowerCase().replace(/ /g, '_')
322+
const name = (docStoreOption?.label || '')
323+
.toLowerCase()
324+
.replace(/ /g, '_')
325+
.replace(/[^a-z0-9_-]/g, '')
323326
const desc = selectedDocumentStores[i].description || docStoreOption?.description || ''
324327

325328
set(retrieverToolNodeData, 'inputs', {

0 commit comments

Comments
 (0)