Skip to content

Commit

Permalink
added gpt 4 o mini
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Jul 24, 2024
1 parent adf8daa commit d60c51a
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
48 changes: 48 additions & 0 deletions ayushma/migrations/0054_alter_chat_model_alter_project_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Generated by Django 4.2.6 on 2024-07-24 14:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("ayushma", "0053_alter_chat_model_alter_project_model"),
]

operations = [
migrations.AlterField(
model_name="chat",
name="model",
field=models.IntegerField(
blank=True,
choices=[
(1, "Gpt 3 5"),
(2, "Gpt 3 5 16K"),
(3, "Gpt 4"),
(4, "Gpt 4 32K"),
(5, "Gpt 4 Visual"),
(6, "Gpt 4 Turbo"),
(7, "Gpt 4 Omni"),
(8, "Gpt 4 Omni Mini"),
],
null=True,
),
),
migrations.AlterField(
model_name="project",
name="model",
field=models.IntegerField(
choices=[
(1, "Gpt 3 5"),
(2, "Gpt 3 5 16K"),
(3, "Gpt 4"),
(4, "Gpt 4 32K"),
(5, "Gpt 4 Visual"),
(6, "Gpt 4 Turbo"),
(7, "Gpt 4 Omni"),
(8, "Gpt 4 Omni Mini"),
],
default=1,
),
),
]
1 change: 1 addition & 0 deletions ayushma/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ModelType(IntegerChoices):
GPT_4_VISUAL = 5
GPT_4_TURBO = 6
GPT_4_OMNI = 7
GPT_4_OMNI_MINI = 8


class StatusChoices(IntegerChoices):
Expand Down
5 changes: 4 additions & 1 deletion ayushma/utils/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ def get_model_name(model_type: ModelType):
elif model_type == ModelType.GPT_4_VISUAL:
return "gpt-4-vision-preview"
elif model_type == ModelType.GPT_4_TURBO:
return "gpt-4-1106-preview"
return "gpt-4-turbo"
elif model_type == ModelType.GPT_4_OMNI:
return "gpt-4o"
elif model_type == ModelType.GPT_4_OMNI_MINI:
return "gpt-4o-mini"

else:
if settings.OPENAI_API_TYPE == "azure":
return settings.AZURE_CHAT_MODEL
Expand Down

0 comments on commit d60c51a

Please sign in to comment.