From 7ddbaf477ab08cceede5ff5ddd4dd9329a32a62c Mon Sep 17 00:00:00 2001 From: yowatari <4982161+YOwatari@users.noreply.github.com> Date: Tue, 14 May 2024 20:16:21 +0900 Subject: [PATCH] feat: add instructions and support for configuring gpt-4o (#340) * feat(config.ts): add 'gpt-4o' to supported model list for enhanced model options docs(config.ts): update error message to include 'gpt-4o' in the list of supported models * docs(README.md): update OCO_MODEL options to include 'gpt-4o' model --- README.md | 2 +- src/commands/config.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 447c376..7d2a6e5 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ OCO_TOKENS_MAX_OUTPUT= OCO_OPENAI_BASE_PATH= OCO_DESCRIPTION= OCO_EMOJI= -OCO_MODEL= +OCO_MODEL= OCO_LANGUAGE= OCO_MESSAGE_TEMPLATE_PLACEHOLDER= OCO_PROMPT_MODULE= diff --git a/src/commands/config.ts b/src/commands/config.ts index d9ce148..420f2ef 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -40,7 +40,8 @@ export const MODEL_LIST = { 'gpt-4-turbo', 'gpt-4-1106-preview', 'gpt-4-turbo-preview', - 'gpt-4-0125-preview'], + 'gpt-4-0125-preview', + 'gpt-4o'], anthropic: ['claude-3-haiku-20240307', 'claude-3-sonnet-20240229', @@ -184,7 +185,7 @@ export const configValidators = { validateConfig( CONFIG_KEYS.OCO_MODEL, [...MODEL_LIST.openai, ...MODEL_LIST.anthropic].includes(value) || config.OCO_AI_PROVIDER == 'ollama' || config.OCO_AI_PROVIDER == 'test', - `${value} is not supported yet, use 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview', 'gpt-4-0125-preview', 'claude-3-opus-20240229', 'claude-3-sonnet-20240229' or 'claude-3-haiku-20240307'` + `${value} is not supported yet, use 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview', 'gpt-4-0125-preview', 'claude-3-opus-20240229', 'claude-3-sonnet-20240229' or 'claude-3-haiku-20240307'` ); return value; },