Agent.getDefaultStreamOptionsLegacy()
warning
已弃用:此方法已被弃用,仅适用于 V1 模型。对于 V2 模型,请改用新的 .getDefaultOptions() 方法。
代理可以配置默认的流式选项,用于内存使用、输出格式和迭代步骤。.getDefaultStreamOptionsLegacy() 方法返回这些默认值,如果它们是函数,则会进行解析。除非被覆盖,否则这些选项适用于所有 streamLegacy() 调用,并且对于检查代理的未知默认值非常有用。
🌐 Agents can be configured with default streaming options for memory usage, output format, and iteration steps. The .getDefaultStreamOptionsLegacy() method returns these defaults, resolving them if they are functions. These options apply to all streamLegacy() calls unless overridden and are useful for inspecting an agent’s unknown defaults.
使用示例Direct link to 使用示例
🌐 Usage example
await agent.getDefaultStreamOptionsLegacy();
参数Direct link to 参数
🌐 Parameters
options?:
{ requestContext?: RequestContext }
= {}
Optional configuration object containing request context.
返回Direct link to 返回
🌐 Returns
defaultOptions:
AgentStreamOptions | Promise<AgentStreamOptions>
The default vNext streaming options configured for the agent, either as a direct object or a promise that resolves to the options.
扩展使用示例Direct link to 扩展使用示例
🌐 Extended usage example
await agent.getDefaultStreamOptionsLegacy({
requestContext: new RequestContext(),
});
选项参数Direct link to 选项参数
🌐 Options parameters
requestContext?:
RequestContext
= new RequestContext()
Request Context for dependency injection and contextual information.
相关Direct link to 相关
🌐 Related