| 1 | # Weather agent |
| 2 | |
| 3 | This example is a weather agent demonstrating function calling with a single agent. The agent has tools to get the weather of a particular city, and send an email. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | To run the weather agent Swarm: |
| 8 | |
| 9 | 1. Run |
| 10 | |
| 11 | ```shell |
| 12 | python3 run.py |
| 13 | ``` |
| 14 | |
| 15 | ## Evals |
| 16 | |
| 17 | > [!NOTE] |
| 18 | > These evals are intended to be examples to demonstrate functionality, but will have to be updated and catered to your particular use case. |
| 19 | |
| 20 | This example uses `Pytest` to run eval unit tests. We have two tests in the `evals.py` file, one which |
| 21 | tests if we call the `get_weather` function when expected, and one which assesses if we properly do NOT call the |
| 22 | `get_weather` function when we shouldn't have a tool call. |
| 23 | |
| 24 | To run the evals, run |
| 25 | |
| 26 | ```shell |
| 27 | pytest evals.py |
| 28 | ``` |