mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-21 17:48:05 +01:00
TEMP: Don't track development steps until Developer starts working
This commit is contained in:
@@ -29,7 +29,8 @@ class AgentConvo:
|
||||
self.messages[-1]['content'] += '\nMAKE SURE THAT YOU RESPOND WITH A CORRECT JSON FORMAT!!!'
|
||||
|
||||
# check if we already have the LLM response saved
|
||||
self.agent.project.llm_req_num += 1
|
||||
if self.agent.__class__.__name__ == 'Developer':
|
||||
self.agent.project.llm_req_num += 1
|
||||
development_step = get_development_step_from_hash_id(self.agent.project, prompt_path, prompt_data, self.agent.project.llm_req_num)
|
||||
if development_step is not None and self.agent.project.skip_steps:
|
||||
# if we do, use it
|
||||
@@ -47,9 +48,10 @@ class AgentConvo:
|
||||
else:
|
||||
# if we don't, get the response from LLM
|
||||
response = create_gpt_chat_completion(self.messages, self.high_level_step, function_calls=function_calls)
|
||||
development_step = save_development_step(self.agent.project, prompt_path, prompt_data, self.messages, response)
|
||||
self.agent.project.checkpoints['last_development_step'] = development_step
|
||||
self.agent.project.save_files_snapshot(development_step.id)
|
||||
if self.agent.__class__.__name__ == 'Developer':
|
||||
development_step = save_development_step(self.agent.project, prompt_path, prompt_data, self.messages, response)
|
||||
self.agent.project.checkpoints['last_development_step'] = development_step
|
||||
self.agent.project.save_files_snapshot(development_step.id)
|
||||
|
||||
# TODO handle errors from OpenAI
|
||||
if response == {}:
|
||||
|
||||
@@ -33,6 +33,8 @@ class Project:
|
||||
# TODO make flexible
|
||||
# self.root_path = get_parent_folder('euclid')
|
||||
self.root_path = ''
|
||||
self.skip_until_dev_step = None
|
||||
self.skip_steps = None
|
||||
# self.restore_files({dev_step_id_to_start_from})
|
||||
|
||||
if current_step is not None:
|
||||
@@ -69,11 +71,6 @@ class Project:
|
||||
clear_directory(self.root_path)
|
||||
delete_all_app_development_data(self.args['app_id'])
|
||||
self.skip_steps = False
|
||||
else:
|
||||
self.skip_until_dev_step = None
|
||||
self.skip_steps = True
|
||||
|
||||
self.skip_steps = False if ('skip_until_dev_step' in self.args and self.args['skip_until_dev_step'] == '0') else True
|
||||
# TODO END
|
||||
|
||||
self.developer = Developer(self)
|
||||
|
||||
@@ -22,6 +22,9 @@ class Developer(Agent):
|
||||
def start_coding(self):
|
||||
self.project.current_step = 'coding'
|
||||
|
||||
if self.project.skip_steps is None:
|
||||
self.project.skip_steps = False if ('skip_until_dev_step' in self.project.args and self.project.args['skip_until_dev_step'] == '0') else True
|
||||
|
||||
# DEVELOPMENT
|
||||
print(colored(f"Ok, great, now, let's start with the actual development...\n", "green"))
|
||||
logger.info(f"Starting to create the actual code...")
|
||||
|
||||
Reference in New Issue
Block a user