You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_models.py 562 B

1234567891011121314151617181920212223
  1. import pytest
  2. from autogen_core.models import ModelInfo, validate_model_info
  3. def test_model_info() -> None:
  4. # Valid model info.
  5. info: ModelInfo = {
  6. "family": "gpt-4o",
  7. "vision": True,
  8. "function_calling": True,
  9. "json_output": True,
  10. "structured_output": True,
  11. }
  12. validate_model_info(info)
  13. # Invalid model info.
  14. info = {
  15. "family": "gpt-4o",
  16. "vision": True,
  17. "function_calling": True,
  18. } # type: ignore
  19. with pytest.raises(ValueError):
  20. validate_model_info(info)