From 7180ea8146817644715ab7e2d1576dfd0b555534 Mon Sep 17 00:00:00 2001 From: n4ze3m Date: Sat, 8 Feb 2025 23:24:18 +0530 Subject: [PATCH] feat: skip embedding model check when simple search is enabled --- src/components/Option/Playground/PlaygroundForm.tsx | 3 ++- src/components/Sidepanel/Chat/form.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Option/Playground/PlaygroundForm.tsx b/src/components/Option/Playground/PlaygroundForm.tsx index 5e65524..1eaed38 100644 --- a/src/components/Option/Playground/PlaygroundForm.tsx +++ b/src/components/Option/Playground/PlaygroundForm.tsx @@ -243,7 +243,8 @@ export const PlaygroundForm = ({ dropedFile }: Props) => { } if (webSearch) { const defaultEM = await defaultEmbeddingModelForRag() - if (!defaultEM) { + const simpleSearch = await getIsSimpleInternetSearch() + if (!defaultEM && !simpleSearch) { form.setFieldError( "message", t("formError.noEmbeddingModel") diff --git a/src/components/Sidepanel/Chat/form.tsx b/src/components/Sidepanel/Chat/form.tsx index 6240a86..8f2fd84 100644 --- a/src/components/Sidepanel/Chat/form.tsx +++ b/src/components/Sidepanel/Chat/form.tsx @@ -273,7 +273,8 @@ export const SidepanelForm = ({ dropedFile }: Props) => { } if (webSearch) { const defaultEM = await defaultEmbeddingModelForRag() - if (!defaultEM) { + const simpleSearch = await getIsSimpleInternetSearch() + if (!defaultEM && !simpleSearch) { form.setFieldError( "message", t("formError.noEmbeddingModel")