Skip to content

Commit

Permalink
Merge pull request #1066 from Pythagora-io/sonnet_for_breakdown
Browse files Browse the repository at this point in the history
Added Sonnet support for the task breakdown
  • Loading branch information
LeonOstrez authored Jul 29, 2024
2 parents 74a24a9 + 3bbb0dd commit 4b4fa08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/agents/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from core.agents.convo import AgentConvo
from core.agents.mixins import TaskSteps
from core.agents.response import AgentResponse, ResponseType
from core.config import TASK_BREAKDOWN_AGENT_NAME
from core.db.models.project_state import IterationStatus, TaskStatus
from core.db.models.specification import Complexity
from core.llm.parser import JSONParser
Expand Down Expand Up @@ -178,7 +179,7 @@ async def breakdown_current_task(self) -> AgentResponse:

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

llm = self.get_llm()
llm = self.get_llm(TASK_BREAKDOWN_AGENT_NAME)
convo = AgentConvo(self).template(
"breakdown",
task=current_task,
Expand All @@ -194,6 +195,7 @@ async def breakdown_current_task(self) -> AgentResponse:
}
self.next_state.flag_tasks_as_modified()

llm = self.get_llm()
await self.send_message("Breaking down the task into steps ...")
convo.assistant(response).template("parse_task").require_schema(TaskSteps)
response: TaskSteps = await llm(convo, parser=JSONParser(TaskSteps), temperature=0)
Expand Down
4 changes: 3 additions & 1 deletion core/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
CODE_MONKEY_AGENT_NAME = "CodeMonkey"
DESCRIBE_FILES_AGENT_NAME = "CodeMonkey.describe_files"
CHECK_LOGS_AGENT_NAME = "BugHunter.check_logs"
TASK_BREAKDOWN_AGENT_NAME = "Developer.breakdown_current_task"

# Endpoint for the external documentation
EXTERNAL_DOCUMENTATION_API = "http://docs-pythagora-io-439719575.us-east-1.elb.amazonaws.com"
Expand Down Expand Up @@ -317,7 +318,8 @@ class Config(_StrictModel):
DEFAULT_AGENT_NAME: AgentLLMConfig(),
CODE_MONKEY_AGENT_NAME: AgentLLMConfig(model="gpt-4-0125-preview", temperature=0.0),
DESCRIBE_FILES_AGENT_NAME: AgentLLMConfig(model="gpt-3.5-turbo", temperature=0.0),
CHECK_LOGS_AGENT_NAME: AgentLLMConfig(model="claude-3-5-sonnet-20240620", temperature=0.0),
CHECK_LOGS_AGENT_NAME: AgentLLMConfig(model="claude-3-5-sonnet-20240620", temperature=0.5),
TASK_BREAKDOWN_AGENT_NAME: AgentLLMConfig(model="claude-3-5-sonnet-20240620", temperature=0.5),
}
)
prompt: PromptConfig = PromptConfig()
Expand Down

0 comments on commit 4b4fa08

Please sign in to comment.