Skip to content

Commit 2477fd5

Browse files
committed
Tests aren't passing because I didn't update the autogenerated code to expect a new param
1 parent 67e3edd commit 2477fd5

File tree

4 files changed

+39
-24
lines changed

4 files changed

+39
-24
lines changed

generated/docs/ImageQueriesApi.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Name | Type | Description | Notes
181181
import time
182182
import openapi_client
183183
from openapi_client.api import image_queries_api
184+
from openapi_client.model.bool import Bool
184185
from openapi_client.model.image_query import ImageQuery
185186
from pprint import pprint
186187
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
@@ -207,6 +208,7 @@ with openapi_client.ApiClient(configuration) as api_client:
207208
detector_id = "detector_id_example" # str | Choose a detector by its ID.
208209
human_review = "human_review_example" # str | If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident. (optional)
209210
patience_time = 3.14 # float | How long to wait for a confident response. (optional)
211+
want_async = # Bool | If set to `true`, server returns response immediately and result is computed asynchronously. (optional)
210212
body = open('@path/to/image.jpeg', 'rb') # file_type | (optional)
211213

212214
# example passing only required values which don't have defaults set
@@ -219,7 +221,7 @@ with openapi_client.ApiClient(configuration) as api_client:
219221
# example passing only required values which don't have defaults set
220222
# and optional values
221223
try:
222-
api_response = api_instance.submit_image_query(detector_id, human_review=human_review, patience_time=patience_time, body=body)
224+
api_response = api_instance.submit_image_query(detector_id, human_review=human_review, patience_time=patience_time, want_async=want_async, body=body)
223225
pprint(api_response)
224226
except openapi_client.ApiException as e:
225227
print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e)
@@ -233,6 +235,7 @@ Name | Type | Description | Notes
233235
**detector_id** | **str**| Choose a detector by its ID. |
234236
**human_review** | **str**| If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident. | [optional]
235237
**patience_time** | **float**| How long to wait for a confident response. | [optional]
238+
**want_async** | **Bool**| If set to `true`, server returns response immediately and result is computed asynchronously. | [optional]
236239
**body** | **file_type**| | [optional]
237240

238241
### Return type

generated/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: public-api.yaml
3-
# timestamp: 2023-08-09T20:46:11+00:00
3+
# timestamp: 2023-10-16T21:00:27+00:00
44

55
from __future__ import annotations
66

generated/openapi_client/api/image_queries_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
none_type,
2323
validate_and_convert_types,
2424
)
25+
from openapi_client.model.bool import Bool
2526
from openapi_client.model.image_query import ImageQuery
2627
from openapi_client.model.paginated_image_query_list import PaginatedImageQueryList
2728

@@ -133,6 +134,7 @@ def __init__(self, api_client=None):
133134
"detector_id",
134135
"human_review",
135136
"patience_time",
137+
"want_async",
136138
"body",
137139
],
138140
"required": [
@@ -149,17 +151,20 @@ def __init__(self, api_client=None):
149151
"detector_id": (str,),
150152
"human_review": (str,),
151153
"patience_time": (float,),
154+
"want_async": (Bool,),
152155
"body": (file_type,),
153156
},
154157
"attribute_map": {
155158
"detector_id": "detector_id",
156159
"human_review": "human_review",
157160
"patience_time": "patience_time",
161+
"want_async": "want_async",
158162
},
159163
"location_map": {
160164
"detector_id": "query",
161165
"human_review": "query",
162166
"patience_time": "query",
167+
"want_async": "query",
163168
"body": "body",
164169
},
165170
"collection_format_map": {},
@@ -299,6 +304,7 @@ def submit_image_query(self, detector_id, **kwargs):
299304
Keyword Args:
300305
human_review (str): If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident. . [optional]
301306
patience_time (float): How long to wait for a confident response.. [optional]
307+
want_async (Bool): If set to `true`, server returns response immediately and result is computed asynchronously.. [optional]
302308
body (file_type): [optional]
303309
_return_http_data_only (bool): response data without head status
304310
code and headers. Default is True.

spec/public-api.yaml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,28 +126,34 @@ paths:
126126
```
127127
128128
parameters:
129-
- in: query
130-
name: detector_id
131-
schema:
132-
type: string
133-
description: Choose a detector by its ID.
134-
required: true
135-
- in: query
136-
name: human_review
137-
schema:
138-
type: string
139-
description: >
140-
If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident).
141-
If set to `ALWAYS`, always send the image query for human review even if the ML model is confident.
142-
If set to `NEVER`, never send the image query for human review even if the ML model is not confident.
143-
required: false
144-
- in: query
145-
name: patience_time
146-
schema:
147-
type: number
148-
format: float
149-
description: How long to wait for a confident response.
150-
required: false
129+
- in: query
130+
name: detector_id
131+
schema:
132+
type: string
133+
description: Choose a detector by its ID.
134+
required: true
135+
- in: query
136+
name: human_review
137+
schema:
138+
type: string
139+
description: >
140+
If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident).
141+
If set to `ALWAYS`, always send the image query for human review even if the ML model is confident.
142+
If set to `NEVER`, never send the image query for human review even if the ML model is not confident.
143+
required: false
144+
- in: query
145+
name: patience_time
146+
schema:
147+
type: number
148+
format: float
149+
description: How long to wait for a confident response.
150+
required: false
151+
- in: query
152+
name: want_async
153+
schema:
154+
type: bool
155+
description: If set to `true`, server returns response immediately and result is computed asynchronously.
156+
required: false
151157
tags:
152158
- image-queries
153159
requestBody:

0 commit comments

Comments
 (0)