huytofu92 commited on
Commit
0239229
·
1 Parent(s): 4c72b08

Change managers to MultiStepAgent

Browse files
Files changed (1) hide show
  1. mini_agents.py +4 -4
mini_agents.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent, InferenceClientModel
2
  from tools import sort_list, operate_two_numbers, convert_number
3
  from tools import to_dataframe, to_json, get_dataframe_data, get_dataframe_column, get_dataframe_row, get_dataframe_groupby
4
  from vlm_tools import download_image, image_processing, object_detection, ocr_scan
@@ -71,7 +71,7 @@ pandas_agent = CodeAgent(
71
  description="This agent is responsible for converting data to a dataframe, performing pandas operations on such dataframe and converting the dataframe back to a json or a csv file."
72
  )
73
 
74
- multimodal_manager = CodeAgent(
75
  model=MODEL_CHOICES["code"][0],
76
  managed_agents=[audio_agent, vlm_agent],
77
  tools=[sort_list],
@@ -81,7 +81,7 @@ multimodal_manager = CodeAgent(
81
  description="This agent is responsible for managing the audio and vlm agents."
82
  )
83
 
84
- operation_manager = CodeAgent(
85
  model=MODEL_CHOICES["code"][0],
86
  managed_agents=[arithmetic_agent, pandas_agent],
87
  tools=[sort_list],
@@ -91,7 +91,7 @@ operation_manager = CodeAgent(
91
  description="This agent is responsible for managing the arithmetic and pandas agents."
92
  )
93
 
94
- master_agent = CodeAgent(
95
  model=MODEL_CHOICES["master"][0],
96
  managed_agents=[multimodal_manager, operation_manager],
97
  tools=[sort_list, *community_tools],
 
1
+ from smolagents import CodeAgent, InferenceClientModel, MultiStepAgent
2
  from tools import sort_list, operate_two_numbers, convert_number
3
  from tools import to_dataframe, to_json, get_dataframe_data, get_dataframe_column, get_dataframe_row, get_dataframe_groupby
4
  from vlm_tools import download_image, image_processing, object_detection, ocr_scan
 
71
  description="This agent is responsible for converting data to a dataframe, performing pandas operations on such dataframe and converting the dataframe back to a json or a csv file."
72
  )
73
 
74
+ multimodal_manager = MultiStepAgent(
75
  model=MODEL_CHOICES["code"][0],
76
  managed_agents=[audio_agent, vlm_agent],
77
  tools=[sort_list],
 
81
  description="This agent is responsible for managing the audio and vlm agents."
82
  )
83
 
84
+ operation_manager = MultiStepAgent(
85
  model=MODEL_CHOICES["code"][0],
86
  managed_agents=[arithmetic_agent, pandas_agent],
87
  tools=[sort_list],
 
91
  description="This agent is responsible for managing the arithmetic and pandas agents."
92
  )
93
 
94
+ master_agent = MultiStepAgent(
95
  model=MODEL_CHOICES["master"][0],
96
  managed_agents=[multimodal_manager, operation_manager],
97
  tools=[sort_list, *community_tools],