DashScopeContentPart
@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeContentPart
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:44–332用于多模态消息的DashScope 内容片段 DTO。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getText、setText、getImage、setImage、getAudio、setAudio。
DashScope content part DTO for multimodal messages.
Each content part can contain one type of content: text, image, audio, or video.
Example text part:
`{"text": "What's in this image?"}
`
Example image part (URL):
`{"image": "https://example.com/image.jpg"}
`
Example image part (base64):
`{"image": "data:image/png;base64,iVBORw0KGgo..."}
`
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DashScopeContentPart() | 初始化 `DashScopeContentPart` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
DashScopeContentPart
public DashScopeContentPart()
初始化 DashScopeContentPart 实例。
Creates a new instance.
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:88方法详情Method Detail
getText
public String getText()
获取文本。
Returns the text.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:90–92setText
public void setText(String text)
设置文本。
Sets the text.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
text | String | 文本(类型 `String`)。The text. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:94–96getImage
public String getImage()
获取图像。
Returns the image.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:98–100setImage
public void setImage(String image)
设置图像。
Sets the image.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
image | String | 图像(类型 `String`)。The image. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:102–104getAudio
public String getAudio()
获取音频。
Returns the audio.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:106–108setAudio
public void setAudio(String audio)
设置音频。
Sets the audio.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
audio | String | 音频(类型 `String`)。The audio. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:110–112getVideo
public Object getVideo()
获取视频。
Returns the video.
Objectio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:114–116setVideo
public void setVideo(Object video)
设置视频。
Sets the video.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
video | Object | 视频(类型 `Object`)。The video. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:118–120getFps
public Float getFps()
获取 getFps。
Returns the fps.
Floatio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:122–124setFps
public void setFps(Float fps)
设置 setFps。
Sets the fps.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
fps | Float | fps(类型 `Float`)。The fps. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:126–128getMaxFrames
public Integer getMaxFrames()
获取 getMaxFrames。
Returns the max frames.
Integerio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:130–132setMaxFrames
public void setMaxFrames(Integer maxFrames)
设置 setMaxFrames。
Sets the max frames.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxFrames | Integer | 最大 Frames(类型 `Integer`)。The max frames. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:134–136getMinPixels
public Integer getMinPixels()
获取 getMinPixels。
Returns the min pixels.
Integerio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:138–140setMinPixels
public void setMinPixels(Integer minPixels)
设置 setMinPixels。
Sets the min pixels.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
minPixels | Integer | 最小 Pixels(类型 `Integer`)。The min pixels. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:142–144getMaxPixels
public Integer getMaxPixels()
获取 getMaxPixels。
Returns the max pixels.
Integerio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:146–148setMaxPixels
public void setMaxPixels(Integer maxPixels)
设置 setMaxPixels。
Sets the max pixels.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxPixels | Integer | 最大 Pixels(类型 `Integer`)。The max pixels. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:150–152getTotalPixels
public Integer getTotalPixels()
获取 getTotalPixels。
Returns the total pixels.
Integerio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:154–156setTotalPixels
public void setTotalPixels(Integer totalPixels)
设置 setTotalPixels。
Sets the total pixels.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
totalPixels | Integer | 总数 Pixels(类型 `Integer`)。The total pixels. |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:158–160getCacheControl
public Map<String, String> getCacheControl()
获取 getCacheControl。
Get the cache control configuration.
Map<String, String>io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:167–169setCacheControl
public void setCacheControl(Map<String, String> cacheControl)
设置 setCacheControl。
Set the cache control configuration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cacheControl | Map<String, String> | 缓存 Control(类型 `Map`)。the cache control configuration |
io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:176–178getVideoAsString
public String getVideoAsString()
获取 getVideoAsString。
Get video as URL string.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:185–190getVideoAsList
public List<String> getVideoAsList()
获取视频 As 列表。
Get video as frame list.
List<String>io/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:197–203text
public static DashScopeContentPart text(String text)
创建文本内容片段。
Create a text content part.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
text | String | 文本内容。the text content |
DashScopeContentPartio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:211–215image
public static DashScopeContentPart image(String imageUrl)
创建图像内容片段。
Create an image content part.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
imageUrl | String | 图像 URL 或 base64 数据 URI。the image URL or base64 data URI |
DashScopeContentPartio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:223–227audio
public static DashScopeContentPart audio(String audioUrl)
创建音频内容片段。
Create an audio content part.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
audioUrl | String | 音频 URL 或 base64 数据 URI。the audio URL or base64 data URI |
DashScopeContentPartio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:235–239video
public static DashScopeContentPart video(String videoUrl)
创建视频内容片段来自 URL。
Create a video content part from URL.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
videoUrl | String | 视频 URL。the video URL |
DashScopeContentPartio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:247–251videoFrames
public static DashScopeContentPart videoFrames(List<String> frames)
设置该参数。
Create a video content part from frame list.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
frames | List<String> | frames(类型 `List`)。the list of frame URLs |
DashScopeContentPartio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:259–263builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeContentPart.java:265–267嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 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.