Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ docs/DetectorCreationInputRequest.md
docs/DetectorGroup.md
docs/DetectorGroupRequest.md
docs/DetectorGroupsApi.md
docs/DetectorResetApi.md
docs/DetectorTypeEnum.md
docs/DetectorsApi.md
docs/ImageQueriesApi.md
Expand All @@ -30,6 +31,7 @@ docs/LabelValueRequest.md
docs/LabelsApi.md
docs/ModeEnum.md
docs/Note.md
docs/NoteRequest.md
docs/NotesApi.md
docs/PaginatedDetectorList.md
docs/PaginatedImageQueryList.md
Expand All @@ -48,6 +50,7 @@ groundlight_openapi_client/__init__.py
groundlight_openapi_client/api/__init__.py
groundlight_openapi_client/api/actions_api.py
groundlight_openapi_client/api/detector_groups_api.py
groundlight_openapi_client/api/detector_reset_api.py
groundlight_openapi_client/api/detectors_api.py
groundlight_openapi_client/api/image_queries_api.py
groundlight_openapi_client/api/labels_api.py
Expand Down Expand Up @@ -81,6 +84,7 @@ groundlight_openapi_client/model/label_value.py
groundlight_openapi_client/model/label_value_request.py
groundlight_openapi_client/model/mode_enum.py
groundlight_openapi_client/model/note.py
groundlight_openapi_client/model/note_request.py
groundlight_openapi_client/model/paginated_detector_list.py
groundlight_openapi_client/model/paginated_image_query_list.py
groundlight_openapi_client/model/paginated_rule_list.py
Expand All @@ -100,4 +104,5 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_detector_reset_api.py
tox.ini
2 changes: 2 additions & 0 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
*ActionsApi* | [**list_rules**](docs/ActionsApi.md#list_rules) | **GET** /v1/actions/rules |
*DetectorGroupsApi* | [**create_detector_group**](docs/DetectorGroupsApi.md#create_detector_group) | **POST** /v1/detector-groups |
*DetectorGroupsApi* | [**get_detector_groups**](docs/DetectorGroupsApi.md#get_detector_groups) | **GET** /v1/detector-groups |
*DetectorResetApi* | [**reset_detector**](docs/DetectorResetApi.md#reset_detector) | **DELETE** /v1/detector-reset/{id} |
*DetectorsApi* | [**create_detector**](docs/DetectorsApi.md#create_detector) | **POST** /v1/detectors |
*DetectorsApi* | [**create_detector_group2**](docs/DetectorsApi.md#create_detector_group2) | **POST** /v1/detectors/detector-groups |
*DetectorsApi* | [**delete_detector**](docs/DetectorsApi.md#delete_detector) | **DELETE** /v1/detectors/{id} |
Expand Down Expand Up @@ -157,6 +158,7 @@ Class | Method | HTTP request | Description
- [LabelValueRequest](docs/LabelValueRequest.md)
- [ModeEnum](docs/ModeEnum.md)
- [Note](docs/Note.md)
- [NoteRequest](docs/NoteRequest.md)
- [PaginatedDetectorList](docs/PaginatedDetectorList.md)
- [PaginatedImageQueryList](docs/PaginatedImageQueryList.md)
- [PaginatedRuleList](docs/PaginatedRuleList.md)
Expand Down
2 changes: 1 addition & 1 deletion generated/docs/Detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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
Expand Down
84 changes: 84 additions & 0 deletions generated/docs/DetectorResetApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# groundlight_openapi_client.DetectorResetApi

All URIs are relative to *https://api.groundlight.ai/device-api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**reset_detector**](DetectorResetApi.md#reset_detector) | **DELETE** /v1/detector-reset/{id} |


# **reset_detector**
> reset_detector(id)



Deletes all image queries on the detector

### Example

* Api Key Authentication (ApiToken):

```python
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import detector_reset_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 = detector_reset_api.DetectorResetApi(api_client)
id = "id_example" # str |

# example passing only required values which don't have defaults set
try:
api_instance.reset_detector(id)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorResetApi->reset_detector: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |

### 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 |
|-------------|-------------|------------------|
**204** | 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)

3 changes: 1 addition & 2 deletions generated/docs/ModeEnum.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# ModeEnum

* `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS | must be one of ["BINARY", "COUNT", "MULTI_CLASS", ]
**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", ]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions generated/docs/NoteRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **str** | Text content of the note. |
**image** | **file_type, 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)
Expand Down
23 changes: 9 additions & 14 deletions generated/docs/NotesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Method | HTTP request | Description


# **create_note**
> create_note(detector_id, content)
> create_note(detector_id, note_request)



Expand All @@ -23,6 +23,7 @@ Create a new note
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import notes_api
from groundlight_openapi_client.model.note_request import NoteRequest
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.
Expand All @@ -46,19 +47,14 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = notes_api.NotesApi(api_client)
detector_id = "detector_id_example" # str | the detector to associate the new note with
content = "content_example" # str | Text content of the note.
image = open('/path/to/file', 'rb') # file_type, none_type | (optional)
note_request = NoteRequest(
content="content_example",
image=open('/path/to/file', 'rb'),
) # NoteRequest |

# example passing only required values which don't have defaults set
try:
api_instance.create_note(detector_id, content)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling NotesApi->create_note: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
api_instance.create_note(detector_id, content, image=image)
api_instance.create_note(detector_id, note_request)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling NotesApi->create_note: %s\n" % e)
```
Expand All @@ -69,8 +65,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| the detector to associate the new note with |
**content** | **str**| Text content of the note. |
**image** | **file_type, none_type**| | [optional]
**note_request** | [**NoteRequest**](NoteRequest.md)| |

### Return type

Expand All @@ -82,7 +77,7 @@ void (empty response body)

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
- **Accept**: Not defined


Expand Down
134 changes: 134 additions & 0 deletions generated/groundlight_openapi_client/api/detector_reset_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
"""
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.15.3
Contact: support@groundlight.ai
Generated by: https://openapi-generator.tech
"""

import re # noqa: F401
import sys # noqa: F401

from groundlight_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
from groundlight_openapi_client.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types,
)


class DetectorResetApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.reset_detector_endpoint = _Endpoint(
settings={
"response_type": None,
"auth": ["ApiToken"],
"endpoint_path": "/v1/detector-reset/{id}",
"operation_id": "reset_detector",
"http_method": "DELETE",
"servers": None,
},
params_map={
"all": [
"id",
],
"required": [
"id",
],
"nullable": [],
"enum": [],
"validation": [],
},
root_map={
"validations": {},
"allowed_values": {},
"openapi_types": {
"id": (str,),
},
"attribute_map": {
"id": "id",
},
"location_map": {
"id": "path",
},
"collection_format_map": {},
},
headers_map={
"accept": [],
"content_type": [],
},
api_client=api_client,
)

def reset_detector(self, id, **kwargs):
"""reset_detector # noqa: E501

Deletes all image queries on the detector # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.reset_detector(id, async_req=True)
>>> result = thread.get()

Args:
id (str):

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")
kwargs["id"] = id
return self.reset_detector_endpoint.call_with_http_info(**kwargs)
Loading