mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-02-23 15:49:50 +01:00
Simplifying the flow - added logs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from playhouse.shortcuts import model_to_dict
|
from playhouse.shortcuts import model_to_dict
|
||||||
from peewee import *
|
from peewee import *
|
||||||
|
from termcolor import colored
|
||||||
|
|
||||||
from utils.utils import hash_data
|
from utils.utils import hash_data
|
||||||
from database.models.components.base_models import database
|
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())
|
.execute())
|
||||||
|
|
||||||
dev_step = DevelopmentSteps.get_by_id(inserted_id)
|
dev_step = DevelopmentSteps.get_by_id(inserted_id)
|
||||||
|
print(colored(f"Saved development step with id {dev_step.id}", "yellow"))
|
||||||
except IntegrityError:
|
except IntegrityError:
|
||||||
print(f"A Development Step with hash_id {hash_id} already exists.")
|
print(f"A Development Step with hash_id {hash_id} already exists.")
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -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):
|
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.args = args
|
||||||
self.llm_req_num = 0
|
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
|
self.skip_until_dev_step = args['skip_until_dev_step'] if 'skip_until_dev_step' in args else None
|
||||||
# TODO make flexible
|
# TODO make flexible
|
||||||
self.root_path = ''
|
self.root_path = ''
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ class Developer(Agent):
|
|||||||
logger.info('The app is DONE!!! Yay...you can use it now.')
|
logger.info('The app is DONE!!! Yay...you can use it now.')
|
||||||
|
|
||||||
def implement_task(self, sibling_tasks, current_task_index, parent_task=None):
|
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)
|
convo_dev_task = AgentConvo(self)
|
||||||
task_steps, type = convo_dev_task.send_message('development/task/breakdown.prompt', {
|
task_steps, type = convo_dev_task.send_message('development/task/breakdown.prompt', {
|
||||||
"app_summary": self.project.high_level_summary,
|
"app_summary": self.project.high_level_summary,
|
||||||
|
|||||||
Reference in New Issue
Block a user