ADK for TypeScript: API Reference
    Preparing search index...

    Interface ReflectAndRetryModelPluginOptions

    用于配置的选项 ReflectAndRetryModelPlugin.

    interface ReflectAndRetryModelPluginOptions {
        maxRetries?: number;
        name?: string;
        onModelErrors?: FinishReason[];
        throwExceptionIfRetryExceeded?: boolean;
        trackingScope?: TrackingScope;
    }
    maxRetries?: number

    在放弃尝试之前,允许模型连续失败的最大次数(0表示不进行重试)。默认值为 3。

    name?: string

    插件实例的标识符。默认值为 ‘reflect_retry_model_plugin’。

    onModelErrors?: FinishReason[]

    这是一份应被视为模型错误的 `FinishReason` 列表。默认值为 `[FinishReason.MALFORMED_FUNCTION_CALL]`。

    throwExceptionIfRetryExceeded?: boolean

    如果该值为 `true`,则在达到重试次数限制时抛出异常;如果该值为 `false`,则返回响应结果。默认值为 `true`。

    trackingScope?: TrackingScope

    用于确定错误跟踪状态的生命周期。默认值为 `TrackingScope.INVOCATION`。