Skip to content

Commit 4a80dac

Browse files
authored
Merge pull request #279 from n4ze3m/next
NO_SEED
2 parents 7442e46 + 2543019 commit 4a80dac

File tree

3 files changed

+7
-89
lines changed

3 files changed

+7
-89
lines changed

server/prisma/migrations/q_15/migration.sql

+1-83
Original file line numberDiff line numberDiff line change
@@ -16,86 +16,4 @@ CREATE TABLE "DialoqbaseModels" (
1616
);
1717

1818
-- CreateIndex
19-
CREATE UNIQUE INDEX "DialoqbaseModels_model_id_key" ON "DialoqbaseModels"("model_id");
20-
21-
22-
-- Insert the default models
23-
24-
25-
INSERT INTO "DialoqbaseModels" ("name", "model_id", "model_type", "model_provider", "stream_available", "local_model", "config") VALUES
26-
('GPT-3.5 Turbo (OpenAI)', 'gpt-3.5-turbo-dbase', 'chat', 'OpenAI', true, false, '{}'),
27-
('GPT-3.5 Turbo 16K (OpenAI)', 'gpt-3.5-turbo-16k-dbase', 'chat', 'OpenAI', true, false, '{}'),
28-
('GPT-4 (OpenAI)', 'gpt-4-dbase', 'chat', 'OpenAI', true, false, '{}'),
29-
('GPT-4 0613 (OpenAI)', 'gpt-4-0613-dbase', 'chat', 'OpenAI', true, false, '{}'),
30-
('GPT-3.5 Turbo Instruct (OpenAI)', 'gpt-3.5-turbo-instruct-dbase', 'instruct', 'openai-instruct', true, false, '{}'),
31-
('Claude 1 (Anthropic)', 'claude-1-dbase', 'chat', 'Anthropic', true, false, '{}'),
32-
('Claude 2 (Anthropic)', 'claude-2-dbase', 'chat', 'Anthropic', true, false, '{}'),
33-
('Claude Instant (Anthropic)', 'claude-instant-1-dbase', 'chat', 'Anthropic', true, false, '{}'),
34-
('Google chat-bison-001', 'google-bison-dbase', 'chat', 'Google', false, false, '{}'),
35-
('Llama v2 7B (Fireworks)', 'accounts/fireworks/models/llama-v2-7b-chat', 'chat', 'Fireworks', true, false, '{}'),
36-
('Llama v2 13B (Fireworks)', 'accounts/fireworks/models/llama-v2-13b-chat', 'chat', 'Fireworks', true, false, '{}'),
37-
('Llama v2 70B (Fireworks)', 'accounts/fireworks/models/llama-v2-70b-chat', 'chat', 'Fireworks', true, false, '{}'),
38-
('Llama v2 7B Chat int8 (Fireworks)', 'accounts/fireworks/models/llama-v2-7b-chat-w8a16', 'chat', 'Fireworks', true, false, '{}'),
39-
('Llama v2 13B Chat int8 (Fireworks)', 'accounts/fireworks/models/llama-v2-13b-chat-w8a16', 'chat', 'Fireworks', true, false, '{}'),
40-
('Llama v2 13B Code Instruct (Fireworks)', 'accounts/fireworks/models/llama-v2-13b-code-instruct', 'instruct', 'Fireworks', true, false, '{}'),
41-
('Llama v2 34B Code Instruct int8 (Fireworks)', 'accounts/fireworks/models/llama-v2-34b-code-instruct-w8a16', 'instruct', 'Fireworks', true, false, '{}'),
42-
('Mistral 7B Instruct 4K (Fireworks)', 'accounts/fireworks/models/mistral-7b-instruct-4k', 'instruct', 'Fireworks', true, false, '{}');
43-
44-
45-
-- Move fireworks model type from existingdata base
46-
47-
CREATE OR REPLACE FUNCTION update_fireworks_bot_model() RETURNS void AS $$
48-
BEGIN
49-
-- Llama v2 7B (Fireworks)
50-
UPDATE "public"."Bot"
51-
SET "model" = 'accounts/fireworks/models/llama-v2-7b-chat',
52-
"provider" = 'Fireworks'
53-
WHERE "model" = 'llama-v2-7b-chat';
54-
55-
-- Llama v2 13B (Fireworks)
56-
UPDATE "public"."Bot"
57-
SET "model" = 'accounts/fireworks/models/llama-v2-13b-chat',
58-
"provider" = 'Fireworks'
59-
WHERE "model" = 'llama-v2-13b-chat';
60-
61-
-- Llama v2 70B (Fireworks)
62-
UPDATE "public"."Bot"
63-
SET "model" = 'accounts/fireworks/models/llama-v2-70b-chat',
64-
"provider" = 'Fireworks'
65-
WHERE "model" = 'llama-v2-70b-chat';
66-
67-
-- Llama v2 7B Chat int8 (Fireworks)
68-
UPDATE "public"."Bot"
69-
SET "model" = 'accounts/fireworks/models/llama-v2-7b-chat-w8a16',
70-
"provider" = 'Fireworks'
71-
WHERE "model" = 'llama-v2-7b-chat-w8a16';
72-
73-
-- Llama v2 13B Chat int8 (Fireworks)
74-
UPDATE "public"."Bot"
75-
SET "model" = 'accounts/fireworks/models/llama-v2-13b-chat-w8a16',
76-
"provider" = 'Fireworks'
77-
WHERE "model" = 'llama-v2-13b-chat-w8a16';
78-
79-
-- Llama v2 13B Code Instruct (Fireworks)
80-
UPDATE "public"."Bot"
81-
SET "model" = 'accounts/fireworks/models/llama-v2-13b-code-instruct',
82-
"provider" = 'Fireworks'
83-
WHERE "model" = 'llama-v2-13b-code-instruct';
84-
85-
-- Llama v2 34B Code Instruct int8 (Fireworks)
86-
UPDATE "public"."Bot"
87-
SET "model" = 'accounts/fireworks/models/llama-v2-34b-code-instruct-w8a16',
88-
"provider" = 'Fireworks'
89-
WHERE "model" = 'llama-v2-34b-code-instruct-w8a16';
90-
91-
-- Mistral 7B Instruct 4K (Fireworks)
92-
UPDATE "public"."Bot"
93-
SET "model" = 'accounts/fireworks/models/mistral-7b-instruct-4k',
94-
"provider" = 'Fireworks'
95-
WHERE "model" = 'mistral-7b-instruct-4k';
96-
97-
END;
98-
$$ LANGUAGE plpgsql;
99-
100-
-- Execute the function to perform the update
101-
SELECT update_fireworks_bot_model();
19+
CREATE UNIQUE INDEX "DialoqbaseModels_model_id_key" ON "DialoqbaseModels"("model_id");

server/prisma/migrations/q_16/migration.sql

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ BEGIN
4949
END;
5050
$$ LANGUAGE plpgsql;
5151

52-
-- Execute the function to perform the update
53-
SELECT update_dialoqbase_models();
52+
-- Execute the function to perform the update
+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
INSERT INTO "DialoqbaseModels" ("name", "model_id", "model_type", "model_provider", "stream_available", "local_model", "config") VALUES
2-
('GPT-3.5 Turbo 1106 (OpenAI)', 'gpt-3.5-turbo-1106-dbase', 'chat', 'OpenAI', true, false, '{}'),
3-
('GPT-4 Turbo (OpenAI)', 'gpt-4-1106-preview-dbase', 'chat', 'OpenAI', true, false, '{}'),
4-
('GPT-4 Turbo with vision (OpenAI)', 'gpt-4-vision-preview-dbase', 'chat', 'OpenAI', true, false, '{}');
1+
-- INSERT INTO "DialoqbaseModels" ("name", "model_id", "model_type", "model_provider", "stream_available", "local_model", "config") VALUES
2+
-- ('GPT-3.5 Turbo 1106 (OpenAI)', 'gpt-3.5-turbo-1106-dbase', 'chat', 'OpenAI', true, false, '{}'),
3+
-- ('GPT-4 Turbo (OpenAI)', 'gpt-4-1106-preview-dbase', 'chat', 'OpenAI', true, false, '{}'),
4+
-- ('GPT-4 Turbo with vision (OpenAI)', 'gpt-4-vision-preview-dbase', 'chat', 'OpenAI', true, false, '{}');
5+
-- Nothing

0 commit comments

Comments
 (0)