UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

30 lines (29 loc) 1.19 kB
import type { ModelRequirements } from '../../../types/ModelRequirements'; import type { string_model_name } from '../../../types/string_model_name'; /** * Tracks unsupported-parameter retries for one OpenAI-compatible model call. * * @private helper of `OpenAiCompatibleExecutionTools` */ export declare class OpenAiCompatibleUnsupportedParameterRetrier { private readonly isVerbose; private readonly attemptStack; private readonly retriedUnsupportedParameters; constructor(isVerbose: boolean | undefined); /** * Resolves the next retry attempt after an unsupported-parameter failure or rethrows the final error. */ resolveRetryOrThrow<TModelRequirements extends ModelRequirements>(options: { readonly error: Error; readonly modelName: string_model_name; readonly currentModelRequirements: TModelRequirements; }): TModelRequirements; /** * Rethrows the original error or wraps it with the collected retry history. */ private throwWithAttemptHistory; /** * Creates the retry-history error message shared by all OpenAI-compatible model variants. */ private createAttemptHistoryError; }