File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88@dataclass (kw_only = True )
99class ModelSearchParameters (BaseSearchParameters [ModelSearchResponse ]):
10- """Search parameters for models."""
10+ """
11+ Search for models within the organization linked to the API key.
12+
13+ All search filters are optional.
14+ If no search filters are given, all models belonging to the organization are returned.
15+
16+ Results are paginated.
17+ """
1118
1219 name : str | None = None
13- """Case-insensitive search term for the model name ."""
20+ """Filter models by partial name match, case-insensitive ."""
1421
1522 model_type : str | None = None
16- """Case-insensitive search term for the model type."""
23+ """Filter by an exact model type."""
1724
1825 _slug : ClassVar [str ] = "models"
1926 _response_class : type [ModelSearchResponse ] = ModelSearchResponse
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ def test_must_have_results(v2_client: Client):
1616
1717 assert response is not None
1818 assert len (response .models ) > 0
19+ for model in response .models :
20+ assert model .id
21+ assert model .name
22+ assert model .model_type
1923 assert response .pagination is not None
2024 assert response .pagination .total_items >= 1
2125 assert response .pagination .page == 1
You can’t perform that action at this time.
0 commit comments