Skip to content

Commit 12152c7

Browse files
committed
Merge branch 'main' into edge-answers-with-wait-time
2 parents b69b244 + f8d89aa commit 12152c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2257
-147
lines changed

docs/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/.openapi-generator/FILES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ docs/DetectorGroupsApi.md
2222
docs/DetectorResetApi.md
2323
docs/DetectorTypeEnum.md
2424
docs/DetectorsApi.md
25+
docs/EdgeApi.md
26+
docs/EdgeModelInfo.md
2527
docs/EscalationTypeEnum.md
2628
docs/ImageQueriesApi.md
2729
docs/ImageQuery.md
@@ -48,15 +50,19 @@ docs/RuleRequest.md
4850
docs/SnoozeTimeUnitEnum.md
4951
docs/SourceEnum.md
5052
docs/StatusEnum.md
53+
docs/TextRecognitionResult.md
5154
docs/UserApi.md
5255
docs/VerbEnum.md
56+
docs/WebhookAction.md
57+
docs/WebhookActionRequest.md
5358
git_push.sh
5459
groundlight_openapi_client/__init__.py
5560
groundlight_openapi_client/api/__init__.py
5661
groundlight_openapi_client/api/actions_api.py
5762
groundlight_openapi_client/api/detector_groups_api.py
5863
groundlight_openapi_client/api/detector_reset_api.py
5964
groundlight_openapi_client/api/detectors_api.py
65+
groundlight_openapi_client/api/edge_api.py
6066
groundlight_openapi_client/api/image_queries_api.py
6167
groundlight_openapi_client/api/labels_api.py
6268
groundlight_openapi_client/api/notes_api.py
@@ -84,6 +90,7 @@ groundlight_openapi_client/model/detector_creation_input_request.py
8490
groundlight_openapi_client/model/detector_group.py
8591
groundlight_openapi_client/model/detector_group_request.py
8692
groundlight_openapi_client/model/detector_type_enum.py
93+
groundlight_openapi_client/model/edge_model_info.py
8794
groundlight_openapi_client/model/escalation_type_enum.py
8895
groundlight_openapi_client/model/image_query.py
8996
groundlight_openapi_client/model/image_query_type_enum.py
@@ -107,7 +114,10 @@ groundlight_openapi_client/model/rule_request.py
107114
groundlight_openapi_client/model/snooze_time_unit_enum.py
108115
groundlight_openapi_client/model/source_enum.py
109116
groundlight_openapi_client/model/status_enum.py
117+
groundlight_openapi_client/model/text_recognition_result.py
110118
groundlight_openapi_client/model/verb_enum.py
119+
groundlight_openapi_client/model/webhook_action.py
120+
groundlight_openapi_client/model/webhook_action_request.py
111121
groundlight_openapi_client/model_utils.py
112122
groundlight_openapi_client/models/__init__.py
113123
groundlight_openapi_client/rest.py

generated/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ rule_request = RuleRequest(
9090
},
9191
),
9292
action=None,
93+
webhook_action=[
94+
WebhookActionRequest(
95+
url="url_example",
96+
include_image=True,
97+
),
98+
],
9399
) # RuleRequest |
94100

95101
try:
@@ -118,6 +124,7 @@ Class | Method | HTTP request | Description
118124
*DetectorsApi* | [**get_detector**](docs/DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
119125
*DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
120126
*DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |
127+
*EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
121128
*ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image |
122129
*ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} |
123130
*ImageQueriesApi* | [**list_image_queries**](docs/ImageQueriesApi.md#list_image_queries) | **GET** /v1/image-queries |
@@ -148,6 +155,7 @@ Class | Method | HTTP request | Description
148155
- [DetectorGroup](docs/DetectorGroup.md)
149156
- [DetectorGroupRequest](docs/DetectorGroupRequest.md)
150157
- [DetectorTypeEnum](docs/DetectorTypeEnum.md)
158+
- [EdgeModelInfo](docs/EdgeModelInfo.md)
151159
- [EscalationTypeEnum](docs/EscalationTypeEnum.md)
152160
- [ImageQuery](docs/ImageQuery.md)
153161
- [ImageQueryTypeEnum](docs/ImageQueryTypeEnum.md)
@@ -171,7 +179,10 @@ Class | Method | HTTP request | Description
171179
- [SnoozeTimeUnitEnum](docs/SnoozeTimeUnitEnum.md)
172180
- [SourceEnum](docs/SourceEnum.md)
173181
- [StatusEnum](docs/StatusEnum.md)
182+
- [TextRecognitionResult](docs/TextRecognitionResult.md)
174183
- [VerbEnum](docs/VerbEnum.md)
184+
- [WebhookAction](docs/WebhookAction.md)
185+
- [WebhookActionRequest](docs/WebhookActionRequest.md)
175186

176187

177188
## Documentation For Authorization

generated/docs/ActionsApi.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
6565
},
6666
),
6767
action=None,
68+
webhook_action=[
69+
WebhookActionRequest(
70+
url="url_example",
71+
include_image=True,
72+
),
73+
],
6874
) # RuleRequest |
6975

7076
# example passing only required values which don't have defaults set
@@ -296,13 +302,23 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
296302
# Create an instance of the API class
297303
api_instance = actions_api.ActionsApi(api_client)
298304
detector_id = "detector_id_example" # str |
305+
page = 1 # int | A page number within the paginated result set. (optional)
306+
page_size = 1 # int | Number of results to return per page. (optional)
299307

300308
# example passing only required values which don't have defaults set
301309
try:
302310
api_response = api_instance.list_detector_rules(detector_id)
303311
pprint(api_response)
304312
except groundlight_openapi_client.ApiException as e:
305313
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)
314+
315+
# example passing only required values which don't have defaults set
316+
# and optional values
317+
try:
318+
api_response = api_instance.list_detector_rules(detector_id, page=page, page_size=page_size)
319+
pprint(api_response)
320+
except groundlight_openapi_client.ApiException as e:
321+
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)
306322
```
307323

308324

@@ -311,6 +327,8 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
311327
Name | Type | Description | Notes
312328
------------- | ------------- | ------------- | -------------
313329
**detector_id** | **str**| |
330+
**page** | **int**| A page number within the paginated result set. | [optional]
331+
**page_size** | **int**| Number of results to return per page. | [optional]
314332

315333
### Return type
316334

generated/docs/BinaryClassificationResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**label** | **str** | |
8-
**confidence** | **float** | | [optional]
8+
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
1010
**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]
1111

generated/docs/CountingResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**count** | **int, none_type** | |
8-
**confidence** | **float** | | [optional]
8+
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
1010
**greater_than_max** | **bool** | | [optional]
1111
**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]

generated/docs/Detector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Detector
22

3-
Spec for serializing a detector object in the public API.
3+
Groundlight Detectors provide answers to natural language questions about images. Each detector can answer a single question, and multiple detectors can be strung together for more complex logic. Detectors can be created through the create_detector method, or through the create_[MODE]_detector methods for pro tier users
44

55
## Properties
66
Name | Type | Description | Notes

generated/docs/DetectorCreationInputRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**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
1313
**pipeline_config** | **str, none_type** | (Advanced usage) Configuration needed to instantiate a prediction pipeline. | [optional]
1414
**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]
15-
**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 | [optional]
15+
**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]
1616
**mode_configuration** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
1717
**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]
1818

generated/docs/EdgeApi.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# groundlight_openapi_client.EdgeApi
2+
3+
All URIs are relative to *https://api.groundlight.ai/device-api*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
8+
9+
10+
# **get_model_urls**
11+
> EdgeModelInfo get_model_urls(detector_id)
12+
13+
14+
15+
Gets time limited pre-authenticated URLs to download a detector's edge model and oodd model.
16+
17+
### Example
18+
19+
* Api Key Authentication (ApiToken):
20+
21+
```python
22+
import time
23+
import groundlight_openapi_client
24+
from groundlight_openapi_client.api import edge_api
25+
from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo
26+
from pprint import pprint
27+
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
28+
# See configuration.py for a list of all supported configuration parameters.
29+
configuration = groundlight_openapi_client.Configuration(
30+
host = "https://api.groundlight.ai/device-api"
31+
)
32+
33+
# The client must configure the authentication and authorization parameters
34+
# in accordance with the API server security policy.
35+
# Examples for each auth method are provided below, use the example that
36+
# satisfies your auth use case.
37+
38+
# Configure API key authorization: ApiToken
39+
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
40+
41+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
42+
# configuration.api_key_prefix['ApiToken'] = 'Bearer'
43+
44+
# Enter a context with an instance of the API client
45+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
46+
# Create an instance of the API class
47+
api_instance = edge_api.EdgeApi(api_client)
48+
detector_id = "detector_id_example" # str |
49+
50+
# example passing only required values which don't have defaults set
51+
try:
52+
api_response = api_instance.get_model_urls(detector_id)
53+
pprint(api_response)
54+
except groundlight_openapi_client.ApiException as e:
55+
print("Exception when calling EdgeApi->get_model_urls: %s\n" % e)
56+
```
57+
58+
59+
### Parameters
60+
61+
Name | Type | Description | Notes
62+
------------- | ------------- | ------------- | -------------
63+
**detector_id** | **str**| |
64+
65+
### Return type
66+
67+
[**EdgeModelInfo**](EdgeModelInfo.md)
68+
69+
### Authorization
70+
71+
[ApiToken](../README.md#ApiToken)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: Not defined
76+
- **Accept**: application/json
77+
78+
79+
### HTTP response details
80+
81+
| Status code | Description | Response headers |
82+
|-------------|-------------|------------------|
83+
**200** | | - |
84+
85+
[[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)
86+

generated/docs/EdgeModelInfo.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EdgeModelInfo
2+
3+
Information for the model running on edge, including temporary presigned urls to the model binaries
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**model_binary_id** | **str** | | [optional]
9+
**model_binary_url** | **str** | | [optional]
10+
**oodd_model_binary_id** | **str** | | [optional]
11+
**oodd_model_binary_url** | **str** | | [optional]
12+
**pipeline_config** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
13+
**oodd_pipeline_config** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
14+
**predictor_metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
15+
**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]
16+
17+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18+
19+

0 commit comments

Comments
 (0)