Agent.getDefaultGenerateOptionsLegacy()
注意
Deprecated: This method is deprecated and only works with V1 models. For V2 models, use the new .getDefaultOptions() method instead.
Configure agents with default generation options that control model behavior and output formatting, including tool and workflow calls. The .getDefaultGenerateOptionsLegacy() method retrieves these defaults and resolves any functions. These options apply to all generateLegacy() calls unless overridden and are useful for inspecting an agent’s unknown defaults.
Usage exampleUsage example的直接链接
await agent.getDefaultGenerateOptionsLegacy()
ParametersParameters的直接链接
options?:
{ requestContext?: RequestContext }
= {}
Optional configuration object containing request context.
{ requestContext?: RequestContext }
requestContext?:
RequestContext
Request Context for dependency injection and contextual information.
ReturnsReturns的直接链接
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.
Extended usage exampleExtended usage example的直接链接
await agent.getDefaultGenerateOptionsLegacy({
requestContext: new RequestContext(),
})