Skip to content

fix: When adding a large language model in Application-Settings-Add AI node, the Base Model is not listed#2804

Merged
wxg0103 merged 1 commit intomainfrom
pr@main@fix_1054358
Apr 7, 2025
Merged

fix: When adding a large language model in Application-Settings-Add AI node, the Base Model is not listed#2804
wxg0103 merged 1 commit intomainfrom
pr@main@fix_1054358

Conversation

@shaohuzhang1
Copy link
Copy Markdown
Contributor

fix: When adding a large language model in Application-Settings-Add AI node, the Base Model is not listed --bug=1054358 --user=王孝刚 【应用】应用-设置-添加AI 节点时添加大语言模型,没有列出Base Model https://www.tapd.cn/57709429/s/1681102

…I node, the Base Model is not listed

--bug=1054358 --user=王孝刚 【应用】应用-设置-添加AI 节点时添加大语言模型,没有列出Base Model https://www.tapd.cn/57709429/s/1681102
@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Apr 7, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Apr 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

}
}

const list_base_model = (model_type: any, change?: boolean) => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code looks correct and well-organized. However, there's an extra blank line added at the end of the function definition, which could be removed for better readability:

@@ -377,6 +377,8 @@
   dialogVisible.value = true
   base_form_data.value.model_type = model_type || ''
   activeName.value = 'base-info'
+  if (model_type) {
+    list_base_model(model_type);
+  }
 }

Additionally, you might consider adding type annotations to improve code clarity:

const open = (provider: Provider, model_type?: string): void => {
  dialogVisible.value = true;
  base_form_data.value.model_type = model_type || '';
  activeName.value = 'base-info';
  if (model_type !== undefined) { // Ensure it's not null or undefined before checking
    list_base_model(model_type);
  }
}

These changes will make the code more maintainable and robust, especially when dealing with nullable values.

@wxg0103 wxg0103 merged commit 189e2a6 into main Apr 7, 2025
4 of 5 checks passed
@wxg0103 wxg0103 deleted the pr@main@fix_1054358 branch April 7, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants