Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing GPT models #989

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions libs/superagent/app/utils/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@
"GPT_3_5_TURBO_16K_0613": "gpt-3.5-turbo-16k-0613",
"GPT_3_5_TURBO_0613": "gpt-3.5-turbo-0613",
"GPT_3_5_TURBO_1106": "gpt-3.5-turbo-1106",
"GPT_3_5_TURBO": "gpt-3.5-turbo",
"GPT_4_0613": "gpt-4-0613",
"GPT_4_32K_0613": "gpt-4-32k-0613",
"GPT_4_32K": "gpt-4-32k",
"GPT_4_1106_PREVIEW": "gpt-4-1106-preview",
"GPT_4_TURBO_PREVIEW": "gpt-4-turbo-preview",
"GPT_3_5_TURBO_0125": "gpt-3.5-turbo-0125",
"GPT_4": "gpt-4",
"GPT_4_TURBO": "gpt-4-turbo",
"GPT_4_TURBO_2024_04_09": "gpt-4-turbo-2024-04-09",
"GPT_4_0125_PREVIEW": "gpt-4-0125-preview",
}

LLM_REVERSE_MAPPING = {v: k for k, v in LLM_MAPPING.items()}


LLM_PROVIDER_MAPPING = {
"OPENAI": [
"GPT_3_5_TURBO",
"GPT_3_5_TURBO_16K_0613",
"GPT_3_5_TURBO_0613",
"GPT_3_5_TURBO_1106",
Expand All @@ -24,6 +31,11 @@
"GPT_4_32K_0613",
"GPT_4_1106_PREVIEW",
"GPT_4_TURBO_PREVIEW",
"GPT_4",
"GPT_4_TURBO",
"GPT_4_TURBO_2024_04_09",
"GPT_4_0125_PREVIEW",
"GPT_4_32K",
]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- AlterEnum
-- This migration adds more than one value to an enum.
-- With PostgreSQL versions 11 and earlier, this is not possible
-- in a single migration. This can be worked around by creating
-- multiple migrations, each migration adding only one value to
-- the enum.


ALTER TYPE "LLMModel" ADD VALUE 'GPT_3_5_TURBO';
ALTER TYPE "LLMModel" ADD VALUE 'GPT_4';
ALTER TYPE "LLMModel" ADD VALUE 'GPT_4_32K';
ALTER TYPE "LLMModel" ADD VALUE 'GPT_4_0125_PREVIEW';
ALTER TYPE "LLMModel" ADD VALUE 'GPT_4_TURBO';
ALTER TYPE "LLMModel" ADD VALUE 'GPT_4_TURBO_2024_04_09';
7 changes: 7 additions & 0 deletions libs/superagent/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,21 @@ enum LLMProvider {
}

enum LLMModel {
GPT_3_5_TURBO
GPT_3_5_TURBO_16K_0613
GPT_3_5_TURBO_0613
GPT_3_5_TURBO_1106
GPT_3_5_TURBO_0125
GPT_4
GPT_4_0613
GPT_4_32K
GPT_4_32K_0613
GPT_4_1106_PREVIEW
GPT_4_0125_PREVIEW
GPT_4_TURBO
GPT_4_TURBO_PREVIEW
GPT_4_TURBO_2024_04_09
MISTRAL_7B_INSTRUCT_V01
MIXTRAL_8X7B_INSTRUCT_V01
}
Expand Down