重要类型包括
AgentDefinition、RunOptions、RunResult、RunRecord、RunStep、Tool、ToolDecision、ToolOutput、RuntimeContext、StateAccessor、ModelRetryConfig 和 ToolExecutionConfig。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
查阅 Go Agent SDK 的主要类型和方法。
| API | 用途 |
|---|---|
CreateAgent(...) | 定义 Agent |
DefineTool(...) | 定义本地或手动工具 |
CreateGatewayAgentClient(...) | 将模型轮次连接到 Phaseo |
Agent.Run(...) | 运行至结束或暂停状态 |
Agent.Stream(...) | 运行并提供可重放流消费者 |
Agent.Continue(...) | 继续已保存或暂停的状态 |
StreamResult.Result() | 读取已完成的运行结果 |
StreamResult.Text() | 读取文本增量 |
StreamResult.Events() | 读取所有事件 |
StreamResult.Cancel() | 取消当前运行 |
AgentDefinition、RunOptions、RunResult、RunRecord、RunStep、Tool、ToolDecision、ToolOutput、RuntimeContext、StateAccessor、ModelRetryConfig 和 ToolExecutionConfig。