hindsight-client 0.1.13__py3-none-any.whl → 0.1.15__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/hindsight_client.py +11 -10
- {hindsight_client-0.1.13.dist-info → hindsight_client-0.1.15.dist-info}/METADATA +1 -1
- hindsight_client-0.1.15.dist-info/RECORD +109 -0
- hindsight_client_api/__init__.py +21 -3
- hindsight_client_api/api/__init__.py +5 -1
- hindsight_client_api/api/banks_api.py +2045 -0
- hindsight_client_api/api/documents_api.py +1234 -0
- hindsight_client_api/api/entities_api.py +921 -0
- hindsight_client_api/api/memory_api.py +1901 -0
- hindsight_client_api/api/monitoring_api.py +1 -1
- hindsight_client_api/api/operations_api.py +610 -0
- hindsight_client_api/api_client.py +1 -1
- hindsight_client_api/configuration.py +2 -2
- hindsight_client_api/docs/BankListItem.md +2 -2
- hindsight_client_api/docs/BankStatsResponse.md +39 -0
- hindsight_client_api/docs/BanksApi.md +517 -0
- hindsight_client_api/docs/CancelOperationResponse.md +32 -0
- hindsight_client_api/docs/DeleteDocumentResponse.md +33 -0
- hindsight_client_api/docs/DeleteResponse.md +2 -0
- hindsight_client_api/docs/DocumentsApi.md +313 -0
- hindsight_client_api/docs/EntitiesApi.md +230 -0
- hindsight_client_api/docs/MemoryApi.md +499 -0
- hindsight_client_api/docs/OperationResponse.md +36 -0
- hindsight_client_api/docs/OperationsApi.md +154 -0
- hindsight_client_api/docs/OperationsListResponse.md +31 -0
- hindsight_client_api/exceptions.py +1 -1
- hindsight_client_api/models/__init__.py +6 -1
- hindsight_client_api/models/add_background_request.py +1 -1
- hindsight_client_api/models/background_response.py +1 -1
- hindsight_client_api/models/bank_list_item.py +13 -3
- hindsight_client_api/models/bank_list_response.py +1 -1
- hindsight_client_api/models/bank_profile_response.py +1 -1
- hindsight_client_api/models/bank_stats_response.py +105 -0
- hindsight_client_api/models/budget.py +1 -1
- hindsight_client_api/models/cancel_operation_response.py +91 -0
- hindsight_client_api/models/chunk_data.py +1 -1
- hindsight_client_api/models/chunk_include_options.py +1 -1
- hindsight_client_api/models/chunk_response.py +1 -1
- hindsight_client_api/models/create_bank_request.py +1 -1
- hindsight_client_api/models/delete_document_response.py +93 -0
- hindsight_client_api/models/delete_response.py +19 -5
- hindsight_client_api/models/disposition_traits.py +1 -1
- hindsight_client_api/models/document_response.py +1 -1
- hindsight_client_api/models/entity_detail_response.py +1 -1
- hindsight_client_api/models/entity_include_options.py +1 -1
- hindsight_client_api/models/entity_list_item.py +1 -1
- hindsight_client_api/models/entity_list_response.py +1 -1
- hindsight_client_api/models/entity_observation_response.py +1 -1
- hindsight_client_api/models/entity_state_response.py +1 -1
- hindsight_client_api/models/graph_data_response.py +1 -1
- hindsight_client_api/models/http_validation_error.py +1 -1
- hindsight_client_api/models/include_options.py +1 -1
- hindsight_client_api/models/list_documents_response.py +1 -1
- hindsight_client_api/models/list_memory_units_response.py +1 -1
- hindsight_client_api/models/memory_item.py +1 -1
- hindsight_client_api/models/operation_response.py +109 -0
- hindsight_client_api/models/operations_list_response.py +97 -0
- hindsight_client_api/models/recall_request.py +1 -1
- hindsight_client_api/models/recall_response.py +1 -1
- hindsight_client_api/models/recall_result.py +1 -1
- hindsight_client_api/models/reflect_fact.py +1 -1
- hindsight_client_api/models/reflect_include_options.py +1 -1
- hindsight_client_api/models/reflect_request.py +1 -1
- hindsight_client_api/models/reflect_response.py +1 -1
- hindsight_client_api/models/retain_request.py +1 -1
- hindsight_client_api/models/retain_response.py +1 -1
- hindsight_client_api/models/update_disposition_request.py +1 -1
- hindsight_client_api/models/validation_error.py +1 -1
- hindsight_client_api/models/validation_error_loc_inner.py +1 -1
- hindsight_client_api/rest.py +1 -1
- hindsight_client-0.1.13.dist-info/RECORD +0 -131
- hindsight_client_api/api/default_api.py +0 -5976
- hindsight_client_api/docs/DefaultApi.md +0 -1568
- hindsight_client_api/test/__init__.py +0 -0
- hindsight_client_api/test/test_add_background_request.py +0 -53
- hindsight_client_api/test/test_background_response.py +0 -53
- hindsight_client_api/test/test_bank_list_item.py +0 -60
- hindsight_client_api/test/test_bank_list_response.py +0 -68
- hindsight_client_api/test/test_bank_profile_response.py +0 -58
- hindsight_client_api/test/test_budget.py +0 -33
- hindsight_client_api/test/test_chunk_data.py +0 -57
- hindsight_client_api/test/test_chunk_include_options.py +0 -51
- hindsight_client_api/test/test_chunk_response.py +0 -62
- hindsight_client_api/test/test_create_bank_request.py +0 -53
- hindsight_client_api/test/test_default_api.py +0 -178
- hindsight_client_api/test/test_delete_response.py +0 -52
- hindsight_client_api/test/test_disposition_traits.py +0 -56
- hindsight_client_api/test/test_document_response.py +0 -64
- hindsight_client_api/test/test_entity_detail_response.py +0 -71
- hindsight_client_api/test/test_entity_include_options.py +0 -51
- hindsight_client_api/test/test_entity_list_item.py +0 -61
- hindsight_client_api/test/test_entity_list_response.py +0 -56
- hindsight_client_api/test/test_entity_observation_response.py +0 -53
- hindsight_client_api/test/test_entity_state_response.py +0 -64
- hindsight_client_api/test/test_graph_data_response.py +0 -82
- hindsight_client_api/test/test_http_validation_error.py +0 -58
- hindsight_client_api/test/test_include_options.py +0 -54
- hindsight_client_api/test/test_list_documents_response.py +0 -66
- hindsight_client_api/test/test_list_memory_units_response.py +0 -66
- hindsight_client_api/test/test_memory_item.py +0 -58
- hindsight_client_api/test/test_monitoring_api.py +0 -45
- hindsight_client_api/test/test_recall_request.py +0 -64
- hindsight_client_api/test/test_recall_response.py +0 -76
- hindsight_client_api/test/test_recall_result.py +0 -67
- hindsight_client_api/test/test_reflect_fact.py +0 -57
- hindsight_client_api/test/test_reflect_include_options.py +0 -51
- hindsight_client_api/test/test_reflect_request.py +0 -56
- hindsight_client_api/test/test_reflect_response.py +0 -55
- hindsight_client_api/test/test_retain_request.py +0 -57
- hindsight_client_api/test/test_retain_response.py +0 -58
- hindsight_client_api/test/test_update_disposition_request.py +0 -52
- hindsight_client_api/test/test_validation_error.py +0 -60
- hindsight_client_api/test/test_validation_error_loc_inner.py +0 -50
- {hindsight_client-0.1.13.dist-info → hindsight_client-0.1.15.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# hindsight_client_api.MemoryApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**clear_bank_memories**](MemoryApi.md#clear_bank_memories) | **DELETE** /v1/default/banks/{bank_id}/memories | Clear memory bank memories
|
|
8
|
+
[**get_graph**](MemoryApi.md#get_graph) | **GET** /v1/default/banks/{bank_id}/graph | Get memory graph data
|
|
9
|
+
[**list_memories**](MemoryApi.md#list_memories) | **GET** /v1/default/banks/{bank_id}/memories/list | List memory units
|
|
10
|
+
[**recall_memories**](MemoryApi.md#recall_memories) | **POST** /v1/default/banks/{bank_id}/memories/recall | Recall memory
|
|
11
|
+
[**reflect**](MemoryApi.md#reflect) | **POST** /v1/default/banks/{bank_id}/reflect | Reflect and generate answer
|
|
12
|
+
[**retain_memories**](MemoryApi.md#retain_memories) | **POST** /v1/default/banks/{bank_id}/memories | Retain memories
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# **clear_bank_memories**
|
|
16
|
+
> DeleteResponse clear_bank_memories(bank_id, type=type, authorization=authorization)
|
|
17
|
+
|
|
18
|
+
Clear memory bank memories
|
|
19
|
+
|
|
20
|
+
Delete memory units for a memory bank. Optionally filter by type (world, experience, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (disposition and background) will be preserved.
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import hindsight_client_api
|
|
27
|
+
from hindsight_client_api.models.delete_response import DeleteResponse
|
|
28
|
+
from hindsight_client_api.rest import ApiException
|
|
29
|
+
from pprint import pprint
|
|
30
|
+
|
|
31
|
+
# Defining the host is optional and defaults to http://localhost
|
|
32
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
33
|
+
configuration = hindsight_client_api.Configuration(
|
|
34
|
+
host = "http://localhost"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Enter a context with an instance of the API client
|
|
39
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
40
|
+
# Create an instance of the API class
|
|
41
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
42
|
+
bank_id = 'bank_id_example' # str |
|
|
43
|
+
type = 'type_example' # str | Optional fact type filter (world, experience, opinion) (optional)
|
|
44
|
+
authorization = 'authorization_example' # str | (optional)
|
|
45
|
+
|
|
46
|
+
try:
|
|
47
|
+
# Clear memory bank memories
|
|
48
|
+
api_response = await api_instance.clear_bank_memories(bank_id, type=type, authorization=authorization)
|
|
49
|
+
print("The response of MemoryApi->clear_bank_memories:\n")
|
|
50
|
+
pprint(api_response)
|
|
51
|
+
except Exception as e:
|
|
52
|
+
print("Exception when calling MemoryApi->clear_bank_memories: %s\n" % e)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Name | Type | Description | Notes
|
|
61
|
+
------------- | ------------- | ------------- | -------------
|
|
62
|
+
**bank_id** | **str**| |
|
|
63
|
+
**type** | **str**| Optional fact type filter (world, experience, opinion) | [optional]
|
|
64
|
+
**authorization** | **str**| | [optional]
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**DeleteResponse**](DeleteResponse.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
No authorization required
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: Not defined
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
### HTTP response details
|
|
80
|
+
|
|
81
|
+
| Status code | Description | Response headers |
|
|
82
|
+
|-------------|-------------|------------------|
|
|
83
|
+
**200** | Successful Response | - |
|
|
84
|
+
**422** | Validation Error | - |
|
|
85
|
+
|
|
86
|
+
[[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)
|
|
87
|
+
|
|
88
|
+
# **get_graph**
|
|
89
|
+
> GraphDataResponse get_graph(bank_id, type=type, authorization=authorization)
|
|
90
|
+
|
|
91
|
+
Get memory graph data
|
|
92
|
+
|
|
93
|
+
Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion). Limited to 1000 most recent items.
|
|
94
|
+
|
|
95
|
+
### Example
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
import hindsight_client_api
|
|
100
|
+
from hindsight_client_api.models.graph_data_response import GraphDataResponse
|
|
101
|
+
from hindsight_client_api.rest import ApiException
|
|
102
|
+
from pprint import pprint
|
|
103
|
+
|
|
104
|
+
# Defining the host is optional and defaults to http://localhost
|
|
105
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
106
|
+
configuration = hindsight_client_api.Configuration(
|
|
107
|
+
host = "http://localhost"
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# Enter a context with an instance of the API client
|
|
112
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
113
|
+
# Create an instance of the API class
|
|
114
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
115
|
+
bank_id = 'bank_id_example' # str |
|
|
116
|
+
type = 'type_example' # str | (optional)
|
|
117
|
+
authorization = 'authorization_example' # str | (optional)
|
|
118
|
+
|
|
119
|
+
try:
|
|
120
|
+
# Get memory graph data
|
|
121
|
+
api_response = await api_instance.get_graph(bank_id, type=type, authorization=authorization)
|
|
122
|
+
print("The response of MemoryApi->get_graph:\n")
|
|
123
|
+
pprint(api_response)
|
|
124
|
+
except Exception as e:
|
|
125
|
+
print("Exception when calling MemoryApi->get_graph: %s\n" % e)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Name | Type | Description | Notes
|
|
134
|
+
------------- | ------------- | ------------- | -------------
|
|
135
|
+
**bank_id** | **str**| |
|
|
136
|
+
**type** | **str**| | [optional]
|
|
137
|
+
**authorization** | **str**| | [optional]
|
|
138
|
+
|
|
139
|
+
### Return type
|
|
140
|
+
|
|
141
|
+
[**GraphDataResponse**](GraphDataResponse.md)
|
|
142
|
+
|
|
143
|
+
### Authorization
|
|
144
|
+
|
|
145
|
+
No authorization required
|
|
146
|
+
|
|
147
|
+
### HTTP request headers
|
|
148
|
+
|
|
149
|
+
- **Content-Type**: Not defined
|
|
150
|
+
- **Accept**: application/json
|
|
151
|
+
|
|
152
|
+
### HTTP response details
|
|
153
|
+
|
|
154
|
+
| Status code | Description | Response headers |
|
|
155
|
+
|-------------|-------------|------------------|
|
|
156
|
+
**200** | Successful Response | - |
|
|
157
|
+
**422** | Validation Error | - |
|
|
158
|
+
|
|
159
|
+
[[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)
|
|
160
|
+
|
|
161
|
+
# **list_memories**
|
|
162
|
+
> ListMemoryUnitsResponse list_memories(bank_id, type=type, q=q, limit=limit, offset=offset, authorization=authorization)
|
|
163
|
+
|
|
164
|
+
List memory units
|
|
165
|
+
|
|
166
|
+
List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
|
|
167
|
+
|
|
168
|
+
### Example
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
import hindsight_client_api
|
|
173
|
+
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
|
|
174
|
+
from hindsight_client_api.rest import ApiException
|
|
175
|
+
from pprint import pprint
|
|
176
|
+
|
|
177
|
+
# Defining the host is optional and defaults to http://localhost
|
|
178
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
179
|
+
configuration = hindsight_client_api.Configuration(
|
|
180
|
+
host = "http://localhost"
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
# Enter a context with an instance of the API client
|
|
185
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
186
|
+
# Create an instance of the API class
|
|
187
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
188
|
+
bank_id = 'bank_id_example' # str |
|
|
189
|
+
type = 'type_example' # str | (optional)
|
|
190
|
+
q = 'q_example' # str | (optional)
|
|
191
|
+
limit = 100 # int | (optional) (default to 100)
|
|
192
|
+
offset = 0 # int | (optional) (default to 0)
|
|
193
|
+
authorization = 'authorization_example' # str | (optional)
|
|
194
|
+
|
|
195
|
+
try:
|
|
196
|
+
# List memory units
|
|
197
|
+
api_response = await api_instance.list_memories(bank_id, type=type, q=q, limit=limit, offset=offset, authorization=authorization)
|
|
198
|
+
print("The response of MemoryApi->list_memories:\n")
|
|
199
|
+
pprint(api_response)
|
|
200
|
+
except Exception as e:
|
|
201
|
+
print("Exception when calling MemoryApi->list_memories: %s\n" % e)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
Name | Type | Description | Notes
|
|
210
|
+
------------- | ------------- | ------------- | -------------
|
|
211
|
+
**bank_id** | **str**| |
|
|
212
|
+
**type** | **str**| | [optional]
|
|
213
|
+
**q** | **str**| | [optional]
|
|
214
|
+
**limit** | **int**| | [optional] [default to 100]
|
|
215
|
+
**offset** | **int**| | [optional] [default to 0]
|
|
216
|
+
**authorization** | **str**| | [optional]
|
|
217
|
+
|
|
218
|
+
### Return type
|
|
219
|
+
|
|
220
|
+
[**ListMemoryUnitsResponse**](ListMemoryUnitsResponse.md)
|
|
221
|
+
|
|
222
|
+
### Authorization
|
|
223
|
+
|
|
224
|
+
No authorization required
|
|
225
|
+
|
|
226
|
+
### HTTP request headers
|
|
227
|
+
|
|
228
|
+
- **Content-Type**: Not defined
|
|
229
|
+
- **Accept**: application/json
|
|
230
|
+
|
|
231
|
+
### HTTP response details
|
|
232
|
+
|
|
233
|
+
| Status code | Description | Response headers |
|
|
234
|
+
|-------------|-------------|------------------|
|
|
235
|
+
**200** | Successful Response | - |
|
|
236
|
+
**422** | Validation Error | - |
|
|
237
|
+
|
|
238
|
+
[[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)
|
|
239
|
+
|
|
240
|
+
# **recall_memories**
|
|
241
|
+
> RecallResponse recall_memories(bank_id, recall_request, authorization=authorization)
|
|
242
|
+
|
|
243
|
+
Recall memory
|
|
244
|
+
|
|
245
|
+
Recall memory using semantic similarity and spreading activation.
|
|
246
|
+
|
|
247
|
+
The type parameter is optional and must be one of:
|
|
248
|
+
- `world`: General knowledge about people, places, events, and things that happen
|
|
249
|
+
- `experience`: Memories about experience, conversations, actions taken, and tasks performed
|
|
250
|
+
- `opinion`: The bank's formed beliefs, perspectives, and viewpoints
|
|
251
|
+
|
|
252
|
+
Set `include_entities=true` to get entity observations alongside recall results.
|
|
253
|
+
|
|
254
|
+
### Example
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
import hindsight_client_api
|
|
259
|
+
from hindsight_client_api.models.recall_request import RecallRequest
|
|
260
|
+
from hindsight_client_api.models.recall_response import RecallResponse
|
|
261
|
+
from hindsight_client_api.rest import ApiException
|
|
262
|
+
from pprint import pprint
|
|
263
|
+
|
|
264
|
+
# Defining the host is optional and defaults to http://localhost
|
|
265
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
266
|
+
configuration = hindsight_client_api.Configuration(
|
|
267
|
+
host = "http://localhost"
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# Enter a context with an instance of the API client
|
|
272
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
273
|
+
# Create an instance of the API class
|
|
274
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
275
|
+
bank_id = 'bank_id_example' # str |
|
|
276
|
+
recall_request = hindsight_client_api.RecallRequest() # RecallRequest |
|
|
277
|
+
authorization = 'authorization_example' # str | (optional)
|
|
278
|
+
|
|
279
|
+
try:
|
|
280
|
+
# Recall memory
|
|
281
|
+
api_response = await api_instance.recall_memories(bank_id, recall_request, authorization=authorization)
|
|
282
|
+
print("The response of MemoryApi->recall_memories:\n")
|
|
283
|
+
pprint(api_response)
|
|
284
|
+
except Exception as e:
|
|
285
|
+
print("Exception when calling MemoryApi->recall_memories: %s\n" % e)
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
### Parameters
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
Name | Type | Description | Notes
|
|
294
|
+
------------- | ------------- | ------------- | -------------
|
|
295
|
+
**bank_id** | **str**| |
|
|
296
|
+
**recall_request** | [**RecallRequest**](RecallRequest.md)| |
|
|
297
|
+
**authorization** | **str**| | [optional]
|
|
298
|
+
|
|
299
|
+
### Return type
|
|
300
|
+
|
|
301
|
+
[**RecallResponse**](RecallResponse.md)
|
|
302
|
+
|
|
303
|
+
### Authorization
|
|
304
|
+
|
|
305
|
+
No authorization required
|
|
306
|
+
|
|
307
|
+
### HTTP request headers
|
|
308
|
+
|
|
309
|
+
- **Content-Type**: application/json
|
|
310
|
+
- **Accept**: application/json
|
|
311
|
+
|
|
312
|
+
### HTTP response details
|
|
313
|
+
|
|
314
|
+
| Status code | Description | Response headers |
|
|
315
|
+
|-------------|-------------|------------------|
|
|
316
|
+
**200** | Successful Response | - |
|
|
317
|
+
**422** | Validation Error | - |
|
|
318
|
+
|
|
319
|
+
[[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)
|
|
320
|
+
|
|
321
|
+
# **reflect**
|
|
322
|
+
> ReflectResponse reflect(bank_id, reflect_request, authorization=authorization)
|
|
323
|
+
|
|
324
|
+
Reflect and generate answer
|
|
325
|
+
|
|
326
|
+
Reflect and formulate an answer using bank identity, world facts, and opinions.
|
|
327
|
+
|
|
328
|
+
This endpoint:
|
|
329
|
+
1. Retrieves experience (conversations and events)
|
|
330
|
+
2. Retrieves world facts relevant to the query
|
|
331
|
+
3. Retrieves existing opinions (bank's perspectives)
|
|
332
|
+
4. Uses LLM to formulate a contextual answer
|
|
333
|
+
5. Extracts and stores any new opinions formed
|
|
334
|
+
6. Returns plain text answer, the facts used, and new opinions
|
|
335
|
+
|
|
336
|
+
### Example
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
```python
|
|
340
|
+
import hindsight_client_api
|
|
341
|
+
from hindsight_client_api.models.reflect_request import ReflectRequest
|
|
342
|
+
from hindsight_client_api.models.reflect_response import ReflectResponse
|
|
343
|
+
from hindsight_client_api.rest import ApiException
|
|
344
|
+
from pprint import pprint
|
|
345
|
+
|
|
346
|
+
# Defining the host is optional and defaults to http://localhost
|
|
347
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
348
|
+
configuration = hindsight_client_api.Configuration(
|
|
349
|
+
host = "http://localhost"
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
# Enter a context with an instance of the API client
|
|
354
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
355
|
+
# Create an instance of the API class
|
|
356
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
357
|
+
bank_id = 'bank_id_example' # str |
|
|
358
|
+
reflect_request = hindsight_client_api.ReflectRequest() # ReflectRequest |
|
|
359
|
+
authorization = 'authorization_example' # str | (optional)
|
|
360
|
+
|
|
361
|
+
try:
|
|
362
|
+
# Reflect and generate answer
|
|
363
|
+
api_response = await api_instance.reflect(bank_id, reflect_request, authorization=authorization)
|
|
364
|
+
print("The response of MemoryApi->reflect:\n")
|
|
365
|
+
pprint(api_response)
|
|
366
|
+
except Exception as e:
|
|
367
|
+
print("Exception when calling MemoryApi->reflect: %s\n" % e)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### Parameters
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
Name | Type | Description | Notes
|
|
376
|
+
------------- | ------------- | ------------- | -------------
|
|
377
|
+
**bank_id** | **str**| |
|
|
378
|
+
**reflect_request** | [**ReflectRequest**](ReflectRequest.md)| |
|
|
379
|
+
**authorization** | **str**| | [optional]
|
|
380
|
+
|
|
381
|
+
### Return type
|
|
382
|
+
|
|
383
|
+
[**ReflectResponse**](ReflectResponse.md)
|
|
384
|
+
|
|
385
|
+
### Authorization
|
|
386
|
+
|
|
387
|
+
No authorization required
|
|
388
|
+
|
|
389
|
+
### HTTP request headers
|
|
390
|
+
|
|
391
|
+
- **Content-Type**: application/json
|
|
392
|
+
- **Accept**: application/json
|
|
393
|
+
|
|
394
|
+
### HTTP response details
|
|
395
|
+
|
|
396
|
+
| Status code | Description | Response headers |
|
|
397
|
+
|-------------|-------------|------------------|
|
|
398
|
+
**200** | Successful Response | - |
|
|
399
|
+
**422** | Validation Error | - |
|
|
400
|
+
|
|
401
|
+
[[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)
|
|
402
|
+
|
|
403
|
+
# **retain_memories**
|
|
404
|
+
> RetainResponse retain_memories(bank_id, retain_request, authorization=authorization)
|
|
405
|
+
|
|
406
|
+
Retain memories
|
|
407
|
+
|
|
408
|
+
Retain memory items with automatic fact extraction.
|
|
409
|
+
|
|
410
|
+
This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing via the `async` parameter.
|
|
411
|
+
|
|
412
|
+
**Features:**
|
|
413
|
+
- Efficient batch processing
|
|
414
|
+
- Automatic fact extraction from natural language
|
|
415
|
+
- Entity recognition and linking
|
|
416
|
+
- Document tracking with automatic upsert (when document_id is provided)
|
|
417
|
+
- Temporal and semantic linking
|
|
418
|
+
- Optional asynchronous processing
|
|
419
|
+
|
|
420
|
+
**The system automatically:**
|
|
421
|
+
1. Extracts semantic facts from the content
|
|
422
|
+
2. Generates embeddings
|
|
423
|
+
3. Deduplicates similar facts
|
|
424
|
+
4. Creates temporal, semantic, and entity links
|
|
425
|
+
5. Tracks document metadata
|
|
426
|
+
|
|
427
|
+
**When `async=true`:** Returns immediately after queuing. Use the operations endpoint to monitor progress.
|
|
428
|
+
|
|
429
|
+
**When `async=false` (default):** Waits for processing to complete.
|
|
430
|
+
|
|
431
|
+
**Note:** If a memory item has a `document_id` that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior).
|
|
432
|
+
|
|
433
|
+
### Example
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
```python
|
|
437
|
+
import hindsight_client_api
|
|
438
|
+
from hindsight_client_api.models.retain_request import RetainRequest
|
|
439
|
+
from hindsight_client_api.models.retain_response import RetainResponse
|
|
440
|
+
from hindsight_client_api.rest import ApiException
|
|
441
|
+
from pprint import pprint
|
|
442
|
+
|
|
443
|
+
# Defining the host is optional and defaults to http://localhost
|
|
444
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
445
|
+
configuration = hindsight_client_api.Configuration(
|
|
446
|
+
host = "http://localhost"
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
# Enter a context with an instance of the API client
|
|
451
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
452
|
+
# Create an instance of the API class
|
|
453
|
+
api_instance = hindsight_client_api.MemoryApi(api_client)
|
|
454
|
+
bank_id = 'bank_id_example' # str |
|
|
455
|
+
retain_request = hindsight_client_api.RetainRequest() # RetainRequest |
|
|
456
|
+
authorization = 'authorization_example' # str | (optional)
|
|
457
|
+
|
|
458
|
+
try:
|
|
459
|
+
# Retain memories
|
|
460
|
+
api_response = await api_instance.retain_memories(bank_id, retain_request, authorization=authorization)
|
|
461
|
+
print("The response of MemoryApi->retain_memories:\n")
|
|
462
|
+
pprint(api_response)
|
|
463
|
+
except Exception as e:
|
|
464
|
+
print("Exception when calling MemoryApi->retain_memories: %s\n" % e)
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
### Parameters
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
Name | Type | Description | Notes
|
|
473
|
+
------------- | ------------- | ------------- | -------------
|
|
474
|
+
**bank_id** | **str**| |
|
|
475
|
+
**retain_request** | [**RetainRequest**](RetainRequest.md)| |
|
|
476
|
+
**authorization** | **str**| | [optional]
|
|
477
|
+
|
|
478
|
+
### Return type
|
|
479
|
+
|
|
480
|
+
[**RetainResponse**](RetainResponse.md)
|
|
481
|
+
|
|
482
|
+
### Authorization
|
|
483
|
+
|
|
484
|
+
No authorization required
|
|
485
|
+
|
|
486
|
+
### HTTP request headers
|
|
487
|
+
|
|
488
|
+
- **Content-Type**: application/json
|
|
489
|
+
- **Accept**: application/json
|
|
490
|
+
|
|
491
|
+
### HTTP response details
|
|
492
|
+
|
|
493
|
+
| Status code | Description | Response headers |
|
|
494
|
+
|-------------|-------------|------------------|
|
|
495
|
+
**200** | Successful Response | - |
|
|
496
|
+
**422** | Validation Error | - |
|
|
497
|
+
|
|
498
|
+
[[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)
|
|
499
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# OperationResponse
|
|
2
|
+
|
|
3
|
+
Response model for a single async operation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **str** | |
|
|
10
|
+
**task_type** | **str** | |
|
|
11
|
+
**items_count** | **int** | |
|
|
12
|
+
**document_id** | **str** | |
|
|
13
|
+
**created_at** | **str** | |
|
|
14
|
+
**status** | **str** | |
|
|
15
|
+
**error_message** | **str** | |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from hindsight_client_api.models.operation_response import OperationResponse
|
|
21
|
+
|
|
22
|
+
# TODO update the JSON string below
|
|
23
|
+
json = "{}"
|
|
24
|
+
# create an instance of OperationResponse from a JSON string
|
|
25
|
+
operation_response_instance = OperationResponse.from_json(json)
|
|
26
|
+
# print the JSON string representation of the object
|
|
27
|
+
print(OperationResponse.to_json())
|
|
28
|
+
|
|
29
|
+
# convert the object into a dict
|
|
30
|
+
operation_response_dict = operation_response_instance.to_dict()
|
|
31
|
+
# create an instance of OperationResponse from a dict
|
|
32
|
+
operation_response_from_dict = OperationResponse.from_dict(operation_response_dict)
|
|
33
|
+
```
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# hindsight_client_api.OperationsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**cancel_operation**](OperationsApi.md#cancel_operation) | **DELETE** /v1/default/banks/{bank_id}/operations/{operation_id} | Cancel a pending async operation
|
|
8
|
+
[**list_operations**](OperationsApi.md#list_operations) | **GET** /v1/default/banks/{bank_id}/operations | List async operations
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# **cancel_operation**
|
|
12
|
+
> CancelOperationResponse cancel_operation(bank_id, operation_id, authorization=authorization)
|
|
13
|
+
|
|
14
|
+
Cancel a pending async operation
|
|
15
|
+
|
|
16
|
+
Cancel a pending async operation by removing it from the queue
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
import hindsight_client_api
|
|
23
|
+
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
|
|
24
|
+
from hindsight_client_api.rest import ApiException
|
|
25
|
+
from pprint import pprint
|
|
26
|
+
|
|
27
|
+
# Defining the host is optional and defaults to http://localhost
|
|
28
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
29
|
+
configuration = hindsight_client_api.Configuration(
|
|
30
|
+
host = "http://localhost"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Enter a context with an instance of the API client
|
|
35
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
36
|
+
# Create an instance of the API class
|
|
37
|
+
api_instance = hindsight_client_api.OperationsApi(api_client)
|
|
38
|
+
bank_id = 'bank_id_example' # str |
|
|
39
|
+
operation_id = 'operation_id_example' # str |
|
|
40
|
+
authorization = 'authorization_example' # str | (optional)
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
# Cancel a pending async operation
|
|
44
|
+
api_response = await api_instance.cancel_operation(bank_id, operation_id, authorization=authorization)
|
|
45
|
+
print("The response of OperationsApi->cancel_operation:\n")
|
|
46
|
+
pprint(api_response)
|
|
47
|
+
except Exception as e:
|
|
48
|
+
print("Exception when calling OperationsApi->cancel_operation: %s\n" % e)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Name | Type | Description | Notes
|
|
57
|
+
------------- | ------------- | ------------- | -------------
|
|
58
|
+
**bank_id** | **str**| |
|
|
59
|
+
**operation_id** | **str**| |
|
|
60
|
+
**authorization** | **str**| | [optional]
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**CancelOperationResponse**](CancelOperationResponse.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
No authorization required
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: Not defined
|
|
73
|
+
- **Accept**: application/json
|
|
74
|
+
|
|
75
|
+
### HTTP response details
|
|
76
|
+
|
|
77
|
+
| Status code | Description | Response headers |
|
|
78
|
+
|-------------|-------------|------------------|
|
|
79
|
+
**200** | Successful Response | - |
|
|
80
|
+
**422** | Validation Error | - |
|
|
81
|
+
|
|
82
|
+
[[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)
|
|
83
|
+
|
|
84
|
+
# **list_operations**
|
|
85
|
+
> OperationsListResponse list_operations(bank_id, authorization=authorization)
|
|
86
|
+
|
|
87
|
+
List async operations
|
|
88
|
+
|
|
89
|
+
Get a list of all async operations (pending and failed) for a specific agent, including error messages for failed operations
|
|
90
|
+
|
|
91
|
+
### Example
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
import hindsight_client_api
|
|
96
|
+
from hindsight_client_api.models.operations_list_response import OperationsListResponse
|
|
97
|
+
from hindsight_client_api.rest import ApiException
|
|
98
|
+
from pprint import pprint
|
|
99
|
+
|
|
100
|
+
# Defining the host is optional and defaults to http://localhost
|
|
101
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
102
|
+
configuration = hindsight_client_api.Configuration(
|
|
103
|
+
host = "http://localhost"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# Enter a context with an instance of the API client
|
|
108
|
+
async with hindsight_client_api.ApiClient(configuration) as api_client:
|
|
109
|
+
# Create an instance of the API class
|
|
110
|
+
api_instance = hindsight_client_api.OperationsApi(api_client)
|
|
111
|
+
bank_id = 'bank_id_example' # str |
|
|
112
|
+
authorization = 'authorization_example' # str | (optional)
|
|
113
|
+
|
|
114
|
+
try:
|
|
115
|
+
# List async operations
|
|
116
|
+
api_response = await api_instance.list_operations(bank_id, authorization=authorization)
|
|
117
|
+
print("The response of OperationsApi->list_operations:\n")
|
|
118
|
+
pprint(api_response)
|
|
119
|
+
except Exception as e:
|
|
120
|
+
print("Exception when calling OperationsApi->list_operations: %s\n" % e)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Parameters
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Name | Type | Description | Notes
|
|
129
|
+
------------- | ------------- | ------------- | -------------
|
|
130
|
+
**bank_id** | **str**| |
|
|
131
|
+
**authorization** | **str**| | [optional]
|
|
132
|
+
|
|
133
|
+
### Return type
|
|
134
|
+
|
|
135
|
+
[**OperationsListResponse**](OperationsListResponse.md)
|
|
136
|
+
|
|
137
|
+
### Authorization
|
|
138
|
+
|
|
139
|
+
No authorization required
|
|
140
|
+
|
|
141
|
+
### HTTP request headers
|
|
142
|
+
|
|
143
|
+
- **Content-Type**: Not defined
|
|
144
|
+
- **Accept**: application/json
|
|
145
|
+
|
|
146
|
+
### HTTP response details
|
|
147
|
+
|
|
148
|
+
| Status code | Description | Response headers |
|
|
149
|
+
|-------------|-------------|------------------|
|
|
150
|
+
**200** | Successful Response | - |
|
|
151
|
+
**422** | Validation Error | - |
|
|
152
|
+
|
|
153
|
+
[[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)
|
|
154
|
+
|