@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
30 lines (29 loc) • 1.18 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;