Skip to content

Commit 7ddbaf4

Browse files
authored
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
1 parent 9a0f412 commit 7ddbaf4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
9797
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
9898
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
9999
OCO_EMOJI=<boolean, add GitMoji>
100-
OCO_MODEL=<either 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'>
100+
OCO_MODEL=<either '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' or 'gpt-4-0125-preview'>
101101
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
102102
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
103103
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>

src/commands/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export const MODEL_LIST = {
4040
'gpt-4-turbo',
4141
'gpt-4-1106-preview',
4242
'gpt-4-turbo-preview',
43-
'gpt-4-0125-preview'],
43+
'gpt-4-0125-preview',
44+
'gpt-4o'],
4445

4546
anthropic: ['claude-3-haiku-20240307',
4647
'claude-3-sonnet-20240229',
@@ -184,7 +185,7 @@ export const configValidators = {
184185
validateConfig(
185186
CONFIG_KEYS.OCO_MODEL,
186187
[...MODEL_LIST.openai, ...MODEL_LIST.anthropic].includes(value) || config.OCO_AI_PROVIDER == 'ollama' || config.OCO_AI_PROVIDER == 'test',
187-
`${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'`
188+
`${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'`
188189
);
189190
return value;
190191
},

0 commit comments

Comments
 (0)