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
This commit is contained in:
@@ -97,7 +97,7 @@ OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
|
|||||||
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
|
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
|
||||||
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
|
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
|
||||||
OCO_EMOJI=<boolean, add GitMoji>
|
OCO_EMOJI=<boolean, add GitMoji>
|
||||||
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'>
|
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'>
|
||||||
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
|
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
|
||||||
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
|
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
|
||||||
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>
|
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ export const MODEL_LIST = {
|
|||||||
'gpt-4-turbo',
|
'gpt-4-turbo',
|
||||||
'gpt-4-1106-preview',
|
'gpt-4-1106-preview',
|
||||||
'gpt-4-turbo-preview',
|
'gpt-4-turbo-preview',
|
||||||
'gpt-4-0125-preview'],
|
'gpt-4-0125-preview',
|
||||||
|
'gpt-4o'],
|
||||||
|
|
||||||
anthropic: ['claude-3-haiku-20240307',
|
anthropic: ['claude-3-haiku-20240307',
|
||||||
'claude-3-sonnet-20240229',
|
'claude-3-sonnet-20240229',
|
||||||
@@ -184,7 +185,7 @@ export const configValidators = {
|
|||||||
validateConfig(
|
validateConfig(
|
||||||
CONFIG_KEYS.OCO_MODEL,
|
CONFIG_KEYS.OCO_MODEL,
|
||||||
[...MODEL_LIST.openai, ...MODEL_LIST.anthropic].includes(value) || config.OCO_AI_PROVIDER == 'ollama' || config.OCO_AI_PROVIDER == 'test',
|
[...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;
|
return value;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user