FilePart
@JsonClassDescription("File part") @JsonInclude(JsonInclude.Include.NON_NULL) public class FilePart implements MessagePart
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:25–75文件片段,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.tracing.telemetry.model 包,实现 MessagePart。核心成员包括 getType、getFileId、getMimeType、getModality、create。
Represents an external referenced file sent to the model by file id.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getType() | 获取类型。 Returns the type. |
public String getFileId() | 获取文件标识。 Returns the file id. |
public String getMimeType() | 获取MIME 类型。 Returns the mime type. |
public String getModality() | 获取 `getModality`。 Returns the modality. |
public static FilePart create(String fileId, String mimeType, String modality)static | 创建并返回实例。 Creates and returns an instance. |
方法详情Method Detail
getType
public String getType()
获取类型。
Returns the type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:37–42getFileId
public String getFileId()
获取文件标识。
Returns the file id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:44–49getMimeType
public String getMimeType()
获取MIME 类型。
Returns the mime type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:51–55getModality
public String getModality()
获取 getModality。
Returns the modality.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:57–63create
public static FilePart create(String fileId, String mimeType, String modality)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
fileId | String | 文件标识(类型 `String`)。The file id. |
mimeType | String | MIME 类型(类型 `String`)。The mime type. |
modality | String | modality(类型 `String`)。The modality. |
FilePart返回FilePart。Returns file part.
源码Source
io/agentscope/core/tracing/telemetry/model/FilePart.java:65–67