@promptbook/vercel
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
26 lines (25 loc) • 1.17 kB
TypeScript
import type { ModelRequirements } from '../../../types/ModelRequirements';
/**
* Parses an OpenAI error message to identify which parameter is unsupported
*
* @param errorMessage The error message from OpenAI API
* @returns The parameter name that is unsupported, or null if not an unsupported parameter error
* @private utility of LLM Tools
*/
export declare function parseUnsupportedParameterError(errorMessage: string): string | null;
/**
* Creates a copy of model requirements with the specified parameter removed
*
* @param modelRequirements Original model requirements
* @param unsupportedParameter The parameter to remove
* @returns New model requirements without the unsupported parameter
* @private utility of LLM Tools
*/
export declare function removeUnsupportedModelRequirement(modelRequirements: ModelRequirements, unsupportedParameter: string): ModelRequirements;
/**
* Checks if an error is an "Unsupported value" error from OpenAI
* @param error The error to check
* @returns true if this is an unsupported parameter error
* @private utility of LLM Tools
*/
export declare function isUnsupportedParameterError(error: Error): boolean;