Skip to content

Commit a3364db

Browse files
authored
Revert "update gpt 4 turbo (#1672)" (#1678)
This reverts commit 5f89405.
1 parent d5a2d28 commit a3364db

File tree

9 files changed

+28
-28
lines changed

9 files changed

+28
-28
lines changed

app/api/chat/azure/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function POST(request: Request) {
2323
case "gpt-3.5-turbo":
2424
DEPLOYMENT_ID = profile.azure_openai_35_turbo_id || ""
2525
break
26-
case "gpt-4-turbo":
26+
case "gpt-4-turbo-preview":
2727
DEPLOYMENT_ID = profile.azure_openai_45_turbo_id || ""
2828
break
2929
case "gpt-4-vision-preview":

app/api/command/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function POST(request: Request) {
3434
],
3535
temperature: 0,
3636
max_tokens:
37-
CHAT_SETTING_LIMITS["gpt-4-turbo"].MAX_TOKEN_OUTPUT_LENGTH
37+
CHAT_SETTING_LIMITS["gpt-4-turbo-preview"].MAX_TOKEN_OUTPUT_LENGTH
3838
// response_format: { type: "json_object" }
3939
// stream: true
4040
})

components/sidebar/items/assistants/create-assistant.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const CreateAssistant: FC<CreateAssistantProps> = ({
8989
if (!assistantChatSettings.model) return false
9090

9191
const compatibleModels = [
92-
"gpt-4-turbo",
92+
"gpt-4-turbo-preview",
9393
"gpt-4-vision-preview",
9494
"gpt-3.5-turbo-1106",
9595
"gpt-4"

components/utility/global-state.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const GlobalState: FC<GlobalStateProps> = ({ children }) => {
7777
const [userInput, setUserInput] = useState<string>("")
7878
const [chatMessages, setChatMessages] = useState<ChatMessage[]>([])
7979
const [chatSettings, setChatSettings] = useState<ChatSettings>({
80-
model: "gpt-4-turbo",
80+
model: "gpt-4-turbo-preview",
8181
prompt: "You are a helpful AI assistant.",
8282
temperature: 0.5,
8383
contextLength: 4000,

lib/chat-setting-limits.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const CHAT_SETTING_LIMITS: Record<LLMID, ChatSettingLimits> = {
108108
MAX_CONTEXT_LENGTH: 4096
109109
// MAX_CONTEXT_LENGTH: 16385 (TODO: Change this back to 16385 when OpenAI bumps the model)
110110
},
111-
"gpt-4-turbo": {
111+
"gpt-4-turbo-preview": {
112112
MIN_TEMPERATURE: 0.0,
113113
MAX_TEMPERATURE: 2.0,
114114
MAX_TOKEN_OUTPUT_LENGTH: 4096,

lib/models/llm/openai-llm-list.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const OPENAI_PLATORM_LINK = "https://platform.openai.com/docs/overview"
66

77
// GPT-4 Turbo (UPDATED 1/25/24)
88
const GPT4Turbo: LLM = {
9-
modelId: "gpt-4-turbo",
9+
modelId: "gpt-4-turbo-preview",
1010
modelName: "GPT-4 Turbo",
1111
provider: "openai",
12-
hostedId: "gpt-4-turbo",
12+
hostedId: "gpt-4-turbo-preview",
1313
platformLink: OPENAI_PLATORM_LINK,
1414
imageInput: false,
1515
pricing: {

supabase/migrations/20240125192042_upgrade_openai_models.sql

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- WORKSPACES
22

33
UPDATE workspaces
4-
SET default_model = 'gpt-4-turbo'
4+
SET default_model = 'gpt-4-turbo-preview'
55
WHERE default_model = 'gpt-4-1106-preview';
66

77
UPDATE workspaces
@@ -11,7 +11,7 @@ WHERE default_model = 'gpt-3.5-turbo-1106';
1111
-- PRESETS
1212

1313
UPDATE presets
14-
SET model = 'gpt-4-turbo'
14+
SET model = 'gpt-4-turbo-preview'
1515
WHERE model = 'gpt-4-1106-preview';
1616

1717
UPDATE presets
@@ -21,7 +21,7 @@ WHERE model = 'gpt-3.5-turbo-1106';
2121
-- ASSISTANTS
2222

2323
UPDATE assistants
24-
SET model = 'gpt-4-turbo'
24+
SET model = 'gpt-4-turbo-preview'
2525
WHERE model = 'gpt-4-1106-preview';
2626

2727
UPDATE assistants
@@ -31,7 +31,7 @@ WHERE model = 'gpt-3.5-turbo-1106';
3131
-- CHATS
3232

3333
UPDATE chats
34-
SET model = 'gpt-4-turbo'
34+
SET model = 'gpt-4-turbo-preview'
3535
WHERE model = 'gpt-4-1106-preview';
3636

3737
UPDATE chats
@@ -41,7 +41,7 @@ WHERE model = 'gpt-3.5-turbo-1106';
4141
-- MESSAGES
4242

4343
UPDATE messages
44-
SET model = 'gpt-4-turbo'
44+
SET model = 'gpt-4-turbo-preview'
4545
WHERE model = 'gpt-4-1106-preview';
4646

4747
UPDATE messages
@@ -93,7 +93,7 @@ BEGIN
9393
TRUE,
9494
'Home',
9595
4096,
96-
'gpt-4-turbo', -- Updated default model
96+
'gpt-4-turbo-preview', -- Updated default model
9797
'You are a friendly, helpful AI assistant.',
9898
0.5,
9999
'My home workspace.',

supabase/seed.sql

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ INSERT INTO auth.users (instance_id, id, aud, role, email, encrypted_password, e
33

44
-- Start data for workspaces
55
INSERT INTO workspaces (user_id, name, description, default_context_length, default_model, default_prompt, default_temperature, include_profile_context, include_workspace_instructions, instructions, is_home, sharing, embeddings_provider) VALUES
6-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', 'Workspace 1', 'This is for testing.', 4000, 'gpt-4-turbo', 'You are an assistant.', 0.5, true, true, 'These are the instructions.', false, 'private', 'openai');
6+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', 'Workspace 1', 'This is for testing.', 4000, 'gpt-4-turbo-preview', 'You are an assistant.', 0.5, true, true, 'These are the instructions.', false, 'private', 'openai');
77

88
-- Get workspace ids
99
DO $$
@@ -42,7 +42,7 @@ BEGIN
4242

4343
-- start data for presets
4444
INSERT INTO presets (user_id, created_at, updated_at, sharing, include_profile_context, include_workspace_instructions, context_length, model, name, prompt, temperature, description, embeddings_provider) VALUES
45-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'private', TRUE, TRUE, 4000, 'gpt-4-turbo', 'Preset 1', 'Prompt 1', 0.5, 'Description for Preset 1', 'openai');
45+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'private', TRUE, TRUE, 4000, 'gpt-4-turbo-preview', 'Preset 1', 'Prompt 1', 0.5, 'Description for Preset 1', 'openai');
4646

4747
-- Get preset id
4848
DECLARE
@@ -57,7 +57,7 @@ BEGIN
5757

5858
-- Start data for assistants
5959
INSERT INTO assistants (user_id, name, description, model, image_path, sharing, context_length, include_profile_context, include_workspace_instructions, prompt, temperature, embeddings_provider) VALUES
60-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', 'Albert Einstein', 'This is an Albert Einstein assistant.', 'gpt-4-turbo', '', 'private', 4000, TRUE, TRUE, 'You are Albert Einstein.', 0.5, 'openai');
60+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', 'Albert Einstein', 'This is an Albert Einstein assistant.', 'gpt-4-turbo-preview', '', 'private', 4000, TRUE, TRUE, 'You are Albert Einstein.', 0.5, 'openai');
6161

6262
-- Get assistant id
6363
DECLARE
@@ -72,15 +72,15 @@ BEGIN
7272

7373
-- Start data for chats
7474
INSERT INTO chats (user_id, workspace_id, name, model, prompt, temperature, context_length, include_profile_context, include_workspace_instructions, embeddings_provider) VALUES
75-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', workspace1_id, 'Chat 1', 'gpt-4-turbo', 'You are an assistant.', 0.5, 4000, TRUE, TRUE, 'openai');
75+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', workspace1_id, 'Chat 1', 'gpt-4-turbo-preview', 'You are an assistant.', 0.5, 4000, TRUE, TRUE, 'openai');
7676

7777
DECLARE
7878
folder1_id UUID;
7979
BEGIN
8080
SELECT id INTO folder1_id FROM folders WHERE name='Chat Folder 1';
8181

8282
INSERT INTO chats (user_id, workspace_id, name, model, prompt, temperature, context_length, include_profile_context, include_workspace_instructions, folder_id, embeddings_provider) VALUES
83-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', workspace1_id, 'Chat 4', 'gpt-4-turbo', 'You are an assistant.', 0.5, 4000, TRUE, TRUE, folder1_id, 'openai');
83+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', workspace1_id, 'Chat 4', 'gpt-4-turbo-preview', 'You are an assistant.', 0.5, 4000, TRUE, TRUE, folder1_id, 'openai');
8484
END;
8585

8686
-- Start data for messages
@@ -92,15 +92,15 @@ BEGIN
9292

9393
INSERT INTO messages (user_id, chat_id, content, role, model, sequence_number, image_paths) VALUES
9494
-- Chat 1
95-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Hello! This is a long message with **markdown**. It contains multiple sentences and paragraphs. Let me add more content to this message. I am a user interacting with an AI assistant. I can ask the assistant to perform various tasks, such as generating text, answering questions, and even writing code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo', 0, '{}'),
96-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'How are you? This is another long message with *italic markdown*. It also contains multiple sentences and paragraphs. Let me add more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo', 1, '{}'),
97-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I am fine, thank you! This is a third long message with [link markdown](http://example.com). It contains even more sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo', 2, '{}'),
98-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Great to hear that! This is a fourth long message with `code markdown`. It contains a lot of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo', 3, '{}'),
99-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'What can you do? This is a fifth long message with > blockquote markdown. It contains a ton of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo', 4, '{}'),
100-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I can assist you with various tasks. This is a sixth long message with - list markdown. It contains an enormous amount of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo', 5, '{}'),
101-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Can you assist me with my homework? This is a seventh long message with 1. numbered list markdown. It contains a plethora of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo', 6, '{}'),
102-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Sure, I would be happy to help. What do you need assistance with? This is an eighth long message with --- horizontal rule markdown. It contains a multitude of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo', 7, '{}'),
103-
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I need help with my math homework. This is a ninth long message with # heading markdown. It contains a vast number of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo', 8, '{}');
95+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Hello! This is a long message with **markdown**. It contains multiple sentences and paragraphs. Let me add more content to this message. I am a user interacting with an AI assistant. I can ask the assistant to perform various tasks, such as generating text, answering questions, and even writing code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo-preview', 0, '{}'),
96+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'How are you? This is another long message with *italic markdown*. It also contains multiple sentences and paragraphs. Let me add more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo-preview', 1, '{}'),
97+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I am fine, thank you! This is a third long message with [link markdown](http://example.com). It contains even more sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo-preview', 2, '{}'),
98+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Great to hear that! This is a fourth long message with `code markdown`. It contains a lot of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo-preview', 3, '{}'),
99+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'What can you do? This is a fifth long message with > blockquote markdown. It contains a ton of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo-preview', 4, '{}'),
100+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I can assist you with various tasks. This is a sixth long message with - list markdown. It contains an enormous amount of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo-preview', 5, '{}'),
101+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Can you assist me with my homework? This is a seventh long message with 1. numbered list markdown. It contains a plethora of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo-preview', 6, '{}'),
102+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'Sure, I would be happy to help. What do you need assistance with? This is an eighth long message with --- horizontal rule markdown. It contains a multitude of sentences and paragraphs. Let me add even more content to this message. As an AI assistant, I can understand and respond to a wide range of requests. I can generate text, answer questions, and even write code. I use a powerful language model to understand your requests and generate appropriate responses. This is a very interesting and exciting technology!', 'assistant', 'gpt-4-turbo-preview', 7, '{}'),
103+
('e9fc7e46-a8a5-4fd4-8ba7-af485013e6fa', chat1_id, 'I need help with my math homework. This is a ninth long message with # heading markdown. It contains a vast number of sentences and paragraphs. Let me add even more content to this message. As a user, I can interact with the AI assistant in a variety of ways. I can ask it to generate text, answer questions, and even write code. The assistant uses a powerful language model to understand my requests and generate appropriate responses. This is a very interesting and exciting technology!', 'user', 'gpt-4-turbo-preview', 8, '{}');
104104
END;
105105

106106
-- Start data for prompts

types/llms.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type LLMID =
1010

1111
// OpenAI Models (UPDATED 1/29/24)
1212
export type OpenAILLMID =
13-
| "gpt-4-turbo" // GPT-4 Turbo
13+
| "gpt-4-turbo-preview" // GPT-4 Turbo
1414
| "gpt-4-vision-preview" // GPT-4 Vision
1515
| "gpt-4" // GPT-4
1616
| "gpt-3.5-turbo" // Updated GPT-3.5 Turbo

0 commit comments

Comments
 (0)