-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support zhipu cogview-3-flash model #1968
Conversation
--bug=1051161 --user=刘瑞斌 【模型】添加智普免费的图片生成模型(Cogview-3-Flash)报错 https://www.tapd.cn/57709429/s/1641187
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. 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. |
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -56,6 +59,7 @@ | |||
.append_default_model_info(ModelInfo('glm-4', '', ModelTypeConst.LLM, qwen_model_credential, ZhipuChatModel)) | |||
.append_model_info_list(model_info_image_list) | |||
.append_model_info_list(model_info_tti_list) | |||
.append_default_model_info(model_info_tti_list[0]) | |||
.build() | |||
) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the corrections and improvements:
-
Comments and Descriptions: The descriptions should be updated to reflect whether they're specifically for paid or free models.
-
Appending Default Models: There's no need to append
model_info_tti_list[0]
since it would be redundant with.append_model_info_list(model_info_tti_list)
. Just remove this line (or use a different index if needed). -
Formatting: Some spacing can improve readability. Ensure consistent indentation throughout.
-
Consistency: Both models mention "生成高质量图像" (generate high-quality image), which is good consistency but ensure that both share the exact same functionality within their respective categories.
-
Typo: Check for any typos in model names to ensure accuracy. In this specific instance, there appear to be no typos.
Updated Code:
@@ -48,6 +48,9 @@
ModelInfo('cogview-3-plus', '根据用户文字描述生成高质量图像,支持多图片尺寸',
ModelTypeConst.TTI, zhipu_tti_model_credential,
ZhiPuTextToImage),
+ ModelInfo('cogview-3-flash', '根据用户文字描述生成高质量图像,支持多图片尺寸(免费)',
+ ModelTypeConst.TTI, zhipu_tti_model_credential,
+ ZhiPuTextToImage),
]
model_info_manage = (
@@ -56,7 +58,7 @@
.append_default_model_info(ModelInfo('glm-4', '', ModelTypeConst.LLM, qwen_model_credential, ZhipuChatModel))
.append_model_info_list(model_info_image_list)
.append_model_info_list(model_info_tti_list)
- .append_default_model_info(model_info_tti_list[0])
.build()
)
Make sure the rest of your configuration file doesn't require these changes, especially in terms of data types or logic flow.
fix: support zhipu cogview-3-flash model --bug=1051161 --user=刘瑞斌 【模型】添加智普免费的图片生成模型(Cogview-3-Flash)报错 https://www.tapd.cn/57709429/s/1641187