Conversation
…I node, the Base Model is not listed --bug=1054358 --user=王孝刚 【应用】应用-设置-添加AI 节点时添加大语言模型,没有列出Base Model https://www.tapd.cn/57709429/s/1681102
|
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. DetailsInstructions 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. |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| } | ||
| } | ||
|
|
||
| const list_base_model = (model_type: any, change?: boolean) => { |
There was a problem hiding this comment.
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.
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