Skip to content

Commit

Permalink
Merge pull request Pythagora-io#32 from Pythagora-io/remove-double-me…
Browse files Browse the repository at this point in the history
…ssages

Fixed various double messages in UI
  • Loading branch information
matija-ilijas authored Sep 25, 2024
2 parents 0638e6a + f3a066e commit d3c1026
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/agents/architect.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def select_templates(self, spec: Specification) -> tuple[str, dict[Project
"""
await self.send_message("Selecting starter templates ...")

llm = self.get_llm(stream_output=True)
llm = self.get_llm()
convo = (
AgentConvo(self)
.template(
Expand Down
2 changes: 1 addition & 1 deletion core/agents/bug_hunter.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def check_logs(self, logs_message: str = None):
)
.require_schema(HuntConclusionOptions)
)
llm = self.get_llm(stream_output=True)
llm = self.get_llm()
hunt_conclusion = await llm(convo, parser=JSONParser(HuntConclusionOptions), temperature=0)

bug_hunting_cycles = self.current_state.current_iteration.get("bug_hunting_cycles")
Expand Down
6 changes: 3 additions & 3 deletions core/agents/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ async def breakdown_current_iteration(self) -> AgentResponse:
source = "bug_hunt"
n_tasks = len(self.next_state.iterations)
log.debug(f"Breaking down the logging cycle {description}")
await self.send_message("Breaking down the current bug hunting cycle ...")
else:
iteration = self.current_state.current_iteration
if iteration is None:
Expand All @@ -118,11 +117,11 @@ async def breakdown_current_iteration(self) -> AgentResponse:
source = "troubleshooting"
n_tasks = len(self.next_state.iterations)
log.debug(f"Breaking down the iteration {description}")
await self.send_message("Breaking down the current task iteration ...")

if self.current_state.files and self.current_state.relevant_files is None:
return await self.get_relevant_files(user_feedback, description)

await self.send_message("Breaking down the task into steps ...")
await self.ui.send_task_progress(
n_tasks, # iterations and reviews can be created only one at a time, so we are always on last one
n_tasks,
Expand Down Expand Up @@ -193,7 +192,6 @@ async def breakdown_current_task(self) -> AgentResponse:
)

log.debug(f"Breaking down the current task: {current_task['description']}")
await self.send_message("Thinking about how to implement this task ...")

log.debug(f"Current state files: {len(self.current_state.files)}, relevant {self.current_state.relevant_files}")
# Check which files are relevant to the current task
Expand All @@ -202,6 +200,8 @@ async def breakdown_current_task(self) -> AgentResponse:

current_task_index = self.current_state.tasks.index(current_task)

await self.send_message("Thinking about how to implement this task ...")

llm = self.get_llm(TASK_BREAKDOWN_AGENT_NAME, stream_output=True)
convo = AgentConvo(self).template(
"breakdown",
Expand Down
2 changes: 1 addition & 1 deletion core/agents/spec_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async def update_spec(self, iteration_mode) -> AgentResponse:

async def check_prompt_complexity(self, prompt: str) -> str:
await self.send_message("Checking the complexity of the prompt ...")
llm = self.get_llm(SPEC_WRITER_AGENT_NAME, stream_output=True)
llm = self.get_llm(SPEC_WRITER_AGENT_NAME)
convo = AgentConvo(self).template("prompt_complexity", prompt=prompt)
llm_response: str = await llm(convo, temperature=0, parser=StringParser())
return llm_response.lower()
Expand Down

0 comments on commit d3c1026

Please sign in to comment.