getDefaultGenerateOptions()
The .getDefaultGenerateOptions()
method retrieves the default generation options configured for an agent, resolving them if they’re a function. These options are used as the base configuration for all generate()
calls unless overridden.
Usage example
const defaultOptions = await agent.getDefaultGenerateOptions();
Parameters
options?:
{ runtimeContext?: RuntimeContext }
= {}
Optional configuration object containing runtime context.
Extended usage example
const defaultOptions = await agent.getDefaultGenerateOptions({
runtimeContext: new RuntimeContext()
});
Options parameters
runtimeContext?:
RuntimeContext
= new RuntimeContext()
Runtime context for dependency injection and contextual information.
Returns
defaultOptions:
AgentGenerateOptions | Promise<AgentGenerateOptions>
The default generation options configured for the agent, either as a direct object or a promise that resolves to the options.