diff --git a/web/app/components/app/app-publisher/features-wrapper.tsx b/web/app/components/app/app-publisher/features-wrapper.tsx index d34cecf55f..dadd112135 100644 --- a/web/app/components/app/app-publisher/features-wrapper.tsx +++ b/web/app/components/app/app-publisher/features-wrapper.tsx @@ -23,7 +23,6 @@ const FeaturesWrappedAppPublisher = (props: Props) => { const featuresStore = useFeaturesStore() const [restoreConfirmOpen, setRestoreConfirmOpen] = useState(false) const handleConfirm = useCallback(() => { - console.log('resetAppConfig') props.resetAppConfig?.() const { features, diff --git a/web/app/components/app/configuration/config-vision/index.tsx b/web/app/components/app/configuration/config-vision/index.tsx index 7666fcb834..23f00d46d8 100644 --- a/web/app/components/app/configuration/config-vision/index.tsx +++ b/web/app/components/app/configuration/config-vision/index.tsx @@ -30,7 +30,12 @@ const ConfigVision: FC = () => { draft.file = { ...draft.file, enabled: data.enabled, - image: { detail: data.image?.detail }, + image: { + enabled: data.enabled, + detail: data.image?.detail, + transfer_methods: data.image?.transfer_methods, + number_limits: data.image?.number_limits, + }, } }) setFeatures(newFeatures) diff --git a/web/app/components/app/configuration/config-vision/param-config-content.tsx b/web/app/components/app/configuration/config-vision/param-config-content.tsx index 97195b24d7..fe6d1cd767 100644 --- a/web/app/components/app/configuration/config-vision/param-config-content.tsx +++ b/web/app/components/app/configuration/config-vision/param-config-content.tsx @@ -26,9 +26,14 @@ const ParamConfigContent: FC = () => { const newFeatures = produce(features, (draft) => { draft.file = { ...draft.file, - image: { detail: data.image?.detail }, allowed_file_upload_methods: data.allowed_file_upload_methods, number_limits: data.number_limits, + image: { + enabled: data.enabled, + detail: data.image?.detail, + transfer_methods: data.allowed_file_upload_methods, + number_limits: data.number_limits, + }, } }) setFeatures(newFeatures) diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx index 098cfac125..8348798018 100644 --- a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx +++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx @@ -49,8 +49,8 @@ const ChatItem: FC = ({ return { ...configTemplate, more_like_this: features.moreLikeThis, - opening_statement: features.opening?.opening_statement || '', - suggested_questions: features.opening?.suggested_questions || [], + opening_statement: features.opening?.enabled ? (features.opening?.opening_statement || '') : '', + suggested_questions: features.opening?.enabled ? (features.opening?.suggested_questions || []) : [], sensitive_word_avoidance: features.moderation, speech_to_text: features.speech2text, text_to_speech: features.text2speech, diff --git a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx index 456a77ebbb..6ebf58de4f 100644 --- a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx +++ b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx @@ -50,8 +50,8 @@ const DebugWithSingleModel = forwardRef = ({ -
- - setExpanded(!expanded)}> - - - - {expanded &&
} -
+ {varList.length > 0 && ( +
+ + setExpanded(!expanded)}> + + + + {expanded &&
} +
+ )} )}
diff --git a/web/app/components/app/configuration/index.tsx b/web/app/components/app/configuration/index.tsx index b68553c70b..1075f0f5f9 100644 --- a/web/app/components/app/configuration/index.tsx +++ b/web/app/components/app/configuration/index.tsx @@ -687,8 +687,8 @@ const Configuration: FC = () => { dataset_query_variable: contextVar || '', // features more_like_this: features?.moreLikeThis as any, - opening_statement: features?.opening?.opening_statement || '', - suggested_questions: features?.opening?.suggested_questions || [], + opening_statement: features?.opening?.enabled ? (features.opening?.opening_statement || '') : '', + suggested_questions: features?.opening?.enabled ? (features.opening?.suggested_questions || []) : [], sensitive_word_avoidance: features?.moderation as any, speech_to_text: features?.speech2text as any, text_to_speech: features?.text2speech as any,