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 527 B

12345678910111213141516171819202122
  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. }
  11. validate_model_info(info)
  12. # Invalid model info.
  13. info = {
  14. "family": "gpt-4o",
  15. "vision": True,
  16. "function_calling": True,
  17. } # type: ignore
  18. with pytest.raises(ValueError):
  19. validate_model_info(info)