From 1f739e94c4d41f866c9c78727d4fc4647a0024ad Mon Sep 17 00:00:00 2001
From: cogentapps <24392461-cogentapps@users.noreply.replit.com>
Date: Sat, 1 Jul 2023 20:09:50 +0000
Subject: [PATCH] add other gpt versions
---
app/src/core/chat/openai.ts | 10 +++++++--
app/src/global-options/parameters.tsx | 30 +++++++++++++++++++++++++--
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/app/src/core/chat/openai.ts b/app/src/core/chat/openai.ts
index f107c537..339546fc 100644
--- a/app/src/core/chat/openai.ts
+++ b/app/src/core/chat/openai.ts
@@ -140,6 +140,12 @@ export async function createStreamingChatCompletion(messages: OpenAIMessage[], p
}
export const maxTokensByModel = {
- "chatgpt-3.5-turbo": 2048,
+ "gpt-3.5-turbo": 4096,
"gpt-4": 8192,
-}
\ No newline at end of file
+ "gpt-4-0613": 8192,
+ "gpt-4-32k": 32768,
+ "gpt-4-32k-0613": 32768,
+ "gpt-3.5-turbo-16k": 16384,
+ "gpt-3.5-turbo-0613": 4096,
+ "gpt-3.5-turbo-16k-0613": 16384,
+};
diff --git a/app/src/global-options/parameters.tsx b/app/src/global-options/parameters.tsx
index bd3fb880..7f28ff70 100644
--- a/app/src/global-options/parameters.tsx
+++ b/app/src/global-options/parameters.tsx
@@ -19,9 +19,9 @@ export const parameterOptions: OptionGroup = {
renderProps: (value, options, context) => ({
type: "select",
label: "Model",
- description: value === 'gpt-4' && context.intl.formatMessage(
+ description: value?.includes('gpt-4') && context.intl.formatMessage(
{
- defaultMessage: "Note: GPT-4 will only work if your OpenAI account has been granted access to the new model. Request access here.",
+ defaultMessage: "Note: This model will only work if your OpenAI account has been granted you have been given access to it. Request access here.",
},
{
a: (text: string) => {text}
@@ -32,10 +32,36 @@ export const parameterOptions: OptionGroup = {
label: "GPT 3.5 Turbo (default)",
value: "gpt-3.5-turbo",
},
+ {
+ label: "GPT 3.5 Turbo 16k",
+ value: "gpt-3.5-turbo-16k",
+ },
{
label: "GPT 4 (requires invite)",
value: "gpt-4",
},
+ {
+ label: "GPT 4 32k (requires invite)",
+ value: "gpt-4-32k",
+ },
+ {
+ label: "GPT 4 Snapshot (June 13, 2023)",
+ value: "gpt-4-0613",
+ },
+
+ {
+ label: "GPT 4 32k Snapshot (June 13, 2023)",
+ value: "gpt-4-32k-0613",
+ },
+
+ {
+ label: "GPT 3.5 Turbo Snapshot (June 13, 2023)",
+ value: "gpt-3.5-turbo-0613",
+ },
+ {
+ label: "GPT 3.5 Turbo 16k Snapshot (June 13, 2023)",
+ value: "gpt-3.5-turbo-16k-0613",
+ },
],
}),
},