fix: improve type hint for image_url in video_create_params.py (#14)

Co-authored-by: zhengweijun <weijun.zheng@aminer.cn>
This commit is contained in:
wellenzheng 2025-07-23 17:04:00 +08:00 committed by GitHub
parent b4ff07c158
commit eb49b8c06c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,5 @@
import os
def check_apikey():
api_key = os.getenv('ZAI_API_KEY')
if api_key and api_key.strip():
@ -11,4 +10,4 @@ def check_apikey():
if __name__ == '__main__':
check_apikey()
check_apikey()

View file

@ -418,7 +418,11 @@ async def main():
sample_image_url = "https://i0.sinaimg.cn/edu/2011/1125/U4999P42DT20111125164101.jpg"
sample_first_frame = "https://gd-hbimg.huaban.com/ccee58d77afe8f5e17a572246b1994f7e027657fe9e6-qD66In_fw1200webp"
sample_last_frame = "https://gd-hbimg.huaban.com/cc2601d568a72d18d90b2cc7f1065b16b2d693f7fa3f7-hDAwNq_fw1200webp"
ref_image_url = ["ref1", "ref2", "ref3"]
ref_image_url = [
"https://gd-hbimg.huaban.com/ccee58d77afe8f5e17a572246b1994f7e027657fe9e6-qD66In_fw1200webp",
"https://gd-hbimg.huaban.com/cc2601d568a72d18d90b2cc7f1065b16b2d693f7fa3f7-hDAwNq_fw1200webp",
"https://gd-hbimg.huaban.com/cc2601d568a72d18d90b2cc7f1065b16b2d693f7fa3f7-hDAwNq_fw1200webp"
]
try:
# 1. cogvideox-3 text-to-video
@ -467,6 +471,7 @@ async def main():
# 5. viduq1-text text-to-video
print("\n" + "="*50)
print(os.environ.get("ZAI_API_KEY"))
result5 = await examples.viduq1_text_to_video(
prompt="Peter Rabbit driving a car, wandering on the road, with a happy and joyful expression on his face.",
style="general",

View file

@ -30,7 +30,7 @@ class VideoCreateParams(TypedDict, total=False):
"""
model: str
prompt: str
image_url: str | list | dict
image_url: str | list[str] | dict
quality: str
with_audio: bool
size: str