在视频长度较小时,支持原生的高分辨率视频;在视频长度较长时,使用更小的分辨率,有效地捕捉模型的时间和空间中的信息。更新后的模型,支持2小时的长视频理解能力和更加精细的短视频理解能力。
提供了视频描述生成、视频事件分割、视频分类、视频打标签、视频事件分析等多种能力,覆盖了新媒体,广告,安全审查,工业制造等场景
from zhipuai import ZhipuAI
client = ZhipuAI(api_key="YOUR API KEY") # Fill in your own APIKey
response = client.chat.completions.create(
model="glm-4v-plus", # Fill in the model name to be called
messages=[
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url" : "https://sfile.chatglm.cn/testpath/video/b844f8f1-5df9-556c-a515-3d3bfaa736e8_0.mp4"
}
},
{
"type": "text",
"text": "Please describe this video in detail"
}
]
}
]
)
print(response.choices[0].message)
评论区