forked from songquanpeng/one-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: enable model configuration on default group (close songquan…
- Loading branch information
1 parent
45e9fd6
commit 813bf0b
Showing
3 changed files
with
19 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
INSERT INTO abilities (`group`, model, channel_id, enabled) | ||
SELECT c.`group`, m.model, c.id, 1 | ||
FROM channels c | ||
CROSS JOIN ( | ||
SELECT 'gpt-3.5-turbo' AS model UNION ALL | ||
SELECT 'gpt-3.5-turbo-0301' AS model UNION ALL | ||
SELECT 'gpt-4' AS model UNION ALL | ||
SELECT 'gpt-4-0314' AS model | ||
) AS m | ||
WHERE c.status = 1 | ||
AND NOT EXISTS ( | ||
SELECT 1 | ||
FROM abilities a | ||
WHERE a.`group` = c.`group` | ||
AND a.model = m.model | ||
AND a.channel_id = c.id | ||
); |
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