Skip to content

Commit

Permalink
chore: add missing gpt models (#989)
Browse files Browse the repository at this point in the history
  • Loading branch information
elisalimli committed May 3, 2024
1 parent f5efbbf commit 4fa0bbd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
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

0 comments on commit 4fa0bbd

Please sign in to comment.