test_examples_handling.py 438 B

1234567891011121314151617
  1. import pytest
  2. from agency_swarm import Agent
  3. def test_examples_parameter_is_removed() -> None:
  4. examples = [
  5. {"role": "user", "content": "Hi"},
  6. {"role": "assistant", "content": "Hello"},
  7. ]
  8. with pytest.raises(TypeError, match=r"Deprecated Agent parameters are not supported"):
  9. Agent(
  10. name="TestAgent",
  11. instructions="You are helpful.",
  12. examples=examples,
  13. )