Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / PiAgentAdapterConfig

Interface: PiAgentAdapterConfig

Defined in: adapters/pi-agent-adapter.ts:11

pi-agent-core 适配器配置:注入 execute(及可选 steer/followUp/cancel)。

Properties

cancelFn?

optional cancelFn?: () => void

Defined in: adapters/pi-agent-adapter.ts:21

取消回调。

Returns

void


executeFn

executeFn: (input, ctx) => Promise<AgentOutput>

Defined in: adapters/pi-agent-adapter.ts:15

实际执行一轮 Agent 的函数(必填)。

Parameters

input

AgentInput

ctx

ExecutionContext

Returns

Promise<AgentOutput>


followUpFn?

optional followUpFn?: (content) => void

Defined in: adapters/pi-agent-adapter.ts:19

追问回调。

Parameters

content

string

Returns

void


steerFn?

optional steerFn?: (content) => void

Defined in: adapters/pi-agent-adapter.ts:17

运行中转向回调。

Parameters

content

string

Returns

void


systemPrompt?

optional systemPrompt?: string

Defined in: adapters/pi-agent-adapter.ts:13

可选系统提示,由调用方自行拼进 executeFn。

MIT Licensed