From 4c400301f20ee31c6de463eafa659feee457b7b8 Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Mon, 6 Jan 2025 03:13:53 +0000 Subject: [PATCH] Bugfix/update doc store naming convention (#3814) update doc store naming convention --- .../assistants/custom/CustomAssistantConfigurePreview.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/views/assistants/custom/CustomAssistantConfigurePreview.jsx b/packages/ui/src/views/assistants/custom/CustomAssistantConfigurePreview.jsx index 6356f8547..044d8eb87 100644 --- a/packages/ui/src/views/assistants/custom/CustomAssistantConfigurePreview.jsx +++ b/packages/ui/src/views/assistants/custom/CustomAssistantConfigurePreview.jsx @@ -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', {