コンテンツにスキップ

ApplicationPromptTurnOptions

このコンテンツはまだ日本語訳がありません。

prepareApplicationPromptTurn 的输入:先异步预检(prepare,如刷新应用提示词)、成功后再以选定的 system 段起真正的一轮(start);预检失败按 errorMessage 出 turn.error 并保留既有历史。

errorMessage: (error) => string;

unknown

string


optional errorScope?: string;

history: readonly IRMessage[];

预检失败时原样保留的既有历史;本轮尚未送往模型的输入不记入。


prepare: (signal) => Promise<IRSystemSegment[]>;

AbortSignal

Promise<IRSystemSegment[]>


optional prepareTimeoutMs?: number;

预检绝对上限,缺省30秒;即使自定义fetch忽略取消,也能收束本轮。


sessionId: string;

start: (system) => QueryHandle;

每轮最多调用一次;此后工具循环始终消费该轮选定的 system。

IRSystemSegment[]

QueryHandle