From 011db5ad5e2d35956e69e5c28699b48938d89254 Mon Sep 17 00:00:00 2001 From: Isaac Johnston Date: Thu, 29 Feb 2024 00:17:10 +1300 Subject: [PATCH] feat: add instructions and support for configuring GPT-4 Turbo (Preview) (#274) * docs(README.md): add instructions for configuring GPT-4 Turbo (Preview) feat(config.ts): include 'gpt-4-1106-preview' in the list of supported models * fix(config.ts): update error message to include 'gpt-4-1106-preview' as a supported model --- README.md | 6 ++++++ src/commands/config.ts | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 233b28a..3302f11 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,12 @@ or for as a cheaper option: oco config set OCO_MODEL=gpt-3.5-turbo ``` +or for GPT-4 Turbo (Preview) which is more capable, has knowledge of world events up to April 2023, a 128k context window and 2-3x cheaper vs GPT-4: + +```sh +oco config set OCO_MODEL=gpt-4-1106-preview +``` + Make sure that you spell it `gpt-4` (lowercase) and that you have API access to the 4th model. Even if you have ChatGPT+, that doesn't necessarily mean that you have API access to GPT-4. ### Locale configuration diff --git a/src/commands/config.ts b/src/commands/config.ts index 346de5a..49c5383 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -129,9 +129,10 @@ export const configValidators = { 'gpt-3.5-turbo', 'gpt-4', 'gpt-3.5-turbo-16k', - 'gpt-3.5-turbo-0613' + 'gpt-3.5-turbo-0613', + 'gpt-4-1106-preview' ].includes(value), - `${value} is not supported yet, use 'gpt-4', 'gpt-3.5-turbo-16k' (default), 'gpt-3.5-turbo-0613' or 'gpt-3.5-turbo'` + `${value} is not supported yet, use 'gpt-4', 'gpt-3.5-turbo-16k' (default), 'gpt-3.5-turbo-0613', 'gpt-3.5-turbo' or 'gpt-4-1106-preview'` ); return value; },