Spaces:
Sleeping
Sleeping
Update multi_agent.py
Browse files- multi_agent.py +5 -4
multi_agent.py
CHANGED
|
@@ -32,12 +32,13 @@ class MultyAgentSystem:
|
|
| 32 |
)
|
| 33 |
self.qwen_model = LiteLLMModel("groq/qwen-qwq-32b", **common)
|
| 34 |
self.fallback_model = LiteLLMModel("groq/llama3-70b-8k", **common)
|
|
|
|
| 35 |
|
| 36 |
self.verification_limit = int(os.getenv("VERIFY_WORD_LIMIT", "75"))
|
| 37 |
|
| 38 |
# --- Web agent definition ---
|
| 39 |
self.web_agent = CodeAgent(
|
| 40 |
-
model=self.
|
| 41 |
tools=[WebSearchTool(), VisitWebpageTool(), WikipediaSearchTool()],
|
| 42 |
name="web_agent",
|
| 43 |
description=(
|
|
@@ -59,7 +60,7 @@ class MultyAgentSystem:
|
|
| 59 |
|
| 60 |
# --- Info agent definition ---
|
| 61 |
self.info_agent = CodeAgent(
|
| 62 |
-
model=self.
|
| 63 |
tools=[PythonInterpreterTool(), image_reasoning_tool],
|
| 64 |
name="info_agent",
|
| 65 |
description=(
|
|
@@ -83,7 +84,7 @@ class MultyAgentSystem:
|
|
| 83 |
# The manager starts with the smaller Qwen model to minimize token usage
|
| 84 |
# and only relies on DeepSeek when verifying critical answers.
|
| 85 |
self.manager_agent = CodeAgent(
|
| 86 |
-
model=self.
|
| 87 |
tools=[FinalAnswerTool()],
|
| 88 |
managed_agents=[self.web_agent, self.info_agent],
|
| 89 |
name="manager_agent",
|
|
@@ -116,7 +117,7 @@ class MultyAgentSystem:
|
|
| 116 |
|
| 117 |
def run(self, question, high_stakes: bool = False, **kwargs):
|
| 118 |
start_time = time.time()
|
| 119 |
-
print("Generating initial answer with
|
| 120 |
max_completion_tokens = kwargs.get("max_completion_tokens", 512)
|
| 121 |
prompt_tokens = len(question.split())
|
| 122 |
consume(prompt_tokens + max_completion_tokens)
|
|
|
|
| 32 |
)
|
| 33 |
self.qwen_model = LiteLLMModel("groq/qwen-qwq-32b", **common)
|
| 34 |
self.fallback_model = LiteLLMModel("groq/llama3-70b-8k", **common)
|
| 35 |
+
self.llama_model = LiteLLMModel("groq/llama-4-scout-17b-16e-instruct", **common)
|
| 36 |
|
| 37 |
self.verification_limit = int(os.getenv("VERIFY_WORD_LIMIT", "75"))
|
| 38 |
|
| 39 |
# --- Web agent definition ---
|
| 40 |
self.web_agent = CodeAgent(
|
| 41 |
+
model=self.llama_model,
|
| 42 |
tools=[WebSearchTool(), VisitWebpageTool(), WikipediaSearchTool()],
|
| 43 |
name="web_agent",
|
| 44 |
description=(
|
|
|
|
| 60 |
|
| 61 |
# --- Info agent definition ---
|
| 62 |
self.info_agent = CodeAgent(
|
| 63 |
+
model=self.llama_model,
|
| 64 |
tools=[PythonInterpreterTool(), image_reasoning_tool],
|
| 65 |
name="info_agent",
|
| 66 |
description=(
|
|
|
|
| 84 |
# The manager starts with the smaller Qwen model to minimize token usage
|
| 85 |
# and only relies on DeepSeek when verifying critical answers.
|
| 86 |
self.manager_agent = CodeAgent(
|
| 87 |
+
model=self.llama_model,
|
| 88 |
tools=[FinalAnswerTool()],
|
| 89 |
managed_agents=[self.web_agent, self.info_agent],
|
| 90 |
name="manager_agent",
|
|
|
|
| 117 |
|
| 118 |
def run(self, question, high_stakes: bool = False, **kwargs):
|
| 119 |
start_time = time.time()
|
| 120 |
+
print("Generating initial answer with llama-4-scout")
|
| 121 |
max_completion_tokens = kwargs.get("max_completion_tokens", 512)
|
| 122 |
prompt_tokens = len(question.split())
|
| 123 |
consume(prompt_tokens + max_completion_tokens)
|