first commit

This commit is contained in:
2025-12-07 14:31:28 +08:00
commit dac41786ec
21 changed files with 398 additions and 0 deletions

17
main.py Normal file
View File

@@ -0,0 +1,17 @@
import os
from dashscope import MultiModalConversation
import dashscope
# 本地图像的绝对路径
local_path = r"D:\Python\mcunc\EmojiTextGenerator\emojis\00e4f193-74af-40f7-8722-59d5a5931f92.jpg"
image_path = f"file://{local_path}"
messages = [
{'role':'user',
'content': [{'image': image_path},
{'text': '使用简洁语言描述该表情包 ,例如 在吗 ,生气,?'}]}]
response = MultiModalConversation.call(
api_key="sk-213f83213fce4e2ba41b8e67721f19cb",
model='qwen3-vl-plus',
messages=messages)
print(response.output.choices[0].message.content[0]["text"])