文档中心 > API类目 > 三方AI项目

taobao.agent.model.multiembedding.capacity (多模态向量化能力)

支持文本、图像等多种模态内容的向量化处理

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
multimodal_contents MultimodalContent 可选 多模态向量化的结合,注意指一个对象中只能有一种格式
  • └ image
  • String
  • 可选
  • https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg
  • 图片
  • └ multi_images
  • String []
  • 可选
  • https://img.alicdn.com/imgextra/i2/O1CN019eO00F1HDdlU4Syj5_!!6000000000724-2-tps-2476-1158.png,https://img.alicdn.com/imgextra/i2/O1CN01dSYhpw1nSoamp31CD_!!6000000005089-2-tps-1765-1639.png
  • 多图片
  • └ text
  • String
  • 可选
  • 量子计算是计算科学的一个前沿领域
  • 文本
  • └ video
  • String
  • 可选
  • https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4
  • 视频
origin_biz_params String 可选 {"a":"aaaa","b","bbbbb"} 业务参数,平台会针对具体的业务要求调用方上传不同格式的业务参数用于平台校验,具体格式在对接时的文档中体现
model String 必须 tongyi-embedding-vision-flash 指定具体的模型,可选的模型列表由平台定义给出枚举,接入文档中说明

响应参数

名称 类型 示例值 描述
embeddings MultimodalEmbedding [] 多模态向量化集合
  • └ index
  • Number
  • 2
  • 索引
  • └ output
  • Json
  • [0.07128906,-0.04071045,0.021957397,0.021499634,0.0093688965,-0.006439209,0.007255554,0.0010824203,-0.007701874,0.038269043,0.016662598,0.03515625,0.0670166,-0.0016651154]
  • 向量化结果
  • └ type
  • String
  • video
  • 类型:image、multi_images、text、video

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AgentModelMultiembeddingCapacityRequest req = new AgentModelMultiembeddingCapacityRequest();
AgentModelMultiembeddingCapacityRequest.MultimodalContent obj1 = new AgentModelMultiembeddingCapacityRequest.MultimodalContent();
obj1.setImage("https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg");
obj1.setMultiImages("https://img.alicdn.com/imgextra/i2/O1CN019eO00F1HDdlU4Syj5_!!6000000000724-2-tps-2476-1158.png,https://img.alicdn.com/imgextra/i2/O1CN01dSYhpw1nSoamp31CD_!!6000000005089-2-tps-1765-1639.png");
obj1.setText("量子计算是计算科学的一个前沿领域");
obj1.setVideo("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4");
req.setMultimodalContents(obj1);
req.setOriginBizParams("{\"a\":\"aaaa\",\"b\",\"bbbbb\"}");
req.setModel("tongyi-embedding-vision-flash");
AgentModelMultiembeddingCapacityResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<agent_model_multiembedding_capacity_response>
    <embeddings>
        <multimodal_embedding>
            <index>2</index>
            <output>[0.07128906,-0.04071045,0.021957397,0.021499634,0.0093688965,-0.006439209,0.007255554,0.0010824203,-0.007701874,0.038269043,0.016662598,0.03515625,0.0670166,-0.0016651154]</output>
            <type>video</type>
        </multimodal_embedding>
    </embeddings>
</agent_model_multiembedding_capacity_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部