ResponseContent
@JsonIgnoreProperties(ignoreUnknown = true) public class ResponseContent
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:24–53响应内容,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.runtime.protocol.responseapi.model 包。核心成员包括 getText、setText、getType、setType、getAnnotations、setAnnotations。
A class in io.agentscope.runtime.protocol.responseapi.model that talks to model services and returns generated or embedded output. Declared in io.agentscope.runtime.protocol.responseapi.model.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getText() | 获取文本。 Returns the text. |
public void setText(String text) | 设置文本。 Sets the text. |
public String getType() | 获取类型。 Returns the type. |
public void setType(String type) | 设置类型。 Sets the type. |
public List<String> getAnnotations() | 获取注解。 Returns the annotations. |
public void setAnnotations(List<String> annotations) | 设置注解。 Sets the annotations. |
方法详情Method Detail
getText
public String getText()
获取文本。
Returns the text.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:30–32setText
public void setText(String text)
设置文本。
Sets the text.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
text | String | 文本(类型 `String`)。The text. |
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:34–36getType
public String getType()
获取类型。
Returns the type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:38–40setType
public void setType(String type)
设置类型。
Sets the type.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:42–44getAnnotations
public List<String> getAnnotations()
获取注解。
Returns the annotations.
List<String>返回列出。Returns list.
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:46–48setAnnotations
public void setAnnotations(List<String> annotations)
设置注解。
Sets the annotations.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
annotations | List<String> | 注解(类型 `List`)。The annotations. |
源码Source
io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:50–52