hindsight-client 0.1.14__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.14.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.14.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.14.dist-info → hindsight_client-0.1.15.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,2045 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
|
|
22
|
+
from hindsight_client_api.models.background_response import BackgroundResponse
|
|
23
|
+
from hindsight_client_api.models.bank_list_response import BankListResponse
|
|
24
|
+
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
|
|
25
|
+
from hindsight_client_api.models.bank_stats_response import BankStatsResponse
|
|
26
|
+
from hindsight_client_api.models.create_bank_request import CreateBankRequest
|
|
27
|
+
from hindsight_client_api.models.delete_response import DeleteResponse
|
|
28
|
+
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
|
|
29
|
+
|
|
30
|
+
from hindsight_client_api.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from hindsight_client_api.api_response import ApiResponse
|
|
32
|
+
from hindsight_client_api.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class BanksApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
async def add_bank_background(
|
|
50
|
+
self,
|
|
51
|
+
bank_id: StrictStr,
|
|
52
|
+
add_background_request: AddBackgroundRequest,
|
|
53
|
+
authorization: Optional[StrictStr] = None,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> BackgroundResponse:
|
|
67
|
+
"""Add/merge memory bank background
|
|
68
|
+
|
|
69
|
+
Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
|
|
70
|
+
|
|
71
|
+
:param bank_id: (required)
|
|
72
|
+
:type bank_id: str
|
|
73
|
+
:param add_background_request: (required)
|
|
74
|
+
:type add_background_request: AddBackgroundRequest
|
|
75
|
+
:param authorization:
|
|
76
|
+
:type authorization: str
|
|
77
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
78
|
+
number provided, it will be total request
|
|
79
|
+
timeout. It can also be a pair (tuple) of
|
|
80
|
+
(connection, read) timeouts.
|
|
81
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
82
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
83
|
+
request; this effectively ignores the
|
|
84
|
+
authentication in the spec for a single request.
|
|
85
|
+
:type _request_auth: dict, optional
|
|
86
|
+
:param _content_type: force content-type for the request.
|
|
87
|
+
:type _content_type: str, Optional
|
|
88
|
+
:param _headers: set to override the headers for a single
|
|
89
|
+
request; this effectively ignores the headers
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _headers: dict, optional
|
|
92
|
+
:param _host_index: set to override the host_index for a single
|
|
93
|
+
request; this effectively ignores the host_index
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _host_index: int, optional
|
|
96
|
+
:return: Returns the result object.
|
|
97
|
+
""" # noqa: E501
|
|
98
|
+
|
|
99
|
+
_param = self._add_bank_background_serialize(
|
|
100
|
+
bank_id=bank_id,
|
|
101
|
+
add_background_request=add_background_request,
|
|
102
|
+
authorization=authorization,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "BackgroundResponse",
|
|
111
|
+
'422': "HTTPValidationError",
|
|
112
|
+
}
|
|
113
|
+
response_data = await self.api_client.call_api(
|
|
114
|
+
*_param,
|
|
115
|
+
_request_timeout=_request_timeout
|
|
116
|
+
)
|
|
117
|
+
await response_data.read()
|
|
118
|
+
return self.api_client.response_deserialize(
|
|
119
|
+
response_data=response_data,
|
|
120
|
+
response_types_map=_response_types_map,
|
|
121
|
+
).data
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@validate_call
|
|
125
|
+
async def add_bank_background_with_http_info(
|
|
126
|
+
self,
|
|
127
|
+
bank_id: StrictStr,
|
|
128
|
+
add_background_request: AddBackgroundRequest,
|
|
129
|
+
authorization: Optional[StrictStr] = None,
|
|
130
|
+
_request_timeout: Union[
|
|
131
|
+
None,
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
133
|
+
Tuple[
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
136
|
+
]
|
|
137
|
+
] = None,
|
|
138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_content_type: Optional[StrictStr] = None,
|
|
140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
142
|
+
) -> ApiResponse[BackgroundResponse]:
|
|
143
|
+
"""Add/merge memory bank background
|
|
144
|
+
|
|
145
|
+
Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
|
|
146
|
+
|
|
147
|
+
:param bank_id: (required)
|
|
148
|
+
:type bank_id: str
|
|
149
|
+
:param add_background_request: (required)
|
|
150
|
+
:type add_background_request: AddBackgroundRequest
|
|
151
|
+
:param authorization:
|
|
152
|
+
:type authorization: str
|
|
153
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
154
|
+
number provided, it will be total request
|
|
155
|
+
timeout. It can also be a pair (tuple) of
|
|
156
|
+
(connection, read) timeouts.
|
|
157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
159
|
+
request; this effectively ignores the
|
|
160
|
+
authentication in the spec for a single request.
|
|
161
|
+
:type _request_auth: dict, optional
|
|
162
|
+
:param _content_type: force content-type for the request.
|
|
163
|
+
:type _content_type: str, Optional
|
|
164
|
+
:param _headers: set to override the headers for a single
|
|
165
|
+
request; this effectively ignores the headers
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _headers: dict, optional
|
|
168
|
+
:param _host_index: set to override the host_index for a single
|
|
169
|
+
request; this effectively ignores the host_index
|
|
170
|
+
in the spec for a single request.
|
|
171
|
+
:type _host_index: int, optional
|
|
172
|
+
:return: Returns the result object.
|
|
173
|
+
""" # noqa: E501
|
|
174
|
+
|
|
175
|
+
_param = self._add_bank_background_serialize(
|
|
176
|
+
bank_id=bank_id,
|
|
177
|
+
add_background_request=add_background_request,
|
|
178
|
+
authorization=authorization,
|
|
179
|
+
_request_auth=_request_auth,
|
|
180
|
+
_content_type=_content_type,
|
|
181
|
+
_headers=_headers,
|
|
182
|
+
_host_index=_host_index
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
186
|
+
'200': "BackgroundResponse",
|
|
187
|
+
'422': "HTTPValidationError",
|
|
188
|
+
}
|
|
189
|
+
response_data = await self.api_client.call_api(
|
|
190
|
+
*_param,
|
|
191
|
+
_request_timeout=_request_timeout
|
|
192
|
+
)
|
|
193
|
+
await response_data.read()
|
|
194
|
+
return self.api_client.response_deserialize(
|
|
195
|
+
response_data=response_data,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
@validate_call
|
|
201
|
+
async def add_bank_background_without_preload_content(
|
|
202
|
+
self,
|
|
203
|
+
bank_id: StrictStr,
|
|
204
|
+
add_background_request: AddBackgroundRequest,
|
|
205
|
+
authorization: Optional[StrictStr] = None,
|
|
206
|
+
_request_timeout: Union[
|
|
207
|
+
None,
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Tuple[
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
212
|
+
]
|
|
213
|
+
] = None,
|
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
218
|
+
) -> RESTResponseType:
|
|
219
|
+
"""Add/merge memory bank background
|
|
220
|
+
|
|
221
|
+
Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
|
|
222
|
+
|
|
223
|
+
:param bank_id: (required)
|
|
224
|
+
:type bank_id: str
|
|
225
|
+
:param add_background_request: (required)
|
|
226
|
+
:type add_background_request: AddBackgroundRequest
|
|
227
|
+
:param authorization:
|
|
228
|
+
:type authorization: str
|
|
229
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
230
|
+
number provided, it will be total request
|
|
231
|
+
timeout. It can also be a pair (tuple) of
|
|
232
|
+
(connection, read) timeouts.
|
|
233
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
234
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
235
|
+
request; this effectively ignores the
|
|
236
|
+
authentication in the spec for a single request.
|
|
237
|
+
:type _request_auth: dict, optional
|
|
238
|
+
:param _content_type: force content-type for the request.
|
|
239
|
+
:type _content_type: str, Optional
|
|
240
|
+
:param _headers: set to override the headers for a single
|
|
241
|
+
request; this effectively ignores the headers
|
|
242
|
+
in the spec for a single request.
|
|
243
|
+
:type _headers: dict, optional
|
|
244
|
+
:param _host_index: set to override the host_index for a single
|
|
245
|
+
request; this effectively ignores the host_index
|
|
246
|
+
in the spec for a single request.
|
|
247
|
+
:type _host_index: int, optional
|
|
248
|
+
:return: Returns the result object.
|
|
249
|
+
""" # noqa: E501
|
|
250
|
+
|
|
251
|
+
_param = self._add_bank_background_serialize(
|
|
252
|
+
bank_id=bank_id,
|
|
253
|
+
add_background_request=add_background_request,
|
|
254
|
+
authorization=authorization,
|
|
255
|
+
_request_auth=_request_auth,
|
|
256
|
+
_content_type=_content_type,
|
|
257
|
+
_headers=_headers,
|
|
258
|
+
_host_index=_host_index
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
262
|
+
'200': "BackgroundResponse",
|
|
263
|
+
'422': "HTTPValidationError",
|
|
264
|
+
}
|
|
265
|
+
response_data = await self.api_client.call_api(
|
|
266
|
+
*_param,
|
|
267
|
+
_request_timeout=_request_timeout
|
|
268
|
+
)
|
|
269
|
+
return response_data.response
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def _add_bank_background_serialize(
|
|
273
|
+
self,
|
|
274
|
+
bank_id,
|
|
275
|
+
add_background_request,
|
|
276
|
+
authorization,
|
|
277
|
+
_request_auth,
|
|
278
|
+
_content_type,
|
|
279
|
+
_headers,
|
|
280
|
+
_host_index,
|
|
281
|
+
) -> RequestSerialized:
|
|
282
|
+
|
|
283
|
+
_host = None
|
|
284
|
+
|
|
285
|
+
_collection_formats: Dict[str, str] = {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
_path_params: Dict[str, str] = {}
|
|
289
|
+
_query_params: List[Tuple[str, str]] = []
|
|
290
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
291
|
+
_form_params: List[Tuple[str, str]] = []
|
|
292
|
+
_files: Dict[
|
|
293
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
294
|
+
] = {}
|
|
295
|
+
_body_params: Optional[bytes] = None
|
|
296
|
+
|
|
297
|
+
# process the path parameters
|
|
298
|
+
if bank_id is not None:
|
|
299
|
+
_path_params['bank_id'] = bank_id
|
|
300
|
+
# process the query parameters
|
|
301
|
+
# process the header parameters
|
|
302
|
+
if authorization is not None:
|
|
303
|
+
_header_params['authorization'] = authorization
|
|
304
|
+
# process the form parameters
|
|
305
|
+
# process the body parameter
|
|
306
|
+
if add_background_request is not None:
|
|
307
|
+
_body_params = add_background_request
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# set the HTTP header `Accept`
|
|
311
|
+
if 'Accept' not in _header_params:
|
|
312
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
313
|
+
[
|
|
314
|
+
'application/json'
|
|
315
|
+
]
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
# set the HTTP header `Content-Type`
|
|
319
|
+
if _content_type:
|
|
320
|
+
_header_params['Content-Type'] = _content_type
|
|
321
|
+
else:
|
|
322
|
+
_default_content_type = (
|
|
323
|
+
self.api_client.select_header_content_type(
|
|
324
|
+
[
|
|
325
|
+
'application/json'
|
|
326
|
+
]
|
|
327
|
+
)
|
|
328
|
+
)
|
|
329
|
+
if _default_content_type is not None:
|
|
330
|
+
_header_params['Content-Type'] = _default_content_type
|
|
331
|
+
|
|
332
|
+
# authentication setting
|
|
333
|
+
_auth_settings: List[str] = [
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
return self.api_client.param_serialize(
|
|
337
|
+
method='POST',
|
|
338
|
+
resource_path='/v1/default/banks/{bank_id}/background',
|
|
339
|
+
path_params=_path_params,
|
|
340
|
+
query_params=_query_params,
|
|
341
|
+
header_params=_header_params,
|
|
342
|
+
body=_body_params,
|
|
343
|
+
post_params=_form_params,
|
|
344
|
+
files=_files,
|
|
345
|
+
auth_settings=_auth_settings,
|
|
346
|
+
collection_formats=_collection_formats,
|
|
347
|
+
_host=_host,
|
|
348
|
+
_request_auth=_request_auth
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
@validate_call
|
|
355
|
+
async def create_or_update_bank(
|
|
356
|
+
self,
|
|
357
|
+
bank_id: StrictStr,
|
|
358
|
+
create_bank_request: CreateBankRequest,
|
|
359
|
+
authorization: Optional[StrictStr] = None,
|
|
360
|
+
_request_timeout: Union[
|
|
361
|
+
None,
|
|
362
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
363
|
+
Tuple[
|
|
364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
365
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
366
|
+
]
|
|
367
|
+
] = None,
|
|
368
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
369
|
+
_content_type: Optional[StrictStr] = None,
|
|
370
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
371
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
372
|
+
) -> BankProfileResponse:
|
|
373
|
+
"""Create or update memory bank
|
|
374
|
+
|
|
375
|
+
Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
|
|
376
|
+
|
|
377
|
+
:param bank_id: (required)
|
|
378
|
+
:type bank_id: str
|
|
379
|
+
:param create_bank_request: (required)
|
|
380
|
+
:type create_bank_request: CreateBankRequest
|
|
381
|
+
:param authorization:
|
|
382
|
+
:type authorization: str
|
|
383
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
384
|
+
number provided, it will be total request
|
|
385
|
+
timeout. It can also be a pair (tuple) of
|
|
386
|
+
(connection, read) timeouts.
|
|
387
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
388
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
389
|
+
request; this effectively ignores the
|
|
390
|
+
authentication in the spec for a single request.
|
|
391
|
+
:type _request_auth: dict, optional
|
|
392
|
+
:param _content_type: force content-type for the request.
|
|
393
|
+
:type _content_type: str, Optional
|
|
394
|
+
:param _headers: set to override the headers for a single
|
|
395
|
+
request; this effectively ignores the headers
|
|
396
|
+
in the spec for a single request.
|
|
397
|
+
:type _headers: dict, optional
|
|
398
|
+
:param _host_index: set to override the host_index for a single
|
|
399
|
+
request; this effectively ignores the host_index
|
|
400
|
+
in the spec for a single request.
|
|
401
|
+
:type _host_index: int, optional
|
|
402
|
+
:return: Returns the result object.
|
|
403
|
+
""" # noqa: E501
|
|
404
|
+
|
|
405
|
+
_param = self._create_or_update_bank_serialize(
|
|
406
|
+
bank_id=bank_id,
|
|
407
|
+
create_bank_request=create_bank_request,
|
|
408
|
+
authorization=authorization,
|
|
409
|
+
_request_auth=_request_auth,
|
|
410
|
+
_content_type=_content_type,
|
|
411
|
+
_headers=_headers,
|
|
412
|
+
_host_index=_host_index
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
416
|
+
'200': "BankProfileResponse",
|
|
417
|
+
'422': "HTTPValidationError",
|
|
418
|
+
}
|
|
419
|
+
response_data = await self.api_client.call_api(
|
|
420
|
+
*_param,
|
|
421
|
+
_request_timeout=_request_timeout
|
|
422
|
+
)
|
|
423
|
+
await response_data.read()
|
|
424
|
+
return self.api_client.response_deserialize(
|
|
425
|
+
response_data=response_data,
|
|
426
|
+
response_types_map=_response_types_map,
|
|
427
|
+
).data
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
@validate_call
|
|
431
|
+
async def create_or_update_bank_with_http_info(
|
|
432
|
+
self,
|
|
433
|
+
bank_id: StrictStr,
|
|
434
|
+
create_bank_request: CreateBankRequest,
|
|
435
|
+
authorization: Optional[StrictStr] = None,
|
|
436
|
+
_request_timeout: Union[
|
|
437
|
+
None,
|
|
438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
439
|
+
Tuple[
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
442
|
+
]
|
|
443
|
+
] = None,
|
|
444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
445
|
+
_content_type: Optional[StrictStr] = None,
|
|
446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
448
|
+
) -> ApiResponse[BankProfileResponse]:
|
|
449
|
+
"""Create or update memory bank
|
|
450
|
+
|
|
451
|
+
Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
|
|
452
|
+
|
|
453
|
+
:param bank_id: (required)
|
|
454
|
+
:type bank_id: str
|
|
455
|
+
:param create_bank_request: (required)
|
|
456
|
+
:type create_bank_request: CreateBankRequest
|
|
457
|
+
:param authorization:
|
|
458
|
+
:type authorization: str
|
|
459
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
460
|
+
number provided, it will be total request
|
|
461
|
+
timeout. It can also be a pair (tuple) of
|
|
462
|
+
(connection, read) timeouts.
|
|
463
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
464
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
465
|
+
request; this effectively ignores the
|
|
466
|
+
authentication in the spec for a single request.
|
|
467
|
+
:type _request_auth: dict, optional
|
|
468
|
+
:param _content_type: force content-type for the request.
|
|
469
|
+
:type _content_type: str, Optional
|
|
470
|
+
:param _headers: set to override the headers for a single
|
|
471
|
+
request; this effectively ignores the headers
|
|
472
|
+
in the spec for a single request.
|
|
473
|
+
:type _headers: dict, optional
|
|
474
|
+
:param _host_index: set to override the host_index for a single
|
|
475
|
+
request; this effectively ignores the host_index
|
|
476
|
+
in the spec for a single request.
|
|
477
|
+
:type _host_index: int, optional
|
|
478
|
+
:return: Returns the result object.
|
|
479
|
+
""" # noqa: E501
|
|
480
|
+
|
|
481
|
+
_param = self._create_or_update_bank_serialize(
|
|
482
|
+
bank_id=bank_id,
|
|
483
|
+
create_bank_request=create_bank_request,
|
|
484
|
+
authorization=authorization,
|
|
485
|
+
_request_auth=_request_auth,
|
|
486
|
+
_content_type=_content_type,
|
|
487
|
+
_headers=_headers,
|
|
488
|
+
_host_index=_host_index
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
492
|
+
'200': "BankProfileResponse",
|
|
493
|
+
'422': "HTTPValidationError",
|
|
494
|
+
}
|
|
495
|
+
response_data = await self.api_client.call_api(
|
|
496
|
+
*_param,
|
|
497
|
+
_request_timeout=_request_timeout
|
|
498
|
+
)
|
|
499
|
+
await response_data.read()
|
|
500
|
+
return self.api_client.response_deserialize(
|
|
501
|
+
response_data=response_data,
|
|
502
|
+
response_types_map=_response_types_map,
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
@validate_call
|
|
507
|
+
async def create_or_update_bank_without_preload_content(
|
|
508
|
+
self,
|
|
509
|
+
bank_id: StrictStr,
|
|
510
|
+
create_bank_request: CreateBankRequest,
|
|
511
|
+
authorization: Optional[StrictStr] = None,
|
|
512
|
+
_request_timeout: Union[
|
|
513
|
+
None,
|
|
514
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
515
|
+
Tuple[
|
|
516
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
517
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
518
|
+
]
|
|
519
|
+
] = None,
|
|
520
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
521
|
+
_content_type: Optional[StrictStr] = None,
|
|
522
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
523
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
524
|
+
) -> RESTResponseType:
|
|
525
|
+
"""Create or update memory bank
|
|
526
|
+
|
|
527
|
+
Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
|
|
528
|
+
|
|
529
|
+
:param bank_id: (required)
|
|
530
|
+
:type bank_id: str
|
|
531
|
+
:param create_bank_request: (required)
|
|
532
|
+
:type create_bank_request: CreateBankRequest
|
|
533
|
+
:param authorization:
|
|
534
|
+
:type authorization: str
|
|
535
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
536
|
+
number provided, it will be total request
|
|
537
|
+
timeout. It can also be a pair (tuple) of
|
|
538
|
+
(connection, read) timeouts.
|
|
539
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
540
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
541
|
+
request; this effectively ignores the
|
|
542
|
+
authentication in the spec for a single request.
|
|
543
|
+
:type _request_auth: dict, optional
|
|
544
|
+
:param _content_type: force content-type for the request.
|
|
545
|
+
:type _content_type: str, Optional
|
|
546
|
+
:param _headers: set to override the headers for a single
|
|
547
|
+
request; this effectively ignores the headers
|
|
548
|
+
in the spec for a single request.
|
|
549
|
+
:type _headers: dict, optional
|
|
550
|
+
:param _host_index: set to override the host_index for a single
|
|
551
|
+
request; this effectively ignores the host_index
|
|
552
|
+
in the spec for a single request.
|
|
553
|
+
:type _host_index: int, optional
|
|
554
|
+
:return: Returns the result object.
|
|
555
|
+
""" # noqa: E501
|
|
556
|
+
|
|
557
|
+
_param = self._create_or_update_bank_serialize(
|
|
558
|
+
bank_id=bank_id,
|
|
559
|
+
create_bank_request=create_bank_request,
|
|
560
|
+
authorization=authorization,
|
|
561
|
+
_request_auth=_request_auth,
|
|
562
|
+
_content_type=_content_type,
|
|
563
|
+
_headers=_headers,
|
|
564
|
+
_host_index=_host_index
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
568
|
+
'200': "BankProfileResponse",
|
|
569
|
+
'422': "HTTPValidationError",
|
|
570
|
+
}
|
|
571
|
+
response_data = await self.api_client.call_api(
|
|
572
|
+
*_param,
|
|
573
|
+
_request_timeout=_request_timeout
|
|
574
|
+
)
|
|
575
|
+
return response_data.response
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
def _create_or_update_bank_serialize(
|
|
579
|
+
self,
|
|
580
|
+
bank_id,
|
|
581
|
+
create_bank_request,
|
|
582
|
+
authorization,
|
|
583
|
+
_request_auth,
|
|
584
|
+
_content_type,
|
|
585
|
+
_headers,
|
|
586
|
+
_host_index,
|
|
587
|
+
) -> RequestSerialized:
|
|
588
|
+
|
|
589
|
+
_host = None
|
|
590
|
+
|
|
591
|
+
_collection_formats: Dict[str, str] = {
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
_path_params: Dict[str, str] = {}
|
|
595
|
+
_query_params: List[Tuple[str, str]] = []
|
|
596
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
597
|
+
_form_params: List[Tuple[str, str]] = []
|
|
598
|
+
_files: Dict[
|
|
599
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
600
|
+
] = {}
|
|
601
|
+
_body_params: Optional[bytes] = None
|
|
602
|
+
|
|
603
|
+
# process the path parameters
|
|
604
|
+
if bank_id is not None:
|
|
605
|
+
_path_params['bank_id'] = bank_id
|
|
606
|
+
# process the query parameters
|
|
607
|
+
# process the header parameters
|
|
608
|
+
if authorization is not None:
|
|
609
|
+
_header_params['authorization'] = authorization
|
|
610
|
+
# process the form parameters
|
|
611
|
+
# process the body parameter
|
|
612
|
+
if create_bank_request is not None:
|
|
613
|
+
_body_params = create_bank_request
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
# set the HTTP header `Accept`
|
|
617
|
+
if 'Accept' not in _header_params:
|
|
618
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
619
|
+
[
|
|
620
|
+
'application/json'
|
|
621
|
+
]
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
# set the HTTP header `Content-Type`
|
|
625
|
+
if _content_type:
|
|
626
|
+
_header_params['Content-Type'] = _content_type
|
|
627
|
+
else:
|
|
628
|
+
_default_content_type = (
|
|
629
|
+
self.api_client.select_header_content_type(
|
|
630
|
+
[
|
|
631
|
+
'application/json'
|
|
632
|
+
]
|
|
633
|
+
)
|
|
634
|
+
)
|
|
635
|
+
if _default_content_type is not None:
|
|
636
|
+
_header_params['Content-Type'] = _default_content_type
|
|
637
|
+
|
|
638
|
+
# authentication setting
|
|
639
|
+
_auth_settings: List[str] = [
|
|
640
|
+
]
|
|
641
|
+
|
|
642
|
+
return self.api_client.param_serialize(
|
|
643
|
+
method='PUT',
|
|
644
|
+
resource_path='/v1/default/banks/{bank_id}',
|
|
645
|
+
path_params=_path_params,
|
|
646
|
+
query_params=_query_params,
|
|
647
|
+
header_params=_header_params,
|
|
648
|
+
body=_body_params,
|
|
649
|
+
post_params=_form_params,
|
|
650
|
+
files=_files,
|
|
651
|
+
auth_settings=_auth_settings,
|
|
652
|
+
collection_formats=_collection_formats,
|
|
653
|
+
_host=_host,
|
|
654
|
+
_request_auth=_request_auth
|
|
655
|
+
)
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
@validate_call
|
|
661
|
+
async def delete_bank(
|
|
662
|
+
self,
|
|
663
|
+
bank_id: StrictStr,
|
|
664
|
+
authorization: Optional[StrictStr] = None,
|
|
665
|
+
_request_timeout: Union[
|
|
666
|
+
None,
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
668
|
+
Tuple[
|
|
669
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
670
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
671
|
+
]
|
|
672
|
+
] = None,
|
|
673
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_content_type: Optional[StrictStr] = None,
|
|
675
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
676
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
677
|
+
) -> DeleteResponse:
|
|
678
|
+
"""Delete memory bank
|
|
679
|
+
|
|
680
|
+
Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
|
|
681
|
+
|
|
682
|
+
:param bank_id: (required)
|
|
683
|
+
:type bank_id: str
|
|
684
|
+
:param authorization:
|
|
685
|
+
:type authorization: str
|
|
686
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
687
|
+
number provided, it will be total request
|
|
688
|
+
timeout. It can also be a pair (tuple) of
|
|
689
|
+
(connection, read) timeouts.
|
|
690
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
691
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
692
|
+
request; this effectively ignores the
|
|
693
|
+
authentication in the spec for a single request.
|
|
694
|
+
:type _request_auth: dict, optional
|
|
695
|
+
:param _content_type: force content-type for the request.
|
|
696
|
+
:type _content_type: str, Optional
|
|
697
|
+
:param _headers: set to override the headers for a single
|
|
698
|
+
request; this effectively ignores the headers
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _headers: dict, optional
|
|
701
|
+
:param _host_index: set to override the host_index for a single
|
|
702
|
+
request; this effectively ignores the host_index
|
|
703
|
+
in the spec for a single request.
|
|
704
|
+
:type _host_index: int, optional
|
|
705
|
+
:return: Returns the result object.
|
|
706
|
+
""" # noqa: E501
|
|
707
|
+
|
|
708
|
+
_param = self._delete_bank_serialize(
|
|
709
|
+
bank_id=bank_id,
|
|
710
|
+
authorization=authorization,
|
|
711
|
+
_request_auth=_request_auth,
|
|
712
|
+
_content_type=_content_type,
|
|
713
|
+
_headers=_headers,
|
|
714
|
+
_host_index=_host_index
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
718
|
+
'200': "DeleteResponse",
|
|
719
|
+
'422': "HTTPValidationError",
|
|
720
|
+
}
|
|
721
|
+
response_data = await self.api_client.call_api(
|
|
722
|
+
*_param,
|
|
723
|
+
_request_timeout=_request_timeout
|
|
724
|
+
)
|
|
725
|
+
await response_data.read()
|
|
726
|
+
return self.api_client.response_deserialize(
|
|
727
|
+
response_data=response_data,
|
|
728
|
+
response_types_map=_response_types_map,
|
|
729
|
+
).data
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
@validate_call
|
|
733
|
+
async def delete_bank_with_http_info(
|
|
734
|
+
self,
|
|
735
|
+
bank_id: StrictStr,
|
|
736
|
+
authorization: Optional[StrictStr] = None,
|
|
737
|
+
_request_timeout: Union[
|
|
738
|
+
None,
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Tuple[
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
743
|
+
]
|
|
744
|
+
] = None,
|
|
745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_content_type: Optional[StrictStr] = None,
|
|
747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
749
|
+
) -> ApiResponse[DeleteResponse]:
|
|
750
|
+
"""Delete memory bank
|
|
751
|
+
|
|
752
|
+
Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
|
|
753
|
+
|
|
754
|
+
:param bank_id: (required)
|
|
755
|
+
:type bank_id: str
|
|
756
|
+
:param authorization:
|
|
757
|
+
:type authorization: str
|
|
758
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
759
|
+
number provided, it will be total request
|
|
760
|
+
timeout. It can also be a pair (tuple) of
|
|
761
|
+
(connection, read) timeouts.
|
|
762
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
763
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
764
|
+
request; this effectively ignores the
|
|
765
|
+
authentication in the spec for a single request.
|
|
766
|
+
:type _request_auth: dict, optional
|
|
767
|
+
:param _content_type: force content-type for the request.
|
|
768
|
+
:type _content_type: str, Optional
|
|
769
|
+
:param _headers: set to override the headers for a single
|
|
770
|
+
request; this effectively ignores the headers
|
|
771
|
+
in the spec for a single request.
|
|
772
|
+
:type _headers: dict, optional
|
|
773
|
+
:param _host_index: set to override the host_index for a single
|
|
774
|
+
request; this effectively ignores the host_index
|
|
775
|
+
in the spec for a single request.
|
|
776
|
+
:type _host_index: int, optional
|
|
777
|
+
:return: Returns the result object.
|
|
778
|
+
""" # noqa: E501
|
|
779
|
+
|
|
780
|
+
_param = self._delete_bank_serialize(
|
|
781
|
+
bank_id=bank_id,
|
|
782
|
+
authorization=authorization,
|
|
783
|
+
_request_auth=_request_auth,
|
|
784
|
+
_content_type=_content_type,
|
|
785
|
+
_headers=_headers,
|
|
786
|
+
_host_index=_host_index
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
790
|
+
'200': "DeleteResponse",
|
|
791
|
+
'422': "HTTPValidationError",
|
|
792
|
+
}
|
|
793
|
+
response_data = await self.api_client.call_api(
|
|
794
|
+
*_param,
|
|
795
|
+
_request_timeout=_request_timeout
|
|
796
|
+
)
|
|
797
|
+
await response_data.read()
|
|
798
|
+
return self.api_client.response_deserialize(
|
|
799
|
+
response_data=response_data,
|
|
800
|
+
response_types_map=_response_types_map,
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
@validate_call
|
|
805
|
+
async def delete_bank_without_preload_content(
|
|
806
|
+
self,
|
|
807
|
+
bank_id: StrictStr,
|
|
808
|
+
authorization: Optional[StrictStr] = None,
|
|
809
|
+
_request_timeout: Union[
|
|
810
|
+
None,
|
|
811
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
812
|
+
Tuple[
|
|
813
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
814
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
815
|
+
]
|
|
816
|
+
] = None,
|
|
817
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
818
|
+
_content_type: Optional[StrictStr] = None,
|
|
819
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
820
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
821
|
+
) -> RESTResponseType:
|
|
822
|
+
"""Delete memory bank
|
|
823
|
+
|
|
824
|
+
Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
|
|
825
|
+
|
|
826
|
+
:param bank_id: (required)
|
|
827
|
+
:type bank_id: str
|
|
828
|
+
:param authorization:
|
|
829
|
+
:type authorization: str
|
|
830
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
831
|
+
number provided, it will be total request
|
|
832
|
+
timeout. It can also be a pair (tuple) of
|
|
833
|
+
(connection, read) timeouts.
|
|
834
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
835
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
836
|
+
request; this effectively ignores the
|
|
837
|
+
authentication in the spec for a single request.
|
|
838
|
+
:type _request_auth: dict, optional
|
|
839
|
+
:param _content_type: force content-type for the request.
|
|
840
|
+
:type _content_type: str, Optional
|
|
841
|
+
:param _headers: set to override the headers for a single
|
|
842
|
+
request; this effectively ignores the headers
|
|
843
|
+
in the spec for a single request.
|
|
844
|
+
:type _headers: dict, optional
|
|
845
|
+
:param _host_index: set to override the host_index for a single
|
|
846
|
+
request; this effectively ignores the host_index
|
|
847
|
+
in the spec for a single request.
|
|
848
|
+
:type _host_index: int, optional
|
|
849
|
+
:return: Returns the result object.
|
|
850
|
+
""" # noqa: E501
|
|
851
|
+
|
|
852
|
+
_param = self._delete_bank_serialize(
|
|
853
|
+
bank_id=bank_id,
|
|
854
|
+
authorization=authorization,
|
|
855
|
+
_request_auth=_request_auth,
|
|
856
|
+
_content_type=_content_type,
|
|
857
|
+
_headers=_headers,
|
|
858
|
+
_host_index=_host_index
|
|
859
|
+
)
|
|
860
|
+
|
|
861
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
862
|
+
'200': "DeleteResponse",
|
|
863
|
+
'422': "HTTPValidationError",
|
|
864
|
+
}
|
|
865
|
+
response_data = await self.api_client.call_api(
|
|
866
|
+
*_param,
|
|
867
|
+
_request_timeout=_request_timeout
|
|
868
|
+
)
|
|
869
|
+
return response_data.response
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
def _delete_bank_serialize(
|
|
873
|
+
self,
|
|
874
|
+
bank_id,
|
|
875
|
+
authorization,
|
|
876
|
+
_request_auth,
|
|
877
|
+
_content_type,
|
|
878
|
+
_headers,
|
|
879
|
+
_host_index,
|
|
880
|
+
) -> RequestSerialized:
|
|
881
|
+
|
|
882
|
+
_host = None
|
|
883
|
+
|
|
884
|
+
_collection_formats: Dict[str, str] = {
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
_path_params: Dict[str, str] = {}
|
|
888
|
+
_query_params: List[Tuple[str, str]] = []
|
|
889
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
890
|
+
_form_params: List[Tuple[str, str]] = []
|
|
891
|
+
_files: Dict[
|
|
892
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
893
|
+
] = {}
|
|
894
|
+
_body_params: Optional[bytes] = None
|
|
895
|
+
|
|
896
|
+
# process the path parameters
|
|
897
|
+
if bank_id is not None:
|
|
898
|
+
_path_params['bank_id'] = bank_id
|
|
899
|
+
# process the query parameters
|
|
900
|
+
# process the header parameters
|
|
901
|
+
if authorization is not None:
|
|
902
|
+
_header_params['authorization'] = authorization
|
|
903
|
+
# process the form parameters
|
|
904
|
+
# process the body parameter
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
# set the HTTP header `Accept`
|
|
908
|
+
if 'Accept' not in _header_params:
|
|
909
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
910
|
+
[
|
|
911
|
+
'application/json'
|
|
912
|
+
]
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
# authentication setting
|
|
917
|
+
_auth_settings: List[str] = [
|
|
918
|
+
]
|
|
919
|
+
|
|
920
|
+
return self.api_client.param_serialize(
|
|
921
|
+
method='DELETE',
|
|
922
|
+
resource_path='/v1/default/banks/{bank_id}',
|
|
923
|
+
path_params=_path_params,
|
|
924
|
+
query_params=_query_params,
|
|
925
|
+
header_params=_header_params,
|
|
926
|
+
body=_body_params,
|
|
927
|
+
post_params=_form_params,
|
|
928
|
+
files=_files,
|
|
929
|
+
auth_settings=_auth_settings,
|
|
930
|
+
collection_formats=_collection_formats,
|
|
931
|
+
_host=_host,
|
|
932
|
+
_request_auth=_request_auth
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
@validate_call
|
|
939
|
+
async def get_agent_stats(
|
|
940
|
+
self,
|
|
941
|
+
bank_id: StrictStr,
|
|
942
|
+
_request_timeout: Union[
|
|
943
|
+
None,
|
|
944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
945
|
+
Tuple[
|
|
946
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
948
|
+
]
|
|
949
|
+
] = None,
|
|
950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
951
|
+
_content_type: Optional[StrictStr] = None,
|
|
952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
954
|
+
) -> BankStatsResponse:
|
|
955
|
+
"""Get statistics for memory bank
|
|
956
|
+
|
|
957
|
+
Get statistics about nodes and links for a specific agent
|
|
958
|
+
|
|
959
|
+
:param bank_id: (required)
|
|
960
|
+
:type bank_id: str
|
|
961
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
962
|
+
number provided, it will be total request
|
|
963
|
+
timeout. It can also be a pair (tuple) of
|
|
964
|
+
(connection, read) timeouts.
|
|
965
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
966
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
967
|
+
request; this effectively ignores the
|
|
968
|
+
authentication in the spec for a single request.
|
|
969
|
+
:type _request_auth: dict, optional
|
|
970
|
+
:param _content_type: force content-type for the request.
|
|
971
|
+
:type _content_type: str, Optional
|
|
972
|
+
:param _headers: set to override the headers for a single
|
|
973
|
+
request; this effectively ignores the headers
|
|
974
|
+
in the spec for a single request.
|
|
975
|
+
:type _headers: dict, optional
|
|
976
|
+
:param _host_index: set to override the host_index for a single
|
|
977
|
+
request; this effectively ignores the host_index
|
|
978
|
+
in the spec for a single request.
|
|
979
|
+
:type _host_index: int, optional
|
|
980
|
+
:return: Returns the result object.
|
|
981
|
+
""" # noqa: E501
|
|
982
|
+
|
|
983
|
+
_param = self._get_agent_stats_serialize(
|
|
984
|
+
bank_id=bank_id,
|
|
985
|
+
_request_auth=_request_auth,
|
|
986
|
+
_content_type=_content_type,
|
|
987
|
+
_headers=_headers,
|
|
988
|
+
_host_index=_host_index
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
992
|
+
'200': "BankStatsResponse",
|
|
993
|
+
'422': "HTTPValidationError",
|
|
994
|
+
}
|
|
995
|
+
response_data = await self.api_client.call_api(
|
|
996
|
+
*_param,
|
|
997
|
+
_request_timeout=_request_timeout
|
|
998
|
+
)
|
|
999
|
+
await response_data.read()
|
|
1000
|
+
return self.api_client.response_deserialize(
|
|
1001
|
+
response_data=response_data,
|
|
1002
|
+
response_types_map=_response_types_map,
|
|
1003
|
+
).data
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
@validate_call
|
|
1007
|
+
async def get_agent_stats_with_http_info(
|
|
1008
|
+
self,
|
|
1009
|
+
bank_id: StrictStr,
|
|
1010
|
+
_request_timeout: Union[
|
|
1011
|
+
None,
|
|
1012
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1013
|
+
Tuple[
|
|
1014
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1015
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1016
|
+
]
|
|
1017
|
+
] = None,
|
|
1018
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1019
|
+
_content_type: Optional[StrictStr] = None,
|
|
1020
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1021
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1022
|
+
) -> ApiResponse[BankStatsResponse]:
|
|
1023
|
+
"""Get statistics for memory bank
|
|
1024
|
+
|
|
1025
|
+
Get statistics about nodes and links for a specific agent
|
|
1026
|
+
|
|
1027
|
+
:param bank_id: (required)
|
|
1028
|
+
:type bank_id: str
|
|
1029
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1030
|
+
number provided, it will be total request
|
|
1031
|
+
timeout. It can also be a pair (tuple) of
|
|
1032
|
+
(connection, read) timeouts.
|
|
1033
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1034
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1035
|
+
request; this effectively ignores the
|
|
1036
|
+
authentication in the spec for a single request.
|
|
1037
|
+
:type _request_auth: dict, optional
|
|
1038
|
+
:param _content_type: force content-type for the request.
|
|
1039
|
+
:type _content_type: str, Optional
|
|
1040
|
+
:param _headers: set to override the headers for a single
|
|
1041
|
+
request; this effectively ignores the headers
|
|
1042
|
+
in the spec for a single request.
|
|
1043
|
+
:type _headers: dict, optional
|
|
1044
|
+
:param _host_index: set to override the host_index for a single
|
|
1045
|
+
request; this effectively ignores the host_index
|
|
1046
|
+
in the spec for a single request.
|
|
1047
|
+
:type _host_index: int, optional
|
|
1048
|
+
:return: Returns the result object.
|
|
1049
|
+
""" # noqa: E501
|
|
1050
|
+
|
|
1051
|
+
_param = self._get_agent_stats_serialize(
|
|
1052
|
+
bank_id=bank_id,
|
|
1053
|
+
_request_auth=_request_auth,
|
|
1054
|
+
_content_type=_content_type,
|
|
1055
|
+
_headers=_headers,
|
|
1056
|
+
_host_index=_host_index
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1060
|
+
'200': "BankStatsResponse",
|
|
1061
|
+
'422': "HTTPValidationError",
|
|
1062
|
+
}
|
|
1063
|
+
response_data = await self.api_client.call_api(
|
|
1064
|
+
*_param,
|
|
1065
|
+
_request_timeout=_request_timeout
|
|
1066
|
+
)
|
|
1067
|
+
await response_data.read()
|
|
1068
|
+
return self.api_client.response_deserialize(
|
|
1069
|
+
response_data=response_data,
|
|
1070
|
+
response_types_map=_response_types_map,
|
|
1071
|
+
)
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
@validate_call
|
|
1075
|
+
async def get_agent_stats_without_preload_content(
|
|
1076
|
+
self,
|
|
1077
|
+
bank_id: StrictStr,
|
|
1078
|
+
_request_timeout: Union[
|
|
1079
|
+
None,
|
|
1080
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1081
|
+
Tuple[
|
|
1082
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1083
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1084
|
+
]
|
|
1085
|
+
] = None,
|
|
1086
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1087
|
+
_content_type: Optional[StrictStr] = None,
|
|
1088
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1089
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1090
|
+
) -> RESTResponseType:
|
|
1091
|
+
"""Get statistics for memory bank
|
|
1092
|
+
|
|
1093
|
+
Get statistics about nodes and links for a specific agent
|
|
1094
|
+
|
|
1095
|
+
:param bank_id: (required)
|
|
1096
|
+
:type bank_id: str
|
|
1097
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1098
|
+
number provided, it will be total request
|
|
1099
|
+
timeout. It can also be a pair (tuple) of
|
|
1100
|
+
(connection, read) timeouts.
|
|
1101
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1102
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1103
|
+
request; this effectively ignores the
|
|
1104
|
+
authentication in the spec for a single request.
|
|
1105
|
+
:type _request_auth: dict, optional
|
|
1106
|
+
:param _content_type: force content-type for the request.
|
|
1107
|
+
:type _content_type: str, Optional
|
|
1108
|
+
:param _headers: set to override the headers for a single
|
|
1109
|
+
request; this effectively ignores the headers
|
|
1110
|
+
in the spec for a single request.
|
|
1111
|
+
:type _headers: dict, optional
|
|
1112
|
+
:param _host_index: set to override the host_index for a single
|
|
1113
|
+
request; this effectively ignores the host_index
|
|
1114
|
+
in the spec for a single request.
|
|
1115
|
+
:type _host_index: int, optional
|
|
1116
|
+
:return: Returns the result object.
|
|
1117
|
+
""" # noqa: E501
|
|
1118
|
+
|
|
1119
|
+
_param = self._get_agent_stats_serialize(
|
|
1120
|
+
bank_id=bank_id,
|
|
1121
|
+
_request_auth=_request_auth,
|
|
1122
|
+
_content_type=_content_type,
|
|
1123
|
+
_headers=_headers,
|
|
1124
|
+
_host_index=_host_index
|
|
1125
|
+
)
|
|
1126
|
+
|
|
1127
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1128
|
+
'200': "BankStatsResponse",
|
|
1129
|
+
'422': "HTTPValidationError",
|
|
1130
|
+
}
|
|
1131
|
+
response_data = await self.api_client.call_api(
|
|
1132
|
+
*_param,
|
|
1133
|
+
_request_timeout=_request_timeout
|
|
1134
|
+
)
|
|
1135
|
+
return response_data.response
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
def _get_agent_stats_serialize(
|
|
1139
|
+
self,
|
|
1140
|
+
bank_id,
|
|
1141
|
+
_request_auth,
|
|
1142
|
+
_content_type,
|
|
1143
|
+
_headers,
|
|
1144
|
+
_host_index,
|
|
1145
|
+
) -> RequestSerialized:
|
|
1146
|
+
|
|
1147
|
+
_host = None
|
|
1148
|
+
|
|
1149
|
+
_collection_formats: Dict[str, str] = {
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
_path_params: Dict[str, str] = {}
|
|
1153
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1154
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1155
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1156
|
+
_files: Dict[
|
|
1157
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1158
|
+
] = {}
|
|
1159
|
+
_body_params: Optional[bytes] = None
|
|
1160
|
+
|
|
1161
|
+
# process the path parameters
|
|
1162
|
+
if bank_id is not None:
|
|
1163
|
+
_path_params['bank_id'] = bank_id
|
|
1164
|
+
# process the query parameters
|
|
1165
|
+
# process the header parameters
|
|
1166
|
+
# process the form parameters
|
|
1167
|
+
# process the body parameter
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
# set the HTTP header `Accept`
|
|
1171
|
+
if 'Accept' not in _header_params:
|
|
1172
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1173
|
+
[
|
|
1174
|
+
'application/json'
|
|
1175
|
+
]
|
|
1176
|
+
)
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
# authentication setting
|
|
1180
|
+
_auth_settings: List[str] = [
|
|
1181
|
+
]
|
|
1182
|
+
|
|
1183
|
+
return self.api_client.param_serialize(
|
|
1184
|
+
method='GET',
|
|
1185
|
+
resource_path='/v1/default/banks/{bank_id}/stats',
|
|
1186
|
+
path_params=_path_params,
|
|
1187
|
+
query_params=_query_params,
|
|
1188
|
+
header_params=_header_params,
|
|
1189
|
+
body=_body_params,
|
|
1190
|
+
post_params=_form_params,
|
|
1191
|
+
files=_files,
|
|
1192
|
+
auth_settings=_auth_settings,
|
|
1193
|
+
collection_formats=_collection_formats,
|
|
1194
|
+
_host=_host,
|
|
1195
|
+
_request_auth=_request_auth
|
|
1196
|
+
)
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
@validate_call
|
|
1202
|
+
async def get_bank_profile(
|
|
1203
|
+
self,
|
|
1204
|
+
bank_id: StrictStr,
|
|
1205
|
+
authorization: Optional[StrictStr] = None,
|
|
1206
|
+
_request_timeout: Union[
|
|
1207
|
+
None,
|
|
1208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1209
|
+
Tuple[
|
|
1210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1212
|
+
]
|
|
1213
|
+
] = None,
|
|
1214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1215
|
+
_content_type: Optional[StrictStr] = None,
|
|
1216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1218
|
+
) -> BankProfileResponse:
|
|
1219
|
+
"""Get memory bank profile
|
|
1220
|
+
|
|
1221
|
+
Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
|
|
1222
|
+
|
|
1223
|
+
:param bank_id: (required)
|
|
1224
|
+
:type bank_id: str
|
|
1225
|
+
:param authorization:
|
|
1226
|
+
:type authorization: str
|
|
1227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1228
|
+
number provided, it will be total request
|
|
1229
|
+
timeout. It can also be a pair (tuple) of
|
|
1230
|
+
(connection, read) timeouts.
|
|
1231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1233
|
+
request; this effectively ignores the
|
|
1234
|
+
authentication in the spec for a single request.
|
|
1235
|
+
:type _request_auth: dict, optional
|
|
1236
|
+
:param _content_type: force content-type for the request.
|
|
1237
|
+
:type _content_type: str, Optional
|
|
1238
|
+
:param _headers: set to override the headers for a single
|
|
1239
|
+
request; this effectively ignores the headers
|
|
1240
|
+
in the spec for a single request.
|
|
1241
|
+
:type _headers: dict, optional
|
|
1242
|
+
:param _host_index: set to override the host_index for a single
|
|
1243
|
+
request; this effectively ignores the host_index
|
|
1244
|
+
in the spec for a single request.
|
|
1245
|
+
:type _host_index: int, optional
|
|
1246
|
+
:return: Returns the result object.
|
|
1247
|
+
""" # noqa: E501
|
|
1248
|
+
|
|
1249
|
+
_param = self._get_bank_profile_serialize(
|
|
1250
|
+
bank_id=bank_id,
|
|
1251
|
+
authorization=authorization,
|
|
1252
|
+
_request_auth=_request_auth,
|
|
1253
|
+
_content_type=_content_type,
|
|
1254
|
+
_headers=_headers,
|
|
1255
|
+
_host_index=_host_index
|
|
1256
|
+
)
|
|
1257
|
+
|
|
1258
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1259
|
+
'200': "BankProfileResponse",
|
|
1260
|
+
'422': "HTTPValidationError",
|
|
1261
|
+
}
|
|
1262
|
+
response_data = await self.api_client.call_api(
|
|
1263
|
+
*_param,
|
|
1264
|
+
_request_timeout=_request_timeout
|
|
1265
|
+
)
|
|
1266
|
+
await response_data.read()
|
|
1267
|
+
return self.api_client.response_deserialize(
|
|
1268
|
+
response_data=response_data,
|
|
1269
|
+
response_types_map=_response_types_map,
|
|
1270
|
+
).data
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
@validate_call
|
|
1274
|
+
async def get_bank_profile_with_http_info(
|
|
1275
|
+
self,
|
|
1276
|
+
bank_id: StrictStr,
|
|
1277
|
+
authorization: Optional[StrictStr] = None,
|
|
1278
|
+
_request_timeout: Union[
|
|
1279
|
+
None,
|
|
1280
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1281
|
+
Tuple[
|
|
1282
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1283
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1284
|
+
]
|
|
1285
|
+
] = None,
|
|
1286
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1287
|
+
_content_type: Optional[StrictStr] = None,
|
|
1288
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1290
|
+
) -> ApiResponse[BankProfileResponse]:
|
|
1291
|
+
"""Get memory bank profile
|
|
1292
|
+
|
|
1293
|
+
Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
|
|
1294
|
+
|
|
1295
|
+
:param bank_id: (required)
|
|
1296
|
+
:type bank_id: str
|
|
1297
|
+
:param authorization:
|
|
1298
|
+
:type authorization: str
|
|
1299
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1300
|
+
number provided, it will be total request
|
|
1301
|
+
timeout. It can also be a pair (tuple) of
|
|
1302
|
+
(connection, read) timeouts.
|
|
1303
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1304
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1305
|
+
request; this effectively ignores the
|
|
1306
|
+
authentication in the spec for a single request.
|
|
1307
|
+
:type _request_auth: dict, optional
|
|
1308
|
+
:param _content_type: force content-type for the request.
|
|
1309
|
+
:type _content_type: str, Optional
|
|
1310
|
+
:param _headers: set to override the headers for a single
|
|
1311
|
+
request; this effectively ignores the headers
|
|
1312
|
+
in the spec for a single request.
|
|
1313
|
+
:type _headers: dict, optional
|
|
1314
|
+
:param _host_index: set to override the host_index for a single
|
|
1315
|
+
request; this effectively ignores the host_index
|
|
1316
|
+
in the spec for a single request.
|
|
1317
|
+
:type _host_index: int, optional
|
|
1318
|
+
:return: Returns the result object.
|
|
1319
|
+
""" # noqa: E501
|
|
1320
|
+
|
|
1321
|
+
_param = self._get_bank_profile_serialize(
|
|
1322
|
+
bank_id=bank_id,
|
|
1323
|
+
authorization=authorization,
|
|
1324
|
+
_request_auth=_request_auth,
|
|
1325
|
+
_content_type=_content_type,
|
|
1326
|
+
_headers=_headers,
|
|
1327
|
+
_host_index=_host_index
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1331
|
+
'200': "BankProfileResponse",
|
|
1332
|
+
'422': "HTTPValidationError",
|
|
1333
|
+
}
|
|
1334
|
+
response_data = await self.api_client.call_api(
|
|
1335
|
+
*_param,
|
|
1336
|
+
_request_timeout=_request_timeout
|
|
1337
|
+
)
|
|
1338
|
+
await response_data.read()
|
|
1339
|
+
return self.api_client.response_deserialize(
|
|
1340
|
+
response_data=response_data,
|
|
1341
|
+
response_types_map=_response_types_map,
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
@validate_call
|
|
1346
|
+
async def get_bank_profile_without_preload_content(
|
|
1347
|
+
self,
|
|
1348
|
+
bank_id: StrictStr,
|
|
1349
|
+
authorization: Optional[StrictStr] = None,
|
|
1350
|
+
_request_timeout: Union[
|
|
1351
|
+
None,
|
|
1352
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1353
|
+
Tuple[
|
|
1354
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1355
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1356
|
+
]
|
|
1357
|
+
] = None,
|
|
1358
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1359
|
+
_content_type: Optional[StrictStr] = None,
|
|
1360
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1361
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1362
|
+
) -> RESTResponseType:
|
|
1363
|
+
"""Get memory bank profile
|
|
1364
|
+
|
|
1365
|
+
Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
|
|
1366
|
+
|
|
1367
|
+
:param bank_id: (required)
|
|
1368
|
+
:type bank_id: str
|
|
1369
|
+
:param authorization:
|
|
1370
|
+
:type authorization: str
|
|
1371
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1372
|
+
number provided, it will be total request
|
|
1373
|
+
timeout. It can also be a pair (tuple) of
|
|
1374
|
+
(connection, read) timeouts.
|
|
1375
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1376
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1377
|
+
request; this effectively ignores the
|
|
1378
|
+
authentication in the spec for a single request.
|
|
1379
|
+
:type _request_auth: dict, optional
|
|
1380
|
+
:param _content_type: force content-type for the request.
|
|
1381
|
+
:type _content_type: str, Optional
|
|
1382
|
+
:param _headers: set to override the headers for a single
|
|
1383
|
+
request; this effectively ignores the headers
|
|
1384
|
+
in the spec for a single request.
|
|
1385
|
+
:type _headers: dict, optional
|
|
1386
|
+
:param _host_index: set to override the host_index for a single
|
|
1387
|
+
request; this effectively ignores the host_index
|
|
1388
|
+
in the spec for a single request.
|
|
1389
|
+
:type _host_index: int, optional
|
|
1390
|
+
:return: Returns the result object.
|
|
1391
|
+
""" # noqa: E501
|
|
1392
|
+
|
|
1393
|
+
_param = self._get_bank_profile_serialize(
|
|
1394
|
+
bank_id=bank_id,
|
|
1395
|
+
authorization=authorization,
|
|
1396
|
+
_request_auth=_request_auth,
|
|
1397
|
+
_content_type=_content_type,
|
|
1398
|
+
_headers=_headers,
|
|
1399
|
+
_host_index=_host_index
|
|
1400
|
+
)
|
|
1401
|
+
|
|
1402
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1403
|
+
'200': "BankProfileResponse",
|
|
1404
|
+
'422': "HTTPValidationError",
|
|
1405
|
+
}
|
|
1406
|
+
response_data = await self.api_client.call_api(
|
|
1407
|
+
*_param,
|
|
1408
|
+
_request_timeout=_request_timeout
|
|
1409
|
+
)
|
|
1410
|
+
return response_data.response
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
def _get_bank_profile_serialize(
|
|
1414
|
+
self,
|
|
1415
|
+
bank_id,
|
|
1416
|
+
authorization,
|
|
1417
|
+
_request_auth,
|
|
1418
|
+
_content_type,
|
|
1419
|
+
_headers,
|
|
1420
|
+
_host_index,
|
|
1421
|
+
) -> RequestSerialized:
|
|
1422
|
+
|
|
1423
|
+
_host = None
|
|
1424
|
+
|
|
1425
|
+
_collection_formats: Dict[str, str] = {
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
_path_params: Dict[str, str] = {}
|
|
1429
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1430
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1431
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1432
|
+
_files: Dict[
|
|
1433
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1434
|
+
] = {}
|
|
1435
|
+
_body_params: Optional[bytes] = None
|
|
1436
|
+
|
|
1437
|
+
# process the path parameters
|
|
1438
|
+
if bank_id is not None:
|
|
1439
|
+
_path_params['bank_id'] = bank_id
|
|
1440
|
+
# process the query parameters
|
|
1441
|
+
# process the header parameters
|
|
1442
|
+
if authorization is not None:
|
|
1443
|
+
_header_params['authorization'] = authorization
|
|
1444
|
+
# process the form parameters
|
|
1445
|
+
# process the body parameter
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
# set the HTTP header `Accept`
|
|
1449
|
+
if 'Accept' not in _header_params:
|
|
1450
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1451
|
+
[
|
|
1452
|
+
'application/json'
|
|
1453
|
+
]
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
# authentication setting
|
|
1458
|
+
_auth_settings: List[str] = [
|
|
1459
|
+
]
|
|
1460
|
+
|
|
1461
|
+
return self.api_client.param_serialize(
|
|
1462
|
+
method='GET',
|
|
1463
|
+
resource_path='/v1/default/banks/{bank_id}/profile',
|
|
1464
|
+
path_params=_path_params,
|
|
1465
|
+
query_params=_query_params,
|
|
1466
|
+
header_params=_header_params,
|
|
1467
|
+
body=_body_params,
|
|
1468
|
+
post_params=_form_params,
|
|
1469
|
+
files=_files,
|
|
1470
|
+
auth_settings=_auth_settings,
|
|
1471
|
+
collection_formats=_collection_formats,
|
|
1472
|
+
_host=_host,
|
|
1473
|
+
_request_auth=_request_auth
|
|
1474
|
+
)
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
@validate_call
|
|
1480
|
+
async def list_banks(
|
|
1481
|
+
self,
|
|
1482
|
+
authorization: Optional[StrictStr] = None,
|
|
1483
|
+
_request_timeout: Union[
|
|
1484
|
+
None,
|
|
1485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1486
|
+
Tuple[
|
|
1487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1488
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1489
|
+
]
|
|
1490
|
+
] = None,
|
|
1491
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1492
|
+
_content_type: Optional[StrictStr] = None,
|
|
1493
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1494
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1495
|
+
) -> BankListResponse:
|
|
1496
|
+
"""List all memory banks
|
|
1497
|
+
|
|
1498
|
+
Get a list of all agents with their profiles
|
|
1499
|
+
|
|
1500
|
+
:param authorization:
|
|
1501
|
+
:type authorization: str
|
|
1502
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1503
|
+
number provided, it will be total request
|
|
1504
|
+
timeout. It can also be a pair (tuple) of
|
|
1505
|
+
(connection, read) timeouts.
|
|
1506
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1507
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1508
|
+
request; this effectively ignores the
|
|
1509
|
+
authentication in the spec for a single request.
|
|
1510
|
+
:type _request_auth: dict, optional
|
|
1511
|
+
:param _content_type: force content-type for the request.
|
|
1512
|
+
:type _content_type: str, Optional
|
|
1513
|
+
:param _headers: set to override the headers for a single
|
|
1514
|
+
request; this effectively ignores the headers
|
|
1515
|
+
in the spec for a single request.
|
|
1516
|
+
:type _headers: dict, optional
|
|
1517
|
+
:param _host_index: set to override the host_index for a single
|
|
1518
|
+
request; this effectively ignores the host_index
|
|
1519
|
+
in the spec for a single request.
|
|
1520
|
+
:type _host_index: int, optional
|
|
1521
|
+
:return: Returns the result object.
|
|
1522
|
+
""" # noqa: E501
|
|
1523
|
+
|
|
1524
|
+
_param = self._list_banks_serialize(
|
|
1525
|
+
authorization=authorization,
|
|
1526
|
+
_request_auth=_request_auth,
|
|
1527
|
+
_content_type=_content_type,
|
|
1528
|
+
_headers=_headers,
|
|
1529
|
+
_host_index=_host_index
|
|
1530
|
+
)
|
|
1531
|
+
|
|
1532
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1533
|
+
'200': "BankListResponse",
|
|
1534
|
+
'422': "HTTPValidationError",
|
|
1535
|
+
}
|
|
1536
|
+
response_data = await self.api_client.call_api(
|
|
1537
|
+
*_param,
|
|
1538
|
+
_request_timeout=_request_timeout
|
|
1539
|
+
)
|
|
1540
|
+
await response_data.read()
|
|
1541
|
+
return self.api_client.response_deserialize(
|
|
1542
|
+
response_data=response_data,
|
|
1543
|
+
response_types_map=_response_types_map,
|
|
1544
|
+
).data
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
@validate_call
|
|
1548
|
+
async def list_banks_with_http_info(
|
|
1549
|
+
self,
|
|
1550
|
+
authorization: Optional[StrictStr] = None,
|
|
1551
|
+
_request_timeout: Union[
|
|
1552
|
+
None,
|
|
1553
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1554
|
+
Tuple[
|
|
1555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1556
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1557
|
+
]
|
|
1558
|
+
] = None,
|
|
1559
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1560
|
+
_content_type: Optional[StrictStr] = None,
|
|
1561
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1562
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1563
|
+
) -> ApiResponse[BankListResponse]:
|
|
1564
|
+
"""List all memory banks
|
|
1565
|
+
|
|
1566
|
+
Get a list of all agents with their profiles
|
|
1567
|
+
|
|
1568
|
+
:param authorization:
|
|
1569
|
+
:type authorization: str
|
|
1570
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1571
|
+
number provided, it will be total request
|
|
1572
|
+
timeout. It can also be a pair (tuple) of
|
|
1573
|
+
(connection, read) timeouts.
|
|
1574
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1575
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1576
|
+
request; this effectively ignores the
|
|
1577
|
+
authentication in the spec for a single request.
|
|
1578
|
+
:type _request_auth: dict, optional
|
|
1579
|
+
:param _content_type: force content-type for the request.
|
|
1580
|
+
:type _content_type: str, Optional
|
|
1581
|
+
:param _headers: set to override the headers for a single
|
|
1582
|
+
request; this effectively ignores the headers
|
|
1583
|
+
in the spec for a single request.
|
|
1584
|
+
:type _headers: dict, optional
|
|
1585
|
+
:param _host_index: set to override the host_index for a single
|
|
1586
|
+
request; this effectively ignores the host_index
|
|
1587
|
+
in the spec for a single request.
|
|
1588
|
+
:type _host_index: int, optional
|
|
1589
|
+
:return: Returns the result object.
|
|
1590
|
+
""" # noqa: E501
|
|
1591
|
+
|
|
1592
|
+
_param = self._list_banks_serialize(
|
|
1593
|
+
authorization=authorization,
|
|
1594
|
+
_request_auth=_request_auth,
|
|
1595
|
+
_content_type=_content_type,
|
|
1596
|
+
_headers=_headers,
|
|
1597
|
+
_host_index=_host_index
|
|
1598
|
+
)
|
|
1599
|
+
|
|
1600
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1601
|
+
'200': "BankListResponse",
|
|
1602
|
+
'422': "HTTPValidationError",
|
|
1603
|
+
}
|
|
1604
|
+
response_data = await self.api_client.call_api(
|
|
1605
|
+
*_param,
|
|
1606
|
+
_request_timeout=_request_timeout
|
|
1607
|
+
)
|
|
1608
|
+
await response_data.read()
|
|
1609
|
+
return self.api_client.response_deserialize(
|
|
1610
|
+
response_data=response_data,
|
|
1611
|
+
response_types_map=_response_types_map,
|
|
1612
|
+
)
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
@validate_call
|
|
1616
|
+
async def list_banks_without_preload_content(
|
|
1617
|
+
self,
|
|
1618
|
+
authorization: Optional[StrictStr] = None,
|
|
1619
|
+
_request_timeout: Union[
|
|
1620
|
+
None,
|
|
1621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1622
|
+
Tuple[
|
|
1623
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1624
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1625
|
+
]
|
|
1626
|
+
] = None,
|
|
1627
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1628
|
+
_content_type: Optional[StrictStr] = None,
|
|
1629
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1630
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1631
|
+
) -> RESTResponseType:
|
|
1632
|
+
"""List all memory banks
|
|
1633
|
+
|
|
1634
|
+
Get a list of all agents with their profiles
|
|
1635
|
+
|
|
1636
|
+
:param authorization:
|
|
1637
|
+
:type authorization: str
|
|
1638
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1639
|
+
number provided, it will be total request
|
|
1640
|
+
timeout. It can also be a pair (tuple) of
|
|
1641
|
+
(connection, read) timeouts.
|
|
1642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1644
|
+
request; this effectively ignores the
|
|
1645
|
+
authentication in the spec for a single request.
|
|
1646
|
+
:type _request_auth: dict, optional
|
|
1647
|
+
:param _content_type: force content-type for the request.
|
|
1648
|
+
:type _content_type: str, Optional
|
|
1649
|
+
:param _headers: set to override the headers for a single
|
|
1650
|
+
request; this effectively ignores the headers
|
|
1651
|
+
in the spec for a single request.
|
|
1652
|
+
:type _headers: dict, optional
|
|
1653
|
+
:param _host_index: set to override the host_index for a single
|
|
1654
|
+
request; this effectively ignores the host_index
|
|
1655
|
+
in the spec for a single request.
|
|
1656
|
+
:type _host_index: int, optional
|
|
1657
|
+
:return: Returns the result object.
|
|
1658
|
+
""" # noqa: E501
|
|
1659
|
+
|
|
1660
|
+
_param = self._list_banks_serialize(
|
|
1661
|
+
authorization=authorization,
|
|
1662
|
+
_request_auth=_request_auth,
|
|
1663
|
+
_content_type=_content_type,
|
|
1664
|
+
_headers=_headers,
|
|
1665
|
+
_host_index=_host_index
|
|
1666
|
+
)
|
|
1667
|
+
|
|
1668
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1669
|
+
'200': "BankListResponse",
|
|
1670
|
+
'422': "HTTPValidationError",
|
|
1671
|
+
}
|
|
1672
|
+
response_data = await self.api_client.call_api(
|
|
1673
|
+
*_param,
|
|
1674
|
+
_request_timeout=_request_timeout
|
|
1675
|
+
)
|
|
1676
|
+
return response_data.response
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
def _list_banks_serialize(
|
|
1680
|
+
self,
|
|
1681
|
+
authorization,
|
|
1682
|
+
_request_auth,
|
|
1683
|
+
_content_type,
|
|
1684
|
+
_headers,
|
|
1685
|
+
_host_index,
|
|
1686
|
+
) -> RequestSerialized:
|
|
1687
|
+
|
|
1688
|
+
_host = None
|
|
1689
|
+
|
|
1690
|
+
_collection_formats: Dict[str, str] = {
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
_path_params: Dict[str, str] = {}
|
|
1694
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1695
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1696
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1697
|
+
_files: Dict[
|
|
1698
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1699
|
+
] = {}
|
|
1700
|
+
_body_params: Optional[bytes] = None
|
|
1701
|
+
|
|
1702
|
+
# process the path parameters
|
|
1703
|
+
# process the query parameters
|
|
1704
|
+
# process the header parameters
|
|
1705
|
+
if authorization is not None:
|
|
1706
|
+
_header_params['authorization'] = authorization
|
|
1707
|
+
# process the form parameters
|
|
1708
|
+
# process the body parameter
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
# set the HTTP header `Accept`
|
|
1712
|
+
if 'Accept' not in _header_params:
|
|
1713
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1714
|
+
[
|
|
1715
|
+
'application/json'
|
|
1716
|
+
]
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
# authentication setting
|
|
1721
|
+
_auth_settings: List[str] = [
|
|
1722
|
+
]
|
|
1723
|
+
|
|
1724
|
+
return self.api_client.param_serialize(
|
|
1725
|
+
method='GET',
|
|
1726
|
+
resource_path='/v1/default/banks',
|
|
1727
|
+
path_params=_path_params,
|
|
1728
|
+
query_params=_query_params,
|
|
1729
|
+
header_params=_header_params,
|
|
1730
|
+
body=_body_params,
|
|
1731
|
+
post_params=_form_params,
|
|
1732
|
+
files=_files,
|
|
1733
|
+
auth_settings=_auth_settings,
|
|
1734
|
+
collection_formats=_collection_formats,
|
|
1735
|
+
_host=_host,
|
|
1736
|
+
_request_auth=_request_auth
|
|
1737
|
+
)
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
@validate_call
|
|
1743
|
+
async def update_bank_disposition(
|
|
1744
|
+
self,
|
|
1745
|
+
bank_id: StrictStr,
|
|
1746
|
+
update_disposition_request: UpdateDispositionRequest,
|
|
1747
|
+
authorization: Optional[StrictStr] = None,
|
|
1748
|
+
_request_timeout: Union[
|
|
1749
|
+
None,
|
|
1750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1751
|
+
Tuple[
|
|
1752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1753
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1754
|
+
]
|
|
1755
|
+
] = None,
|
|
1756
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1757
|
+
_content_type: Optional[StrictStr] = None,
|
|
1758
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1759
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1760
|
+
) -> BankProfileResponse:
|
|
1761
|
+
"""Update memory bank disposition
|
|
1762
|
+
|
|
1763
|
+
Update bank's disposition traits (skepticism, literalism, empathy)
|
|
1764
|
+
|
|
1765
|
+
:param bank_id: (required)
|
|
1766
|
+
:type bank_id: str
|
|
1767
|
+
:param update_disposition_request: (required)
|
|
1768
|
+
:type update_disposition_request: UpdateDispositionRequest
|
|
1769
|
+
:param authorization:
|
|
1770
|
+
:type authorization: str
|
|
1771
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1772
|
+
number provided, it will be total request
|
|
1773
|
+
timeout. It can also be a pair (tuple) of
|
|
1774
|
+
(connection, read) timeouts.
|
|
1775
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1776
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1777
|
+
request; this effectively ignores the
|
|
1778
|
+
authentication in the spec for a single request.
|
|
1779
|
+
:type _request_auth: dict, optional
|
|
1780
|
+
:param _content_type: force content-type for the request.
|
|
1781
|
+
:type _content_type: str, Optional
|
|
1782
|
+
:param _headers: set to override the headers for a single
|
|
1783
|
+
request; this effectively ignores the headers
|
|
1784
|
+
in the spec for a single request.
|
|
1785
|
+
:type _headers: dict, optional
|
|
1786
|
+
:param _host_index: set to override the host_index for a single
|
|
1787
|
+
request; this effectively ignores the host_index
|
|
1788
|
+
in the spec for a single request.
|
|
1789
|
+
:type _host_index: int, optional
|
|
1790
|
+
:return: Returns the result object.
|
|
1791
|
+
""" # noqa: E501
|
|
1792
|
+
|
|
1793
|
+
_param = self._update_bank_disposition_serialize(
|
|
1794
|
+
bank_id=bank_id,
|
|
1795
|
+
update_disposition_request=update_disposition_request,
|
|
1796
|
+
authorization=authorization,
|
|
1797
|
+
_request_auth=_request_auth,
|
|
1798
|
+
_content_type=_content_type,
|
|
1799
|
+
_headers=_headers,
|
|
1800
|
+
_host_index=_host_index
|
|
1801
|
+
)
|
|
1802
|
+
|
|
1803
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1804
|
+
'200': "BankProfileResponse",
|
|
1805
|
+
'422': "HTTPValidationError",
|
|
1806
|
+
}
|
|
1807
|
+
response_data = await self.api_client.call_api(
|
|
1808
|
+
*_param,
|
|
1809
|
+
_request_timeout=_request_timeout
|
|
1810
|
+
)
|
|
1811
|
+
await response_data.read()
|
|
1812
|
+
return self.api_client.response_deserialize(
|
|
1813
|
+
response_data=response_data,
|
|
1814
|
+
response_types_map=_response_types_map,
|
|
1815
|
+
).data
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
@validate_call
|
|
1819
|
+
async def update_bank_disposition_with_http_info(
|
|
1820
|
+
self,
|
|
1821
|
+
bank_id: StrictStr,
|
|
1822
|
+
update_disposition_request: UpdateDispositionRequest,
|
|
1823
|
+
authorization: Optional[StrictStr] = None,
|
|
1824
|
+
_request_timeout: Union[
|
|
1825
|
+
None,
|
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1827
|
+
Tuple[
|
|
1828
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1829
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1830
|
+
]
|
|
1831
|
+
] = None,
|
|
1832
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1833
|
+
_content_type: Optional[StrictStr] = None,
|
|
1834
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1835
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1836
|
+
) -> ApiResponse[BankProfileResponse]:
|
|
1837
|
+
"""Update memory bank disposition
|
|
1838
|
+
|
|
1839
|
+
Update bank's disposition traits (skepticism, literalism, empathy)
|
|
1840
|
+
|
|
1841
|
+
:param bank_id: (required)
|
|
1842
|
+
:type bank_id: str
|
|
1843
|
+
:param update_disposition_request: (required)
|
|
1844
|
+
:type update_disposition_request: UpdateDispositionRequest
|
|
1845
|
+
:param authorization:
|
|
1846
|
+
:type authorization: str
|
|
1847
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1848
|
+
number provided, it will be total request
|
|
1849
|
+
timeout. It can also be a pair (tuple) of
|
|
1850
|
+
(connection, read) timeouts.
|
|
1851
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1852
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1853
|
+
request; this effectively ignores the
|
|
1854
|
+
authentication in the spec for a single request.
|
|
1855
|
+
:type _request_auth: dict, optional
|
|
1856
|
+
:param _content_type: force content-type for the request.
|
|
1857
|
+
:type _content_type: str, Optional
|
|
1858
|
+
:param _headers: set to override the headers for a single
|
|
1859
|
+
request; this effectively ignores the headers
|
|
1860
|
+
in the spec for a single request.
|
|
1861
|
+
:type _headers: dict, optional
|
|
1862
|
+
:param _host_index: set to override the host_index for a single
|
|
1863
|
+
request; this effectively ignores the host_index
|
|
1864
|
+
in the spec for a single request.
|
|
1865
|
+
:type _host_index: int, optional
|
|
1866
|
+
:return: Returns the result object.
|
|
1867
|
+
""" # noqa: E501
|
|
1868
|
+
|
|
1869
|
+
_param = self._update_bank_disposition_serialize(
|
|
1870
|
+
bank_id=bank_id,
|
|
1871
|
+
update_disposition_request=update_disposition_request,
|
|
1872
|
+
authorization=authorization,
|
|
1873
|
+
_request_auth=_request_auth,
|
|
1874
|
+
_content_type=_content_type,
|
|
1875
|
+
_headers=_headers,
|
|
1876
|
+
_host_index=_host_index
|
|
1877
|
+
)
|
|
1878
|
+
|
|
1879
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1880
|
+
'200': "BankProfileResponse",
|
|
1881
|
+
'422': "HTTPValidationError",
|
|
1882
|
+
}
|
|
1883
|
+
response_data = await self.api_client.call_api(
|
|
1884
|
+
*_param,
|
|
1885
|
+
_request_timeout=_request_timeout
|
|
1886
|
+
)
|
|
1887
|
+
await response_data.read()
|
|
1888
|
+
return self.api_client.response_deserialize(
|
|
1889
|
+
response_data=response_data,
|
|
1890
|
+
response_types_map=_response_types_map,
|
|
1891
|
+
)
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
@validate_call
|
|
1895
|
+
async def update_bank_disposition_without_preload_content(
|
|
1896
|
+
self,
|
|
1897
|
+
bank_id: StrictStr,
|
|
1898
|
+
update_disposition_request: UpdateDispositionRequest,
|
|
1899
|
+
authorization: Optional[StrictStr] = None,
|
|
1900
|
+
_request_timeout: Union[
|
|
1901
|
+
None,
|
|
1902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1903
|
+
Tuple[
|
|
1904
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1905
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1906
|
+
]
|
|
1907
|
+
] = None,
|
|
1908
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1909
|
+
_content_type: Optional[StrictStr] = None,
|
|
1910
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1911
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1912
|
+
) -> RESTResponseType:
|
|
1913
|
+
"""Update memory bank disposition
|
|
1914
|
+
|
|
1915
|
+
Update bank's disposition traits (skepticism, literalism, empathy)
|
|
1916
|
+
|
|
1917
|
+
:param bank_id: (required)
|
|
1918
|
+
:type bank_id: str
|
|
1919
|
+
:param update_disposition_request: (required)
|
|
1920
|
+
:type update_disposition_request: UpdateDispositionRequest
|
|
1921
|
+
:param authorization:
|
|
1922
|
+
:type authorization: str
|
|
1923
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1924
|
+
number provided, it will be total request
|
|
1925
|
+
timeout. It can also be a pair (tuple) of
|
|
1926
|
+
(connection, read) timeouts.
|
|
1927
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1928
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1929
|
+
request; this effectively ignores the
|
|
1930
|
+
authentication in the spec for a single request.
|
|
1931
|
+
:type _request_auth: dict, optional
|
|
1932
|
+
:param _content_type: force content-type for the request.
|
|
1933
|
+
:type _content_type: str, Optional
|
|
1934
|
+
:param _headers: set to override the headers for a single
|
|
1935
|
+
request; this effectively ignores the headers
|
|
1936
|
+
in the spec for a single request.
|
|
1937
|
+
:type _headers: dict, optional
|
|
1938
|
+
:param _host_index: set to override the host_index for a single
|
|
1939
|
+
request; this effectively ignores the host_index
|
|
1940
|
+
in the spec for a single request.
|
|
1941
|
+
:type _host_index: int, optional
|
|
1942
|
+
:return: Returns the result object.
|
|
1943
|
+
""" # noqa: E501
|
|
1944
|
+
|
|
1945
|
+
_param = self._update_bank_disposition_serialize(
|
|
1946
|
+
bank_id=bank_id,
|
|
1947
|
+
update_disposition_request=update_disposition_request,
|
|
1948
|
+
authorization=authorization,
|
|
1949
|
+
_request_auth=_request_auth,
|
|
1950
|
+
_content_type=_content_type,
|
|
1951
|
+
_headers=_headers,
|
|
1952
|
+
_host_index=_host_index
|
|
1953
|
+
)
|
|
1954
|
+
|
|
1955
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1956
|
+
'200': "BankProfileResponse",
|
|
1957
|
+
'422': "HTTPValidationError",
|
|
1958
|
+
}
|
|
1959
|
+
response_data = await self.api_client.call_api(
|
|
1960
|
+
*_param,
|
|
1961
|
+
_request_timeout=_request_timeout
|
|
1962
|
+
)
|
|
1963
|
+
return response_data.response
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
def _update_bank_disposition_serialize(
|
|
1967
|
+
self,
|
|
1968
|
+
bank_id,
|
|
1969
|
+
update_disposition_request,
|
|
1970
|
+
authorization,
|
|
1971
|
+
_request_auth,
|
|
1972
|
+
_content_type,
|
|
1973
|
+
_headers,
|
|
1974
|
+
_host_index,
|
|
1975
|
+
) -> RequestSerialized:
|
|
1976
|
+
|
|
1977
|
+
_host = None
|
|
1978
|
+
|
|
1979
|
+
_collection_formats: Dict[str, str] = {
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
_path_params: Dict[str, str] = {}
|
|
1983
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1984
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1985
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1986
|
+
_files: Dict[
|
|
1987
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1988
|
+
] = {}
|
|
1989
|
+
_body_params: Optional[bytes] = None
|
|
1990
|
+
|
|
1991
|
+
# process the path parameters
|
|
1992
|
+
if bank_id is not None:
|
|
1993
|
+
_path_params['bank_id'] = bank_id
|
|
1994
|
+
# process the query parameters
|
|
1995
|
+
# process the header parameters
|
|
1996
|
+
if authorization is not None:
|
|
1997
|
+
_header_params['authorization'] = authorization
|
|
1998
|
+
# process the form parameters
|
|
1999
|
+
# process the body parameter
|
|
2000
|
+
if update_disposition_request is not None:
|
|
2001
|
+
_body_params = update_disposition_request
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
# set the HTTP header `Accept`
|
|
2005
|
+
if 'Accept' not in _header_params:
|
|
2006
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2007
|
+
[
|
|
2008
|
+
'application/json'
|
|
2009
|
+
]
|
|
2010
|
+
)
|
|
2011
|
+
|
|
2012
|
+
# set the HTTP header `Content-Type`
|
|
2013
|
+
if _content_type:
|
|
2014
|
+
_header_params['Content-Type'] = _content_type
|
|
2015
|
+
else:
|
|
2016
|
+
_default_content_type = (
|
|
2017
|
+
self.api_client.select_header_content_type(
|
|
2018
|
+
[
|
|
2019
|
+
'application/json'
|
|
2020
|
+
]
|
|
2021
|
+
)
|
|
2022
|
+
)
|
|
2023
|
+
if _default_content_type is not None:
|
|
2024
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2025
|
+
|
|
2026
|
+
# authentication setting
|
|
2027
|
+
_auth_settings: List[str] = [
|
|
2028
|
+
]
|
|
2029
|
+
|
|
2030
|
+
return self.api_client.param_serialize(
|
|
2031
|
+
method='PUT',
|
|
2032
|
+
resource_path='/v1/default/banks/{bank_id}/profile',
|
|
2033
|
+
path_params=_path_params,
|
|
2034
|
+
query_params=_query_params,
|
|
2035
|
+
header_params=_header_params,
|
|
2036
|
+
body=_body_params,
|
|
2037
|
+
post_params=_form_params,
|
|
2038
|
+
files=_files,
|
|
2039
|
+
auth_settings=_auth_settings,
|
|
2040
|
+
collection_formats=_collection_formats,
|
|
2041
|
+
_host=_host,
|
|
2042
|
+
_request_auth=_request_auth
|
|
2043
|
+
)
|
|
2044
|
+
|
|
2045
|
+
|