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 |
|---|---|---|
text | String | 文本(类型 `String`)。The text. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:272–275image
public Builder image(String image)
设置图像。
Performs the image operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
image | String | 图像(类型 `String`)。The image. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:277–280audio
public Builder audio(String audio)
设置音频。
Performs the audio operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
audio | String | 音频(类型 `String`)。The audio. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:282–285video
public Builder video(Object video)
设置视频。
Performs the video operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
video | Object | 视频(类型 `Object`)。The video. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:287–290fps
public Builder fps(Float fps)
设置该配置项。
Performs the fps operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
fps | Float | fps(类型 `Float`)。The fps. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:292–295maxFrames
public Builder maxFrames(Integer maxFrames)
设置该配置项。
Performs the max frames operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxFrames | Integer | 最大 Frames(类型 `Integer`)。The max frames. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:297–300minPixels
public Builder minPixels(Integer minPixels)
设置该配置项。
Performs the min pixels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
minPixels | Integer | 最小 Pixels(类型 `Integer`)。The min pixels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:302–305maxPixels
public Builder maxPixels(Integer maxPixels)
设置该配置项。
Performs the max pixels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxPixels | Integer | 最大 Pixels(类型 `Integer`)。The max pixels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:307–310totalPixels
public Builder totalPixels(Integer totalPixels)
设置该配置项。
Performs the total pixels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
totalPixels | Integer | 总数 Pixels(类型 `Integer`)。The total pixels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:312–315cacheControl
public Builder cacheControl(Map<String, String> cacheControl)
设置该配置项。
Set the cache control configuration.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cacheControl | Map<String, String> | 缓存 Control(类型 `Map`)。the cache control configuration |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:323–326build
public DashScopeContentPart build()
构建并返回最终实例。
Creates and returns an instance.
DashScopeContentPart返回DashScopeContentPart。Returns DashScope content part.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:328–330