mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
Merge pull request #1066 from Pythagora-io/sonnet_for_breakdown
Added Sonnet support for the task breakdown
This commit is contained in:
@@ -7,6 +7,7 @@ from core.agents.base import BaseAgent
|
||||
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
|
||||
@@ -178,7 +179,7 @@ class Developer(BaseAgent):
|
||||
|
||||
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,
|
||||
@@ -194,6 +195,7 @@ class Developer(BaseAgent):
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -37,6 +37,7 @@ DEFAULT_AGENT_NAME = "default"
|
||||
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"
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user