wangold 修订了这个 Gist . 跳至此修订
1 file changed, 9 insertions
Swarm-readme-14.py(file created)
@@ -0,0 +1,9 @@ | |||
1 | + | sales_agent = Agent(name="Sales Agent") | |
2 | + | ||
3 | + | def transfer_to_sales(): | |
4 | + | return sales_agent | |
5 | + | ||
6 | + | agent = Agent(functions=[transfer_to_sales]) | |
7 | + | ||
8 | + | response = client.run(agent, [{"role":"user", "content":"Transfer me to sales."}]) | |
9 | + | print(response.agent.name) |
更新
更早