From c3e4f13ce4fd8a31bff36e1423d718b4f0788af4 Mon Sep 17 00:00:00 2001 From: CoreyEWood Date: Mon, 31 Mar 2025 22:13:41 +0000 Subject: [PATCH 1/3] Generate client code from updated spec --- generated/.openapi-generator/FILES | 4 + generated/README.md | 8 +- generated/docs/ActionsApi.md | 5 +- generated/docs/AnnotationsRequestedEnum.md | 3 +- generated/docs/BinaryClassificationResult.md | 3 +- .../docs/BoundingBoxModeConfiguration.md | 13 + generated/docs/BoundingBoxResult.md | 16 + generated/docs/Condition.md | 2 +- generated/docs/ConditionRequest.md | 2 +- generated/docs/CountingResult.md | 3 +- generated/docs/Detector.md | 4 +- .../docs/DetectorCreationInputRequest.md | 2 +- generated/docs/DetectorsApi.md | 2 +- generated/docs/EdgeApi.md | 72 +++++ generated/docs/EscalationTypeEnum.md | 3 +- generated/docs/LabelValue.md | 4 +- generated/docs/ModeEnum.md | 2 +- generated/docs/MultiClassificationResult.md | 3 +- generated/docs/PatchedDetectorRequest.md | 2 +- generated/docs/ResultTypeEnum.md | 2 +- generated/docs/SourceEnum.md | 3 +- generated/docs/TextRecognitionResult.md | 3 +- generated/docs/VerbEnum.md | 3 +- generated/docs/WebhookAction.md | 3 + generated/docs/WebhookActionRequest.md | 3 + .../api/edge_api.py | 79 +++++ .../model/annotations_requested_enum.py | 8 +- .../model/binary_classification_result.py | 27 +- .../model/bounding_box_mode_configuration.py | 283 +++++++++++++++++ .../model/bounding_box_result.py | 298 ++++++++++++++++++ .../model/condition.py | 14 +- .../model/condition_request.py | 14 +- .../model/counting_result.py | 22 +- .../model/detector.py | 34 +- .../model/detector_creation_input_request.py | 6 +- .../model/escalation_type_enum.py | 8 +- .../model/image_query.py | 2 + .../model/label_value.py | 22 +- .../model/mode_enum.py | 9 +- .../model/multi_classification_result.py | 22 +- .../model/patched_detector_request.py | 21 +- .../model/result_type_enum.py | 9 +- .../model/source_enum.py | 8 +- .../model/text_recognition_result.py | 22 +- .../model/verb_enum.py | 8 +- .../model/webhook_action.py | 18 ++ .../model/webhook_action_request.py | 18 ++ .../models/__init__.py | 2 + generated/model.py | 221 ++++++------- .../test_bounding_box_mode_configuration.py | 35 ++ generated/test/test_bounding_box_result.py | 35 ++ spec/public-api.yaml | 233 +++++++------- 52 files changed, 1199 insertions(+), 449 deletions(-) create mode 100644 generated/docs/BoundingBoxModeConfiguration.md create mode 100644 generated/docs/BoundingBoxResult.md create mode 100644 generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py create mode 100644 generated/groundlight_openapi_client/model/bounding_box_result.py create mode 100644 generated/test/test_bounding_box_mode_configuration.py create mode 100644 generated/test/test_bounding_box_result.py diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 27ddbd5d..c6bdc7b8 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/BBoxGeometry.md docs/BBoxGeometryRequest.md docs/BinaryClassificationResult.md docs/BlankEnum.md +docs/BoundingBoxModeConfiguration.md +docs/BoundingBoxResult.md docs/ChannelEnum.md docs/Condition.md docs/ConditionRequest.md @@ -88,6 +90,8 @@ groundlight_openapi_client/model/b_box_geometry.py groundlight_openapi_client/model/b_box_geometry_request.py groundlight_openapi_client/model/binary_classification_result.py groundlight_openapi_client/model/blank_enum.py +groundlight_openapi_client/model/bounding_box_mode_configuration.py +groundlight_openapi_client/model/bounding_box_result.py groundlight_openapi_client/model/channel_enum.py groundlight_openapi_client/model/condition.py groundlight_openapi_client/model/condition_request.py diff --git a/generated/README.md b/generated/README.md index 373577ba..086d2c24 100644 --- a/generated/README.md +++ b/generated/README.md @@ -84,7 +84,7 @@ rule_request = RuleRequest( snooze_time_unit=None, human_review_required=False, condition=ConditionRequest( - verb=VerbEnum("ANSWERED_CONSECUTIVELY"), + verb="verb_example", parameters={ "key": None, }, @@ -95,6 +95,9 @@ rule_request = RuleRequest( url="url_example", include_image=True, payload_template=None, + last_message_failed=True, + last_failure_error="last_failure_error_example", + last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'), ), ], ) # RuleRequest | @@ -127,6 +130,7 @@ Class | Method | HTTP request | Description *DetectorsApi* | [**get_detector_metrics**](docs/DetectorsApi.md#get_detector_metrics) | **GET** /v1/detectors/{detector_id}/metrics | *DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors | *DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} | +*EdgeApi* | [**edge_report_metrics_create**](docs/EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics | *EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ | *ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image | *ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} | @@ -148,6 +152,8 @@ Class | Method | HTTP request | Description - [BBoxGeometryRequest](docs/BBoxGeometryRequest.md) - [BinaryClassificationResult](docs/BinaryClassificationResult.md) - [BlankEnum](docs/BlankEnum.md) + - [BoundingBoxModeConfiguration](docs/BoundingBoxModeConfiguration.md) + - [BoundingBoxResult](docs/BoundingBoxResult.md) - [ChannelEnum](docs/ChannelEnum.md) - [Condition](docs/Condition.md) - [ConditionRequest](docs/ConditionRequest.md) diff --git a/generated/docs/ActionsApi.md b/generated/docs/ActionsApi.md index 9bf52c09..099d468f 100644 --- a/generated/docs/ActionsApi.md +++ b/generated/docs/ActionsApi.md @@ -59,7 +59,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: snooze_time_unit=None, human_review_required=False, condition=ConditionRequest( - verb=VerbEnum("ANSWERED_CONSECUTIVELY"), + verb="verb_example", parameters={ "key": None, }, @@ -70,6 +70,9 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: url="url_example", include_image=True, payload_template=None, + last_message_failed=True, + last_failure_error="last_failure_error_example", + last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'), ), ], ) # RuleRequest | diff --git a/generated/docs/AnnotationsRequestedEnum.md b/generated/docs/AnnotationsRequestedEnum.md index fd366f01..31b444e4 100644 --- a/generated/docs/AnnotationsRequestedEnum.md +++ b/generated/docs/AnnotationsRequestedEnum.md @@ -1,11 +1,10 @@ # AnnotationsRequestedEnum -* `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes | must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] +**value** | **str** | | must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/BinaryClassificationResult.md b/generated/docs/BinaryClassificationResult.md index 4a9fb8fb..0ddc4f9e 100644 --- a/generated/docs/BinaryClassificationResult.md +++ b/generated/docs/BinaryClassificationResult.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **label** | **str** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] if omitted the server will use the default value of "binary_classification" +**result_type** | **str** | | [optional] +**from_edge** | **bool** | | [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) diff --git a/generated/docs/BoundingBoxModeConfiguration.md b/generated/docs/BoundingBoxModeConfiguration.md new file mode 100644 index 00000000..5a27bed3 --- /dev/null +++ b/generated/docs/BoundingBoxModeConfiguration.md @@ -0,0 +1,13 @@ +# BoundingBoxModeConfiguration + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**class_name** | **str** | | +**max_num_bboxes** | **int** | | [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) + + diff --git a/generated/docs/BoundingBoxResult.md b/generated/docs/BoundingBoxResult.md new file mode 100644 index 00000000..aab5d925 --- /dev/null +++ b/generated/docs/BoundingBoxResult.md @@ -0,0 +1,16 @@ +# BoundingBoxResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | +**confidence** | **float, none_type** | | [optional] +**source** | **str** | | [optional] +**result_type** | **str** | | [optional] +**from_edge** | **bool** | | [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) + + diff --git a/generated/docs/Condition.md b/generated/docs/Condition.md index edfe01a8..e54e1ad5 100644 --- a/generated/docs/Condition.md +++ b/generated/docs/Condition.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verb** | [**VerbEnum**](VerbEnum.md) | | +**verb** | **str** | | **parameters** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | **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] diff --git a/generated/docs/ConditionRequest.md b/generated/docs/ConditionRequest.md index a9a2cead..60a6d034 100644 --- a/generated/docs/ConditionRequest.md +++ b/generated/docs/ConditionRequest.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verb** | [**VerbEnum**](VerbEnum.md) | | +**verb** | **str** | | **parameters** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | **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] diff --git a/generated/docs/CountingResult.md b/generated/docs/CountingResult.md index a79620db..deb8cbe6 100644 --- a/generated/docs/CountingResult.md +++ b/generated/docs/CountingResult.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **count** | **int, none_type** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] if omitted the server will use the default value of "counting" +**result_type** | **str** | | [optional] +**from_edge** | **bool** | | [optional] **greater_than_max** | **bool** | | [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] diff --git a/generated/docs/Detector.md b/generated/docs/Detector.md index 133bfeba..b2f9f86e 100644 --- a/generated/docs/Detector.md +++ b/generated/docs/Detector.md @@ -12,12 +12,12 @@ Name | Type | Description | Notes **query** | **str** | A question about the image. | [readonly] **group_name** | **str** | Which group should this detector be part of? | [readonly] **metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata about the detector. | [readonly] -**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly] +**mode** | **str** | | [readonly] **mode_configuration** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [readonly] **confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9 **patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0 **status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [optional] +**escalation_type** | **str** | | [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) diff --git a/generated/docs/DetectorCreationInputRequest.md b/generated/docs/DetectorCreationInputRequest.md index fe683f5d..16adba94 100644 --- a/generated/docs/DetectorCreationInputRequest.md +++ b/generated/docs/DetectorCreationInputRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0 **pipeline_config** | **str, none_type** | (Advanced usage) Configuration needed to instantiate a prediction pipeline. | [optional] **metadata** | **str** | Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding. | [optional] -**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT | [optional] +**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX | [optional] **mode_configuration** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [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] diff --git a/generated/docs/DetectorsApi.md b/generated/docs/DetectorsApi.md index 51cc1d1c..9f5355e5 100644 --- a/generated/docs/DetectorsApi.md +++ b/generated/docs/DetectorsApi.md @@ -532,7 +532,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: confidence_threshold=0.9, patience_time=30.0, status=None, - escalation_type=None, + escalation_type="escalation_type_example", ) # PatchedDetectorRequest | (optional) # example passing only required values which don't have defaults set diff --git a/generated/docs/EdgeApi.md b/generated/docs/EdgeApi.md index a702b352..04976261 100644 --- a/generated/docs/EdgeApi.md +++ b/generated/docs/EdgeApi.md @@ -4,9 +4,81 @@ All URIs are relative to *https://api.groundlight.ai/device-api* Method | HTTP request | Description ------------- | ------------- | ------------- +[**edge_report_metrics_create**](EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics | [**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ | +# **edge_report_metrics_create** +> edge_report_metrics_create() + + + +Edge server periodically calls this to report metrics. POST body will have JSON data that we log. + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from pprint import pprint +# Defining the host is optional and defaults to https://api.groundlight.ai/device-api +# See configuration.py for a list of all supported configuration parameters. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_instance.edge_report_metrics_create() + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->edge_report_metrics_create: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | No response body | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_model_urls** > EdgeModelInfo get_model_urls(detector_id) diff --git a/generated/docs/EscalationTypeEnum.md b/generated/docs/EscalationTypeEnum.md index 36e1e46e..d7842681 100644 --- a/generated/docs/EscalationTypeEnum.md +++ b/generated/docs/EscalationTypeEnum.md @@ -1,11 +1,10 @@ # EscalationTypeEnum -* `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | must be one of ["STANDARD", "NO_HUMAN_LABELING", ] +**value** | **str** | | must be one of ["STANDARD", "NO_HUMAN_LABELING", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/LabelValue.md b/generated/docs/LabelValue.md index acbb0e6f..da087687 100644 --- a/generated/docs/LabelValue.md +++ b/generated/docs/LabelValue.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **confidence** | **float, none_type** | | [readonly] **class_name** | **str, none_type** | Return a human-readable class name for this label (e.g. YES/NO) | [readonly] -**annotations_requested** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | | [readonly] +**annotations_requested** | **[str]** | | [readonly] **created_at** | **datetime** | | [readonly] **detector_id** | **int, none_type** | | [readonly] -**source** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly] +**source** | **str** | | [readonly] **text** | **str, none_type** | Text annotations | [readonly] **rois** | [**[ROI], none_type**](ROI.md) | | [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] diff --git a/generated/docs/ModeEnum.md b/generated/docs/ModeEnum.md index c14a5aca..720ccf3e 100644 --- a/generated/docs/ModeEnum.md +++ b/generated/docs/ModeEnum.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ] +**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/MultiClassificationResult.md b/generated/docs/MultiClassificationResult.md index 8b928073..04aad82f 100644 --- a/generated/docs/MultiClassificationResult.md +++ b/generated/docs/MultiClassificationResult.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **label** | **str** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] if omitted the server will use the default value of "multi_classification" +**result_type** | **str** | | [optional] +**from_edge** | **bool** | | [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) diff --git a/generated/docs/PatchedDetectorRequest.md b/generated/docs/PatchedDetectorRequest.md index 819310b8..eb594561 100644 --- a/generated/docs/PatchedDetectorRequest.md +++ b/generated/docs/PatchedDetectorRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9 **patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0 **status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [optional] +**escalation_type** | **str** | | [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) diff --git a/generated/docs/ResultTypeEnum.md b/generated/docs/ResultTypeEnum.md index 0f03cf6c..0146b794 100644 --- a/generated/docs/ResultTypeEnum.md +++ b/generated/docs/ResultTypeEnum.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ] +**value** | **str** | | must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/SourceEnum.md b/generated/docs/SourceEnum.md index 65fe757d..a382414e 100644 --- a/generated/docs/SourceEnum.md +++ b/generated/docs/SourceEnum.md @@ -1,11 +1,10 @@ # SourceEnum -* `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE | must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] +**value** | **str** | | must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/TextRecognitionResult.md b/generated/docs/TextRecognitionResult.md index 0d5aeedb..736bec34 100644 --- a/generated/docs/TextRecognitionResult.md +++ b/generated/docs/TextRecognitionResult.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes **truncated** | **bool** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] if omitted the server will use the default value of "text_recognition" +**result_type** | **str** | | [optional] +**from_edge** | **bool** | | [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) diff --git a/generated/docs/VerbEnum.md b/generated/docs/VerbEnum.md index a76351de..57a334c2 100644 --- a/generated/docs/VerbEnum.md +++ b/generated/docs/VerbEnum.md @@ -1,11 +1,10 @@ # VerbEnum -* `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES | must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] +**value** | **str** | | must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/WebhookAction.md b/generated/docs/WebhookAction.md index a1f6cf2b..3635866d 100644 --- a/generated/docs/WebhookAction.md +++ b/generated/docs/WebhookAction.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **url** | **str** | | **include_image** | **bool** | | [optional] **payload_template** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**last_message_failed** | **bool** | | [optional] +**last_failure_error** | **str, none_type** | | [optional] +**last_failed_at** | **datetime, none_type** | | [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) diff --git a/generated/docs/WebhookActionRequest.md b/generated/docs/WebhookActionRequest.md index e3b1c59e..0910602a 100644 --- a/generated/docs/WebhookActionRequest.md +++ b/generated/docs/WebhookActionRequest.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **url** | **str** | | **include_image** | **bool** | | [optional] **payload_template** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**last_message_failed** | **bool** | | [optional] +**last_failure_error** | **str, none_type** | | [optional] +**last_failed_at** | **datetime, none_type** | | [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) diff --git a/generated/groundlight_openapi_client/api/edge_api.py b/generated/groundlight_openapi_client/api/edge_api.py index 7d6e4c85..a0b3187d 100644 --- a/generated/groundlight_openapi_client/api/edge_api.py +++ b/generated/groundlight_openapi_client/api/edge_api.py @@ -35,6 +35,30 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.edge_report_metrics_create_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/report-metrics", + "operation_id": "edge_report_metrics_create", + "http_method": "POST", + "servers": None, + }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, + }, + headers_map={ + "accept": [], + "content_type": [], + }, + api_client=api_client, + ) self.get_model_urls_endpoint = _Endpoint( settings={ "response_type": (EdgeModelInfo,), @@ -76,6 +100,61 @@ def __init__(self, api_client=None): api_client=api_client, ) + def edge_report_metrics_create(self, **kwargs): + """edge_report_metrics_create # noqa: E501 + + Edge server periodically calls this to report metrics. POST body will have JSON data that we log. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.edge_report_metrics_create(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + return self.edge_report_metrics_create_endpoint.call_with_http_info(**kwargs) + def get_model_urls(self, detector_id, **kwargs): """get_model_urls # noqa: E501 diff --git a/generated/groundlight_openapi_client/model/annotations_requested_enum.py b/generated/groundlight_openapi_client/model/annotations_requested_enum.py index d951c99e..1e1f6b8f 100644 --- a/generated/groundlight_openapi_client/model/annotations_requested_enum.py +++ b/generated/groundlight_openapi_client/model/annotations_requested_enum.py @@ -102,10 +102,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + args[0] (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 Keyword Args: - value (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + value (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -194,10 +194,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + args[0] (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 Keyword Args: - value (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + value (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/binary_classification_result.py b/generated/groundlight_openapi_client/model/binary_classification_result.py index 53c63b1b..605685dc 100644 --- a/generated/groundlight_openapi_client/model/binary_classification_result.py +++ b/generated/groundlight_openapi_client/model/binary_classification_result.py @@ -53,24 +53,7 @@ class BinaryClassificationResult(ModelNormal): as additional properties values. """ - allowed_values = { - ("label",): { - "YES": "YES", - "NO": "NO", - "UNCLEAR": "UNCLEAR", - }, - ("source",): { - "STILL_PROCESSING": "STILL_PROCESSING", - "CLOUD": "CLOUD", - "USER": "USER", - "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", - "ALGORITHM": "ALGORITHM", - "EDGE": "EDGE", - }, - ("result_type",): { - "BINARY_CLASSIFICATION": "binary_classification", - }, - } + allowed_values = {} validations = { ("confidence",): { @@ -117,6 +100,7 @@ def openapi_types(): ), # noqa: E501 "source": (str,), # noqa: E501 "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property @@ -128,6 +112,7 @@ def discriminator(): "confidence": "confidence", # noqa: E501 "source": "source", # noqa: E501 "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } read_only_vars = {} @@ -175,7 +160,8 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -266,7 +252,8 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py new file mode 100644 index 00000000..bcf98f27 --- /dev/null +++ b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py @@ -0,0 +1,283 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class BoundingBoxModeConfiguration(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = {} + + validations = { + ("max_num_bboxes",): { + "inclusive_maximum": 50, + "inclusive_minimum": 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "class_name": (str,), # noqa: E501 + "max_num_bboxes": (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "class_name": "class_name", # noqa: E501 + "max_num_bboxes": "max_num_bboxes", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 + """BoundingBoxModeConfiguration - a model defined in OpenAPI + + Args: + class_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_num_bboxes (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.class_name = class_name + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ]) + + @convert_js_args_to_python_args + def __init__(self, class_name, *args, **kwargs): # noqa: E501 + """BoundingBoxModeConfiguration - a model defined in OpenAPI + + Args: + class_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_num_bboxes (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.class_name = class_name + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/bounding_box_result.py b/generated/groundlight_openapi_client/model/bounding_box_result.py new file mode 100644 index 00000000..be4daaba --- /dev/null +++ b/generated/groundlight_openapi_client/model/bounding_box_result.py @@ -0,0 +1,298 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class BoundingBoxResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = {} + + validations = { + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "label": (str,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "label": "label", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 + """BoundingBoxResult - a model defined in OpenAPI + + Args: + label (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + confidence (float, none_type): [optional] # noqa: E501 + source (str): [optional] # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.label = label + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ]) + + @convert_js_args_to_python_args + def __init__(self, label, *args, **kwargs): # noqa: E501 + """BoundingBoxResult - a model defined in OpenAPI + + Args: + label (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + confidence (float, none_type): [optional] # noqa: E501 + source (str): [optional] # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.label = label + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/condition.py b/generated/groundlight_openapi_client/model/condition.py index 6e12ea64..65a2861f 100644 --- a/generated/groundlight_openapi_client/model/condition.py +++ b/generated/groundlight_openapi_client/model/condition.py @@ -29,12 +29,6 @@ from groundlight_openapi_client.exceptions import ApiAttributeError -def lazy_import(): - from groundlight_openapi_client.model.verb_enum import VerbEnum - - globals()["VerbEnum"] = VerbEnum - - class Condition(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -69,7 +63,6 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return ( bool, date, @@ -94,9 +87,8 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - "verb": (VerbEnum,), # noqa: E501 + "verb": (str,), # noqa: E501 "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @@ -119,7 +111,7 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 """Condition - a model defined in OpenAPI Args: - verb (VerbEnum): + verb (str): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: @@ -209,7 +201,7 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 """Condition - a model defined in OpenAPI Args: - verb (VerbEnum): + verb (str): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: diff --git a/generated/groundlight_openapi_client/model/condition_request.py b/generated/groundlight_openapi_client/model/condition_request.py index 3172892a..674578a6 100644 --- a/generated/groundlight_openapi_client/model/condition_request.py +++ b/generated/groundlight_openapi_client/model/condition_request.py @@ -29,12 +29,6 @@ from groundlight_openapi_client.exceptions import ApiAttributeError -def lazy_import(): - from groundlight_openapi_client.model.verb_enum import VerbEnum - - globals()["VerbEnum"] = VerbEnum - - class ConditionRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -69,7 +63,6 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return ( bool, date, @@ -94,9 +87,8 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - "verb": (VerbEnum,), # noqa: E501 + "verb": (str,), # noqa: E501 "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @@ -119,7 +111,7 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 """ConditionRequest - a model defined in OpenAPI Args: - verb (VerbEnum): + verb (str): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: @@ -209,7 +201,7 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 """ConditionRequest - a model defined in OpenAPI Args: - verb (VerbEnum): + verb (str): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: diff --git a/generated/groundlight_openapi_client/model/counting_result.py b/generated/groundlight_openapi_client/model/counting_result.py index 00dfc34a..08d2f6db 100644 --- a/generated/groundlight_openapi_client/model/counting_result.py +++ b/generated/groundlight_openapi_client/model/counting_result.py @@ -53,19 +53,7 @@ class CountingResult(ModelNormal): as additional properties values. """ - allowed_values = { - ("source",): { - "STILL_PROCESSING": "STILL_PROCESSING", - "CLOUD": "CLOUD", - "USER": "USER", - "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", - "ALGORITHM": "ALGORITHM", - "EDGE": "EDGE", - }, - ("result_type",): { - "COUNTING": "counting", - }, - } + allowed_values = {} validations = { ("count",): { @@ -118,6 +106,7 @@ def openapi_types(): ), # noqa: E501 "source": (str,), # noqa: E501 "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 "greater_than_max": (bool,), # noqa: E501 } @@ -130,6 +119,7 @@ def discriminator(): "confidence": "confidence", # noqa: E501 "source": "source", # noqa: E501 "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 "greater_than_max": "greater_than_max", # noqa: E501 } @@ -178,7 +168,8 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ @@ -270,7 +261,8 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py index 04c6beb8..2cde7991 100644 --- a/generated/groundlight_openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -32,14 +32,10 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum - from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum - from groundlight_openapi_client.model.mode_enum import ModeEnum from groundlight_openapi_client.model.status_enum import StatusEnum globals()["BlankEnum"] = BlankEnum globals()["DetectorTypeEnum"] = DetectorTypeEnum - globals()["EscalationTypeEnum"] = EscalationTypeEnum - globals()["ModeEnum"] = ModeEnum globals()["StatusEnum"] = StatusEnum @@ -136,17 +132,7 @@ def openapi_types(): {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, ), # noqa: E501 - "mode": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + "mode": (str,), # noqa: E501 "mode_configuration": ( {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, @@ -164,17 +150,7 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "escalation_type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + "escalation_type": (str,), # noqa: E501 } @cached_property @@ -225,7 +201,7 @@ def _from_openapi_data( query (str): A question about the image. group_name (str): Which group should this detector be part of? metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata about the detector. - mode (bool, date, datetime, dict, float, int, list, str, none_type): + mode (str): mode_configuration ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Keyword Args: @@ -262,7 +238,7 @@ def _from_openapi_data( confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 + escalation_type (str): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -360,7 +336,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 + escalation_type (str): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/detector_creation_input_request.py b/generated/groundlight_openapi_client/model/detector_creation_input_request.py index ee4d485a..ca1b1563 100644 --- a/generated/groundlight_openapi_client/model/detector_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/detector_creation_input_request.py @@ -30,11 +30,13 @@ def lazy_import(): + from groundlight_openapi_client.model.bounding_box_mode_configuration import BoundingBoxModeConfiguration from groundlight_openapi_client.model.count_mode_configuration import CountModeConfiguration from groundlight_openapi_client.model.mode_enum import ModeEnum from groundlight_openapi_client.model.multi_class_mode_configuration import MultiClassModeConfiguration from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration + globals()["BoundingBoxModeConfiguration"] = BoundingBoxModeConfiguration globals()["CountModeConfiguration"] = CountModeConfiguration globals()["ModeEnum"] = ModeEnum globals()["MultiClassModeConfiguration"] = MultiClassModeConfiguration @@ -229,7 +231,7 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501 metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501 - mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT. [optional] # noqa: E501 + mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ @@ -326,7 +328,7 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501 metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501 - mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT. [optional] # noqa: E501 + mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/escalation_type_enum.py b/generated/groundlight_openapi_client/model/escalation_type_enum.py index d28cb1ed..2b80360e 100644 --- a/generated/groundlight_openapi_client/model/escalation_type_enum.py +++ b/generated/groundlight_openapi_client/model/escalation_type_enum.py @@ -102,10 +102,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + args[0] (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 Keyword Args: - value (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + value (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -194,10 +194,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + args[0] (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 Keyword Args: - value (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + value (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/image_query.py b/generated/groundlight_openapi_client/model/image_query.py index 3cb597b7..79cf0179 100644 --- a/generated/groundlight_openapi_client/model/image_query.py +++ b/generated/groundlight_openapi_client/model/image_query.py @@ -31,6 +31,7 @@ def lazy_import(): from groundlight_openapi_client.model.binary_classification_result import BinaryClassificationResult + from groundlight_openapi_client.model.bounding_box_result import BoundingBoxResult from groundlight_openapi_client.model.counting_result import CountingResult from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum from groundlight_openapi_client.model.multi_classification_result import MultiClassificationResult @@ -39,6 +40,7 @@ def lazy_import(): from groundlight_openapi_client.model.text_recognition_result import TextRecognitionResult globals()["BinaryClassificationResult"] = BinaryClassificationResult + globals()["BoundingBoxResult"] = BoundingBoxResult globals()["CountingResult"] = CountingResult globals()["ImageQueryTypeEnum"] = ImageQueryTypeEnum globals()["MultiClassificationResult"] = MultiClassificationResult diff --git a/generated/groundlight_openapi_client/model/label_value.py b/generated/groundlight_openapi_client/model/label_value.py index d2981b5d..ee9b73e9 100644 --- a/generated/groundlight_openapi_client/model/label_value.py +++ b/generated/groundlight_openapi_client/model/label_value.py @@ -30,13 +30,9 @@ def lazy_import(): - from groundlight_openapi_client.model.annotations_requested_enum import AnnotationsRequestedEnum from groundlight_openapi_client.model.roi import ROI - from groundlight_openapi_client.model.source_enum import SourceEnum - globals()["AnnotationsRequestedEnum"] = AnnotationsRequestedEnum globals()["ROI"] = ROI - globals()["SourceEnum"] = SourceEnum class LabelValue(ModelNormal): @@ -108,23 +104,13 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "annotations_requested": ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 + "annotations_requested": ([str],), # noqa: E501 "created_at": (datetime,), # noqa: E501 "detector_id": ( int, none_type, ), # noqa: E501 - "source": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + "source": (str,), # noqa: E501 "text": ( str, none_type, @@ -172,10 +158,10 @@ def _from_openapi_data( Args: confidence (float, none_type): class_name (str, none_type): Return a human-readable class name for this label (e.g. YES/NO) - annotations_requested ([bool, date, datetime, dict, float, int, list, str, none_type]): + annotations_requested ([str]): created_at (datetime): detector_id (int, none_type): - source (bool, date, datetime, dict, float, int, list, str, none_type): + source (str): text (str, none_type): Text annotations Keyword Args: diff --git a/generated/groundlight_openapi_client/model/mode_enum.py b/generated/groundlight_openapi_client/model/mode_enum.py index a947ba8c..b35a3833 100644 --- a/generated/groundlight_openapi_client/model/mode_enum.py +++ b/generated/groundlight_openapi_client/model/mode_enum.py @@ -55,6 +55,7 @@ class ModeEnum(ModelSimple): "COUNT": "COUNT", "MULTI_CLASS": "MULTI_CLASS", "TEXT": "TEXT", + "BOUNDING_BOX": "BOUNDING_BOX", }, } @@ -104,10 +105,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ] # noqa: E501 + args[0] (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ] # noqa: E501 + value (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -196,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ] # noqa: E501 + args[0] (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ] # noqa: E501 + value (str):, must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/multi_classification_result.py b/generated/groundlight_openapi_client/model/multi_classification_result.py index 97c66110..798c1615 100644 --- a/generated/groundlight_openapi_client/model/multi_classification_result.py +++ b/generated/groundlight_openapi_client/model/multi_classification_result.py @@ -53,19 +53,7 @@ class MultiClassificationResult(ModelNormal): as additional properties values. """ - allowed_values = { - ("source",): { - "STILL_PROCESSING": "STILL_PROCESSING", - "CLOUD": "CLOUD", - "USER": "USER", - "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", - "ALGORITHM": "ALGORITHM", - "EDGE": "EDGE", - }, - ("result_type",): { - "MULTI_CLASSIFICATION": "multi_classification", - }, - } + allowed_values = {} validations = { ("confidence",): { @@ -112,6 +100,7 @@ def openapi_types(): ), # noqa: E501 "source": (str,), # noqa: E501 "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property @@ -123,6 +112,7 @@ def discriminator(): "confidence": "confidence", # noqa: E501 "source": "source", # noqa: E501 "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } read_only_vars = {} @@ -170,7 +160,8 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "multi_classification" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -261,7 +252,8 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "multi_classification" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 251cb75d..7e7a5813 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -31,11 +31,9 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum - from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum from groundlight_openapi_client.model.status_enum import StatusEnum globals()["BlankEnum"] = BlankEnum - globals()["EscalationTypeEnum"] = EscalationTypeEnum globals()["StatusEnum"] = StatusEnum @@ -78,6 +76,9 @@ class PatchedDetectorRequest(ModelNormal): "inclusive_maximum": 3600, "inclusive_minimum": 0, }, + ("escalation_type",): { + "min_length": 1, + }, } @cached_property @@ -127,17 +128,7 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "escalation_type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + "escalation_type": (str,), # noqa: E501 } @cached_property @@ -196,7 +187,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 + escalation_type (str): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -285,7 +276,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 + escalation_type (str): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/result_type_enum.py b/generated/groundlight_openapi_client/model/result_type_enum.py index 4fff6840..c4b954fd 100644 --- a/generated/groundlight_openapi_client/model/result_type_enum.py +++ b/generated/groundlight_openapi_client/model/result_type_enum.py @@ -55,6 +55,7 @@ class ResultTypeEnum(ModelSimple): "COUNTING": "counting", "MULTI_CLASSIFICATION": "multi_classification", "TEXT_RECOGNITION": "text_recognition", + "BOUNDING_BOX": "bounding_box", }, } @@ -104,10 +105,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ] # noqa: E501 + args[0] (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ] # noqa: E501 + value (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -196,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ] # noqa: E501 + args[0] (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ] # noqa: E501 + value (str):, must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/source_enum.py b/generated/groundlight_openapi_client/model/source_enum.py index 4addbc10..8a2746ab 100644 --- a/generated/groundlight_openapi_client/model/source_enum.py +++ b/generated/groundlight_openapi_client/model/source_enum.py @@ -108,10 +108,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + args[0] (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 Keyword Args: - value (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + value (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +200,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + args[0] (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 Keyword Args: - value (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + value (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/text_recognition_result.py b/generated/groundlight_openapi_client/model/text_recognition_result.py index 9b12e960..e0937650 100644 --- a/generated/groundlight_openapi_client/model/text_recognition_result.py +++ b/generated/groundlight_openapi_client/model/text_recognition_result.py @@ -53,19 +53,7 @@ class TextRecognitionResult(ModelNormal): as additional properties values. """ - allowed_values = { - ("source",): { - "STILL_PROCESSING": "STILL_PROCESSING", - "CLOUD": "CLOUD", - "USER": "USER", - "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", - "ALGORITHM": "ALGORITHM", - "EDGE": "EDGE", - }, - ("result_type",): { - "TEXT_RECOGNITION": "text_recognition", - }, - } + allowed_values = {} validations = { ("confidence",): { @@ -116,6 +104,7 @@ def openapi_types(): ), # noqa: E501 "source": (str,), # noqa: E501 "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property @@ -128,6 +117,7 @@ def discriminator(): "confidence": "confidence", # noqa: E501 "source": "source", # noqa: E501 "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } read_only_vars = {} @@ -176,7 +166,8 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "text_recognition" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -269,7 +260,8 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] if omitted the server will use the default value of "text_recognition" # noqa: E501 + result_type (str): [optional] # noqa: E501 + from_edge (bool): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/verb_enum.py b/generated/groundlight_openapi_client/model/verb_enum.py index 8d138449..789dd77c 100644 --- a/generated/groundlight_openapi_client/model/verb_enum.py +++ b/generated/groundlight_openapi_client/model/verb_enum.py @@ -105,10 +105,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + args[0] (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 Keyword Args: - value (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + value (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + args[0] (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 Keyword Args: - value (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + value (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/webhook_action.py b/generated/groundlight_openapi_client/model/webhook_action.py index d272aad8..33f70f3c 100644 --- a/generated/groundlight_openapi_client/model/webhook_action.py +++ b/generated/groundlight_openapi_client/model/webhook_action.py @@ -113,6 +113,15 @@ def openapi_types(): str, none_type, ), # noqa: E501 + "last_message_failed": (bool,), # noqa: E501 + "last_failure_error": ( + str, + none_type, + ), # noqa: E501 + "last_failed_at": ( + datetime, + none_type, + ), # noqa: E501 } @cached_property @@ -123,6 +132,9 @@ def discriminator(): "url": "url", # noqa: E501 "include_image": "include_image", # noqa: E501 "payload_template": "payload_template", # noqa: E501 + "last_message_failed": "last_message_failed", # noqa: E501 + "last_failure_error": "last_failure_error", # noqa: E501 + "last_failed_at": "last_failed_at", # noqa: E501 } read_only_vars = {} @@ -170,6 +182,9 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) include_image (bool): [optional] # noqa: E501 payload_template (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + last_message_failed (bool): [optional] # noqa: E501 + last_failure_error (str, none_type): [optional] # noqa: E501 + last_failed_at (datetime, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -260,6 +275,9 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) include_image (bool): [optional] # noqa: E501 payload_template (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + last_message_failed (bool): [optional] # noqa: E501 + last_failure_error (str, none_type): [optional] # noqa: E501 + last_failed_at (datetime, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/webhook_action_request.py b/generated/groundlight_openapi_client/model/webhook_action_request.py index 053d1a77..cd98a99b 100644 --- a/generated/groundlight_openapi_client/model/webhook_action_request.py +++ b/generated/groundlight_openapi_client/model/webhook_action_request.py @@ -114,6 +114,15 @@ def openapi_types(): str, none_type, ), # noqa: E501 + "last_message_failed": (bool,), # noqa: E501 + "last_failure_error": ( + str, + none_type, + ), # noqa: E501 + "last_failed_at": ( + datetime, + none_type, + ), # noqa: E501 } @cached_property @@ -124,6 +133,9 @@ def discriminator(): "url": "url", # noqa: E501 "include_image": "include_image", # noqa: E501 "payload_template": "payload_template", # noqa: E501 + "last_message_failed": "last_message_failed", # noqa: E501 + "last_failure_error": "last_failure_error", # noqa: E501 + "last_failed_at": "last_failed_at", # noqa: E501 } read_only_vars = {} @@ -171,6 +183,9 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) include_image (bool): [optional] # noqa: E501 payload_template (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + last_message_failed (bool): [optional] # noqa: E501 + last_failure_error (str, none_type): [optional] # noqa: E501 + last_failed_at (datetime, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -261,6 +276,9 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) include_image (bool): [optional] # noqa: E501 payload_template (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + last_message_failed (bool): [optional] # noqa: E501 + last_failure_error (str, none_type): [optional] # noqa: E501 + last_failed_at (datetime, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/models/__init__.py b/generated/groundlight_openapi_client/models/__init__.py index 6f7e77be..705cc1c0 100644 --- a/generated/groundlight_openapi_client/models/__init__.py +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -17,6 +17,8 @@ from groundlight_openapi_client.model.b_box_geometry_request import BBoxGeometryRequest from groundlight_openapi_client.model.binary_classification_result import BinaryClassificationResult from groundlight_openapi_client.model.blank_enum import BlankEnum +from groundlight_openapi_client.model.bounding_box_mode_configuration import BoundingBoxModeConfiguration +from groundlight_openapi_client.model.bounding_box_result import BoundingBoxResult from groundlight_openapi_client.model.channel_enum import ChannelEnum from groundlight_openapi_client.model.condition import Condition from groundlight_openapi_client.model.condition_request import ConditionRequest diff --git a/generated/model.py b/generated/model.py index 66f5927d..d93c1e7a 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-03-11T18:57:57+00:00 +# timestamp: 2025-03-31T22:10:29+00:00 from __future__ import annotations @@ -11,16 +11,6 @@ from pydantic import AnyUrl, BaseModel, Field, RootModel, confloat, conint, constr -class AnnotationsRequestedEnum(str, Enum): - """ - * `BINARY_CLASSIFICATION` - Binary Classification - * `BOUNDING_BOXES` - Bounding Boxes - """ - - BINARY_CLASSIFICATION = "BINARY_CLASSIFICATION" - BOUNDING_BOXES = "BOUNDING_BOXES" - - class BBoxGeometry(BaseModel): """ Mixin for serializers to handle data in the StrictBaseModel format @@ -49,6 +39,16 @@ class BlankEnum(Enum): field_ = "" +class Condition(BaseModel): + verb: str + parameters: Dict[str, Any] + + +class ConditionRequest(BaseModel): + verb: str + parameters: Dict[str, Any] + + class DetectorGroup(BaseModel): id: str name: constr(max_length=100) @@ -76,16 +76,6 @@ class EdgeModelInfo(BaseModel): predictor_metadata: Optional[Any] = None -class EscalationTypeEnum(str, Enum): - """ - * `STANDARD` - STANDARD - * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING - """ - - STANDARD = "STANDARD" - NO_HUMAN_LABELING = "NO_HUMAN_LABELING" - - class ImageQueryTypeEnum(str, Enum): image_query = "image_query" @@ -95,6 +85,7 @@ class ModeEnum(str, Enum): COUNT = "COUNT" MULTI_CLASS = "MULTI_CLASS" TEXT = "TEXT" + BOUNDING_BOX = "BOUNDING_BOX" class Note(BaseModel): @@ -143,6 +134,7 @@ class ResultTypeEnum(str, Enum): counting = "counting" multi_classification = "multi_classification" text_recognition = "text_recognition" + bounding_box = "bounding_box" class SnoozeTimeUnitEnum(str, Enum): @@ -159,28 +151,6 @@ class SnoozeTimeUnitEnum(str, Enum): SECONDS = "SECONDS" -class SourceEnum(str, Enum): - """ - * `INITIAL_PLACEHOLDER` - InitialPlaceholder - * `CLOUD` - HumanCloud - * `CUST` - HumanCustomer - * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble - * `ALG` - Algorithm - * `ALG_REC` - AlgorithmReconciled - * `ALG_UNCLEAR` - AlgorithmUnclear - * `EDGE` - EDGE - """ - - INITIAL_PLACEHOLDER = "INITIAL_PLACEHOLDER" - CLOUD = "CLOUD" - CUST = "CUST" - HUMAN_CLOUD_ENSEMBLE = "HUMAN_CLOUD_ENSEMBLE" - ALG = "ALG" - ALG_REC = "ALG_REC" - ALG_UNCLEAR = "ALG_UNCLEAR" - EDGE = "EDGE" - - class StatusEnum(str, Enum): """ * `ON` - ON @@ -191,95 +161,66 @@ class StatusEnum(str, Enum): OFF = "OFF" -class VerbEnum(str, Enum): - """ - * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY - * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME - * `CHANGED_TO` - CHANGED_TO - * `NO_CHANGE` - NO_CHANGE - * `NO_QUERIES` - NO_QUERIES - """ - - ANSWERED_CONSECUTIVELY = "ANSWERED_CONSECUTIVELY" - ANSWERED_WITHIN_TIME = "ANSWERED_WITHIN_TIME" - CHANGED_TO = "CHANGED_TO" - NO_CHANGE = "NO_CHANGE" - NO_QUERIES = "NO_QUERIES" - - class WebhookAction(BaseModel): url: AnyUrl include_image: Optional[bool] = None payload_template: Optional[PayloadTemplate] = None + last_message_failed: Optional[bool] = None + last_failure_error: Optional[str] = None + last_failed_at: Optional[datetime] = None class WebhookActionRequest(BaseModel): url: AnyUrl include_image: Optional[bool] = None payload_template: Optional[PayloadTemplateRequest] = None - - -class Source(str, Enum): - STILL_PROCESSING = "STILL_PROCESSING" - CLOUD = "CLOUD" - USER = "USER" - CLOUD_ENSEMBLE = "CLOUD_ENSEMBLE" - ALGORITHM = "ALGORITHM" - EDGE = "EDGE" - - -class ResultType(str, Enum): - binary_classification = "binary_classification" - - -class Label(str, Enum): - YES = "YES" - NO = "NO" - UNCLEAR = "UNCLEAR" + last_message_failed: Optional[bool] = None + last_failure_error: Optional[str] = None + last_failed_at: Optional[datetime] = None class BinaryClassificationResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[Source] = None - result_type: Optional[ResultType] = None - label: Label - - -class ResultType2(str, Enum): - counting = "counting" + source: Optional[str] = None + result_type: Optional[str] = None + from_edge: Optional[bool] = None + label: str class CountingResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[Source] = None - result_type: Optional[ResultType2] = None + source: Optional[str] = None + result_type: Optional[str] = None + from_edge: Optional[bool] = None count: Optional[conint(ge=0)] = Field(...) greater_than_max: Optional[bool] = None -class ResultType3(str, Enum): - multi_classification = "multi_classification" - - class MultiClassificationResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[Source] = None - result_type: Optional[ResultType3] = None + source: Optional[str] = None + result_type: Optional[str] = None + from_edge: Optional[bool] = None label: str -class ResultType4(str, Enum): - text_recognition = "text_recognition" - - class TextRecognitionResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[Source] = None - result_type: Optional[ResultType4] = None + source: Optional[str] = None + result_type: Optional[str] = None + from_edge: Optional[bool] = None text: Optional[str] = Field(...) truncated: bool +class BoundingBoxResult(BaseModel): + confidence: Optional[confloat(ge=0.0, le=1.0)] = None + source: Optional[str] = None + result_type: Optional[str] = None + from_edge: Optional[bool] = None + label: str + + class CountModeConfiguration(BaseModel): max_count: Optional[conint(ge=1, le=50)] = None class_name: str @@ -294,6 +235,11 @@ class TextModeConfiguration(BaseModel): value_max_length: Optional[conint(ge=1, le=250)] = None +class BoundingBoxModeConfiguration(BaseModel): + class_name: str + max_num_bboxes: Optional[conint(ge=1, le=50)] = None + + class ChannelEnum(str, Enum): TEXT = "TEXT" EMAIL = "EMAIL" @@ -309,6 +255,35 @@ class ActionList(RootModel[List[Action]]): root: List[Action] +class AnnotationsRequestedEnum(str, Enum): + BINARY_CLASSIFICATION = "BINARY_CLASSIFICATION" + BOUNDING_BOXES = "BOUNDING_BOXES" + + +class EscalationTypeEnum(str, Enum): + STANDARD = "STANDARD" + NO_HUMAN_LABELING = "NO_HUMAN_LABELING" + + +class SourceEnum(str, Enum): + INITIAL_PLACEHOLDER = "INITIAL_PLACEHOLDER" + CLOUD = "CLOUD" + CUST = "CUST" + HUMAN_CLOUD_ENSEMBLE = "HUMAN_CLOUD_ENSEMBLE" + ALG = "ALG" + ALG_REC = "ALG_REC" + ALG_UNCLEAR = "ALG_UNCLEAR" + EDGE = "EDGE" + + +class VerbEnum(str, Enum): + ANSWERED_CONSECUTIVELY = "ANSWERED_CONSECUTIVELY" + ANSWERED_WITHIN_TIME = "ANSWERED_WITHIN_TIME" + CHANGED_TO = "CHANGED_TO" + NO_CHANGE = "NO_CHANGE" + NO_QUERIES = "NO_QUERIES" + + class AllNotes(BaseModel): """ Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices @@ -319,16 +294,6 @@ class AllNotes(BaseModel): GL: List[Note] -class Condition(BaseModel): - verb: VerbEnum - parameters: Dict[str, Any] - - -class ConditionRequest(BaseModel): - verb: VerbEnum - parameters: Dict[str, Any] - - class Detector(BaseModel): """ Groundlight Detectors provide answers to natural language questions about images. @@ -354,16 +319,10 @@ class Detector(BaseModel): 30.0, description="How long Groundlight will attempt to generate a confident prediction" ) metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the detector.") - mode: ModeEnum + mode: str mode_configuration: Optional[Dict[str, Any]] = Field(...) status: Optional[Union[StatusEnum, BlankEnum]] = None - escalation_type: Optional[EscalationTypeEnum] = Field( - None, - description=( - "Category that define internal proccess for labeling image queries\n\n* `STANDARD` - STANDARD\n*" - " `NO_HUMAN_LABELING` - NO_HUMAN_LABELING" - ), - ) + escalation_type: Optional[str] = None class DetectorCreationInputRequest(BaseModel): @@ -399,12 +358,12 @@ class DetectorCreationInputRequest(BaseModel): "BINARY", description=( "Mode in which this detector will work.\n\n* `BINARY` - BINARY\n* `COUNT` - COUNT\n* `MULTI_CLASS` -" - " MULTI_CLASS\n* `TEXT` - TEXT" + " MULTI_CLASS\n* `TEXT` - TEXT\n* `BOUNDING_BOX` - BOUNDING_BOX" ), ) - mode_configuration: Optional[Union[CountModeConfiguration, MultiClassModeConfiguration, TextModeConfiguration]] = ( - None - ) + mode_configuration: Optional[ + Union[CountModeConfiguration, MultiClassModeConfiguration, TextModeConfiguration, BoundingBoxModeConfiguration] + ] = None class ImageQuery(BaseModel): @@ -420,7 +379,13 @@ 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[ - Union[BinaryClassificationResult, CountingResult, MultiClassificationResult, TextRecognitionResult] + Union[ + BinaryClassificationResult, + CountingResult, + MultiClassificationResult, + TextRecognitionResult, + BoundingBoxResult, + ] ] = Field(...) patience_time: float = Field(..., description="How long to wait for a confident response.") confidence_threshold: float = Field( @@ -442,10 +407,10 @@ class LabelValue(BaseModel): ..., description="Return a human-readable class name for this label (e.g. YES/NO)" ) rois: Optional[List[ROI]] = None - annotations_requested: List[AnnotationsRequestedEnum] + annotations_requested: List[str] created_at: datetime detector_id: Optional[int] = Field(...) - source: SourceEnum + source: str text: Optional[str] = Field(..., description="Text annotations") @@ -491,13 +456,7 @@ class PatchedDetectorRequest(BaseModel): 30.0, description="How long Groundlight will attempt to generate a confident prediction" ) status: Optional[Union[StatusEnum, BlankEnum]] = None - escalation_type: Optional[EscalationTypeEnum] = Field( - None, - description=( - "Category that define internal proccess for labeling image queries\n\n* `STANDARD` - STANDARD\n*" - " `NO_HUMAN_LABELING` - NO_HUMAN_LABELING" - ), - ) + escalation_type: Optional[constr(min_length=1)] = None class Rule(BaseModel): diff --git a/generated/test/test_bounding_box_mode_configuration.py b/generated/test/test_bounding_box_mode_configuration.py new file mode 100644 index 00000000..67b2b472 --- /dev/null +++ b/generated/test/test_bounding_box_mode_configuration.py @@ -0,0 +1,35 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import groundlight_openapi_client +from groundlight_openapi_client.model.bounding_box_mode_configuration import BoundingBoxModeConfiguration + + +class TestBoundingBoxModeConfiguration(unittest.TestCase): + """BoundingBoxModeConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBoundingBoxModeConfiguration(self): + """Test BoundingBoxModeConfiguration""" + # FIXME: construct object with mandatory attributes with example values + # model = BoundingBoxModeConfiguration() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_bounding_box_result.py b/generated/test/test_bounding_box_result.py new file mode 100644 index 00000000..4608b05e --- /dev/null +++ b/generated/test/test_bounding_box_result.py @@ -0,0 +1,35 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import groundlight_openapi_client +from groundlight_openapi_client.model.bounding_box_result import BoundingBoxResult + + +class TestBoundingBoxResult(unittest.TestCase): + """BoundingBoxResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBoundingBoxResult(self): + """Test BoundingBoxResult""" + # FIXME: construct object with mandatory attributes with example values + # model = BoundingBoxResult() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/spec/public-api.yaml b/spec/public-api.yaml index bb11e4ff..64cc8f66 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -443,6 +443,20 @@ paths: schema: $ref: '#/components/schemas/EdgeModelInfo' description: '' + /v1/edge/report-metrics: + post: + operationId: edge_report_metrics_create + description: |- + Edge server periodically calls this to report metrics. + + POST body will have JSON data that we log. + tags: + - edge + security: + - ApiToken: [] + responses: + '200': + description: No response body /v1/image-queries: get: operationId: List image queries @@ -742,14 +756,6 @@ components: required: - CUSTOMER - GL - AnnotationsRequestedEnum: - enum: - - BINARY_CLASSIFICATION - - BOUNDING_BOXES - type: string - description: |- - * `BINARY_CLASSIFICATION` - Binary Classification - * `BOUNDING_BOXES` - Bounding Boxes BBoxGeometry: type: object description: Mixin for serializers to handle data in the StrictBaseModel format @@ -809,7 +815,7 @@ components: type: object properties: verb: - $ref: '#/components/schemas/VerbEnum' + type: string parameters: type: object additionalProperties: {} @@ -820,7 +826,7 @@ components: type: object properties: verb: - $ref: '#/components/schemas/VerbEnum' + type: string parameters: type: object additionalProperties: {} @@ -884,8 +890,7 @@ components: readOnly: true description: Metadata about the detector. mode: - allOf: - - $ref: '#/components/schemas/ModeEnum' + type: string readOnly: true mode_configuration: type: object @@ -897,13 +902,7 @@ components: - $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: - allOf: - - $ref: '#/components/schemas/EscalationTypeEnum' - description: |- - Category that define internal proccess for labeling image queries - - * `STANDARD` - STANDARD - * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING + type: string required: - created_at - group_name @@ -973,11 +972,13 @@ components: * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT + * `BOUNDING_BOX` - BOUNDING_BOX mode_configuration: oneOf: - $ref: '#/components/schemas/CountModeConfiguration' - $ref: '#/components/schemas/MultiClassModeConfiguration' - $ref: '#/components/schemas/TextModeConfiguration' + - $ref: '#/components/schemas/BoundingBoxModeConfiguration' nullable: true required: - name @@ -1024,14 +1025,6 @@ components: pipeline_config: {} oodd_pipeline_config: {} predictor_metadata: {} - EscalationTypeEnum: - enum: - - STANDARD - - NO_HUMAN_LABELING - type: string - description: |- - * `STANDARD` - STANDARD - * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING ImageQuery: type: object description: ImageQuery objects are the answers to natural language questions @@ -1076,6 +1069,7 @@ components: - $ref: '#/components/schemas/CountingResult' - $ref: '#/components/schemas/MultiClassificationResult' - $ref: '#/components/schemas/TextRecognitionResult' + - $ref: '#/components/schemas/BoundingBoxResult' nullable: true patience_time: type: number @@ -1144,13 +1138,7 @@ components: annotations_requested: type: array items: - allOf: - - $ref: '#/components/schemas/AnnotationsRequestedEnum' - description: |- - The type of annotation requested - - * `BINARY_CLASSIFICATION` - Binary Classification - * `BOUNDING_BOXES` - Bounding Boxes + type: string readOnly: true created_at: type: string @@ -1161,8 +1149,7 @@ components: nullable: true readOnly: true source: - allOf: - - $ref: '#/components/schemas/SourceEnum' + type: string readOnly: true text: type: string @@ -1197,12 +1184,13 @@ components: - image_query_id - label ModeEnum: + type: string enum: - BINARY - COUNT - MULTI_CLASS - TEXT - type: string + - BOUNDING_BOX Note: type: object properties: @@ -1336,13 +1324,8 @@ components: - $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: - allOf: - - $ref: '#/components/schemas/EscalationTypeEnum' - description: |- - Category that define internal proccess for labeling image queries - - * `STANDARD` - STANDARD - * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING + type: string + minLength: 1 x-internal: true PayloadTemplate: type: object @@ -1407,6 +1390,7 @@ components: - counting - multi_classification - text_recognition + - bounding_box type: string Rule: type: object @@ -1505,26 +1489,6 @@ components: * `HOURS` - HOURS * `MINUTES` - MINUTES * `SECONDS` - SECONDS - SourceEnum: - enum: - - INITIAL_PLACEHOLDER - - CLOUD - - CUST - - HUMAN_CLOUD_ENSEMBLE - - ALG - - ALG_REC - - ALG_UNCLEAR - - EDGE - type: string - description: |- - * `INITIAL_PLACEHOLDER` - InitialPlaceholder - * `CLOUD` - HumanCloud - * `CUST` - HumanCustomer - * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble - * `ALG` - Algorithm - * `ALG_REC` - AlgorithmReconciled - * `ALG_UNCLEAR` - AlgorithmUnclear - * `EDGE` - EDGE StatusEnum: enum: - 'ON' @@ -1533,20 +1497,6 @@ components: description: |- * `ON` - ON * `OFF` - OFF - VerbEnum: - enum: - - ANSWERED_CONSECUTIVELY - - ANSWERED_WITHIN_TIME - - CHANGED_TO - - NO_CHANGE - - NO_QUERIES - type: string - description: |- - * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY - * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME - * `CHANGED_TO` - CHANGED_TO - * `NO_CHANGE` - NO_CHANGE - * `NO_QUERIES` - NO_QUERIES WebhookAction: type: object properties: @@ -1560,6 +1510,15 @@ components: allOf: - $ref: '#/components/schemas/PayloadTemplate' nullable: true + last_message_failed: + type: boolean + last_failure_error: + type: string + nullable: true + last_failed_at: + type: string + format: date-time + nullable: true required: - url WebhookActionRequest: @@ -1576,6 +1535,15 @@ components: allOf: - $ref: '#/components/schemas/PayloadTemplateRequest' nullable: true + last_message_failed: + type: boolean + last_failure_error: + type: string + nullable: true + last_failed_at: + type: string + format: date-time + nullable: true required: - url BinaryClassificationResult: @@ -1589,23 +1557,12 @@ components: nullable: true source: type: string - enum: - - STILL_PROCESSING - - CLOUD - - USER - - CLOUD_ENSEMBLE - - ALGORITHM - - EDGE result_type: type: string - enum: - - binary_classification + from_edge: + type: boolean label: type: string - enum: - - 'YES' - - 'NO' - - UNCLEAR required: - label CountingResult: @@ -1619,17 +1576,10 @@ components: nullable: true source: type: string - enum: - - STILL_PROCESSING - - CLOUD - - USER - - CLOUD_ENSEMBLE - - ALGORITHM - - EDGE result_type: type: string - enum: - - counting + from_edge: + type: boolean count: type: integer minimum: 0 @@ -1649,17 +1599,10 @@ components: nullable: true source: type: string - enum: - - STILL_PROCESSING - - CLOUD - - USER - - CLOUD_ENSEMBLE - - ALGORITHM - - EDGE result_type: type: string - enum: - - multi_classification + from_edge: + type: boolean label: type: string nullable: false @@ -1676,17 +1619,10 @@ components: nullable: true source: type: string - enum: - - STILL_PROCESSING - - CLOUD - - USER - - CLOUD_ENSEMBLE - - ALGORITHM - - EDGE result_type: type: string - enum: - - text_recognition + from_edge: + type: boolean text: type: string nullable: true @@ -1695,6 +1631,25 @@ components: required: - text - truncated + BoundingBoxResult: + type: object + properties: + confidence: + type: number + format: float + minimum: 0.0 + maximum: 1.0 + nullable: true + source: + type: string + result_type: + type: string + from_edge: + type: boolean + label: + type: string + required: + - label CountModeConfiguration: type: object properties: @@ -1729,6 +1684,19 @@ components: minimum: 1 maximum: 250 nullable: false + BoundingBoxModeConfiguration: + type: object + properties: + class_name: + type: string + nullable: false + max_num_bboxes: + type: integer + minimum: 1 + maximum: 50 + nullable: false + required: + - class_name ChannelEnum: type: string enum: @@ -1751,6 +1719,35 @@ components: type: array items: $ref: '#/components/schemas/Action' + AnnotationsRequestedEnum: + type: string + enum: + - BINARY_CLASSIFICATION + - BOUNDING_BOXES + EscalationTypeEnum: + type: string + enum: + - STANDARD + - NO_HUMAN_LABELING + SourceEnum: + type: string + enum: + - INITIAL_PLACEHOLDER + - CLOUD + - CUST + - HUMAN_CLOUD_ENSEMBLE + - ALG + - ALG_REC + - ALG_UNCLEAR + - EDGE + VerbEnum: + type: string + enum: + - ANSWERED_CONSECUTIVELY + - ANSWERED_WITHIN_TIME + - CHANGED_TO + - NO_CHANGE + - NO_QUERIES securitySchemes: ApiToken: name: x-api-token From ddc260da6cd1003efbe360911110317355c5d41a Mon Sep 17 00:00:00 2001 From: CoreyEWood Date: Mon, 31 Mar 2025 22:14:57 +0000 Subject: [PATCH 2/3] Bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4db58220..56f944b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ {include = "**/*.py", from = "src"}, ] readme = "README.md" -version = "0.22.3" +version = "0.22.4" [tool.poetry.dependencies] # For certifi, use ">=" instead of "^" since it upgrades its "major version" every year, not really following semver From fad52855589408c6d4dd97c88dd6abbaf991d224 Mon Sep 17 00:00:00 2001 From: CoreyEWood Date: Mon, 31 Mar 2025 23:29:51 +0000 Subject: [PATCH 3/3] Only changes from 4798 and before --- generated/README.md | 2 +- generated/docs/ActionsApi.md | 2 +- generated/docs/AnnotationsRequestedEnum.md | 3 +- generated/docs/BinaryClassificationResult.md | 2 +- generated/docs/BoundingBoxResult.md | 2 +- generated/docs/Condition.md | 2 +- generated/docs/ConditionRequest.md | 2 +- generated/docs/CountingResult.md | 2 +- generated/docs/Detector.md | 4 +- generated/docs/DetectorsApi.md | 2 +- generated/docs/EscalationTypeEnum.md | 3 +- generated/docs/LabelValue.md | 4 +- generated/docs/MultiClassificationResult.md | 2 +- generated/docs/PatchedDetectorRequest.md | 2 +- generated/docs/SourceEnum.md | 3 +- generated/docs/TextRecognitionResult.md | 2 +- generated/docs/VerbEnum.md | 3 +- .../model/annotations_requested_enum.py | 8 +- .../model/binary_classification_result.py | 23 +- .../model/bounding_box_result.py | 23 +- .../model/condition.py | 14 +- .../model/condition_request.py | 14 +- .../model/counting_result.py | 18 +- .../model/detector.py | 34 ++- .../model/escalation_type_enum.py | 8 +- .../model/label_value.py | 22 +- .../model/multi_classification_result.py | 18 +- .../model/patched_detector_request.py | 21 +- .../model/source_enum.py | 8 +- .../model/text_recognition_result.py | 18 +- .../model/verb_enum.py | 8 +- generated/model.py | 196 +++++++++++++----- spec/public-api.yaml | 171 +++++++++++---- 33 files changed, 479 insertions(+), 167 deletions(-) diff --git a/generated/README.md b/generated/README.md index 086d2c24..4a84c1f2 100644 --- a/generated/README.md +++ b/generated/README.md @@ -84,7 +84,7 @@ rule_request = RuleRequest( snooze_time_unit=None, human_review_required=False, condition=ConditionRequest( - verb="verb_example", + verb=VerbEnum("ANSWERED_CONSECUTIVELY"), parameters={ "key": None, }, diff --git a/generated/docs/ActionsApi.md b/generated/docs/ActionsApi.md index 099d468f..ae3b580b 100644 --- a/generated/docs/ActionsApi.md +++ b/generated/docs/ActionsApi.md @@ -59,7 +59,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: snooze_time_unit=None, human_review_required=False, condition=ConditionRequest( - verb="verb_example", + verb=VerbEnum("ANSWERED_CONSECUTIVELY"), parameters={ "key": None, }, diff --git a/generated/docs/AnnotationsRequestedEnum.md b/generated/docs/AnnotationsRequestedEnum.md index 31b444e4..fd366f01 100644 --- a/generated/docs/AnnotationsRequestedEnum.md +++ b/generated/docs/AnnotationsRequestedEnum.md @@ -1,10 +1,11 @@ # AnnotationsRequestedEnum +* `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] +**value** | **str** | * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes | must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/BinaryClassificationResult.md b/generated/docs/BinaryClassificationResult.md index 0ddc4f9e..a98a3b70 100644 --- a/generated/docs/BinaryClassificationResult.md +++ b/generated/docs/BinaryClassificationResult.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **label** | **str** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] +**result_type** | **str** | | [optional] if omitted the server will use the default value of "binary_classification" **from_edge** | **bool** | | [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] diff --git a/generated/docs/BoundingBoxResult.md b/generated/docs/BoundingBoxResult.md index aab5d925..7a089d95 100644 --- a/generated/docs/BoundingBoxResult.md +++ b/generated/docs/BoundingBoxResult.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **label** | **str** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] +**result_type** | **str** | | [optional] if omitted the server will use the default value of "bounding_box" **from_edge** | **bool** | | [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] diff --git a/generated/docs/Condition.md b/generated/docs/Condition.md index e54e1ad5..edfe01a8 100644 --- a/generated/docs/Condition.md +++ b/generated/docs/Condition.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verb** | **str** | | +**verb** | [**VerbEnum**](VerbEnum.md) | | **parameters** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | **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] diff --git a/generated/docs/ConditionRequest.md b/generated/docs/ConditionRequest.md index 60a6d034..a9a2cead 100644 --- a/generated/docs/ConditionRequest.md +++ b/generated/docs/ConditionRequest.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verb** | **str** | | +**verb** | [**VerbEnum**](VerbEnum.md) | | **parameters** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | **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] diff --git a/generated/docs/CountingResult.md b/generated/docs/CountingResult.md index deb8cbe6..f9db3d5d 100644 --- a/generated/docs/CountingResult.md +++ b/generated/docs/CountingResult.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **count** | **int, none_type** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] +**result_type** | **str** | | [optional] if omitted the server will use the default value of "counting" **from_edge** | **bool** | | [optional] **greater_than_max** | **bool** | | [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] diff --git a/generated/docs/Detector.md b/generated/docs/Detector.md index b2f9f86e..133bfeba 100644 --- a/generated/docs/Detector.md +++ b/generated/docs/Detector.md @@ -12,12 +12,12 @@ Name | Type | Description | Notes **query** | **str** | A question about the image. | [readonly] **group_name** | **str** | Which group should this detector be part of? | [readonly] **metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata about the detector. | [readonly] -**mode** | **str** | | [readonly] +**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly] **mode_configuration** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [readonly] **confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9 **patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0 **status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**escalation_type** | **str** | | [optional] +**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [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) diff --git a/generated/docs/DetectorsApi.md b/generated/docs/DetectorsApi.md index 9f5355e5..51cc1d1c 100644 --- a/generated/docs/DetectorsApi.md +++ b/generated/docs/DetectorsApi.md @@ -532,7 +532,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: confidence_threshold=0.9, patience_time=30.0, status=None, - escalation_type="escalation_type_example", + escalation_type=None, ) # PatchedDetectorRequest | (optional) # example passing only required values which don't have defaults set diff --git a/generated/docs/EscalationTypeEnum.md b/generated/docs/EscalationTypeEnum.md index d7842681..36e1e46e 100644 --- a/generated/docs/EscalationTypeEnum.md +++ b/generated/docs/EscalationTypeEnum.md @@ -1,10 +1,11 @@ # EscalationTypeEnum +* `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["STANDARD", "NO_HUMAN_LABELING", ] +**value** | **str** | * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | must be one of ["STANDARD", "NO_HUMAN_LABELING", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/LabelValue.md b/generated/docs/LabelValue.md index da087687..acbb0e6f 100644 --- a/generated/docs/LabelValue.md +++ b/generated/docs/LabelValue.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **confidence** | **float, none_type** | | [readonly] **class_name** | **str, none_type** | Return a human-readable class name for this label (e.g. YES/NO) | [readonly] -**annotations_requested** | **[str]** | | [readonly] +**annotations_requested** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | | [readonly] **created_at** | **datetime** | | [readonly] **detector_id** | **int, none_type** | | [readonly] -**source** | **str** | | [readonly] +**source** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly] **text** | **str, none_type** | Text annotations | [readonly] **rois** | [**[ROI], none_type**](ROI.md) | | [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] diff --git a/generated/docs/MultiClassificationResult.md b/generated/docs/MultiClassificationResult.md index 04aad82f..d048a5da 100644 --- a/generated/docs/MultiClassificationResult.md +++ b/generated/docs/MultiClassificationResult.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **label** | **str** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] +**result_type** | **str** | | [optional] if omitted the server will use the default value of "multi_classification" **from_edge** | **bool** | | [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] diff --git a/generated/docs/PatchedDetectorRequest.md b/generated/docs/PatchedDetectorRequest.md index eb594561..819310b8 100644 --- a/generated/docs/PatchedDetectorRequest.md +++ b/generated/docs/PatchedDetectorRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9 **patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0 **status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**escalation_type** | **str** | | [optional] +**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [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) diff --git a/generated/docs/SourceEnum.md b/generated/docs/SourceEnum.md index a382414e..65fe757d 100644 --- a/generated/docs/SourceEnum.md +++ b/generated/docs/SourceEnum.md @@ -1,10 +1,11 @@ # SourceEnum +* `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] +**value** | **str** | * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE | must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/docs/TextRecognitionResult.md b/generated/docs/TextRecognitionResult.md index 736bec34..f518a26b 100644 --- a/generated/docs/TextRecognitionResult.md +++ b/generated/docs/TextRecognitionResult.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **truncated** | **bool** | | **confidence** | **float, none_type** | | [optional] **source** | **str** | | [optional] -**result_type** | **str** | | [optional] +**result_type** | **str** | | [optional] if omitted the server will use the default value of "text_recognition" **from_edge** | **bool** | | [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] diff --git a/generated/docs/VerbEnum.md b/generated/docs/VerbEnum.md index 57a334c2..a76351de 100644 --- a/generated/docs/VerbEnum.md +++ b/generated/docs/VerbEnum.md @@ -1,10 +1,11 @@ # VerbEnum +* `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] +**value** | **str** | * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES | must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/groundlight_openapi_client/model/annotations_requested_enum.py b/generated/groundlight_openapi_client/model/annotations_requested_enum.py index 1e1f6b8f..d951c99e 100644 --- a/generated/groundlight_openapi_client/model/annotations_requested_enum.py +++ b/generated/groundlight_openapi_client/model/annotations_requested_enum.py @@ -102,10 +102,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + args[0] (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + value (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -194,10 +194,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + args[0] (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 + value (str): * `BINARY_CLASSIFICATION` - Binary Classification * `BOUNDING_BOXES` - Bounding Boxes., must be one of ["BINARY_CLASSIFICATION", "BOUNDING_BOXES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/binary_classification_result.py b/generated/groundlight_openapi_client/model/binary_classification_result.py index 605685dc..25ef477e 100644 --- a/generated/groundlight_openapi_client/model/binary_classification_result.py +++ b/generated/groundlight_openapi_client/model/binary_classification_result.py @@ -53,7 +53,24 @@ class BinaryClassificationResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + ("label",): { + "YES": "YES", + "NO": "NO", + "UNCLEAR": "UNCLEAR", + }, + ("source",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "EDGE": "EDGE", + }, + ("result_type",): { + "BINARY_CLASSIFICATION": "binary_classification", + }, + } validations = { ("confidence",): { @@ -160,7 +177,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ @@ -252,7 +269,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/bounding_box_result.py b/generated/groundlight_openapi_client/model/bounding_box_result.py index be4daaba..3c18763d 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_result.py +++ b/generated/groundlight_openapi_client/model/bounding_box_result.py @@ -53,7 +53,24 @@ class BoundingBoxResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + ("label",): { + "BOUNDING_BOX": "BOUNDING_BOX", + "GREATER_THAN_MAX": "GREATER_THAN_MAX", + "UNCLEAR": "UNCLEAR", + }, + ("source",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "EDGE": "EDGE", + }, + ("result_type",): { + "BOUNDING_BOX": "bounding_box", + }, + } validations = { ("confidence",): { @@ -160,7 +177,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "bounding_box" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ @@ -252,7 +269,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "bounding_box" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/condition.py b/generated/groundlight_openapi_client/model/condition.py index 65a2861f..6e12ea64 100644 --- a/generated/groundlight_openapi_client/model/condition.py +++ b/generated/groundlight_openapi_client/model/condition.py @@ -29,6 +29,12 @@ from groundlight_openapi_client.exceptions import ApiAttributeError +def lazy_import(): + from groundlight_openapi_client.model.verb_enum import VerbEnum + + globals()["VerbEnum"] = VerbEnum + + class Condition(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -63,6 +69,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return ( bool, date, @@ -87,8 +94,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - "verb": (str,), # noqa: E501 + "verb": (VerbEnum,), # noqa: E501 "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @@ -111,7 +119,7 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 """Condition - a model defined in OpenAPI Args: - verb (str): + verb (VerbEnum): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: @@ -201,7 +209,7 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 """Condition - a model defined in OpenAPI Args: - verb (str): + verb (VerbEnum): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: diff --git a/generated/groundlight_openapi_client/model/condition_request.py b/generated/groundlight_openapi_client/model/condition_request.py index 674578a6..3172892a 100644 --- a/generated/groundlight_openapi_client/model/condition_request.py +++ b/generated/groundlight_openapi_client/model/condition_request.py @@ -29,6 +29,12 @@ from groundlight_openapi_client.exceptions import ApiAttributeError +def lazy_import(): + from groundlight_openapi_client.model.verb_enum import VerbEnum + + globals()["VerbEnum"] = VerbEnum + + class ConditionRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -63,6 +69,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return ( bool, date, @@ -87,8 +94,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - "verb": (str,), # noqa: E501 + "verb": (VerbEnum,), # noqa: E501 "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @@ -111,7 +119,7 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 """ConditionRequest - a model defined in OpenAPI Args: - verb (str): + verb (VerbEnum): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: @@ -201,7 +209,7 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 """ConditionRequest - a model defined in OpenAPI Args: - verb (str): + verb (VerbEnum): parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Keyword Args: diff --git a/generated/groundlight_openapi_client/model/counting_result.py b/generated/groundlight_openapi_client/model/counting_result.py index 08d2f6db..9d7ff477 100644 --- a/generated/groundlight_openapi_client/model/counting_result.py +++ b/generated/groundlight_openapi_client/model/counting_result.py @@ -53,7 +53,19 @@ class CountingResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + ("source",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "EDGE": "EDGE", + }, + ("result_type",): { + "COUNTING": "counting", + }, + } validations = { ("count",): { @@ -168,7 +180,7 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501 from_edge (bool): [optional] # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ @@ -261,7 +273,7 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501 from_edge (bool): [optional] # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py index 2cde7991..04c6beb8 100644 --- a/generated/groundlight_openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -32,10 +32,14 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum + from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum + from groundlight_openapi_client.model.mode_enum import ModeEnum from groundlight_openapi_client.model.status_enum import StatusEnum globals()["BlankEnum"] = BlankEnum globals()["DetectorTypeEnum"] = DetectorTypeEnum + globals()["EscalationTypeEnum"] = EscalationTypeEnum + globals()["ModeEnum"] = ModeEnum globals()["StatusEnum"] = StatusEnum @@ -132,7 +136,17 @@ def openapi_types(): {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, ), # noqa: E501 - "mode": (str,), # noqa: E501 + "mode": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 "mode_configuration": ( {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, @@ -150,7 +164,17 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "escalation_type": (str,), # noqa: E501 + "escalation_type": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 } @cached_property @@ -201,7 +225,7 @@ def _from_openapi_data( query (str): A question about the image. group_name (str): Which group should this detector be part of? metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata about the detector. - mode (str): + mode (bool, date, datetime, dict, float, int, list, str, none_type): mode_configuration ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Keyword Args: @@ -238,7 +262,7 @@ def _from_openapi_data( confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (str): [optional] # noqa: E501 + escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -336,7 +360,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (str): [optional] # noqa: E501 + escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/escalation_type_enum.py b/generated/groundlight_openapi_client/model/escalation_type_enum.py index 2b80360e..d28cb1ed 100644 --- a/generated/groundlight_openapi_client/model/escalation_type_enum.py +++ b/generated/groundlight_openapi_client/model/escalation_type_enum.py @@ -102,10 +102,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + args[0] (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + value (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -194,10 +194,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + args[0] (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 + value (str): * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING., must be one of ["STANDARD", "NO_HUMAN_LABELING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/label_value.py b/generated/groundlight_openapi_client/model/label_value.py index ee9b73e9..d2981b5d 100644 --- a/generated/groundlight_openapi_client/model/label_value.py +++ b/generated/groundlight_openapi_client/model/label_value.py @@ -30,9 +30,13 @@ def lazy_import(): + from groundlight_openapi_client.model.annotations_requested_enum import AnnotationsRequestedEnum from groundlight_openapi_client.model.roi import ROI + from groundlight_openapi_client.model.source_enum import SourceEnum + globals()["AnnotationsRequestedEnum"] = AnnotationsRequestedEnum globals()["ROI"] = ROI + globals()["SourceEnum"] = SourceEnum class LabelValue(ModelNormal): @@ -104,13 +108,23 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "annotations_requested": ([str],), # noqa: E501 + "annotations_requested": ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 "created_at": (datetime,), # noqa: E501 "detector_id": ( int, none_type, ), # noqa: E501 - "source": (str,), # noqa: E501 + "source": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 "text": ( str, none_type, @@ -158,10 +172,10 @@ def _from_openapi_data( Args: confidence (float, none_type): class_name (str, none_type): Return a human-readable class name for this label (e.g. YES/NO) - annotations_requested ([str]): + annotations_requested ([bool, date, datetime, dict, float, int, list, str, none_type]): created_at (datetime): detector_id (int, none_type): - source (str): + source (bool, date, datetime, dict, float, int, list, str, none_type): text (str, none_type): Text annotations Keyword Args: diff --git a/generated/groundlight_openapi_client/model/multi_classification_result.py b/generated/groundlight_openapi_client/model/multi_classification_result.py index 798c1615..ddd68bd7 100644 --- a/generated/groundlight_openapi_client/model/multi_classification_result.py +++ b/generated/groundlight_openapi_client/model/multi_classification_result.py @@ -53,7 +53,19 @@ class MultiClassificationResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + ("source",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "EDGE": "EDGE", + }, + ("result_type",): { + "MULTI_CLASSIFICATION": "multi_classification", + }, + } validations = { ("confidence",): { @@ -160,7 +172,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "multi_classification" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ @@ -252,7 +264,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "multi_classification" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 7e7a5813..251cb75d 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -31,9 +31,11 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum + from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum from groundlight_openapi_client.model.status_enum import StatusEnum globals()["BlankEnum"] = BlankEnum + globals()["EscalationTypeEnum"] = EscalationTypeEnum globals()["StatusEnum"] = StatusEnum @@ -76,9 +78,6 @@ class PatchedDetectorRequest(ModelNormal): "inclusive_maximum": 3600, "inclusive_minimum": 0, }, - ("escalation_type",): { - "min_length": 1, - }, } @cached_property @@ -128,7 +127,17 @@ def openapi_types(): str, none_type, ), # noqa: E501 - "escalation_type": (str,), # noqa: E501 + "escalation_type": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 } @cached_property @@ -187,7 +196,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (str): [optional] # noqa: E501 + escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -276,7 +285,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501 patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501 status (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - escalation_type (str): [optional] # noqa: E501 + escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/source_enum.py b/generated/groundlight_openapi_client/model/source_enum.py index 8a2746ab..4addbc10 100644 --- a/generated/groundlight_openapi_client/model/source_enum.py +++ b/generated/groundlight_openapi_client/model/source_enum.py @@ -108,10 +108,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + args[0] (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + value (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +200,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + args[0] (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 + value (str): * `INITIAL_PLACEHOLDER` - InitialPlaceholder * `CLOUD` - HumanCloud * `CUST` - HumanCustomer * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble * `ALG` - Algorithm * `ALG_REC` - AlgorithmReconciled * `ALG_UNCLEAR` - AlgorithmUnclear * `EDGE` - EDGE., must be one of ["INITIAL_PLACEHOLDER", "CLOUD", "CUST", "HUMAN_CLOUD_ENSEMBLE", "ALG", "ALG_REC", "ALG_UNCLEAR", "EDGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/groundlight_openapi_client/model/text_recognition_result.py b/generated/groundlight_openapi_client/model/text_recognition_result.py index e0937650..25add8f1 100644 --- a/generated/groundlight_openapi_client/model/text_recognition_result.py +++ b/generated/groundlight_openapi_client/model/text_recognition_result.py @@ -53,7 +53,19 @@ class TextRecognitionResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + ("source",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "EDGE": "EDGE", + }, + ("result_type",): { + "TEXT_RECOGNITION": "text_recognition", + }, + } validations = { ("confidence",): { @@ -166,7 +178,7 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "text_recognition" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ @@ -260,7 +272,7 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) confidence (float, none_type): [optional] # noqa: E501 source (str): [optional] # noqa: E501 - result_type (str): [optional] # noqa: E501 + result_type (str): [optional] if omitted the server will use the default value of "text_recognition" # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ diff --git a/generated/groundlight_openapi_client/model/verb_enum.py b/generated/groundlight_openapi_client/model/verb_enum.py index 789dd77c..8d138449 100644 --- a/generated/groundlight_openapi_client/model/verb_enum.py +++ b/generated/groundlight_openapi_client/model/verb_enum.py @@ -105,10 +105,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + args[0] (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + value (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + args[0] (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 + value (str): * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME * `CHANGED_TO` - CHANGED_TO * `NO_CHANGE` - NO_CHANGE * `NO_QUERIES` - NO_QUERIES., must be one of ["ANSWERED_CONSECUTIVELY", "ANSWERED_WITHIN_TIME", "CHANGED_TO", "NO_CHANGE", "NO_QUERIES", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/generated/model.py b/generated/model.py index d93c1e7a..480c1e0d 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-03-31T22:10:29+00:00 +# timestamp: 2025-03-31T23:28:33+00:00 from __future__ import annotations @@ -11,6 +11,16 @@ from pydantic import AnyUrl, BaseModel, Field, RootModel, confloat, conint, constr +class AnnotationsRequestedEnum(str, Enum): + """ + * `BINARY_CLASSIFICATION` - Binary Classification + * `BOUNDING_BOXES` - Bounding Boxes + """ + + BINARY_CLASSIFICATION = "BINARY_CLASSIFICATION" + BOUNDING_BOXES = "BOUNDING_BOXES" + + class BBoxGeometry(BaseModel): """ Mixin for serializers to handle data in the StrictBaseModel format @@ -39,16 +49,6 @@ class BlankEnum(Enum): field_ = "" -class Condition(BaseModel): - verb: str - parameters: Dict[str, Any] - - -class ConditionRequest(BaseModel): - verb: str - parameters: Dict[str, Any] - - class DetectorGroup(BaseModel): id: str name: constr(max_length=100) @@ -76,6 +76,16 @@ class EdgeModelInfo(BaseModel): predictor_metadata: Optional[Any] = None +class EscalationTypeEnum(str, Enum): + """ + * `STANDARD` - STANDARD + * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING + """ + + STANDARD = "STANDARD" + NO_HUMAN_LABELING = "NO_HUMAN_LABELING" + + class ImageQueryTypeEnum(str, Enum): image_query = "image_query" @@ -151,6 +161,28 @@ class SnoozeTimeUnitEnum(str, Enum): SECONDS = "SECONDS" +class SourceEnum(str, Enum): + """ + * `INITIAL_PLACEHOLDER` - InitialPlaceholder + * `CLOUD` - HumanCloud + * `CUST` - HumanCustomer + * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble + * `ALG` - Algorithm + * `ALG_REC` - AlgorithmReconciled + * `ALG_UNCLEAR` - AlgorithmUnclear + * `EDGE` - EDGE + """ + + INITIAL_PLACEHOLDER = "INITIAL_PLACEHOLDER" + CLOUD = "CLOUD" + CUST = "CUST" + HUMAN_CLOUD_ENSEMBLE = "HUMAN_CLOUD_ENSEMBLE" + ALG = "ALG" + ALG_REC = "ALG_REC" + ALG_UNCLEAR = "ALG_UNCLEAR" + EDGE = "EDGE" + + class StatusEnum(str, Enum): """ * `ON` - ON @@ -161,6 +193,22 @@ class StatusEnum(str, Enum): OFF = "OFF" +class VerbEnum(str, Enum): + """ + * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY + * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME + * `CHANGED_TO` - CHANGED_TO + * `NO_CHANGE` - NO_CHANGE + * `NO_QUERIES` - NO_QUERIES + """ + + ANSWERED_CONSECUTIVELY = "ANSWERED_CONSECUTIVELY" + ANSWERED_WITHIN_TIME = "ANSWERED_WITHIN_TIME" + CHANGED_TO = "CHANGED_TO" + NO_CHANGE = "NO_CHANGE" + NO_QUERIES = "NO_QUERIES" + + class WebhookAction(BaseModel): url: AnyUrl include_image: Optional[bool] = None @@ -179,46 +227,87 @@ class WebhookActionRequest(BaseModel): last_failed_at: Optional[datetime] = None +class Source(str, Enum): + STILL_PROCESSING = "STILL_PROCESSING" + CLOUD = "CLOUD" + USER = "USER" + CLOUD_ENSEMBLE = "CLOUD_ENSEMBLE" + ALGORITHM = "ALGORITHM" + EDGE = "EDGE" + + +class ResultType(str, Enum): + binary_classification = "binary_classification" + + +class Label(str, Enum): + YES = "YES" + NO = "NO" + UNCLEAR = "UNCLEAR" + + class BinaryClassificationResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[str] = None - result_type: Optional[str] = None + source: Optional[Source] = None + result_type: Optional[ResultType] = None from_edge: Optional[bool] = None - label: str + label: Label + + +class ResultType2(str, Enum): + counting = "counting" class CountingResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[str] = None - result_type: Optional[str] = None + source: Optional[Source] = None + result_type: Optional[ResultType2] = None from_edge: Optional[bool] = None count: Optional[conint(ge=0)] = Field(...) greater_than_max: Optional[bool] = None +class ResultType3(str, Enum): + multi_classification = "multi_classification" + + class MultiClassificationResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[str] = None - result_type: Optional[str] = None + source: Optional[Source] = None + result_type: Optional[ResultType3] = None from_edge: Optional[bool] = None label: str +class ResultType4(str, Enum): + text_recognition = "text_recognition" + + class TextRecognitionResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[str] = None - result_type: Optional[str] = None + source: Optional[Source] = None + result_type: Optional[ResultType4] = None from_edge: Optional[bool] = None text: Optional[str] = Field(...) truncated: bool +class ResultType5(str, Enum): + bounding_box = "bounding_box" + + +class Label1(str, Enum): + BOUNDING_BOX = "BOUNDING_BOX" + GREATER_THAN_MAX = "GREATER_THAN_MAX" + UNCLEAR = "UNCLEAR" + + class BoundingBoxResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None - source: Optional[str] = None - result_type: Optional[str] = None + source: Optional[Source] = None + result_type: Optional[ResultType5] = None from_edge: Optional[bool] = None - label: str + label: Label1 class CountModeConfiguration(BaseModel): @@ -255,35 +344,6 @@ class ActionList(RootModel[List[Action]]): root: List[Action] -class AnnotationsRequestedEnum(str, Enum): - BINARY_CLASSIFICATION = "BINARY_CLASSIFICATION" - BOUNDING_BOXES = "BOUNDING_BOXES" - - -class EscalationTypeEnum(str, Enum): - STANDARD = "STANDARD" - NO_HUMAN_LABELING = "NO_HUMAN_LABELING" - - -class SourceEnum(str, Enum): - INITIAL_PLACEHOLDER = "INITIAL_PLACEHOLDER" - CLOUD = "CLOUD" - CUST = "CUST" - HUMAN_CLOUD_ENSEMBLE = "HUMAN_CLOUD_ENSEMBLE" - ALG = "ALG" - ALG_REC = "ALG_REC" - ALG_UNCLEAR = "ALG_UNCLEAR" - EDGE = "EDGE" - - -class VerbEnum(str, Enum): - ANSWERED_CONSECUTIVELY = "ANSWERED_CONSECUTIVELY" - ANSWERED_WITHIN_TIME = "ANSWERED_WITHIN_TIME" - CHANGED_TO = "CHANGED_TO" - NO_CHANGE = "NO_CHANGE" - NO_QUERIES = "NO_QUERIES" - - class AllNotes(BaseModel): """ Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices @@ -294,6 +354,16 @@ class AllNotes(BaseModel): GL: List[Note] +class Condition(BaseModel): + verb: VerbEnum + parameters: Dict[str, Any] + + +class ConditionRequest(BaseModel): + verb: VerbEnum + parameters: Dict[str, Any] + + class Detector(BaseModel): """ Groundlight Detectors provide answers to natural language questions about images. @@ -319,10 +389,16 @@ class Detector(BaseModel): 30.0, description="How long Groundlight will attempt to generate a confident prediction" ) metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the detector.") - mode: str + mode: ModeEnum mode_configuration: Optional[Dict[str, Any]] = Field(...) status: Optional[Union[StatusEnum, BlankEnum]] = None - escalation_type: Optional[str] = None + escalation_type: Optional[EscalationTypeEnum] = Field( + None, + description=( + "Category that define internal proccess for labeling image queries\n\n* `STANDARD` - STANDARD\n*" + " `NO_HUMAN_LABELING` - NO_HUMAN_LABELING" + ), + ) class DetectorCreationInputRequest(BaseModel): @@ -407,10 +483,10 @@ class LabelValue(BaseModel): ..., description="Return a human-readable class name for this label (e.g. YES/NO)" ) rois: Optional[List[ROI]] = None - annotations_requested: List[str] + annotations_requested: List[AnnotationsRequestedEnum] created_at: datetime detector_id: Optional[int] = Field(...) - source: str + source: SourceEnum text: Optional[str] = Field(..., description="Text annotations") @@ -456,7 +532,13 @@ class PatchedDetectorRequest(BaseModel): 30.0, description="How long Groundlight will attempt to generate a confident prediction" ) status: Optional[Union[StatusEnum, BlankEnum]] = None - escalation_type: Optional[constr(min_length=1)] = None + escalation_type: Optional[EscalationTypeEnum] = Field( + None, + description=( + "Category that define internal proccess for labeling image queries\n\n* `STANDARD` - STANDARD\n*" + " `NO_HUMAN_LABELING` - NO_HUMAN_LABELING" + ), + ) class Rule(BaseModel): diff --git a/spec/public-api.yaml b/spec/public-api.yaml index 64cc8f66..1859dbf0 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -756,6 +756,14 @@ components: required: - CUSTOMER - GL + AnnotationsRequestedEnum: + enum: + - BINARY_CLASSIFICATION + - BOUNDING_BOXES + type: string + description: |- + * `BINARY_CLASSIFICATION` - Binary Classification + * `BOUNDING_BOXES` - Bounding Boxes BBoxGeometry: type: object description: Mixin for serializers to handle data in the StrictBaseModel format @@ -815,7 +823,7 @@ components: type: object properties: verb: - type: string + $ref: '#/components/schemas/VerbEnum' parameters: type: object additionalProperties: {} @@ -826,7 +834,7 @@ components: type: object properties: verb: - type: string + $ref: '#/components/schemas/VerbEnum' parameters: type: object additionalProperties: {} @@ -890,7 +898,8 @@ components: readOnly: true description: Metadata about the detector. mode: - type: string + allOf: + - $ref: '#/components/schemas/ModeEnum' readOnly: true mode_configuration: type: object @@ -902,7 +911,13 @@ components: - $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: - type: string + allOf: + - $ref: '#/components/schemas/EscalationTypeEnum' + description: |- + Category that define internal proccess for labeling image queries + + * `STANDARD` - STANDARD + * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING required: - created_at - group_name @@ -1025,6 +1040,14 @@ components: pipeline_config: {} oodd_pipeline_config: {} predictor_metadata: {} + EscalationTypeEnum: + enum: + - STANDARD + - NO_HUMAN_LABELING + type: string + description: |- + * `STANDARD` - STANDARD + * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING ImageQuery: type: object description: ImageQuery objects are the answers to natural language questions @@ -1138,7 +1161,13 @@ components: annotations_requested: type: array items: - type: string + allOf: + - $ref: '#/components/schemas/AnnotationsRequestedEnum' + description: |- + The type of annotation requested + + * `BINARY_CLASSIFICATION` - Binary Classification + * `BOUNDING_BOXES` - Bounding Boxes readOnly: true created_at: type: string @@ -1149,7 +1178,8 @@ components: nullable: true readOnly: true source: - type: string + allOf: + - $ref: '#/components/schemas/SourceEnum' readOnly: true text: type: string @@ -1184,13 +1214,13 @@ components: - image_query_id - label ModeEnum: - type: string enum: - BINARY - COUNT - MULTI_CLASS - TEXT - BOUNDING_BOX + type: string Note: type: object properties: @@ -1324,8 +1354,13 @@ components: - $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: - type: string - minLength: 1 + allOf: + - $ref: '#/components/schemas/EscalationTypeEnum' + description: |- + Category that define internal proccess for labeling image queries + + * `STANDARD` - STANDARD + * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING x-internal: true PayloadTemplate: type: object @@ -1489,6 +1524,26 @@ components: * `HOURS` - HOURS * `MINUTES` - MINUTES * `SECONDS` - SECONDS + SourceEnum: + enum: + - INITIAL_PLACEHOLDER + - CLOUD + - CUST + - HUMAN_CLOUD_ENSEMBLE + - ALG + - ALG_REC + - ALG_UNCLEAR + - EDGE + type: string + description: |- + * `INITIAL_PLACEHOLDER` - InitialPlaceholder + * `CLOUD` - HumanCloud + * `CUST` - HumanCustomer + * `HUMAN_CLOUD_ENSEMBLE` - HumanCloudEnsemble + * `ALG` - Algorithm + * `ALG_REC` - AlgorithmReconciled + * `ALG_UNCLEAR` - AlgorithmUnclear + * `EDGE` - EDGE StatusEnum: enum: - 'ON' @@ -1497,6 +1552,20 @@ components: description: |- * `ON` - ON * `OFF` - OFF + VerbEnum: + enum: + - ANSWERED_CONSECUTIVELY + - ANSWERED_WITHIN_TIME + - CHANGED_TO + - NO_CHANGE + - NO_QUERIES + type: string + description: |- + * `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY + * `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME + * `CHANGED_TO` - CHANGED_TO + * `NO_CHANGE` - NO_CHANGE + * `NO_QUERIES` - NO_QUERIES WebhookAction: type: object properties: @@ -1557,12 +1626,25 @@ components: nullable: true source: type: string + enum: + - STILL_PROCESSING + - CLOUD + - USER + - CLOUD_ENSEMBLE + - ALGORITHM + - EDGE result_type: type: string + enum: + - binary_classification from_edge: type: boolean label: type: string + enum: + - 'YES' + - 'NO' + - UNCLEAR required: - label CountingResult: @@ -1576,8 +1658,17 @@ components: nullable: true source: type: string + enum: + - STILL_PROCESSING + - CLOUD + - USER + - CLOUD_ENSEMBLE + - ALGORITHM + - EDGE result_type: type: string + enum: + - counting from_edge: type: boolean count: @@ -1599,8 +1690,17 @@ components: nullable: true source: type: string + enum: + - STILL_PROCESSING + - CLOUD + - USER + - CLOUD_ENSEMBLE + - ALGORITHM + - EDGE result_type: type: string + enum: + - multi_classification from_edge: type: boolean label: @@ -1619,8 +1719,17 @@ components: nullable: true source: type: string + enum: + - STILL_PROCESSING + - CLOUD + - USER + - CLOUD_ENSEMBLE + - ALGORITHM + - EDGE result_type: type: string + enum: + - text_recognition from_edge: type: boolean text: @@ -1642,12 +1751,25 @@ components: nullable: true source: type: string + enum: + - STILL_PROCESSING + - CLOUD + - USER + - CLOUD_ENSEMBLE + - ALGORITHM + - EDGE result_type: type: string + enum: + - bounding_box from_edge: type: boolean label: type: string + enum: + - BOUNDING_BOX + - GREATER_THAN_MAX + - UNCLEAR required: - label CountModeConfiguration: @@ -1719,35 +1841,6 @@ components: type: array items: $ref: '#/components/schemas/Action' - AnnotationsRequestedEnum: - type: string - enum: - - BINARY_CLASSIFICATION - - BOUNDING_BOXES - EscalationTypeEnum: - type: string - enum: - - STANDARD - - NO_HUMAN_LABELING - SourceEnum: - type: string - enum: - - INITIAL_PLACEHOLDER - - CLOUD - - CUST - - HUMAN_CLOUD_ENSEMBLE - - ALG - - ALG_REC - - ALG_UNCLEAR - - EDGE - VerbEnum: - type: string - enum: - - ANSWERED_CONSECUTIVELY - - ANSWERED_WITHIN_TIME - - CHANGED_TO - - NO_CHANGE - - NO_QUERIES securitySchemes: ApiToken: name: x-api-token @@ -1761,4 +1854,4 @@ servers: - url: https://device.positronix.ai/device-api description: Device Prod - url: https://device.integ.positronix.ai/device-api - description: Device Integ + description: Device Integ \ No newline at end of file