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–30TextContent
public TextContent(String text)
初始化 TextContent 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
text | String | 文本(类型 `String`)。The text. |
源码Source
io/agentscope/runtime/engine/schemas/TextContent.java:32–35TextContent
public TextContent(Boolean delta, Integer index, String text)
初始化 TextContent 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
delta | Boolean | 增量(类型 `Boolean`)。The delta. |
index | Integer | 索引(类型 `Integer`)。The index. |
text | String | 文本(类型 `String`)。The text. |
源码Source
io/agentscope/runtime/engine/schemas/TextContent.java:37–41方法详情Method Detail
getText
public String getText()
获取文本。
Returns the text.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/TextContent.java:43–45setText
public void setText(String text)
设置文本。
Sets the text.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
text | String | 文本(类型 `String`)。The text. |
源码Source
io/agentscope/runtime/engine/schemas/TextContent.java:47–49