update config

This commit is contained in:
LeonOstrez
2024-09-13 12:33:43 +02:00
parent 2edff2e436
commit 2f98ac3e30
3 changed files with 6 additions and 11 deletions

View File

@@ -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",

View File

@@ -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

View File

@@ -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"