AS AgentScopeAPI 手册 / API Reference

BlobPart

@JsonClassDescription("Blob part") @JsonInclude(JsonInclude.Include.NON_NULL) public class BlobPart implements MessagePart
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:25–76

二进制对象片段,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.tracing.telemetry.model 包,实现 MessagePart。核心成员包括 getType、getContent、getMimeType、getModality、create。

Represents blob binary data sent inline to the model.

方法摘要Method Summary

方法Method说明Description
public String getType()
获取类型。
Returns the type.
public String getContent()
获取内容。
Returns the content.
public String getMimeType()
获取MIME 类型。
Returns the mime type.
public String getModality()
获取 `getModality`。
Returns the modality.
public static BlobPart create(String content, String mimeType, String modality)
static
创建并返回实例。
Creates and returns an instance.

方法详情Method Detail

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:37–42

getContent

public String getContent()

获取内容。

Returns the content.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:44–50

getMimeType

public String getMimeType()

获取MIME 类型。

Returns the mime type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:52–56

getModality

public String getModality()

获取 getModality。

Returns the modality.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:58–64

create

public static BlobPart create(String content, String mimeType, String modality)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
contentString内容(类型 `String`)。The content.
mimeTypeStringMIME 类型(类型 `String`)。The mime type.
modalityStringmodality(类型 `String`)。The modality.
返回Returns BlobPart
返回BlobPart。Returns blob part.
源码Source io/agentscope/core/tracing/telemetry/model/BlobPart.java:66–68
基于官方固定版本源码静态生成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.