@Preview(value="3.8.4")
public interface AgentResponse
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getContent()
获取消息内容
|
org.noear.solon.flow.FlowContext |
getContext()
获取上下文
|
AssistantMessage |
getMessage()
获取消息
|
Metrics |
getMetrics()
获取执行指标(如 Token 消耗、耗时等)
|
AgentSession |
getSession()
获取会话
|
<T> T |
toBean(java.lang.Class<T> type)
将消息内容转换为结构化对象(通常用于解析 JSON 格式的 Final Answer)
|
AgentSession getSession()
org.noear.solon.flow.FlowContext getContext()
Metrics getMetrics()
AssistantMessage getMessage()
java.lang.String getContent()
<T> T toBean(java.lang.Class<T> type)
T - 类型泛型type - 目标类型