Spaces:
Runtime error
Runtime error
Nicolas Fremondiere commited on
Commit ·
b830998
1
Parent(s): 4436f89
Add max steps
Browse files
agent.py
CHANGED
|
@@ -23,7 +23,7 @@ class WikipediaAgentTool(Tool):
|
|
| 23 |
inputs = {"query": {"type": "string", "description": "Search query for Wikipedia or Web search."}}
|
| 24 |
output_type = "string"
|
| 25 |
def forward(self, query: str) -> str:
|
| 26 |
-
return agent_wikipedia.run(query)
|
| 27 |
|
| 28 |
class MediaAgentTool(Tool):
|
| 29 |
name = "MediaAgentTool"
|
|
@@ -34,7 +34,7 @@ class MediaAgentTool(Tool):
|
|
| 34 |
|
| 35 |
def forward(self, query: str) -> str:
|
| 36 |
# Utilise l'agent vidéo pour rechercher sur YouTube
|
| 37 |
-
return agent_multimedia.run(query)
|
| 38 |
|
| 39 |
|
| 40 |
class CodeAgentTool(Tool):
|
|
@@ -45,7 +45,7 @@ class CodeAgentTool(Tool):
|
|
| 45 |
|
| 46 |
def forward(self, query: str) -> str:
|
| 47 |
# Utilise l'agent code pour exécuter du code Python
|
| 48 |
-
return agent_code.run(query)
|
| 49 |
|
| 50 |
|
| 51 |
|
|
@@ -69,7 +69,7 @@ manager_agent = ToolCallingAgent(
|
|
| 69 |
# Pour interagir avec l'agent manager
|
| 70 |
async def run_multi_agent_system(prompt: str):
|
| 71 |
print(f"\nRequête au Manager : {prompt}")
|
| 72 |
-
return manager_agent.run(prompt)
|
| 73 |
|
| 74 |
|
| 75 |
class BasicAgent:
|
|
|
|
| 23 |
inputs = {"query": {"type": "string", "description": "Search query for Wikipedia or Web search."}}
|
| 24 |
output_type = "string"
|
| 25 |
def forward(self, query: str) -> str:
|
| 26 |
+
return agent_wikipedia.run(query,max_steps=5)
|
| 27 |
|
| 28 |
class MediaAgentTool(Tool):
|
| 29 |
name = "MediaAgentTool"
|
|
|
|
| 34 |
|
| 35 |
def forward(self, query: str) -> str:
|
| 36 |
# Utilise l'agent vidéo pour rechercher sur YouTube
|
| 37 |
+
return agent_multimedia.run(query,max_steps=5)
|
| 38 |
|
| 39 |
|
| 40 |
class CodeAgentTool(Tool):
|
|
|
|
| 45 |
|
| 46 |
def forward(self, query: str) -> str:
|
| 47 |
# Utilise l'agent code pour exécuter du code Python
|
| 48 |
+
return agent_code.run(query,max_steps=5)
|
| 49 |
|
| 50 |
|
| 51 |
|
|
|
|
| 69 |
# Pour interagir avec l'agent manager
|
| 70 |
async def run_multi_agent_system(prompt: str):
|
| 71 |
print(f"\nRequête au Manager : {prompt}")
|
| 72 |
+
return manager_agent.run(prompt,max_steps=5)
|
| 73 |
|
| 74 |
|
| 75 |
class BasicAgent:
|