Skip to Content
ReferenceAgentsgetDefaultVNextStreamOptions()

getDefaultVNextStreamOptions()

The .getDefaultVNextStreamOptions() method retrieves the default vNext streaming options configured for an agent, resolving them if they’re a function. These options are used as the base configuration for all streamVNext() calls unless overridden.

Usage example

const defaultOptions = await agent.getDefaultVNextStreamOptions();

Parameters

options?:

{ runtimeContext?: RuntimeContext }
= {}
Optional configuration object containing runtime context.

Extended usage example

const defaultOptions = await agent.getDefaultVNextStreamOptions({ runtimeContext: new RuntimeContext() });

Options parameters

runtimeContext?:

RuntimeContext
= new RuntimeContext()
Runtime context for dependency injection and contextual information.

Returns

defaultOptions:

AgentVNextStreamOptions<Output, StructuredOutput> | Promise<AgentVNextStreamOptions<Output, StructuredOutput>>
The default vNext streaming options configured for the agent, either as a direct object or a promise that resolves to the options.