Skip to content

Commit

Permalink
fix generated
Browse files Browse the repository at this point in the history
  • Loading branch information
sunildkumar committed Oct 16, 2023
1 parent 07670e3 commit 935c036
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 146 deletions.
4 changes: 3 additions & 1 deletion generated/docs/ImageQueriesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ with openapi_client.ApiClient(configuration) as api_client:
detector_id = "detector_id_example" # str | Choose a detector by its ID.
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)
patience_time = 3.14 # float | How long to wait for a confident response. (optional)
want_async = True # bool | If set to `true`, the server returns immediately without a result and query's result is calculated asynchronously. (optional)
body = open('@path/to/image.jpeg', 'rb') # file_type | (optional)

# example passing only required values which don't have defaults set
Expand All @@ -219,7 +220,7 @@ with openapi_client.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.submit_image_query(detector_id, human_review=human_review, patience_time=patience_time, body=body)
api_response = api_instance.submit_image_query(detector_id, human_review=human_review, patience_time=patience_time, want_async=want_async, body=body)
pprint(api_response)
except openapi_client.ApiException as e:
print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e)
Expand All @@ -233,6 +234,7 @@ Name | Type | Description | Notes
**detector_id** | **str**| Choose a detector by its ID. |
**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]
**patience_time** | **float**| How long to wait for a confident response. | [optional]
**want_async** | **bool**| If set to `true`, the server returns immediately without a result and query's result is calculated asynchronously. | [optional]
**body** | **file_type**| | [optional]

### Return type
Expand Down
4 changes: 2 additions & 2 deletions generated/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: public-api.yaml
# timestamp: 2023-08-09T20:46:11+00:00
# timestamp: 2023-10-16T22:28:48+00:00

from __future__ import annotations

Expand Down Expand Up @@ -69,7 +69,7 @@ class ImageQuery(BaseModel):
query: str = Field(..., description="A question about the image.")
detector_id: str = Field(..., description="Which detector was used on this image query?")
result_type: ResultTypeEnum = Field(..., description="What type of result are we returning?")
result: ClassificationResult | None = Field(..., description="Groundlight's answer to your query.")
result: ClassificationResult


class PaginatedDetectorList(BaseModel):
Expand Down
5 changes: 5 additions & 0 deletions generated/openapi_client/api/image_queries_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def __init__(self, api_client=None):
"detector_id",
"human_review",
"patience_time",
"want_async",
"body",
],
"required": [
Expand All @@ -149,17 +150,20 @@ def __init__(self, api_client=None):
"detector_id": (str,),
"human_review": (str,),
"patience_time": (float,),
"want_async": (bool,),
"body": (file_type,),
},
"attribute_map": {
"detector_id": "detector_id",
"human_review": "human_review",
"patience_time": "patience_time",
"want_async": "want_async",
},
"location_map": {
"detector_id": "query",
"human_review": "query",
"patience_time": "query",
"want_async": "query",
"body": "body",
},
"collection_format_map": {},
Expand Down Expand Up @@ -299,6 +303,7 @@ def submit_image_query(self, detector_id, **kwargs):
Keyword Args:
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]
patience_time (float): How long to wait for a confident response.. [optional]
want_async (bool): If set to `true`, the server returns immediately without a result and query's result is calculated asynchronously.. [optional]
body (file_type): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
Expand Down
Loading

0 comments on commit 935c036

Please sign in to comment.