Skip to content

Commit 4ab29b2

Browse files
fix: vocab field is required
1 parent 7826590 commit 4ab29b2

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 48
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-c028a7584d3508f268ce5c5b824b50af88eaa140620dd03a1b35f409f510603c.yml
3-
openapi_spec_hash: f9b780b2398a87678a13355e48cd515f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-84f0d75048a9268981a84800b4190e3691997ce57dcfc0876f38a5b3fce6bacd.yml
3+
openapi_spec_hash: 35607d4e850c8a60524223ff632c83bb
44
config_hash: aeb6eb949d73382270bbd8bbf2e4cf2a

src/imagekitio/types/shared/extension_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ class AITasksTaskSelectTags(BaseModel):
9090
type: Literal["select_tags"]
9191
"""Task type that analyzes the image and adds matching tags from a vocabulary."""
9292

93-
vocabulary: List[str]
94-
"""Array of possible tag values.
95-
96-
Combined length of all strings must not exceed 500 characters. Cannot contain
97-
the `%` character.
98-
"""
99-
10093
max_selections: Optional[int] = None
10194
"""Maximum number of tags to select from the vocabulary."""
10295

10396
min_selections: Optional[int] = None
10497
"""Minimum number of tags to select from the vocabulary."""
10598

99+
vocabulary: Optional[List[str]] = None
100+
"""Array of possible tag values.
101+
102+
Combined length of all strings must not exceed 500 characters. Cannot contain
103+
the `%` character.
104+
"""
105+
106106

107107
class AITasksTaskSelectMetadata(BaseModel):
108108
field: str

src/imagekitio/types/shared/extensions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ class ExtensionItemAITasksTaskSelectTags(BaseModel):
9292
type: Literal["select_tags"]
9393
"""Task type that analyzes the image and adds matching tags from a vocabulary."""
9494

95-
vocabulary: List[str]
96-
"""Array of possible tag values.
97-
98-
Combined length of all strings must not exceed 500 characters. Cannot contain
99-
the `%` character.
100-
"""
101-
10295
max_selections: Optional[int] = None
10396
"""Maximum number of tags to select from the vocabulary."""
10497

10598
min_selections: Optional[int] = None
10699
"""Minimum number of tags to select from the vocabulary."""
107100

101+
vocabulary: Optional[List[str]] = None
102+
"""Array of possible tag values.
103+
104+
Combined length of all strings must not exceed 500 characters. Cannot contain
105+
the `%` character.
106+
"""
107+
108108

109109
class ExtensionItemAITasksTaskSelectMetadata(BaseModel):
110110
field: str

src/imagekitio/types/shared_params/extension_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ class AITasksTaskSelectTags(TypedDict, total=False):
9090
type: Required[Literal["select_tags"]]
9191
"""Task type that analyzes the image and adds matching tags from a vocabulary."""
9292

93-
vocabulary: Required[SequenceNotStr[str]]
94-
"""Array of possible tag values.
95-
96-
Combined length of all strings must not exceed 500 characters. Cannot contain
97-
the `%` character.
98-
"""
99-
10093
max_selections: int
10194
"""Maximum number of tags to select from the vocabulary."""
10295

10396
min_selections: int
10497
"""Minimum number of tags to select from the vocabulary."""
10598

99+
vocabulary: SequenceNotStr[str]
100+
"""Array of possible tag values.
101+
102+
Combined length of all strings must not exceed 500 characters. Cannot contain
103+
the `%` character.
104+
"""
105+
106106

107107
class AITasksTaskSelectMetadata(TypedDict, total=False):
108108
field: Required[str]

src/imagekitio/types/shared_params/extensions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ class ExtensionItemAITasksTaskSelectTags(TypedDict, total=False):
9292
type: Required[Literal["select_tags"]]
9393
"""Task type that analyzes the image and adds matching tags from a vocabulary."""
9494

95-
vocabulary: Required[SequenceNotStr[str]]
96-
"""Array of possible tag values.
97-
98-
Combined length of all strings must not exceed 500 characters. Cannot contain
99-
the `%` character.
100-
"""
101-
10295
max_selections: int
10396
"""Maximum number of tags to select from the vocabulary."""
10497

10598
min_selections: int
10699
"""Minimum number of tags to select from the vocabulary."""
107100

101+
vocabulary: SequenceNotStr[str]
102+
"""Array of possible tag values.
103+
104+
Combined length of all strings must not exceed 500 characters. Cannot contain
105+
the `%` character.
106+
"""
107+
108108

109109
class ExtensionItemAITasksTaskSelectMetadata(TypedDict, total=False):
110110
field: Required[str]

tests/api_resources/beta/v2/test_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None:
6262
{
6363
"instruction": "What types of clothing items are visible in this image?",
6464
"type": "select_tags",
65-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
6665
"max_selections": 1,
6766
"min_selections": 0,
67+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
6868
},
6969
{
7070
"instruction": "Is this a luxury or high-end fashion item?",
@@ -217,9 +217,9 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit)
217217
{
218218
"instruction": "What types of clothing items are visible in this image?",
219219
"type": "select_tags",
220-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
221220
"max_selections": 1,
222221
"min_selections": 0,
222+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
223223
},
224224
{
225225
"instruction": "Is this a luxury or high-end fashion item?",

tests/api_resources/test_dummy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def test_method_create_with_all_params(self, client: ImageKit) -> None:
7070
{
7171
"instruction": "What types of clothing items are visible in this image?",
7272
"type": "select_tags",
73-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
7473
"max_selections": 1,
7574
"min_selections": 0,
75+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
7676
},
7777
{
7878
"instruction": "Is this a luxury or high-end fashion item?",
@@ -887,9 +887,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncImageKit)
887887
{
888888
"instruction": "What types of clothing items are visible in this image?",
889889
"type": "select_tags",
890-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
891890
"max_selections": 1,
892891
"min_selections": 0,
892+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
893893
},
894894
{
895895
"instruction": "Is this a luxury or high-end fashion item?",

tests/api_resources/test_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def test_method_update_with_all_params_overload_1(self, client: ImageKit) -> Non
6262
{
6363
"instruction": "What types of clothing items are visible in this image?",
6464
"type": "select_tags",
65-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
6665
"max_selections": 1,
6766
"min_selections": 0,
67+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
6868
},
6969
{
7070
"instruction": "Is this a luxury or high-end fashion item?",
@@ -465,9 +465,9 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None:
465465
{
466466
"instruction": "What types of clothing items are visible in this image?",
467467
"type": "select_tags",
468-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
469468
"max_selections": 1,
470469
"min_selections": 0,
470+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
471471
},
472472
{
473473
"instruction": "Is this a luxury or high-end fashion item?",
@@ -615,9 +615,9 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
615615
{
616616
"instruction": "What types of clothing items are visible in this image?",
617617
"type": "select_tags",
618-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
619618
"max_selections": 1,
620619
"min_selections": 0,
620+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
621621
},
622622
{
623623
"instruction": "Is this a luxury or high-end fashion item?",
@@ -1018,9 +1018,9 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit)
10181018
{
10191019
"instruction": "What types of clothing items are visible in this image?",
10201020
"type": "select_tags",
1021-
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
10221021
"max_selections": 1,
10231022
"min_selections": 0,
1023+
"vocabulary": ["shirt", "tshirt", "dress", "trousers", "jacket"],
10241024
},
10251025
{
10261026
"instruction": "Is this a luxury or high-end fashion item?",

0 commit comments

Comments
 (0)