AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:269–331

构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 text、image、audio、video、fps、maxFrames。

A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.dashscope.dto.

方法摘要Method Summary

方法Method说明Description
public Builder text(String text)
设置文本。
Performs the text operation.
public Builder image(String image)
设置图像。
Performs the image operation.
public Builder audio(String audio)
设置音频。
Performs the audio operation.
public Builder video(Object video)
设置视频。
Performs the video operation.
public Builder fps(Float fps)
设置该配置项。
Performs the fps operation.
public Builder maxFrames(Integer maxFrames)
设置该配置项。
Performs the max frames operation.
public Builder minPixels(Integer minPixels)
设置该配置项。
Performs the min pixels operation.
public Builder maxPixels(Integer maxPixels)
设置该配置项。
Performs the max pixels operation.
public Builder totalPixels(Integer totalPixels)
设置该配置项。
Performs the total pixels operation.
public Builder cacheControl(Map<String, String> cacheControl)
设置该配置项。
Set the cache control configuration.
public DashScopeContentPart build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

text

public Builder text(String text)

设置文本。

Performs the text operation.

参数Parameters
名称Name类型Type说明Description
textString文本(类型 `String`)。The text.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:272–275

image

public Builder image(String image)

设置图像。

Performs the image operation.

参数Parameters
名称Name类型Type说明Description
imageString图像(类型 `String`)。The image.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:277–280

audio

public Builder audio(String audio)

设置音频。

Performs the audio operation.

参数Parameters
名称Name类型Type说明Description
audioString音频(类型 `String`)。The audio.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:282–285

video

public Builder video(Object video)

设置视频。

Performs the video operation.

参数Parameters
名称Name类型Type说明Description
videoObject视频(类型 `Object`)。The video.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:287–290

fps

public Builder fps(Float fps)

设置该配置项。

Performs the fps operation.

参数Parameters
名称Name类型Type说明Description
fpsFloatfps(类型 `Float`)。The fps.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:292–295

maxFrames

public Builder maxFrames(Integer maxFrames)

设置该配置项。

Performs the max frames operation.

参数Parameters
名称Name类型Type说明Description
maxFramesInteger最大 Frames(类型 `Integer`)。The max frames.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:297–300

minPixels

public Builder minPixels(Integer minPixels)

设置该配置项。

Performs the min pixels operation.

参数Parameters
名称Name类型Type说明Description
minPixelsInteger最小 Pixels(类型 `Integer`)。The min pixels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:302–305

maxPixels

public Builder maxPixels(Integer maxPixels)

设置该配置项。

Performs the max pixels operation.

参数Parameters
名称Name类型Type说明Description
maxPixelsInteger最大 Pixels(类型 `Integer`)。The max pixels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:307–310

totalPixels

public Builder totalPixels(Integer totalPixels)

设置该配置项。

Performs the total pixels operation.

参数Parameters
名称Name类型Type说明Description
totalPixelsInteger总数 Pixels(类型 `Integer`)。The total pixels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:312–315

cacheControl

public Builder cacheControl(Map<String, String> cacheControl)

设置该配置项。

Set the cache control configuration.

参数Parameters
名称Name类型Type说明Description
cacheControlMap<String, String>缓存 Control(类型 `Map`)。the cache control configuration
返回Returns Builder
返回当前实例,以支持链式调用。this builder
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:323–326

build

public DashScopeContentPart build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns DashScopeContentPart
返回DashScopeContentPart。Returns DashScope content part.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:328–330
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.