AS AgentScopeAPI 手册 / API Reference

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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/engine/schemas/Content.java:44–46

setType

public void setType(String type)

设置类型。

Sets the type.

参数Parameters
名称Name类型Type说明Description
typeString类型(类型 `String`)。The type.
源码Source io/agentscope/runtime/engine/schemas/Content.java:48–50

getObject

public String getObject()

获取对象。

Returns the object.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/engine/schemas/Content.java:52–54

setObject

public void setObject(String object)

设置对象。

Sets the object.

参数Parameters
名称Name类型Type说明Description
objectString对象(类型 `String`)。The object.
源码Source io/agentscope/runtime/engine/schemas/Content.java:56–58

getIndex

public Integer getIndex()

获取索引。

Returns the index.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/runtime/engine/schemas/Content.java:60–62

setIndex

public void setIndex(Integer index)

设置索引。

Sets the index.

参数Parameters
名称Name类型Type说明Description
indexInteger索引(类型 `Integer`)。The index.
源码Source io/agentscope/runtime/engine/schemas/Content.java:64–66

getDelta

public Boolean getDelta()

获取增量。

Returns the delta.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/runtime/engine/schemas/Content.java:68–70

setDelta

public void setDelta(Boolean delta)

设置增量。

Sets the delta.

参数Parameters
名称Name类型Type说明Description
deltaBoolean增量(类型 `Boolean`)。The delta.
源码Source io/agentscope/runtime/engine/schemas/Content.java:72–74

getMsgId

public String getMsgId()

获取消息标识。

Returns the msg id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/engine/schemas/Content.java:76–78

setMsgId

public void setMsgId(String msgId)

设置消息标识。

Sets the msg id.

参数Parameters
名称Name类型Type说明Description
msgIdString消息标识(类型 `String`)。The msg id.
源码Source io/agentscope/runtime/engine/schemas/Content.java:80–82

completed

public Content completed()

返回已完成。

Returns the completed.

返回Returns Content
返回内容。Returns content.
源码Source io/agentscope/runtime/engine/schemas/Content.java:84–88

inProgress

public Content inProgress()

将响应状态设置为进行中。

Returns the in progress.

返回Returns Content
返回内容。Returns content.
源码Source io/agentscope/runtime/engine/schemas/Content.java:90–93

继承成员Inherited Members

基于官方固定版本源码静态生成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.