Content
public class Content extends Event
源码Source
io/agentscope/runtime/engine/schemas/Content.java:24–94内容 in 消息的基类。位于 io.agentscope.runtime.engine.schemas 包,继承自 Event。核心成员包括 getType、setType、getObject、setObject、getIndex、setIndex。
Base class for content in messages.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public Content() | 初始化 `Content` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getType() | 获取类型。 Returns the type. |
public void setType(String type) | 设置类型。 Sets the type. |
public String getObject() | 获取对象。 Returns the object. |
public void setObject(String object) | 设置对象。 Sets the object. |
public Integer getIndex() | 获取索引。 Returns the index. |
public void setIndex(Integer index) | 设置索引。 Sets the index. |
public Boolean getDelta() | 获取增量。 Returns the delta. |
public void setDelta(Boolean delta) | 设置增量。 Sets the delta. |
public String getMsgId() | 获取消息标识。 Returns the msg id. |
public void setMsgId(String msgId) | 设置消息标识。 Sets the msg id. |
public Content completed() | 返回已完成。 Returns the completed. |
public Content inProgress() | 将响应状态设置为进行中。 Returns the in progress. |
构造器详情Constructor Detail
Content
public Content()
初始化 Content 实例。
Creates a new instance.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:40–42方法详情Method Detail
getType
public String getType()
获取类型。
Returns the type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:44–46setType
public void setType(String type)
设置类型。
Sets the type.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
源码Source
io/agentscope/runtime/engine/schemas/Content.java:48–50getObject
public String getObject()
获取对象。
Returns the object.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:52–54setObject
public void setObject(String object)
设置对象。
Sets the object.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
object | String | 对象(类型 `String`)。The object. |
源码Source
io/agentscope/runtime/engine/schemas/Content.java:56–58getIndex
public Integer getIndex()
获取索引。
Returns the index.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:60–62setIndex
public void setIndex(Integer index)
设置索引。
Sets the index.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
index | Integer | 索引(类型 `Integer`)。The index. |
源码Source
io/agentscope/runtime/engine/schemas/Content.java:64–66getDelta
public Boolean getDelta()
获取增量。
Returns the delta.
Boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:68–70setDelta
public void setDelta(Boolean delta)
设置增量。
Sets the delta.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
delta | Boolean | 增量(类型 `Boolean`)。The delta. |
源码Source
io/agentscope/runtime/engine/schemas/Content.java:72–74getMsgId
public String getMsgId()
获取消息标识。
Returns the msg id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:76–78setMsgId
public void setMsgId(String msgId)
设置消息标识。
Sets the msg id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
msgId | String | 消息标识(类型 `String`)。The msg id. |
源码Source
io/agentscope/runtime/engine/schemas/Content.java:80–82completed
public Content completed()
返回已完成。
Returns the completed.
Content返回内容。Returns content.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:84–88inProgress
public Content inProgress()
将响应状态设置为进行中。
Returns the in progress.
Content返回内容。Returns content.
源码Source
io/agentscope/runtime/engine/schemas/Content.java:90–93