This commit is contained in:
LeonOstrez
2024-10-21 13:02:57 +02:00
parent 65514908fb
commit e36a74fbb9
4 changed files with 9 additions and 4 deletions

View File

@@ -193,8 +193,12 @@ class BugHunter(BaseAgent):
)
# TODO select only the logs that are new (with PYTHAGORA_DEBUGGING_LOG)
self.next_state.current_iteration["bug_hunting_cycles"][-1]["backend_logs"] = backend_logs.text
self.next_state.current_iteration["bug_hunting_cycles"][-1]["frontend_logs"] = frontend_logs.text
self.next_state.current_iteration["bug_hunting_cycles"][-1]["backend_logs"] = "\n".join(
backend_logs.text.splitlines()[-500:]
)
self.next_state.current_iteration["bug_hunting_cycles"][-1]["frontend_logs"] = "\n".join(
frontend_logs.text.splitlines()[-500:]
)
self.next_state.current_iteration["bug_hunting_cycles"][-1]["user_feedback"] = user_feedback.text
self.next_state.current_iteration["status"] = IterationStatus.HUNTING_FOR_BUG

View File

@@ -141,7 +141,7 @@ class TechLead(BaseAgent):
)
if response.button == "end" or response.cancelled or not response.text:
await self.ui.send_message("Thanks for using Pythagora!")
await self.ui.send_message("Thank you for using Pythagora!", source=pythagora_source)
return AgentResponse.exit(self)
self.next_state.epics = self.current_state.epics + [

View File

@@ -38,7 +38,7 @@ class AnthropicClient(BaseLLMClient):
Adapt the conversation messages to the format expected by the Anthropic Claude model.
Claude only recognizes "user" and "assistant" roles, and requires them to be switched
for each message (ie. no consecutive messages from the same role).
for each message (i.e. no consecutive messages from the same role).
:param convo: Conversation to adapt.
:return: Adapted conversation messages.

View File

@@ -435,6 +435,7 @@ class IPCClientUI(UIBase):
async def send_test_instructions(self, test_instructions: str):
try:
log.debug("Sending test instructions")
parsed_instructions = json.loads(test_instructions)
except Exception:
# this is for backwards compatibility with the old format