AS AgentScopeAPI 手册 / API Reference

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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:30–32

setText

public void setText(String text)

设置文本。

Sets the text.

参数Parameters
名称Name类型Type说明Description
textString文本(类型 `String`)。The text.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:34–36

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:38–40

setType

public void setType(String type)

设置类型。

Sets the type.

参数Parameters
名称Name类型Type说明Description
typeString类型(类型 `String`)。The type.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:42–44

getAnnotations

public List<String> getAnnotations()

获取注解。

Returns the annotations.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:46–48

setAnnotations

public void setAnnotations(List<String> annotations)

设置注解。

Sets the annotations.

参数Parameters
名称Name类型Type说明Description
annotationsList<String>注解(类型 `List`)。The annotations.
源码Source io/agentscope/runtime/protocol/responseapi/model/ResponseContent.java:50–52
基于官方固定版本源码静态生成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.