mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 13:17:55 -05:00
update config.json default models
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from core.agents.base import BaseAgent
|
||||
from core.agents.convo import AgentConvo
|
||||
from core.agents.response import AgentResponse, ResponseType
|
||||
from core.config import SPEC_WRITER_AGENT_NAME
|
||||
from core.db.models import Complexity
|
||||
from core.db.models.project_state import IterationStatus
|
||||
from core.llm.parser import StringParser
|
||||
@@ -95,7 +96,7 @@ class SpecWriter(BaseAgent):
|
||||
await self.send_message(
|
||||
f"Making the following changes to project specification:\n\n{feature_description}\n\nUpdated project specification:"
|
||||
)
|
||||
llm = self.get_llm()
|
||||
llm = self.get_llm(SPEC_WRITER_AGENT_NAME)
|
||||
convo = AgentConvo(self).template("add_new_feature", feature_description=feature_description)
|
||||
llm_response: str = await llm(convo, temperature=0, parser=StringParser())
|
||||
updated_spec = llm_response.strip()
|
||||
@@ -124,7 +125,7 @@ class SpecWriter(BaseAgent):
|
||||
|
||||
async def check_prompt_complexity(self, prompt: str) -> str:
|
||||
await self.send_message("Checking the complexity of the prompt ...")
|
||||
llm = self.get_llm()
|
||||
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()
|
||||
@@ -154,7 +155,7 @@ class SpecWriter(BaseAgent):
|
||||
)
|
||||
await self.send_message(msg)
|
||||
|
||||
llm = self.get_llm()
|
||||
llm = self.get_llm(SPEC_WRITER_AGENT_NAME)
|
||||
convo = AgentConvo(self).template("ask_questions").user(spec)
|
||||
n_questions = 0
|
||||
n_answers = 0
|
||||
@@ -204,7 +205,7 @@ class SpecWriter(BaseAgent):
|
||||
|
||||
async def review_spec(self, spec: str) -> str:
|
||||
convo = AgentConvo(self).template("review_spec", spec=spec)
|
||||
llm = self.get_llm()
|
||||
llm = self.get_llm(SPEC_WRITER_AGENT_NAME)
|
||||
llm_response: str = await llm(convo, temperature=0)
|
||||
additional_info = llm_response.strip()
|
||||
if additional_info and len(additional_info) > 6:
|
||||
|
||||
@@ -27,7 +27,7 @@ def parse_llm_endpoint(value: str) -> Optional[tuple[LLMProvider, str]]:
|
||||
Option syntax is: --llm-endpoint <provider>:<url>
|
||||
|
||||
:param value: Argument value.
|
||||
:return: Tuple with LLM provider and URL, or None if if the option wasn't provided.
|
||||
:return: Tuple with LLM provider and URL, or None if the option wasn't provided.
|
||||
"""
|
||||
if not value:
|
||||
return None
|
||||
|
||||
@@ -38,6 +38,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"
|
||||
SPEC_WRITER_AGENT_NAME = "SpecWriter"
|
||||
|
||||
# Endpoint for the external documentation
|
||||
EXTERNAL_DOCUMENTATION_API = "http://docs-pythagora-io-439719575.us-east-1.elb.amazonaws.com"
|
||||
@@ -112,7 +113,7 @@ class AgentLLMConfig(_StrictModel):
|
||||
AgentLLMConfig is not specified, default will be used.
|
||||
"""
|
||||
|
||||
provider: LLMProvider = LLMProvider.OPENAI
|
||||
provider: Optional[LLMProvider] = Field(default=LLMProvider.OPENAI, description="LLM provider")
|
||||
model: str = Field(description="Model to use", default="gpt-4o-2024-05-13")
|
||||
temperature: float = Field(
|
||||
default=0.5,
|
||||
@@ -318,8 +319,17 @@ 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.5),
|
||||
TASK_BREAKDOWN_AGENT_NAME: AgentLLMConfig(model="claude-3-5-sonnet-20240620", temperature=0.5),
|
||||
CHECK_LOGS_AGENT_NAME: AgentLLMConfig(
|
||||
provider=LLMProvider.ANTHROPIC,
|
||||
model="claude-3-5-sonnet-20240620",
|
||||
temperature=0.5,
|
||||
),
|
||||
TASK_BREAKDOWN_AGENT_NAME: AgentLLMConfig(
|
||||
provider=LLMProvider.ANTHROPIC,
|
||||
model="claude-3-5-sonnet-20240620",
|
||||
temperature=0.5,
|
||||
),
|
||||
SPEC_WRITER_AGENT_NAME: AgentLLMConfig(model="gpt-4-0125-preview", temperature=0.0),
|
||||
}
|
||||
)
|
||||
prompt: PromptConfig = PromptConfig()
|
||||
|
||||
@@ -52,6 +52,16 @@
|
||||
"provider": "anthropic",
|
||||
"model": "claude-3-5-sonnet-20240620",
|
||||
"temperature": 0.0
|
||||
},
|
||||
"Developer.breakdown_current_task": {
|
||||
"provider": "anthropic",
|
||||
"model": "claude-3-5-sonnet-20240620",
|
||||
"temperature": 0.5
|
||||
},
|
||||
"SpecWriter": {
|
||||
"provider": "openai",
|
||||
"model": "gpt-4-0125-preview",
|
||||
"temperature": 0.5
|
||||
}
|
||||
},
|
||||
// Logging configuration outputs debug log to "pythagora.log" by default. If you set this to null,
|
||||
|
||||
Reference in New Issue
Block a user