@openai/agents-core
Version:
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
23 lines (22 loc) • 1.54 kB
TypeScript
import { Agent } from '../agent';
import { Handoff } from '../handoff';
import { RunItem } from '../items';
import { ModelResponse } from '../model';
import { RunState } from '../runState';
import type { AgentInputItem } from '../types';
import { Tool } from '../tool';
import type { ProcessedResponse } from './types';
import type { ToolNotFoundBehavior } from '../run';
type ModelResponseProcessingOptions = {
toolSearchAgentName?: string;
completedInvocations?: ReadonlyMap<string, string>;
allowPromptSuppliedTools?: boolean;
beforeClientToolSearch?: () => void;
};
/**
* Walks a raw model response and classifies each item so the runner can schedule follow-up work.
* Returns both the serializable RunItems (for history/streaming) and the actionable tool metadata.
*/
export declare function processModelResponse<TContext>(modelResponse: ModelResponse, agent: Agent<any, any>, tools: Tool<TContext>[], handoffs: Handoff<any, any>[], priorItems?: Array<RunItem | AgentInputItem>, toolNotFoundBehavior?: ToolNotFoundBehavior, processingOptions?: ModelResponseProcessingOptions): ProcessedResponse<TContext>;
export declare function processModelResponseAsync<TContext>(modelResponse: ModelResponse, agent: Agent<any, any>, tools: Tool<TContext>[], handoffs: Handoff<any, any>[], state: RunState<TContext, Agent<any, any>>, priorItems?: Array<RunItem | AgentInputItem>, toolNotFoundBehavior?: ToolNotFoundBehavior, processingOptions?: ModelResponseProcessingOptions): Promise<ProcessedResponse<TContext>>;
export {};