Skip to content

Commit

Permalink
Generating files
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Apr 17, 2024
1 parent 6d17e94 commit 0c4ae81
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions generated/docs/ClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**confidence** | **float** | On a scale of 0 to 1, how confident are we in the predicted label? |
**label** | **str** | What is the predicted label? |
**source** | **str** | Where did this classification result come from? | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
1 change: 1 addition & 0 deletions generated/docs/ImageQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**detector_id** | **str** | Which detector was used on this image query? | [readonly]
**result_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | What type of result are we returning? | [readonly]
**result** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] [readonly]
**confidence_threshold** | **float** | | [optional] [readonly]
**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | A dictionary of custom key/value metadata to associate with the image query (limited to 1KB). | [optional] [readonly]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def openapi_types():
return {
"confidence": (float,), # noqa: E501
"label": (str,), # noqa: E501
"source": (str,), # noqa: E501
}

@cached_property
Expand All @@ -105,6 +106,7 @@ def discriminator():
attribute_map = {
"confidence": "confidence", # noqa: E501
"label": "label", # noqa: E501
"source": "source", # noqa: E501
}

read_only_vars = {}
Expand Down Expand Up @@ -151,6 +153,7 @@ def _from_openapi_data(cls, confidence, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
source (str): Where did this classification result come from?. [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down Expand Up @@ -243,6 +246,7 @@ def __init__(self, confidence, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
source (str): Where did this classification result come from?. [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down
5 changes: 5 additions & 0 deletions generated/groundlight_openapi_client/model/image_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def openapi_types():
str,
none_type,
), # noqa: E501
"confidence_threshold": (float,), # noqa: E501
"metadata": (
{str: (bool, date, datetime, dict, float, int, list, str, none_type)},
none_type,
Expand All @@ -156,6 +157,7 @@ def discriminator():
"detector_id": "detector_id", # noqa: E501
"result_type": "result_type", # noqa: E501
"result": "result", # noqa: E501
"confidence_threshold": "confidence_threshold", # noqa: E501
"metadata": "metadata", # noqa: E501
}

Expand All @@ -167,6 +169,7 @@ def discriminator():
"detector_id", # noqa: E501
"result_type", # noqa: E501
"result", # noqa: E501
"confidence_threshold", # noqa: E501
"metadata", # noqa: E501
}

Expand Down Expand Up @@ -217,6 +220,7 @@ def _from_openapi_data(cls, id, type, created_at, query, detector_id, result_typ
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
result (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
confidence_threshold (float): [optional] # noqa: E501
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): A dictionary of custom key/value metadata to associate with the image query (limited to 1KB).. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -311,6 +315,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
result (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
confidence_threshold (float): [optional] # noqa: E501
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): A dictionary of custom key/value metadata to associate with the image query (limited to 1KB).. [optional] # noqa: E501
"""

Expand Down
4 changes: 3 additions & 1 deletion 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: 2024-04-11T21:16:33+00:00
# timestamp: 2024-04-17T23:39:40+00:00

from __future__ import annotations

Expand All @@ -20,6 +20,7 @@ class ClassificationResult(BaseModel):
..., description="On a scale of 0 to 1, how confident are we in the predicted label?"
)
label: str = Field(..., description="What is the predicted label?")
source: Optional[str] = Field(None, description="Where did this classification result come from?")


class DetectorCreationInput(BaseModel):
Expand Down Expand Up @@ -155,6 +156,7 @@ class ImageQuery(BaseModel):
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: Optional[ClassificationResult] = None
confidence_threshold: Optional[float] = None
metadata: Optional[Dict[str, Any]] = Field(
None,
description="A dictionary of custom key/value metadata to associate with the image query (limited to 1KB).",
Expand Down

0 comments on commit 0c4ae81

Please sign in to comment.