mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-08 12:53:50 -05:00
update config
This commit is contained in:
@@ -120,8 +120,8 @@ class AgentLLMConfig(_StrictModel):
|
||||
AgentLLMConfig is not specified, default will be used.
|
||||
"""
|
||||
|
||||
provider: Optional[LLMProvider] = Field(default=LLMProvider.ANTHROPIC, description="LLM provider")
|
||||
model: str = Field(description="Model to use", default="claude-3-5-sonnet-20240620")
|
||||
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,
|
||||
description="Temperature to use for sampling",
|
||||
@@ -344,11 +344,6 @@ class Config(_StrictModel):
|
||||
model="gpt-4o-mini-2024-07-18",
|
||||
temperature=0.0,
|
||||
),
|
||||
GET_RELEVANT_FILES_AGENT_NAME: AgentLLMConfig(
|
||||
provider=LLMProvider.ANTHROPIC,
|
||||
model="claude-3-5-sonnet-20240620",
|
||||
temperature=0.0,
|
||||
),
|
||||
PARSE_TASK_AGENT_NAME: AgentLLMConfig(
|
||||
provider=LLMProvider.OPENAI,
|
||||
model="gpt-4-0125-preview",
|
||||
|
||||
@@ -65,7 +65,7 @@ async def test_get_llm(mock_BaseLLMClient):
|
||||
|
||||
llm = agent.get_llm(stream_output=True)
|
||||
|
||||
mock_BaseLLMClient.for_provider.assert_called_once_with("anthropic")
|
||||
mock_BaseLLMClient.for_provider.assert_called_once_with("openai")
|
||||
|
||||
mock_OpenAIClient.assert_called_once()
|
||||
assert mock_OpenAIClient.call_args.kwargs["stream_handler"] == agent.stream_handler
|
||||
|
||||
@@ -64,8 +64,8 @@ def test_default_agent_llm_config():
|
||||
def test_builtin_defaults():
|
||||
config = ConfigLoader.from_json("{}")
|
||||
|
||||
assert config.llm_for_agent().provider == LLMProvider.ANTHROPIC
|
||||
assert config.llm_for_agent().model == "claude-3-5-sonnet-20240620"
|
||||
assert config.llm_for_agent().provider == LLMProvider.OPENAI
|
||||
assert config.llm_for_agent().model == "gpt-4o-2024-05-13"
|
||||
assert config.llm_for_agent().base_url is None
|
||||
assert config.llm_for_agent().api_key is None
|
||||
|
||||
@@ -104,7 +104,7 @@ def test_load_from_file_with_comments():
|
||||
def test_default_config():
|
||||
loader.config = Config()
|
||||
config = get_config()
|
||||
assert config.llm_for_agent().provider == LLMProvider.ANTHROPIC
|
||||
assert config.llm_for_agent().provider == LLMProvider.OPENAI
|
||||
assert config.log.level == "DEBUG"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user