类 DashScopeContentPart
java.lang.Object
io.agentscope.core.formatter.dashscope.dto.DashScopeContentPart
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..."}
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static DashScopeContentPartCreate an audio content part.static DashScopeContentPart.Builderbuilder()getAudio()getFps()getImage()getText()getVideo()Get video as frame list.Get video as URL string.static DashScopeContentPartCreate an image content part.voidvoidvoidvoidsetMaxFrames(Integer maxFrames) voidsetMaxPixels(Integer maxPixels) voidsetMinPixels(Integer minPixels) voidvoidsetTotalPixels(Integer totalPixels) voidstatic DashScopeContentPartCreate a text content part.static DashScopeContentPartCreate a video content part from URL.static DashScopeContentPartvideoFrames(List<String> frames) Create a video content part from frame list.
-
构造器详细资料
-
DashScopeContentPart
public DashScopeContentPart()
-
-
方法详细资料
-
getText
-
setText
-
getImage
-
setImage
-
getAudio
-
setAudio
-
getVideo
-
setVideo
-
getFps
-
setFps
-
getMaxFrames
-
setMaxFrames
-
getMinPixels
-
setMinPixels
-
getMaxPixels
-
setMaxPixels
-
getTotalPixels
-
setTotalPixels
-
getVideoAsString
Get video as URL string.- 返回:
- the video URL, or null if not a string
-
getVideoAsList
Get video as frame list.- 返回:
- the video frames, or null if not a list
-
text
Create a text content part.- 参数:
text- the text content- 返回:
- a new DashScopeContentPart
-
image
Create an image content part.- 参数:
imageUrl- the image URL or base64 data URI- 返回:
- a new DashScopeContentPart
-
audio
Create an audio content part.- 参数:
audioUrl- the audio URL or base64 data URI- 返回:
- a new DashScopeContentPart
-
video
Create a video content part from URL.- 参数:
videoUrl- the video URL- 返回:
- a new DashScopeContentPart
-
videoFrames
Create a video content part from frame list.- 参数:
frames- the list of frame URLs- 返回:
- a new DashScopeContentPart
-
builder
-