su3su2u1 commited on
Commit
724c767
·
unverified ·
1 Parent(s): 986f6b9
Files changed (1) hide show
  1. theagent.py +7 -5
theagent.py CHANGED
@@ -109,6 +109,7 @@ class BasicAgent:
109
 
110
  manager_agent = CodeAgent(
111
  tools=[SpeechToTextTool(), ExecutePythonTool()],
 
112
  model=model,
113
  managed_agents=[web_agent, excel_summarizer_agent],
114
  additional_authorized_imports=["time", "numpy", "pandas", "os"],
@@ -123,11 +124,12 @@ class BasicAgent:
123
  return v
124
 
125
  images = []
126
- for k, v in attachment.items():
127
- if v.endswith(".png") or v.endswith(".jpg"):
128
- image_content = Image.open(v).convert("RGB")
129
- images = [image_content]
130
- attachment = None
 
131
  answer = self.agent.run(
132
  question
133
  + " Please break down the questions into easier sub-tasks."
 
109
 
110
  manager_agent = CodeAgent(
111
  tools=[SpeechToTextTool(), ExecutePythonTool()],
112
+ #tools=[ExecutePythonTool()],
113
  model=model,
114
  managed_agents=[web_agent, excel_summarizer_agent],
115
  additional_authorized_imports=["time", "numpy", "pandas", "os"],
 
124
  return v
125
 
126
  images = []
127
+ if attachment:
128
+ for k, v in attachment.items():
129
+ if v.endswith(".png") or v.endswith(".jpg"):
130
+ image_content = Image.open(v).convert("RGB")
131
+ images = [image_content]
132
+ attachment = None
133
  answer = self.agent.run(
134
  question
135
  + " Please break down the questions into easier sub-tasks."