-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gpt-4o-mini, 'deactivate' gpt-3.5-turbo.
- Loading branch information
Showing
9 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- SPDX-FileCopyrightText: 2024 Mark Liffiton <[email protected]> | ||
-- | ||
-- SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
PRAGMA foreign_keys = OFF; | ||
|
||
BEGIN; | ||
|
||
-- Note: Not removing DEFAULT values on model_id in consumer and classes_user. | ||
-- With the default removed in the schema, no code going forward should | ||
-- ever use that default (else it would crash in testing). | ||
|
||
DROP TABLE models; | ||
|
||
CREATE TABLE models ( | ||
id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
name TEXT NOT NULL UNIQUE, | ||
shortname TEXT NOT NULL UNIQUE, | ||
model TEXT NOT NULL, | ||
active BOOLEAN NOT NULL CHECK (active IN (0,1)) | ||
); | ||
-- See also: DEFAULT_MODEL_ID in app.config (src/gened/base.py) | ||
INSERT INTO models(name, shortname, model, active) VALUES | ||
('OpenAI GPT-3.5 Turbo', 'GPT-3.5', 'gpt-3.5-turbo-0125', false), | ||
('OpenAI GPT-4o', 'GPT-4o', 'gpt-4o', true), | ||
('OpenAI GPT-4o-mini', 'GPT-4o-mini', 'gpt-4o-mini', true) | ||
; | ||
|
||
COMMIT; | ||
|
||
PRAGMA foreign_keys = ON; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
-- | ||
-- SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
INSERT INTO consumers (id, lti_consumer, lti_secret, openai_key) | ||
INSERT INTO consumers (id, lti_consumer, lti_secret, openai_key, model_id) | ||
VALUES | ||
(1, 'consumer.domain', 'seecrits1', 'keeeez1'), | ||
(2, 'consumer.otherdomain', 'seecrits2', 'keeeez2'); | ||
(1, 'consumer.domain', 'seecrits1', 'keeeez1', 1), | ||
(2, 'consumer.otherdomain', 'seecrits2', 'keeeez2', 2); | ||
|
||
INSERT INTO classes (id, name, enabled) | ||
VALUES | ||
|
@@ -41,11 +41,11 @@ VALUES | |
(22, 2, null, '[email protected]', null, false, false, 0), | ||
(23, 2, null, '[email protected]', null, false, false, 0); | ||
|
||
INSERT INTO classes_user (class_id, openai_key, link_ident, link_reg_expires, creator_user_id) | ||
INSERT INTO classes_user (class_id, openai_key, link_ident, link_reg_expires, creator_user_id, model_id) | ||
VALUES | ||
(2, 'nope', 'reg_disabled', '0001-01-01', 11), | ||
(3, 'nope', 'reg_expired', '2023-01-01', 11), | ||
(4, 'nope', 'reg_enabled', '9999-12-31', 11); | ||
(2, 'nope', 'reg_disabled', '0001-01-01', 11, 1), | ||
(3, 'nope', 'reg_expired', '2023-01-01', 11, 2), | ||
(4, 'nope', 'reg_enabled', '9999-12-31', 11, 2); | ||
|
||
INSERT INTO auth_local (user_id, username, password) | ||
VALUES | ||
|