Refactored saving previous steps and made steps be loaded by looking at the current step as well

This commit is contained in:
Zvonimir Sabljic
2023-08-10 08:41:46 +02:00
parent 6b7e77b46a
commit 01b50ab3e3
9 changed files with 54 additions and 21 deletions

View File

@@ -8,11 +8,11 @@ from database.models.app import App
class DevelopmentSteps(BaseModel):
id = AutoField() # This will serve as the primary key
app = ForeignKeyField(App)
app = ForeignKeyField(App, on_delete='CASCADE')
hash_id = CharField(null=False)
messages = BinaryJSONField(null=True)
llm_response = BinaryJSONField(null=False)
previous_dev_step = ForeignKeyField('self', null=True, column_name='previous_dev_step')
previous_step = ForeignKeyField('self', null=True, column_name='previous_step')
class Meta:
db_table = 'development_steps'