Skip to content

Commit

Permalink
Added: support for gpt-4o-mini model in config.ts
Browse files Browse the repository at this point in the history
- **WHAT**: Introduced `gpt-4o-mini` to the list of supported models in the `configValidators` and updated the default model in `getConfig`.
- **WHY**: To expand the range of supported models and provide a more lightweight option for users.
- **HOW**:
  - Added `gpt-4o-mini` to the array of valid models in the `configValidators` (line 104).
  - Updated the error message to include `gpt-4o-mini` (line 113).
  - Changed the default model from `gpt-4o` to `gpt-4o-mini` in the `getConfig` function (line 181).

These changes ensure that the new model is recognized and can be used as a default, enhancing the flexibility and options available to users.
  • Loading branch information
SHSharkar committed Aug 16, 2024
1 parent 170ab25 commit 1fb9e68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const configValidators = {
CONFIG_KEYS.GW_MODEL,
[
'gpt-4o',
'gpt-4o-mini',
'gpt-4-turbo',
'gpt-4-turbo-preview',
'gpt-4-0125-preview',
Expand All @@ -111,7 +112,7 @@ export const configValidators = {
'gpt-3.5-turbo',
'gpt-3.5-turbo-1106',
].includes(value),
`${value} is not supported yet, use 'gpt-4o','gpt-4-turbo','gpt-4-turbo-preview','gpt-4-0125-preview','gpt-4-1106-preview','gpt-4','gpt-3.5-turbo-0125','gpt-3.5-turbo','gpt-3.5-turbo-1106'`,
`${value} is not supported yet, use 'gpt-4o','gpt-4o-mini','gpt-4-turbo','gpt-4-turbo-preview','gpt-4-0125-preview','gpt-4-1106-preview','gpt-4','gpt-3.5-turbo-0125','gpt-3.5-turbo','gpt-3.5-turbo-1106'`,
);
return value;
},
Expand Down Expand Up @@ -178,7 +179,7 @@ export const getConfig = (): ConfigType | null => {
GW_OPENAI_BASE_PATH: process.env.GW_OPENAI_BASE_PATH,
GW_DESCRIPTION: process.env.GW_DESCRIPTION === 'true' ? true : false,
GW_EMOJI: process.env.GW_EMOJI === 'true' ? true : false,
GW_MODEL: process.env.GW_MODEL || 'gpt-4o',
GW_MODEL: process.env.GW_MODEL || 'gpt-4o-mini',
GW_LANGUAGE: process.env.GW_LANGUAGE || 'en',
GW_MESSAGE_TEMPLATE_PLACEHOLDER: process.env.GW_MESSAGE_TEMPLATE_PLACEHOLDER || '$msg',
GW_PROMPT_MODULE: process.env.GW_PROMPT_MODULE || 'conventional-commit',
Expand Down

0 comments on commit 1fb9e68

Please sign in to comment.