hindsight-client 0.0.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hindsight_client/__init__.py +26 -0
- hindsight_client/hindsight_client.py +432 -0
- hindsight_client-0.0.13.dist-info/METADATA +56 -0
- hindsight_client-0.0.13.dist-info/RECORD +134 -0
- hindsight_client-0.0.13.dist-info/WHEEL +4 -0
- hindsight_client_api/__init__.py +126 -0
- hindsight_client_api/api/__init__.py +6 -0
- hindsight_client_api/api/default_api.py +5976 -0
- hindsight_client_api/api/monitoring_api.py +281 -0
- hindsight_client_api/api_client.py +807 -0
- hindsight_client_api/api_response.py +21 -0
- hindsight_client_api/configuration.py +572 -0
- hindsight_client_api/docs/AddBackgroundRequest.md +31 -0
- hindsight_client_api/docs/BackgroundResponse.md +31 -0
- hindsight_client_api/docs/BankListItem.md +35 -0
- hindsight_client_api/docs/BankListResponse.md +30 -0
- hindsight_client_api/docs/BankProfileResponse.md +33 -0
- hindsight_client_api/docs/Budget.md +15 -0
- hindsight_client_api/docs/ChunkData.md +33 -0
- hindsight_client_api/docs/ChunkIncludeOptions.md +30 -0
- hindsight_client_api/docs/ChunkResponse.md +35 -0
- hindsight_client_api/docs/CreateBankRequest.md +32 -0
- hindsight_client_api/docs/DefaultApi.md +1569 -0
- hindsight_client_api/docs/DeleteResponse.md +30 -0
- hindsight_client_api/docs/DocumentResponse.md +36 -0
- hindsight_client_api/docs/EntityDetailResponse.md +36 -0
- hindsight_client_api/docs/EntityIncludeOptions.md +30 -0
- hindsight_client_api/docs/EntityListItem.md +35 -0
- hindsight_client_api/docs/EntityListResponse.md +30 -0
- hindsight_client_api/docs/EntityObservationResponse.md +31 -0
- hindsight_client_api/docs/EntityStateResponse.md +32 -0
- hindsight_client_api/docs/GraphDataResponse.md +33 -0
- hindsight_client_api/docs/HTTPValidationError.md +29 -0
- hindsight_client_api/docs/IncludeOptions.md +31 -0
- hindsight_client_api/docs/ListDocumentsResponse.md +33 -0
- hindsight_client_api/docs/ListMemoryUnitsResponse.md +33 -0
- hindsight_client_api/docs/MemoryItem.md +34 -0
- hindsight_client_api/docs/MetadataFilter.md +32 -0
- hindsight_client_api/docs/MonitoringApi.md +72 -0
- hindsight_client_api/docs/PersonalityTraits.md +35 -0
- hindsight_client_api/docs/RecallRequest.md +37 -0
- hindsight_client_api/docs/RecallResponse.md +33 -0
- hindsight_client_api/docs/RecallResult.md +40 -0
- hindsight_client_api/docs/ReflectFact.md +35 -0
- hindsight_client_api/docs/ReflectIncludeOptions.md +30 -0
- hindsight_client_api/docs/ReflectRequest.md +34 -0
- hindsight_client_api/docs/ReflectResponse.md +31 -0
- hindsight_client_api/docs/RetainRequest.md +31 -0
- hindsight_client_api/docs/RetainResponse.md +33 -0
- hindsight_client_api/docs/UpdatePersonalityRequest.md +30 -0
- hindsight_client_api/docs/ValidationError.md +31 -0
- hindsight_client_api/docs/ValidationErrorLocInner.md +28 -0
- hindsight_client_api/exceptions.py +219 -0
- hindsight_client_api/models/__init__.py +54 -0
- hindsight_client_api/models/add_background_request.py +89 -0
- hindsight_client_api/models/background_response.py +98 -0
- hindsight_client_api/models/bank_list_item.py +111 -0
- hindsight_client_api/models/bank_list_response.py +95 -0
- hindsight_client_api/models/bank_profile_response.py +97 -0
- hindsight_client_api/models/budget.py +38 -0
- hindsight_client_api/models/chunk_data.py +93 -0
- hindsight_client_api/models/chunk_include_options.py +87 -0
- hindsight_client_api/models/chunk_response.py +97 -0
- hindsight_client_api/models/create_bank_request.py +110 -0
- hindsight_client_api/models/delete_response.py +87 -0
- hindsight_client_api/models/document_response.py +104 -0
- hindsight_client_api/models/entity_detail_response.py +122 -0
- hindsight_client_api/models/entity_include_options.py +87 -0
- hindsight_client_api/models/entity_list_item.py +112 -0
- hindsight_client_api/models/entity_list_response.py +95 -0
- hindsight_client_api/models/entity_observation_response.py +94 -0
- hindsight_client_api/models/entity_state_response.py +99 -0
- hindsight_client_api/models/graph_data_response.py +93 -0
- hindsight_client_api/models/http_validation_error.py +95 -0
- hindsight_client_api/models/include_options.py +107 -0
- hindsight_client_api/models/list_documents_response.py +93 -0
- hindsight_client_api/models/list_memory_units_response.py +93 -0
- hindsight_client_api/models/memory_item.py +116 -0
- hindsight_client_api/models/metadata_filter.py +96 -0
- hindsight_client_api/models/personality_traits.py +98 -0
- hindsight_client_api/models/recall_request.py +129 -0
- hindsight_client_api/models/recall_response.py +142 -0
- hindsight_client_api/models/recall_result.py +152 -0
- hindsight_client_api/models/reflect_fact.py +122 -0
- hindsight_client_api/models/reflect_include_options.py +87 -0
- hindsight_client_api/models/reflect_request.py +118 -0
- hindsight_client_api/models/reflect_response.py +97 -0
- hindsight_client_api/models/retain_request.py +97 -0
- hindsight_client_api/models/retain_response.py +93 -0
- hindsight_client_api/models/update_personality_request.py +91 -0
- hindsight_client_api/models/validation_error.py +99 -0
- hindsight_client_api/models/validation_error_loc_inner.py +138 -0
- hindsight_client_api/rest.py +213 -0
- hindsight_client_api/test/__init__.py +0 -0
- hindsight_client_api/test/test_add_background_request.py +53 -0
- hindsight_client_api/test/test_background_response.py +53 -0
- hindsight_client_api/test/test_bank_list_item.py +60 -0
- hindsight_client_api/test/test_bank_list_response.py +68 -0
- hindsight_client_api/test/test_bank_profile_response.py +58 -0
- hindsight_client_api/test/test_budget.py +33 -0
- hindsight_client_api/test/test_chunk_data.py +57 -0
- hindsight_client_api/test/test_chunk_include_options.py +51 -0
- hindsight_client_api/test/test_chunk_response.py +62 -0
- hindsight_client_api/test/test_create_bank_request.py +53 -0
- hindsight_client_api/test/test_default_api.py +178 -0
- hindsight_client_api/test/test_delete_response.py +52 -0
- hindsight_client_api/test/test_document_response.py +64 -0
- hindsight_client_api/test/test_entity_detail_response.py +71 -0
- hindsight_client_api/test/test_entity_include_options.py +51 -0
- hindsight_client_api/test/test_entity_list_item.py +61 -0
- hindsight_client_api/test/test_entity_list_response.py +56 -0
- hindsight_client_api/test/test_entity_observation_response.py +53 -0
- hindsight_client_api/test/test_entity_state_response.py +64 -0
- hindsight_client_api/test/test_graph_data_response.py +82 -0
- hindsight_client_api/test/test_http_validation_error.py +58 -0
- hindsight_client_api/test/test_include_options.py +54 -0
- hindsight_client_api/test/test_list_documents_response.py +66 -0
- hindsight_client_api/test/test_list_memory_units_response.py +66 -0
- hindsight_client_api/test/test_memory_item.py +58 -0
- hindsight_client_api/test/test_metadata_filter.py +54 -0
- hindsight_client_api/test/test_monitoring_api.py +38 -0
- hindsight_client_api/test/test_personality_traits.py +62 -0
- hindsight_client_api/test/test_recall_request.py +67 -0
- hindsight_client_api/test/test_recall_response.py +76 -0
- hindsight_client_api/test/test_recall_result.py +67 -0
- hindsight_client_api/test/test_reflect_fact.py +57 -0
- hindsight_client_api/test/test_reflect_include_options.py +51 -0
- hindsight_client_api/test/test_reflect_request.py +59 -0
- hindsight_client_api/test/test_reflect_response.py +55 -0
- hindsight_client_api/test/test_retain_request.py +57 -0
- hindsight_client_api/test/test_retain_response.py +58 -0
- hindsight_client_api/test/test_update_personality_request.py +52 -0
- hindsight_client_api/test/test_validation_error.py +60 -0
- hindsight_client_api/test/test_validation_error_loc_inner.py +50 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# RecallResult
|
|
2
|
+
|
|
3
|
+
Single recall result item.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **str** | |
|
|
10
|
+
**text** | **str** | |
|
|
11
|
+
**type** | **str** | | [optional]
|
|
12
|
+
**entities** | **List[str]** | | [optional]
|
|
13
|
+
**context** | **str** | | [optional]
|
|
14
|
+
**occurred_start** | **str** | | [optional]
|
|
15
|
+
**occurred_end** | **str** | | [optional]
|
|
16
|
+
**mentioned_at** | **str** | | [optional]
|
|
17
|
+
**document_id** | **str** | | [optional]
|
|
18
|
+
**metadata** | **Dict[str, str]** | | [optional]
|
|
19
|
+
**chunk_id** | **str** | | [optional]
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from hindsight_client_api.models.recall_result import RecallResult
|
|
25
|
+
|
|
26
|
+
# TODO update the JSON string below
|
|
27
|
+
json = "{}"
|
|
28
|
+
# create an instance of RecallResult from a JSON string
|
|
29
|
+
recall_result_instance = RecallResult.from_json(json)
|
|
30
|
+
# print the JSON string representation of the object
|
|
31
|
+
print(RecallResult.to_json())
|
|
32
|
+
|
|
33
|
+
# convert the object into a dict
|
|
34
|
+
recall_result_dict = recall_result_instance.to_dict()
|
|
35
|
+
# create an instance of RecallResult from a dict
|
|
36
|
+
recall_result_from_dict = RecallResult.from_dict(recall_result_dict)
|
|
37
|
+
```
|
|
38
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ReflectFact
|
|
2
|
+
|
|
3
|
+
A fact used in think response.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **str** | | [optional]
|
|
10
|
+
**text** | **str** | |
|
|
11
|
+
**type** | **str** | | [optional]
|
|
12
|
+
**context** | **str** | | [optional]
|
|
13
|
+
**occurred_start** | **str** | | [optional]
|
|
14
|
+
**occurred_end** | **str** | | [optional]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from hindsight_client_api.models.reflect_fact import ReflectFact
|
|
20
|
+
|
|
21
|
+
# TODO update the JSON string below
|
|
22
|
+
json = "{}"
|
|
23
|
+
# create an instance of ReflectFact from a JSON string
|
|
24
|
+
reflect_fact_instance = ReflectFact.from_json(json)
|
|
25
|
+
# print the JSON string representation of the object
|
|
26
|
+
print(ReflectFact.to_json())
|
|
27
|
+
|
|
28
|
+
# convert the object into a dict
|
|
29
|
+
reflect_fact_dict = reflect_fact_instance.to_dict()
|
|
30
|
+
# create an instance of ReflectFact from a dict
|
|
31
|
+
reflect_fact_from_dict = ReflectFact.from_dict(reflect_fact_dict)
|
|
32
|
+
```
|
|
33
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ReflectIncludeOptions
|
|
2
|
+
|
|
3
|
+
Options for including additional data in reflect results.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**facts** | **object** | Options for including facts (based_on) in reflect results. | [optional]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions
|
|
15
|
+
|
|
16
|
+
# TODO update the JSON string below
|
|
17
|
+
json = "{}"
|
|
18
|
+
# create an instance of ReflectIncludeOptions from a JSON string
|
|
19
|
+
reflect_include_options_instance = ReflectIncludeOptions.from_json(json)
|
|
20
|
+
# print the JSON string representation of the object
|
|
21
|
+
print(ReflectIncludeOptions.to_json())
|
|
22
|
+
|
|
23
|
+
# convert the object into a dict
|
|
24
|
+
reflect_include_options_dict = reflect_include_options_instance.to_dict()
|
|
25
|
+
# create an instance of ReflectIncludeOptions from a dict
|
|
26
|
+
reflect_include_options_from_dict = ReflectIncludeOptions.from_dict(reflect_include_options_dict)
|
|
27
|
+
```
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ReflectRequest
|
|
2
|
+
|
|
3
|
+
Request model for reflect endpoint.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**query** | **str** | |
|
|
10
|
+
**budget** | [**Budget**](Budget.md) | | [optional]
|
|
11
|
+
**context** | **str** | | [optional]
|
|
12
|
+
**filters** | [**List[MetadataFilter]**](MetadataFilter.md) | | [optional]
|
|
13
|
+
**include** | [**ReflectIncludeOptions**](ReflectIncludeOptions.md) | Options for including additional data (disabled by default) | [optional]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from hindsight_client_api.models.reflect_request import ReflectRequest
|
|
19
|
+
|
|
20
|
+
# TODO update the JSON string below
|
|
21
|
+
json = "{}"
|
|
22
|
+
# create an instance of ReflectRequest from a JSON string
|
|
23
|
+
reflect_request_instance = ReflectRequest.from_json(json)
|
|
24
|
+
# print the JSON string representation of the object
|
|
25
|
+
print(ReflectRequest.to_json())
|
|
26
|
+
|
|
27
|
+
# convert the object into a dict
|
|
28
|
+
reflect_request_dict = reflect_request_instance.to_dict()
|
|
29
|
+
# create an instance of ReflectRequest from a dict
|
|
30
|
+
reflect_request_from_dict = ReflectRequest.from_dict(reflect_request_dict)
|
|
31
|
+
```
|
|
32
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ReflectResponse
|
|
2
|
+
|
|
3
|
+
Response model for think endpoint.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**text** | **str** | |
|
|
10
|
+
**based_on** | [**List[ReflectFact]**](ReflectFact.md) | | [optional] [default to []]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from hindsight_client_api.models.reflect_response import ReflectResponse
|
|
16
|
+
|
|
17
|
+
# TODO update the JSON string below
|
|
18
|
+
json = "{}"
|
|
19
|
+
# create an instance of ReflectResponse from a JSON string
|
|
20
|
+
reflect_response_instance = ReflectResponse.from_json(json)
|
|
21
|
+
# print the JSON string representation of the object
|
|
22
|
+
print(ReflectResponse.to_json())
|
|
23
|
+
|
|
24
|
+
# convert the object into a dict
|
|
25
|
+
reflect_response_dict = reflect_response_instance.to_dict()
|
|
26
|
+
# create an instance of ReflectResponse from a dict
|
|
27
|
+
reflect_response_from_dict = ReflectResponse.from_dict(reflect_response_dict)
|
|
28
|
+
```
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# RetainRequest
|
|
2
|
+
|
|
3
|
+
Request model for retain endpoint.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**items** | [**List[MemoryItem]**](MemoryItem.md) | |
|
|
10
|
+
**var_async** | **bool** | If true, process asynchronously in background. If false, wait for completion (default: false) | [optional] [default to False]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from hindsight_client_api.models.retain_request import RetainRequest
|
|
16
|
+
|
|
17
|
+
# TODO update the JSON string below
|
|
18
|
+
json = "{}"
|
|
19
|
+
# create an instance of RetainRequest from a JSON string
|
|
20
|
+
retain_request_instance = RetainRequest.from_json(json)
|
|
21
|
+
# print the JSON string representation of the object
|
|
22
|
+
print(RetainRequest.to_json())
|
|
23
|
+
|
|
24
|
+
# convert the object into a dict
|
|
25
|
+
retain_request_dict = retain_request_instance.to_dict()
|
|
26
|
+
# create an instance of RetainRequest from a dict
|
|
27
|
+
retain_request_from_dict = RetainRequest.from_dict(retain_request_dict)
|
|
28
|
+
```
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# RetainResponse
|
|
2
|
+
|
|
3
|
+
Response model for retain endpoint.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**success** | **bool** | |
|
|
10
|
+
**bank_id** | **str** | |
|
|
11
|
+
**items_count** | **int** | |
|
|
12
|
+
**var_async** | **bool** | Whether the operation was processed asynchronously |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from hindsight_client_api.models.retain_response import RetainResponse
|
|
18
|
+
|
|
19
|
+
# TODO update the JSON string below
|
|
20
|
+
json = "{}"
|
|
21
|
+
# create an instance of RetainResponse from a JSON string
|
|
22
|
+
retain_response_instance = RetainResponse.from_json(json)
|
|
23
|
+
# print the JSON string representation of the object
|
|
24
|
+
print(RetainResponse.to_json())
|
|
25
|
+
|
|
26
|
+
# convert the object into a dict
|
|
27
|
+
retain_response_dict = retain_response_instance.to_dict()
|
|
28
|
+
# create an instance of RetainResponse from a dict
|
|
29
|
+
retain_response_from_dict = RetainResponse.from_dict(retain_response_dict)
|
|
30
|
+
```
|
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UpdatePersonalityRequest
|
|
2
|
+
|
|
3
|
+
Request model for updating personality traits.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**personality** | [**PersonalityTraits**](PersonalityTraits.md) | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from hindsight_client_api.models.update_personality_request import UpdatePersonalityRequest
|
|
15
|
+
|
|
16
|
+
# TODO update the JSON string below
|
|
17
|
+
json = "{}"
|
|
18
|
+
# create an instance of UpdatePersonalityRequest from a JSON string
|
|
19
|
+
update_personality_request_instance = UpdatePersonalityRequest.from_json(json)
|
|
20
|
+
# print the JSON string representation of the object
|
|
21
|
+
print(UpdatePersonalityRequest.to_json())
|
|
22
|
+
|
|
23
|
+
# convert the object into a dict
|
|
24
|
+
update_personality_request_dict = update_personality_request_instance.to_dict()
|
|
25
|
+
# create an instance of UpdatePersonalityRequest from a dict
|
|
26
|
+
update_personality_request_from_dict = UpdatePersonalityRequest.from_dict(update_personality_request_dict)
|
|
27
|
+
```
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ValidationError
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
|
|
9
|
+
**msg** | **str** | |
|
|
10
|
+
**type** | **str** | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from hindsight_client_api.models.validation_error import ValidationError
|
|
16
|
+
|
|
17
|
+
# TODO update the JSON string below
|
|
18
|
+
json = "{}"
|
|
19
|
+
# create an instance of ValidationError from a JSON string
|
|
20
|
+
validation_error_instance = ValidationError.from_json(json)
|
|
21
|
+
# print the JSON string representation of the object
|
|
22
|
+
print(ValidationError.to_json())
|
|
23
|
+
|
|
24
|
+
# convert the object into a dict
|
|
25
|
+
validation_error_dict = validation_error_instance.to_dict()
|
|
26
|
+
# create an instance of ValidationError from a dict
|
|
27
|
+
validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
|
|
28
|
+
```
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ValidationErrorLocInner
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner
|
|
13
|
+
|
|
14
|
+
# TODO update the JSON string below
|
|
15
|
+
json = "{}"
|
|
16
|
+
# create an instance of ValidationErrorLocInner from a JSON string
|
|
17
|
+
validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json)
|
|
18
|
+
# print the JSON string representation of the object
|
|
19
|
+
print(ValidationErrorLocInner.to_json())
|
|
20
|
+
|
|
21
|
+
# convert the object into a dict
|
|
22
|
+
validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict()
|
|
23
|
+
# create an instance of ValidationErrorLocInner from a dict
|
|
24
|
+
validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict)
|
|
25
|
+
```
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from typing import Any, Optional
|
|
15
|
+
from typing_extensions import Self
|
|
16
|
+
|
|
17
|
+
class OpenApiException(Exception):
|
|
18
|
+
"""The base exception class for all OpenAPIExceptions"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ApiTypeError(OpenApiException, TypeError):
|
|
22
|
+
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
23
|
+
key_type=None) -> None:
|
|
24
|
+
""" Raises an exception for TypeErrors
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
msg (str): the exception message
|
|
28
|
+
|
|
29
|
+
Keyword Args:
|
|
30
|
+
path_to_item (list): a list of keys an indices to get to the
|
|
31
|
+
current_item
|
|
32
|
+
None if unset
|
|
33
|
+
valid_classes (tuple): the primitive classes that current item
|
|
34
|
+
should be an instance of
|
|
35
|
+
None if unset
|
|
36
|
+
key_type (bool): False if our value is a value in a dict
|
|
37
|
+
True if it is a key in a dict
|
|
38
|
+
False if our item is an item in a list
|
|
39
|
+
None if unset
|
|
40
|
+
"""
|
|
41
|
+
self.path_to_item = path_to_item
|
|
42
|
+
self.valid_classes = valid_classes
|
|
43
|
+
self.key_type = key_type
|
|
44
|
+
full_msg = msg
|
|
45
|
+
if path_to_item:
|
|
46
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
47
|
+
super(ApiTypeError, self).__init__(full_msg)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ApiValueError(OpenApiException, ValueError):
|
|
51
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
52
|
+
"""
|
|
53
|
+
Args:
|
|
54
|
+
msg (str): the exception message
|
|
55
|
+
|
|
56
|
+
Keyword Args:
|
|
57
|
+
path_to_item (list) the path to the exception in the
|
|
58
|
+
received_data dict. None if unset
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
self.path_to_item = path_to_item
|
|
62
|
+
full_msg = msg
|
|
63
|
+
if path_to_item:
|
|
64
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
65
|
+
super(ApiValueError, self).__init__(full_msg)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class ApiAttributeError(OpenApiException, AttributeError):
|
|
69
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
70
|
+
"""
|
|
71
|
+
Raised when an attribute reference or assignment fails.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
msg (str): the exception message
|
|
75
|
+
|
|
76
|
+
Keyword Args:
|
|
77
|
+
path_to_item (None/list) the path to the exception in the
|
|
78
|
+
received_data dict
|
|
79
|
+
"""
|
|
80
|
+
self.path_to_item = path_to_item
|
|
81
|
+
full_msg = msg
|
|
82
|
+
if path_to_item:
|
|
83
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
84
|
+
super(ApiAttributeError, self).__init__(full_msg)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class ApiKeyError(OpenApiException, KeyError):
|
|
88
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
89
|
+
"""
|
|
90
|
+
Args:
|
|
91
|
+
msg (str): the exception message
|
|
92
|
+
|
|
93
|
+
Keyword Args:
|
|
94
|
+
path_to_item (None/list) the path to the exception in the
|
|
95
|
+
received_data dict
|
|
96
|
+
"""
|
|
97
|
+
self.path_to_item = path_to_item
|
|
98
|
+
full_msg = msg
|
|
99
|
+
if path_to_item:
|
|
100
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
101
|
+
super(ApiKeyError, self).__init__(full_msg)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class ApiException(OpenApiException):
|
|
105
|
+
|
|
106
|
+
def __init__(
|
|
107
|
+
self,
|
|
108
|
+
status=None,
|
|
109
|
+
reason=None,
|
|
110
|
+
http_resp=None,
|
|
111
|
+
*,
|
|
112
|
+
body: Optional[str] = None,
|
|
113
|
+
data: Optional[Any] = None,
|
|
114
|
+
) -> None:
|
|
115
|
+
self.status = status
|
|
116
|
+
self.reason = reason
|
|
117
|
+
self.body = body
|
|
118
|
+
self.data = data
|
|
119
|
+
self.headers = None
|
|
120
|
+
|
|
121
|
+
if http_resp:
|
|
122
|
+
if self.status is None:
|
|
123
|
+
self.status = http_resp.status
|
|
124
|
+
if self.reason is None:
|
|
125
|
+
self.reason = http_resp.reason
|
|
126
|
+
if self.body is None:
|
|
127
|
+
try:
|
|
128
|
+
self.body = http_resp.data.decode('utf-8')
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
|
131
|
+
self.headers = http_resp.getheaders()
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_response(
|
|
135
|
+
cls,
|
|
136
|
+
*,
|
|
137
|
+
http_resp,
|
|
138
|
+
body: Optional[str],
|
|
139
|
+
data: Optional[Any],
|
|
140
|
+
) -> Self:
|
|
141
|
+
if http_resp.status == 400:
|
|
142
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
143
|
+
|
|
144
|
+
if http_resp.status == 401:
|
|
145
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
146
|
+
|
|
147
|
+
if http_resp.status == 403:
|
|
148
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
149
|
+
|
|
150
|
+
if http_resp.status == 404:
|
|
151
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
152
|
+
|
|
153
|
+
# Added new conditions for 409 and 422
|
|
154
|
+
if http_resp.status == 409:
|
|
155
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
|
|
157
|
+
if http_resp.status == 422:
|
|
158
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
159
|
+
|
|
160
|
+
if 500 <= http_resp.status <= 599:
|
|
161
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
162
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
163
|
+
|
|
164
|
+
def __str__(self):
|
|
165
|
+
"""Custom error messages for exception"""
|
|
166
|
+
error_message = "({0})\n"\
|
|
167
|
+
"Reason: {1}\n".format(self.status, self.reason)
|
|
168
|
+
if self.headers:
|
|
169
|
+
error_message += "HTTP response headers: {0}\n".format(
|
|
170
|
+
self.headers)
|
|
171
|
+
|
|
172
|
+
if self.body:
|
|
173
|
+
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
174
|
+
|
|
175
|
+
if self.data:
|
|
176
|
+
error_message += "HTTP response data: {0}\n".format(self.data)
|
|
177
|
+
|
|
178
|
+
return error_message
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class BadRequestException(ApiException):
|
|
182
|
+
pass
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class NotFoundException(ApiException):
|
|
186
|
+
pass
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class UnauthorizedException(ApiException):
|
|
190
|
+
pass
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class ForbiddenException(ApiException):
|
|
194
|
+
pass
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class ServiceException(ApiException):
|
|
198
|
+
pass
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class ConflictException(ApiException):
|
|
202
|
+
"""Exception for HTTP 409 Conflict."""
|
|
203
|
+
pass
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class UnprocessableEntityException(ApiException):
|
|
207
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
208
|
+
pass
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def render_path(path_to_item):
|
|
212
|
+
"""Returns a string representation of a path"""
|
|
213
|
+
result = ""
|
|
214
|
+
for pth in path_to_item:
|
|
215
|
+
if isinstance(pth, int):
|
|
216
|
+
result += "[{0}]".format(pth)
|
|
217
|
+
else:
|
|
218
|
+
result += "['{0}']".format(pth)
|
|
219
|
+
return result
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Hindsight HTTP API
|
|
6
|
+
|
|
7
|
+
HTTP API for Hindsight
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 1.0.0
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
# import models into model package
|
|
16
|
+
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
|
|
17
|
+
from hindsight_client_api.models.background_response import BackgroundResponse
|
|
18
|
+
from hindsight_client_api.models.bank_list_item import BankListItem
|
|
19
|
+
from hindsight_client_api.models.bank_list_response import BankListResponse
|
|
20
|
+
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
|
|
21
|
+
from hindsight_client_api.models.budget import Budget
|
|
22
|
+
from hindsight_client_api.models.chunk_data import ChunkData
|
|
23
|
+
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions
|
|
24
|
+
from hindsight_client_api.models.chunk_response import ChunkResponse
|
|
25
|
+
from hindsight_client_api.models.create_bank_request import CreateBankRequest
|
|
26
|
+
from hindsight_client_api.models.delete_response import DeleteResponse
|
|
27
|
+
from hindsight_client_api.models.document_response import DocumentResponse
|
|
28
|
+
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
|
|
29
|
+
from hindsight_client_api.models.entity_include_options import EntityIncludeOptions
|
|
30
|
+
from hindsight_client_api.models.entity_list_item import EntityListItem
|
|
31
|
+
from hindsight_client_api.models.entity_list_response import EntityListResponse
|
|
32
|
+
from hindsight_client_api.models.entity_observation_response import EntityObservationResponse
|
|
33
|
+
from hindsight_client_api.models.entity_state_response import EntityStateResponse
|
|
34
|
+
from hindsight_client_api.models.graph_data_response import GraphDataResponse
|
|
35
|
+
from hindsight_client_api.models.http_validation_error import HTTPValidationError
|
|
36
|
+
from hindsight_client_api.models.include_options import IncludeOptions
|
|
37
|
+
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse
|
|
38
|
+
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
|
|
39
|
+
from hindsight_client_api.models.memory_item import MemoryItem
|
|
40
|
+
from hindsight_client_api.models.metadata_filter import MetadataFilter
|
|
41
|
+
from hindsight_client_api.models.personality_traits import PersonalityTraits
|
|
42
|
+
from hindsight_client_api.models.recall_request import RecallRequest
|
|
43
|
+
from hindsight_client_api.models.recall_response import RecallResponse
|
|
44
|
+
from hindsight_client_api.models.recall_result import RecallResult
|
|
45
|
+
from hindsight_client_api.models.reflect_fact import ReflectFact
|
|
46
|
+
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions
|
|
47
|
+
from hindsight_client_api.models.reflect_request import ReflectRequest
|
|
48
|
+
from hindsight_client_api.models.reflect_response import ReflectResponse
|
|
49
|
+
from hindsight_client_api.models.retain_request import RetainRequest
|
|
50
|
+
from hindsight_client_api.models.retain_response import RetainResponse
|
|
51
|
+
from hindsight_client_api.models.update_personality_request import UpdatePersonalityRequest
|
|
52
|
+
from hindsight_client_api.models.validation_error import ValidationError
|
|
53
|
+
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner
|
|
54
|
+
|