uni-flow 公开 API(中文注解) / PiAgentAdapter
Class: PiAgentAdapter
Defined in: adapters/pi-agent-adapter.ts:27
pi-agent-core 的 RuntimeAdapter:通过注入的 executeFn 解耦真实 Agent 循环,便于测试与集成。
Implements
Constructors
Constructor
new PiAgentAdapter(
config):PiAgentAdapter
Defined in: adapters/pi-agent-adapter.ts:31
Parameters
config
Returns
PiAgentAdapter
Properties
type
readonlytype:"pi-agent"
Defined in: adapters/pi-agent-adapter.ts:28
适配器类型标签。
Implementation of
Methods
cancel()
cancel():
void
Defined in: adapters/pi-agent-adapter.ts:64
请求取消。
Returns
void
Implementation of
execute()
execute(
input,ctx):Promise<AgentOutput>
Defined in: adapters/pi-agent-adapter.ts:33
执行一轮并返回 AgentOutput。
Parameters
input
ctx
Returns
Promise<AgentOutput>
Implementation of
followUp()
followUp(
content):void
Defined in: adapters/pi-agent-adapter.ts:53
运行中追问(若框架支持)。
Parameters
content
string
Returns
void
Implementation of
frameworkInfo()
frameworkInfo():
object
Defined in: adapters/pi-agent-adapter.ts:68
框架名称与版本,供可观测性使用。
Returns
object
name
name:
string
version
version:
string
Implementation of
steer()
steer(
content):void
Defined in: adapters/pi-agent-adapter.ts:49
运行中转向(若框架支持)。
Parameters
content
string
Returns
void
Implementation of
subscribe()
subscribe(
handler):Unsubscribe
Defined in: adapters/pi-agent-adapter.ts:57
订阅生命周期事件。