UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

32 lines (31 loc) • 1.46 kB
import { z } from 'zod'; import { ModelResponse } from '../model'; import { RunItem } from '../items'; import { AgentInputItem } from '../types'; import type { FinalOutputSource } from '../runState'; export declare const nextStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"next_step_handoff">; newAgent: z.ZodAny; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"next_step_final_output">; output: z.ZodString; responseAccepted: z.ZodOptional<z.ZodLiteral<true>>; localFinalizationStarted: z.ZodOptional<z.ZodLiteral<true>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"next_step_run_again">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"next_step_interruption">; data: z.ZodRecord<z.ZodString, z.ZodAny>; }, z.core.$strip>], "type">; export type NextStep = z.infer<typeof nextStepSchema>; export declare class SingleStepResult { originalInput: string | AgentInputItem[]; modelResponse: ModelResponse; preStepItems: RunItem[]; newStepItems: RunItem[]; nextStep: NextStep; finalOutputSource?: FinalOutputSource | undefined; toolInvocationCommitItems: RunItem[]; constructor(originalInput: string | AgentInputItem[], modelResponse: ModelResponse, preStepItems: RunItem[], newStepItems: RunItem[], nextStep: NextStep, finalOutputSource?: FinalOutputSource | undefined, toolInvocationCommitItems?: RunItem[]); get generatedItems(): RunItem[]; }