Merge pull request #1218 from Steve-Dusty/autobuilder

Fix AutoSwarmBuilder API and add missing JSON parsing
pull/1226/merge
Kye Gomez 2 days ago committed by GitHub
commit a815a9cfae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -407,6 +407,8 @@ class AutoSwarmBuilder:
agents_dictionary = model.run(task)
agents_dictionary = json.loads(agents_dictionary)
return agents_dictionary
except Exception as e:
@ -437,6 +439,8 @@ class AutoSwarmBuilder:
f"Create the swarm spec for the following task: {task}"
)
swarm_spec = json.loads(swarm_spec)
print(swarm_spec)
print(type(swarm_spec))

@ -59,6 +59,10 @@ def test_agent_building():
agents = swarm.create_agents_from_specs(specs)
agent = agents[0]
# Create agent from spec
agents = swarm.create_agents_from_specs({"agents": [agent_spec]})
agent = agents[0]
print("✓ Built agent with configuration:")
print(f" - Name: {agent.agent_name}")
print(f" - Description: {agent.agent_description}")
@ -116,7 +120,7 @@ def test_swarm_routing():
task = "Analyze the impact of AI on healthcare"
print("Starting task routing...")
result = swarm.swarm_router(agents, task)
result = swarm.initialize_swarm_router(agents, task)
print("✓ Task routed successfully")
print(

Loading…
Cancel
Save