@@ -60,8 +60,8 @@ class AgentBuilder:
60
60
def __init__ (
61
61
self ,
62
62
config_path : Optional [str ] = "OAI_CONFIG_LIST" ,
63
- builder_model : Optional [str ] = "gpt-4-1106-preview " ,
64
- agent_model : Optional [str ] = "gpt-4-1106-preview " ,
63
+ builder_model : Optional [str ] = "gpt-4" ,
64
+ agent_model : Optional [str ] = "gpt-4" ,
65
65
host : Optional [str ] = "localhost" ,
66
66
endpoint_building_timeout : Optional [int ] = 600 ,
67
67
):
@@ -277,10 +277,10 @@ def build(
277
277
coding = cached_configs ["coding" ]
278
278
agent_configs = cached_configs ["agent_configs" ]
279
279
280
- config_list = autogen .config_list_from_json (self .config_path , filter_dict = {"model" : [self .builder_model ]})
281
- build_manager = autogen .OpenAIWrapper (config_list = config_list )
282
-
283
280
if use_api :
281
+ config_list = autogen .config_list_from_json (self .config_path , filter_dict = {"model" : [self .builder_model ]})
282
+ build_manager = autogen .OpenAIWrapper (config_list = config_list )
283
+
284
284
print ("Generating agents..." )
285
285
resp_agent_name = (
286
286
build_manager .create (
@@ -323,6 +323,16 @@ def build(
323
323
{"name" : agent_name_list [i ], "model" : self .agent_model , "system_message" : agent_sys_msg_list [i ]}
324
324
)
325
325
326
+ if coding is None :
327
+ resp = (
328
+ build_manager .create (
329
+ messages = [{"role" : "user" , "content" : self .CODING_PROMPT .format (task = building_task )}]
330
+ )
331
+ .choices [0 ]
332
+ .message .content
333
+ )
334
+ coding = True if resp == "YES" else False
335
+
326
336
for config in agent_configs :
327
337
print (f"Creating agent { config ['name' ]} with backbone { config ['model' ]} ..." )
328
338
self ._create_agent (
@@ -335,16 +345,6 @@ def build(
335
345
)
336
346
agent_list = [agent_config [0 ] for agent_config in self .agent_procs_assign .values ()]
337
347
338
- if coding is None :
339
- resp = (
340
- build_manager .create (
341
- messages = [{"role" : "user" , "content" : self .CODING_PROMPT .format (task = building_task )}]
342
- )
343
- .choices [0 ]
344
- .message .content
345
- )
346
- coding = True if resp == "YES" else False
347
-
348
348
if coding is True :
349
349
print ("Adding user console proxy..." )
350
350
agent_list = [
0 commit comments