diff --git a/config/provider/openai.config.ts b/config/provider/openai.config.ts index 9fc221a5..dd0b470c 100644 --- a/config/provider/openai.config.ts +++ b/config/provider/openai.config.ts @@ -10,11 +10,31 @@ export const openAIModelConfig: openAIModelConfig[] = [ maxTokens: 8192, price: 0.06 / 1000, }, + { + model: 'gpt-4-0613', + maxTokens: 8192, + price: 0.06 / 1000, + }, + { + model: 'gpt-4-1106-preview', + maxTokens: 128000, + price: 0.04 / 1000, + }, + { + model: 'gpt-4-vision-preview', + maxTokens: 128000, + price: 0.04 / 1000, + }, { model: 'gpt-4-32k', maxTokens: 32768, price: 0.12 / 1000, }, + { + model: 'gpt-4-32k-0613', + maxTokens: 32768, + price: 0.12 / 1000, + }, { model: 'gpt-3.5-turbo', maxTokens: 4096, @@ -22,7 +42,17 @@ export const openAIModelConfig: openAIModelConfig[] = [ }, { model: 'gpt-3.5-turbo-16k', - maxTokens: 16384, + maxTokens: 16385, price: 0.004 / 1000, }, + { + model: 'gpt-3.5-turbo-1106', + maxTokens: 16385, + price: 0.003 / 1000, + }, + { + model: 'gpt-3.5-turbo-instruct', + maxTokens: 4096, + price: 0.0035 / 1000, + }, ]; diff --git a/types/openai.d.ts b/types/openai.d.ts index 0bc39846..29a6f372 100644 --- a/types/openai.d.ts +++ b/types/openai.d.ts @@ -1,4 +1,14 @@ -type OpenAIModel = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k'; +type OpenAIModel = + | 'gpt-4' + | 'gpt-4-0613' + | 'gpt-4-1106-preview' + | 'gpt-4-vision-preview' + | 'gpt-4-32k' + | 'gpt-4-32k-0613' + | 'gpt-3.5-turbo' + | 'gpt-3.5-turbo-16k' + | 'gpt-3.5-turbo-1106' + | 'gpt-3.5-turbo-instruct'; type OpenAIMessageRole = 'user' | 'system' | 'assistant'; interface OpenAIMessage {