Skip to content
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

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

shaohuzhang1
Copy link
Contributor

fix: support zhipu cogview-3-flash model --bug=1051161 --user=刘瑞斌 【模型】添加智普免费的图片生成模型(Cogview-3-Flash)报错 https://www.tapd.cn/57709429/s/1641187

--bug=1051161 --user=刘瑞斌 【模型】添加智普免费的图片生成模型(Cogview-3-Flash)报错 https://www.tapd.cn/57709429/s/1641187
Copy link

f2c-ci-robot bot commented Jan 3, 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.

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.

Copy link

f2c-ci-robot bot commented Jan 3, 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.

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

@@ -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()
)

Copy link
Contributor Author

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:

  1. Comments and Descriptions: The descriptions should be updated to reflect whether they're specifically for paid or free models.

  2. 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).

  3. Formatting: Some spacing can improve readability. Ensure consistent indentation throughout.

  4. 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.

  5. 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.

@liuruibin liuruibin merged commit f9b1f2d into main Jan 3, 2025
4 checks passed
@liuruibin liuruibin deleted the pr@main@fix_zhipu branch January 3, 2025 05:45
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