Simplifying the flow - added logs

This commit is contained in:
Zvonimir Sabljic
2023-08-03 18:47:21 +02:00
parent 5c27d407b8
commit 3bfae8a97e
3 changed files with 7 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
from playhouse.shortcuts import model_to_dict
from peewee import *
from termcolor import colored
from utils.utils import hash_data
from database.models.components.base_models import database
@@ -123,6 +124,7 @@ def save_development_step(app_id, prompt_path, prompt_data, llm_req_num, message
.execute())
dev_step = DevelopmentSteps.get_by_id(inserted_id)
print(colored(f"Saved development step with id {dev_step.id}", "yellow"))
except IntegrityError:
print(f"A Development Step with hash_id {hash_id} already exists.")
return None

View File

@@ -17,7 +17,7 @@ class Project:
def __init__(self, args, name=None, description=None, user_stories=None, user_tasks=None, architecture=None, development_plan=None, current_step=None):
self.args = args
self.llm_req_num = 0
self.skip_steps = True
self.skip_steps = False if ('skip_until_dev_step' in args and args['skip_until_dev_step'] == '0') else True
self.skip_until_dev_step = args['skip_until_dev_step'] if 'skip_until_dev_step' in args else None
# TODO make flexible
self.root_path = ''

View File

@@ -31,6 +31,10 @@ class Developer(Agent):
logger.info('The app is DONE!!! Yay...you can use it now.')
def implement_task(self, sibling_tasks, current_task_index, parent_task=None):
print(colored('-------------------------', 'green'))
print(colored(f"Implementing task {current_task_index + 1}...\n", "green"))
print(sibling_tasks[current_task_index]['description'])
print(colored('-------------------------', 'green'))
convo_dev_task = AgentConvo(self)
task_steps, type = convo_dev_task.send_message('development/task/breakdown.prompt', {
"app_summary": self.project.high_level_summary,