-
Notifications
You must be signed in to change notification settings - Fork 509
[Feature]:视觉理解模型支持 多模态消息 #1124
Description
使用视觉理解模型 https://bailian.console.aliyun.com/cn-beijing/?tab=doc#/doc/?type=model&url=2845871
百炼api支持,但 agentscppe暂时不支持
Map<String, Object> params = new HashMap<>();
params.put("video", "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241115/cqqkru/1.mp4");
params.put("fps", 2);
MultiModalMessage userMessage = MultiModalMessage.builder().role(Role.USER.getValue())
.content(Arrays.asList(
params,
Collections.singletonMap("text", "这段视频的内容是什么?"))).build();
MultiModalConversationParam param = MultiModalConversationParam.builder()
// 若没有配置环境变量,请用百炼API Key将下行替换为:.apiKey("sk-xxx")
// 各地域的API Key不同。获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
.model("qwen3.6-plus")
.messages(Arrays.asList(userMessage))
.build();
MultiModalConversationResult result = conv.call(param);
Metadata
Metadata
Assignees
Labels
Type
Projects
Status