diff --git a/pilot/helpers/AgentConvo.py b/pilot/helpers/AgentConvo.py index d774d9b6..d98a58c3 100644 --- a/pilot/helpers/AgentConvo.py +++ b/pilot/helpers/AgentConvo.py @@ -51,6 +51,7 @@ class AgentConvo: # craft message self.construct_and_add_message_from_prompt(prompt_path, prompt_data) + # TODO: move this if block (and the other below) to Developer agent - https://github.com/Pythagora-io/gpt-pilot/issues/91#issuecomment-1751964079 # check if we already have the LLM response saved if self.agent.__class__.__name__ == 'Developer': self.agent.project.llm_req_num += 1 @@ -80,7 +81,8 @@ class AgentConvo: save_development_step(self.agent.project, prompt_path, prompt_data, self.messages, '', str(e)) raise e - if self.agent.__class__.__name__ == 'Developer': + # TODO: move this code to Developer agent - https://github.com/Pythagora-io/gpt-pilot/issues/91#issuecomment-1751964079 + if response != {} and self.agent.__class__.__name__ == 'Developer': development_step = save_development_step(self.agent.project, prompt_path, prompt_data, self.messages, response) # TODO handle errors from OpenAI