From 303c6ecc1d4a16af4ccb5bc3e7ced3d6fc152b08 Mon Sep 17 00:00:00 2001 From: zhaobingshuang <1475195565@qq.com> Date: Thu, 15 May 2025 10:02:59 +0800 Subject: [PATCH 1/2] fix: The init_azure_openai() method in the core/hosting_configuration.py file doesn't work (#19704) (#19705) Co-authored-by: crazywoola <427733928@qq.com> --- api/core/entities/provider_configuration.py | 51 ++++++++++----------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/api/core/entities/provider_configuration.py b/api/core/entities/provider_configuration.py index 86887c9b4a..81d582fb9a 100644 --- a/api/core/entities/provider_configuration.py +++ b/api/core/entities/provider_configuration.py @@ -897,37 +897,36 @@ class ProviderConfiguration(BaseModel): ) except Exception as ex: logger.warning(f"get custom model schema failed, {ex}") + continue - if not custom_model_schema: - continue + if not custom_model_schema: + continue - if custom_model_schema.model_type not in model_types: - continue + if custom_model_schema.model_type not in model_types: + continue - status = ModelStatus.ACTIVE - if ( - custom_model_schema.model_type in model_setting_map - and custom_model_schema.model in model_setting_map[custom_model_schema.model_type] - ): - model_setting = model_setting_map[custom_model_schema.model_type][ - custom_model_schema.model - ] - if model_setting.enabled is False: - status = ModelStatus.DISABLED + status = ModelStatus.ACTIVE + if ( + custom_model_schema.model_type in model_setting_map + and custom_model_schema.model in model_setting_map[custom_model_schema.model_type] + ): + model_setting = model_setting_map[custom_model_schema.model_type][custom_model_schema.model] + if model_setting.enabled is False: + status = ModelStatus.DISABLED - provider_models.append( - ModelWithProviderEntity( - model=custom_model_schema.model, - label=custom_model_schema.label, - model_type=custom_model_schema.model_type, - features=custom_model_schema.features, - fetch_from=FetchFrom.PREDEFINED_MODEL, - model_properties=custom_model_schema.model_properties, - deprecated=custom_model_schema.deprecated, - provider=SimpleModelProviderEntity(self.provider), - status=status, - ) + provider_models.append( + ModelWithProviderEntity( + model=custom_model_schema.model, + label=custom_model_schema.label, + model_type=custom_model_schema.model_type, + features=custom_model_schema.features, + fetch_from=FetchFrom.PREDEFINED_MODEL, + model_properties=custom_model_schema.model_properties, + deprecated=custom_model_schema.deprecated, + provider=SimpleModelProviderEntity(self.provider), + status=status, ) + ) # if llm name not in restricted llm list, remove it restrict_model_names = [rm.model for rm in restrict_models] From dd4419fd5eff2e57f35378942e24fad3e9d75296 Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Thu, 15 May 2025 10:26:23 +0800 Subject: [PATCH 2/2] Revert "Support for copying nodes between workflows (This feature is unrelated to remove functions. When using the copy function, the browser will permanently retain the last copied node)."" (#19708) --- .../components/workflow/store/workflow/workflow-slice.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/web/app/components/workflow/store/workflow/workflow-slice.ts b/web/app/components/workflow/store/workflow/workflow-slice.ts index e1f2fd91c5..6bb69cdfcd 100644 --- a/web/app/components/workflow/store/workflow/workflow-slice.ts +++ b/web/app/components/workflow/store/workflow/workflow-slice.ts @@ -37,13 +37,8 @@ export type WorkflowSliceShape = { export const createWorkflowSlice: StateCreator = set => ({ workflowRunningData: undefined, setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })), - clipboardElements: (() => { - const storedElements = localStorage.getItem('clipboard_elements') - return storedElements ? JSON.parse(storedElements) : [] - })(), - setClipboardElements: (clipboardElements) => { - localStorage.setItem('clipboard_elements', JSON.stringify(clipboardElements)) - }, + clipboardElements: [], + setClipboardElements: clipboardElements => set(() => ({ clipboardElements })), selection: null, setSelection: selection => set(() => ({ selection })), bundleNodeSize: null,