Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
di-sukharev
2024-08-18 14:04:27 +03:00
2 changed files with 9 additions and 14 deletions
+7 -9
View File
@@ -48,15 +48,13 @@ if (
const MODEL = config?.OCO_MODEL; const MODEL = config?.OCO_MODEL;
if (provider === 'anthropic' && if (provider === 'anthropic' &&
!MODEL_LIST.anthropic.includes(MODEL) && MODEL.typeof !== 'string' &&
command !== 'config' && command !== 'config' &&
mode !== CONFIG_MODES.set) { mode !== CONFIG_MODES.set) {
outro( outro(
`${chalk.red('✖')} Unsupported model ${MODEL} for Anthropic. Supported models are: ${MODEL_LIST.anthropic.join( `${chalk.red('✖')} Unsupported model ${MODEL}. The model can be any string, but the current configuration is not supported.`
', ' );
)}` process.exit(1);
);
process.exit(1);
} }
export class AnthropicAi implements AiEngine { export class AnthropicAi implements AiEngine {
+2 -5
View File
@@ -54,15 +54,12 @@ if (
const MODEL = config?.OCO_MODEL || 'gpt-3.5-turbo'; const MODEL = config?.OCO_MODEL || 'gpt-3.5-turbo';
if (provider === 'openai' && if (provider === 'openai' &&
!MODEL_LIST.openai.includes(MODEL) && MODEL.typeof !== 'string' &&
command !== 'config' && command !== 'config' &&
mode !== CONFIG_MODES.set) { mode !== CONFIG_MODES.set) {
outro( outro(
`${chalk.red('✖')} Unsupported model ${MODEL} for OpenAI. Supported models are: ${MODEL_LIST.openai.join( `${chalk.red('✖')} Unsupported model ${MODEL}. The model can be any string, but the current configuration is not supported.`
', '
)}`
); );
process.exit(1); process.exit(1);
} }