Skip to content

Commit

Permalink
solve #954
Browse files Browse the repository at this point in the history
  • Loading branch information
LinxinS97 committed Dec 15, 2023
1 parent c2816a5 commit 2feda6f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions autogen/agentchat/contrib/agent_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ def build(
"""
use_api = False

if code_execution_config is None:
code_execution_config = {
"last_n_messages": 2,
"work_dir": "groupchat",
"use_docker": False,
"timeout": 60,
}

if cached_configs is None:
use_api = True
agent_configs = []
Expand All @@ -302,6 +294,15 @@ def build(
default_llm_config = cached_configs["default_llm_config"]
coding = cached_configs["coding"]
agent_configs = cached_configs["agent_configs"]
code_execution_config = cached_configs['code_execution_config']

if code_execution_config is None:
code_execution_config = {
"last_n_messages": 2,
"work_dir": "groupchat",
"use_docker": False,
"timeout": 60,
}

if use_api:
config_list = autogen.config_list_from_json(self.config_path, filter_dict={"model": [self.builder_model]})
Expand Down

0 comments on commit 2feda6f

Please sign in to comment.