Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ jobs:
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Run Flake8 Linter
if: ${{ !cancelled() }}
run: poetry run flake8 .
- name: Check migrations
if: ${{ !cancelled() }}
run: poetry run python manage.py makemigrations --dry-run --check
- name: "Run he backend unit tests"
if: ${{ !cancelled() }}
run: poetry run pytest ./tests/unit
35 changes: 35 additions & 0 deletions fab_credits/migrations/0003_alter_userusage_model_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 5.0.8 on 2024-09-05 08:01

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
(
"fab_credits",
"0002_alter_userusage_unique_together_userusage_model_name_and_more",
),
]

operations = [
migrations.AlterField(
model_name="userusage",
name="model_name",
field=models.CharField(
choices=[
("gpt-4o", "gpt-4o"),
("gpt-4o-mini", "gpt-4o-mini"),
("gpt-4o-2024-05-13", "gpt-4o-2024-05-13"),
("gpt-3.5-turbo-0125", "gpt-3.5-turbo-0125"),
("gpt-3.5-turbo-instruct", "gpt-3.5-turbo-instruct"),
("claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20240620"),
("claude-3-opus-20240229", "claude-3-opus-20240229"),
("claude-3-sonnet-20240229", "claude-3-sonnet-20240229"),
("claude-3-haiku-20240307", "claude-3-haiku-20240307"),
],
default="gpt-4o",
max_length=50,
),
),
]
1 change: 1 addition & 0 deletions fab_credits/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

available_models = [
("gpt-4o", "gpt-4o"),
("gpt-4o-mini", "gpt-4o-mini"),
("gpt-4o-2024-05-13", "gpt-4o-2024-05-13"),
("gpt-3.5-turbo-0125", "gpt-3.5-turbo-0125"),
("gpt-3.5-turbo-instruct", "gpt-3.5-turbo-instruct"),
Expand Down