From eae4c8067932679b2093b3829f293530112d8f6e Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 18 Mar 2024 22:12:34 +0800 Subject: [PATCH] fix: input text error --- .../app/configuration/config-var/select-var-type.tsx | 2 +- web/utils/model-config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/app/configuration/config-var/select-var-type.tsx b/web/app/components/app/configuration/config-var/select-var-type.tsx index ad0c6fbd01..f3bfae82b6 100644 --- a/web/app/components/app/configuration/config-var/select-var-type.tsx +++ b/web/app/components/app/configuration/config-var/select-var-type.tsx @@ -62,7 +62,7 @@ const SelectVarType: FC = ({
- + diff --git a/web/utils/model-config.ts b/web/utils/model-config.ts index 9f6f11cfed..b54b5f284e 100644 --- a/web/utils/model-config.ts +++ b/web/utils/model-config.ts @@ -18,9 +18,9 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] | if (item.external_data_tool) return [item.external_data_tool.type, item.external_data_tool] - return ['select', item.select] + return ['select', item.select || {}] })() - const is_context_var = dataset_query_variable === content.variable + const is_context_var = dataset_query_variable === content?.variable if (type === 'string' || type === 'paragraph') { promptVariables.push({