From 08eda93963976f6f9aa4de3898d726326bf54b88 Mon Sep 17 00:00:00 2001 From: Bob Beauchamp Date: Thu, 23 May 2024 10:10:43 -0400 Subject: [PATCH 1/2] Changed default OPENAI model to GPT-4o --- agency_swarm/agents/agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agency_swarm/agents/agent.py b/agency_swarm/agents/agent.py index 37f22776..31789743 100644 --- a/agency_swarm/agents/agent.py +++ b/agency_swarm/agents/agent.py @@ -68,7 +68,7 @@ def __init__( api_params: Dict[str, Dict[str, str]] = None, file_ids: List[str] = None, metadata: Dict[str, str] = None, - model: str = "gpt-4-turbo", + model: str = "gpt-4o", validation_attempts: int = 1, max_prompt_tokens: int = None, max_completion_tokens: int = None, @@ -94,7 +94,7 @@ def __init__( api_headers (Dict[str,Dict[str, str]], optional): Headers to be used for the openapi requests. Each key must be a full filename from schemas_folder. Defaults to an empty dictionary. api_params (Dict[str, Dict[str, str]], optional): Extra params to be used for the openapi requests. Each key must be a full filename from schemas_folder. Defaults to an empty dictionary. metadata (Dict[str, str], optional): Metadata associated with the agent. Defaults to an empty dictionary. - model (str, optional): The model identifier for the OpenAI API. Defaults to "gpt-4-turbo-preview". + model (str, optional): The model identifier for the OpenAI API. Defaults to "gpt-4o". validation_attempts (int, optional): Number of attempts to validate the response with response_validator function. Defaults to 1. max_prompt_tokens (int, optional): Maximum number of tokens allowed in the prompt. Defaults to None. max_completion_tokens (int, optional): Maximum number of tokens allowed in the completion. Defaults to None. From 8b645b6f8ac29f8835ff247b10320c06fa5a467a Mon Sep 17 00:00:00 2001 From: Arsenii Shatokhin Date: Mon, 27 May 2024 08:55:17 +0400 Subject: [PATCH 2/2] Changed model to gpt-4o in tools --- agency_swarm/agency/genesis/ToolCreator/tools/CreateTool.py | 2 +- agency_swarm/agents/Devid/tools/FileWriter.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agency_swarm/agency/genesis/ToolCreator/tools/CreateTool.py b/agency_swarm/agency/genesis/ToolCreator/tools/CreateTool.py index d1c91893..635d91de 100644 --- a/agency_swarm/agency/genesis/ToolCreator/tools/CreateTool.py +++ b/agency_swarm/agency/genesis/ToolCreator/tools/CreateTool.py @@ -173,7 +173,7 @@ def run(self): while n < 3: resp = client.chat.completions.create( messages=messages, - model="gpt-4-turbo", + model="gpt-4o", temperature=0, ) diff --git a/agency_swarm/agents/Devid/tools/FileWriter.py b/agency_swarm/agents/Devid/tools/FileWriter.py index e470246b..93b86b21 100644 --- a/agency_swarm/agents/Devid/tools/FileWriter.py +++ b/agency_swarm/agents/Devid/tools/FileWriter.py @@ -102,7 +102,7 @@ def run(self): while n < 3: resp = client.chat.completions.create( messages=messages, - model="gpt-4-turbo", + model="gpt-4o", temperature=0, ) @@ -190,7 +190,7 @@ def validate_content(self, v): llm_validator( statement="Check if the code is bug-free. Code should be considered in isolation, with the understanding that it is part of a larger, fully developed program that strictly adheres to these standards of completeness and correctness. All files, elements, components, functions, or modules referenced within this snippet are assumed to exist in other parts of the project and are also devoid of any errors, ensuring a cohesive and error-free integration across the entire software solution. Certain placeholders may be present.", client=client, - model="gpt-4-turbo", + model="gpt-4o", temperature=0, allow_override=False )(v)