AS AgentScopeAPI 手册 / API Reference

TextContent

public class TextContent extends Content
源码Source io/agentscope/runtime/engine/schemas/TextContent.java:24–50

文本内容,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.engine.schemas 包,继承自 Content。核心成员包括 getText、setText、TextContent。

Text content in a message.

构造器摘要Constructor Summary

构造器Constructor说明Description
public TextContent()
初始化 `TextContent` 实例。
Creates a new instance.
public TextContent(String text)
初始化 `TextContent` 实例。
Creates a new instance.
public TextContent(Boolean delta, Integer index, String text)
初始化 `TextContent` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String getText()
获取文本。
Returns the text.
public void setText(String text)
设置文本。
Sets the text.

构造器详情Constructor Detail

TextContent

public TextContent()

初始化 TextContent 实例。

Creates a new instance.

源码Source io/agentscope/runtime/engine/schemas/TextContent.java:28–30

TextContent

public TextContent(String text)

初始化 TextContent 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
textString文本(类型 `String`)。The text.
源码Source io/agentscope/runtime/engine/schemas/TextContent.java:32–35

TextContent

public TextContent(Boolean delta, Integer index, String text)

初始化 TextContent 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
deltaBoolean增量(类型 `Boolean`)。The delta.
indexInteger索引(类型 `Integer`)。The index.
textString文本(类型 `String`)。The text.
源码Source io/agentscope/runtime/engine/schemas/TextContent.java:37–41

方法详情Method Detail

getText

public String getText()

获取文本。

Returns the text.

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

setText

public void setText(String text)

设置文本。

Sets the text.

参数Parameters
名称Name类型Type说明Description
textString文本(类型 `String`)。The text.
源码Source io/agentscope/runtime/engine/schemas/TextContent.java:47–49

继承成员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.