-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed non null constraint for fields in token usage table (#374)
Co-authored-by: vishnuszipstack <[email protected]>
- Loading branch information
1 parent
9f7e069
commit f41509b
Showing
2 changed files
with
130 additions
and
11 deletions.
There are no files selected for viewing
97 changes: 97 additions & 0 deletions
97
backend/usage/migrations/0002_alter_usage_adapter_instance_id_and_more.py
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,97 @@ | ||
# Generated by Django 4.2.1 on 2024-06-01 10:18 | ||
|
||
import uuid | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("usage", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="adapter_instance_id", | ||
field=models.CharField( | ||
db_comment="Identifier for the adapter instance", max_length=255 | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="completion_tokens", | ||
field=models.IntegerField( | ||
db_comment="Number of tokens used for the completion" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="embedding_tokens", | ||
field=models.IntegerField(db_comment="Number of tokens used for embedding"), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="execution_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_comment="Identifier for the execution instance", | ||
max_length=255, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="id", | ||
field=models.UUIDField( | ||
db_comment="Primary key for the usage entry, automatically generated UUID", | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="model_name", | ||
field=models.CharField(db_comment="Name of the model used", max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="prompt_tokens", | ||
field=models.IntegerField( | ||
db_comment="Number of tokens used for the prompt" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="run_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_comment="Identifier for the run", | ||
max_length=255, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="total_tokens", | ||
field=models.IntegerField(db_comment="Total number of tokens used"), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="usage_type", | ||
field=models.CharField(db_comment="Type of usage", max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name="usage", | ||
name="workflow_id", | ||
field=models.CharField( | ||
blank=True, | ||
db_comment="Identifier for the workflow", | ||
max_length=255, | ||
null=True, | ||
), | ||
), | ||
] |
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