You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: swarms/structs/swarm_router.py
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -272,6 +272,40 @@ def reliability_check(self):
272
272
"SwarmRouter: Swarm type cannot be 'none'. Check the docs for all the swarm types available. https://docs.swarms.world/en/latest/swarms/structs/swarm_router/"
273
273
)
274
274
275
+
# Validate swarm type is a valid string
276
+
valid_swarm_types= [
277
+
"AgentRearrange",
278
+
"MixtureOfAgents",
279
+
"SequentialWorkflow",
280
+
"ConcurrentWorkflow",
281
+
"GroupChat",
282
+
"MultiAgentRouter",
283
+
"AutoSwarmBuilder",
284
+
"HiearchicalSwarm",
285
+
"auto",
286
+
"MajorityVoting",
287
+
"MALT",
288
+
"CouncilAsAJudge",
289
+
"InteractiveGroupChat",
290
+
"HeavySwarm",
291
+
"BatchedGridWorkflow",
292
+
]
293
+
294
+
ifnotisinstance(self.swarm_type, str):
295
+
raiseSwarmRouterConfigError(
296
+
f"SwarmRouter: swarm_type must be a string, not {type(self.swarm_type).__name__}. "
0 commit comments