evermemos 0.3.8__py3-none-any.whl → 0.3.10__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.
- evermemos/_base_client.py +5 -2
- evermemos/_compat.py +3 -3
- evermemos/_utils/_json.py +35 -0
- evermemos/_version.py +1 -1
- evermemos/resources/v1/__init__.py +13 -13
- evermemos/resources/v1/memories/conversation_meta.py +82 -40
- evermemos/resources/v1/memories/memories.py +133 -228
- evermemos/resources/v1/{stats → status}/__init__.py +13 -13
- evermemos/resources/v1/{stats → status}/request.py +6 -6
- evermemos/resources/v1/{stats/stats.py → status/status.py} +27 -27
- evermemos/resources/v1/v1.py +19 -19
- evermemos/types/v1/__init__.py +2 -4
- evermemos/types/v1/memories/conversation_meta_create_params.py +90 -19
- evermemos/types/v1/memories/conversation_meta_create_response.py +60 -17
- evermemos/types/v1/memories/conversation_meta_get_response.py +60 -17
- evermemos/types/v1/memories/conversation_meta_update_params.py +68 -9
- evermemos/types/v1/memories/conversation_meta_update_response.py +0 -5
- evermemos/types/v1/{memory_create_params.py → memory_add_params.py} +2 -2
- evermemos/types/v1/{memory_create_response.py → memory_add_response.py} +2 -2
- evermemos/types/v1/memory_delete_params.py +6 -0
- evermemos/types/v1/memory_delete_response.py +0 -5
- evermemos/types/v1/memory_get_response.py +7 -10
- evermemos/types/v1/memory_search_response.py +5 -18
- evermemos/types/v1/{stats → status}/request_get_params.py +1 -1
- evermemos/types/v1/{stats → status}/request_get_response.py +0 -5
- {evermemos-0.3.8.dist-info → evermemos-0.3.10.dist-info}/METADATA +24 -27
- {evermemos-0.3.8.dist-info → evermemos-0.3.10.dist-info}/RECORD +30 -32
- evermemos/types/v1/global_user_profile/__init__.py +0 -3
- evermemos/types/v1/memory_load_params.py +0 -83
- evermemos/types/v1/memory_load_response.py +0 -26
- /evermemos/types/v1/{stats → status}/__init__.py +0 -0
- {evermemos-0.3.8.dist-info → evermemos-0.3.10.dist-info}/WHEEL +0 -0
- {evermemos-0.3.8.dist-info → evermemos-0.3.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
10
10
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
11
11
|
from ...._compat import cached_property
|
|
12
|
-
from ....types.v1 import
|
|
12
|
+
from ....types.v1 import memory_add_params, memory_delete_params
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
14
14
|
from ...._response import (
|
|
15
15
|
to_raw_response_wrapper,
|
|
@@ -26,9 +26,8 @@ from .conversation_meta import (
|
|
|
26
26
|
ConversationMetaResourceWithStreamingResponse,
|
|
27
27
|
AsyncConversationMetaResourceWithStreamingResponse,
|
|
28
28
|
)
|
|
29
|
+
from ....types.v1.memory_add_response import MemoryAddResponse
|
|
29
30
|
from ....types.v1.memory_get_response import MemoryGetResponse
|
|
30
|
-
from ....types.v1.memory_load_response import MemoryLoadResponse
|
|
31
|
-
from ....types.v1.memory_create_response import MemoryCreateResponse
|
|
32
31
|
from ....types.v1.memory_delete_response import MemoryDeleteResponse
|
|
33
32
|
from ....types.v1.memory_search_response import MemorySearchResponse
|
|
34
33
|
|
|
@@ -59,7 +58,62 @@ class MemoriesResource(SyncAPIResource):
|
|
|
59
58
|
"""
|
|
60
59
|
return MemoriesResourceWithStreamingResponse(self)
|
|
61
60
|
|
|
62
|
-
def
|
|
61
|
+
def delete(
|
|
62
|
+
self,
|
|
63
|
+
*,
|
|
64
|
+
id: Optional[str] | Omit = omit,
|
|
65
|
+
event_id: Optional[str] | Omit = omit,
|
|
66
|
+
group_id: Optional[str] | Omit = omit,
|
|
67
|
+
memory_id: Optional[str] | Omit = omit,
|
|
68
|
+
user_id: Optional[str] | Omit = omit,
|
|
69
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
70
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
71
|
+
extra_headers: Headers | None = None,
|
|
72
|
+
extra_query: Query | None = None,
|
|
73
|
+
extra_body: Body | None = None,
|
|
74
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
75
|
+
) -> MemoryDeleteResponse:
|
|
76
|
+
"""
|
|
77
|
+
Delete memory records based on combined filter criteria
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
id: Alias for memory_id (backward compatibility)
|
|
81
|
+
|
|
82
|
+
event_id: Alias for memory_id (backward compatibility)
|
|
83
|
+
|
|
84
|
+
group_id: Group ID (filter condition)
|
|
85
|
+
|
|
86
|
+
memory_id: Memory id (filter condition)
|
|
87
|
+
|
|
88
|
+
user_id: User ID (filter condition)
|
|
89
|
+
|
|
90
|
+
extra_headers: Send extra headers
|
|
91
|
+
|
|
92
|
+
extra_query: Add additional query parameters to the request
|
|
93
|
+
|
|
94
|
+
extra_body: Add additional JSON properties to the request
|
|
95
|
+
|
|
96
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
97
|
+
"""
|
|
98
|
+
return self._delete(
|
|
99
|
+
"/api/v1/memories",
|
|
100
|
+
body=maybe_transform(
|
|
101
|
+
{
|
|
102
|
+
"id": id,
|
|
103
|
+
"event_id": event_id,
|
|
104
|
+
"group_id": group_id,
|
|
105
|
+
"memory_id": memory_id,
|
|
106
|
+
"user_id": user_id,
|
|
107
|
+
},
|
|
108
|
+
memory_delete_params.MemoryDeleteParams,
|
|
109
|
+
),
|
|
110
|
+
options=make_request_options(
|
|
111
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
112
|
+
),
|
|
113
|
+
cast_to=MemoryDeleteResponse,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
def add(
|
|
63
117
|
self,
|
|
64
118
|
*,
|
|
65
119
|
content: str,
|
|
@@ -78,7 +132,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
78
132
|
extra_query: Query | None = None,
|
|
79
133
|
extra_body: Body | None = None,
|
|
80
134
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
81
|
-
) ->
|
|
135
|
+
) -> MemoryAddResponse:
|
|
82
136
|
"""
|
|
83
137
|
Store a single message into memory.
|
|
84
138
|
|
|
@@ -133,59 +187,12 @@ class MemoriesResource(SyncAPIResource):
|
|
|
133
187
|
"role": role,
|
|
134
188
|
"sender_name": sender_name,
|
|
135
189
|
},
|
|
136
|
-
|
|
137
|
-
),
|
|
138
|
-
options=make_request_options(
|
|
139
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
140
|
-
),
|
|
141
|
-
cast_to=MemoryCreateResponse,
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
def delete(
|
|
145
|
-
self,
|
|
146
|
-
*,
|
|
147
|
-
group_id: Optional[str] | Omit = omit,
|
|
148
|
-
memory_id: Optional[str] | Omit = omit,
|
|
149
|
-
user_id: Optional[str] | Omit = omit,
|
|
150
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
151
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
152
|
-
extra_headers: Headers | None = None,
|
|
153
|
-
extra_query: Query | None = None,
|
|
154
|
-
extra_body: Body | None = None,
|
|
155
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
156
|
-
) -> MemoryDeleteResponse:
|
|
157
|
-
"""
|
|
158
|
-
Delete memory records based on combined filter criteria
|
|
159
|
-
|
|
160
|
-
Args:
|
|
161
|
-
group_id: Group ID (filter condition)
|
|
162
|
-
|
|
163
|
-
memory_id: Memory id (filter condition)
|
|
164
|
-
|
|
165
|
-
user_id: User ID (filter condition)
|
|
166
|
-
|
|
167
|
-
extra_headers: Send extra headers
|
|
168
|
-
|
|
169
|
-
extra_query: Add additional query parameters to the request
|
|
170
|
-
|
|
171
|
-
extra_body: Add additional JSON properties to the request
|
|
172
|
-
|
|
173
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
174
|
-
"""
|
|
175
|
-
return self._delete(
|
|
176
|
-
"/api/v1/memories",
|
|
177
|
-
body=maybe_transform(
|
|
178
|
-
{
|
|
179
|
-
"group_id": group_id,
|
|
180
|
-
"memory_id": memory_id,
|
|
181
|
-
"user_id": user_id,
|
|
182
|
-
},
|
|
183
|
-
memory_delete_params.MemoryDeleteParams,
|
|
190
|
+
memory_add_params.MemoryAddParams,
|
|
184
191
|
),
|
|
185
192
|
options=make_request_options(
|
|
186
193
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
187
194
|
),
|
|
188
|
-
cast_to=
|
|
195
|
+
cast_to=MemoryAddResponse,
|
|
189
196
|
)
|
|
190
197
|
|
|
191
198
|
def get(
|
|
@@ -207,55 +214,6 @@ class MemoriesResource(SyncAPIResource):
|
|
|
207
214
|
cast_to=MemoryGetResponse,
|
|
208
215
|
)
|
|
209
216
|
|
|
210
|
-
def load(
|
|
211
|
-
self,
|
|
212
|
-
*,
|
|
213
|
-
conversation_meta: memory_load_params.ConversationMeta,
|
|
214
|
-
conversation_list: Optional[Iterable[memory_load_params.ConversationList]] | Omit = omit,
|
|
215
|
-
version: Optional[str] | Omit = omit,
|
|
216
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
217
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
218
|
-
extra_headers: Headers | None = None,
|
|
219
|
-
extra_query: Query | None = None,
|
|
220
|
-
extra_body: Body | None = None,
|
|
221
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
222
|
-
) -> MemoryLoadResponse:
|
|
223
|
-
"""Import conversation metadata and message list in one request.
|
|
224
|
-
|
|
225
|
-
Messages are
|
|
226
|
-
queued for processing.
|
|
227
|
-
|
|
228
|
-
Args:
|
|
229
|
-
conversation_meta: Conversation metadata for batch import.
|
|
230
|
-
|
|
231
|
-
conversation_list: Message list.
|
|
232
|
-
|
|
233
|
-
version: Format version.
|
|
234
|
-
|
|
235
|
-
extra_headers: Send extra headers
|
|
236
|
-
|
|
237
|
-
extra_query: Add additional query parameters to the request
|
|
238
|
-
|
|
239
|
-
extra_body: Add additional JSON properties to the request
|
|
240
|
-
|
|
241
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
242
|
-
"""
|
|
243
|
-
return self._post(
|
|
244
|
-
"/api/v1/memories/import",
|
|
245
|
-
body=maybe_transform(
|
|
246
|
-
{
|
|
247
|
-
"conversation_meta": conversation_meta,
|
|
248
|
-
"conversation_list": conversation_list,
|
|
249
|
-
"version": version,
|
|
250
|
-
},
|
|
251
|
-
memory_load_params.MemoryLoadParams,
|
|
252
|
-
),
|
|
253
|
-
options=make_request_options(
|
|
254
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
255
|
-
),
|
|
256
|
-
cast_to=MemoryLoadResponse,
|
|
257
|
-
)
|
|
258
|
-
|
|
259
217
|
def search(
|
|
260
218
|
self,
|
|
261
219
|
*,
|
|
@@ -303,7 +261,62 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
303
261
|
"""
|
|
304
262
|
return AsyncMemoriesResourceWithStreamingResponse(self)
|
|
305
263
|
|
|
306
|
-
async def
|
|
264
|
+
async def delete(
|
|
265
|
+
self,
|
|
266
|
+
*,
|
|
267
|
+
id: Optional[str] | Omit = omit,
|
|
268
|
+
event_id: Optional[str] | Omit = omit,
|
|
269
|
+
group_id: Optional[str] | Omit = omit,
|
|
270
|
+
memory_id: Optional[str] | Omit = omit,
|
|
271
|
+
user_id: Optional[str] | Omit = omit,
|
|
272
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
273
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
274
|
+
extra_headers: Headers | None = None,
|
|
275
|
+
extra_query: Query | None = None,
|
|
276
|
+
extra_body: Body | None = None,
|
|
277
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
278
|
+
) -> MemoryDeleteResponse:
|
|
279
|
+
"""
|
|
280
|
+
Delete memory records based on combined filter criteria
|
|
281
|
+
|
|
282
|
+
Args:
|
|
283
|
+
id: Alias for memory_id (backward compatibility)
|
|
284
|
+
|
|
285
|
+
event_id: Alias for memory_id (backward compatibility)
|
|
286
|
+
|
|
287
|
+
group_id: Group ID (filter condition)
|
|
288
|
+
|
|
289
|
+
memory_id: Memory id (filter condition)
|
|
290
|
+
|
|
291
|
+
user_id: User ID (filter condition)
|
|
292
|
+
|
|
293
|
+
extra_headers: Send extra headers
|
|
294
|
+
|
|
295
|
+
extra_query: Add additional query parameters to the request
|
|
296
|
+
|
|
297
|
+
extra_body: Add additional JSON properties to the request
|
|
298
|
+
|
|
299
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
300
|
+
"""
|
|
301
|
+
return await self._delete(
|
|
302
|
+
"/api/v1/memories",
|
|
303
|
+
body=await async_maybe_transform(
|
|
304
|
+
{
|
|
305
|
+
"id": id,
|
|
306
|
+
"event_id": event_id,
|
|
307
|
+
"group_id": group_id,
|
|
308
|
+
"memory_id": memory_id,
|
|
309
|
+
"user_id": user_id,
|
|
310
|
+
},
|
|
311
|
+
memory_delete_params.MemoryDeleteParams,
|
|
312
|
+
),
|
|
313
|
+
options=make_request_options(
|
|
314
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
315
|
+
),
|
|
316
|
+
cast_to=MemoryDeleteResponse,
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
async def add(
|
|
307
320
|
self,
|
|
308
321
|
*,
|
|
309
322
|
content: str,
|
|
@@ -322,7 +335,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
322
335
|
extra_query: Query | None = None,
|
|
323
336
|
extra_body: Body | None = None,
|
|
324
337
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
325
|
-
) ->
|
|
338
|
+
) -> MemoryAddResponse:
|
|
326
339
|
"""
|
|
327
340
|
Store a single message into memory.
|
|
328
341
|
|
|
@@ -377,59 +390,12 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
377
390
|
"role": role,
|
|
378
391
|
"sender_name": sender_name,
|
|
379
392
|
},
|
|
380
|
-
|
|
381
|
-
),
|
|
382
|
-
options=make_request_options(
|
|
383
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
384
|
-
),
|
|
385
|
-
cast_to=MemoryCreateResponse,
|
|
386
|
-
)
|
|
387
|
-
|
|
388
|
-
async def delete(
|
|
389
|
-
self,
|
|
390
|
-
*,
|
|
391
|
-
group_id: Optional[str] | Omit = omit,
|
|
392
|
-
memory_id: Optional[str] | Omit = omit,
|
|
393
|
-
user_id: Optional[str] | Omit = omit,
|
|
394
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
395
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
396
|
-
extra_headers: Headers | None = None,
|
|
397
|
-
extra_query: Query | None = None,
|
|
398
|
-
extra_body: Body | None = None,
|
|
399
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
400
|
-
) -> MemoryDeleteResponse:
|
|
401
|
-
"""
|
|
402
|
-
Delete memory records based on combined filter criteria
|
|
403
|
-
|
|
404
|
-
Args:
|
|
405
|
-
group_id: Group ID (filter condition)
|
|
406
|
-
|
|
407
|
-
memory_id: Memory id (filter condition)
|
|
408
|
-
|
|
409
|
-
user_id: User ID (filter condition)
|
|
410
|
-
|
|
411
|
-
extra_headers: Send extra headers
|
|
412
|
-
|
|
413
|
-
extra_query: Add additional query parameters to the request
|
|
414
|
-
|
|
415
|
-
extra_body: Add additional JSON properties to the request
|
|
416
|
-
|
|
417
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
418
|
-
"""
|
|
419
|
-
return await self._delete(
|
|
420
|
-
"/api/v1/memories",
|
|
421
|
-
body=await async_maybe_transform(
|
|
422
|
-
{
|
|
423
|
-
"group_id": group_id,
|
|
424
|
-
"memory_id": memory_id,
|
|
425
|
-
"user_id": user_id,
|
|
426
|
-
},
|
|
427
|
-
memory_delete_params.MemoryDeleteParams,
|
|
393
|
+
memory_add_params.MemoryAddParams,
|
|
428
394
|
),
|
|
429
395
|
options=make_request_options(
|
|
430
396
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
431
397
|
),
|
|
432
|
-
cast_to=
|
|
398
|
+
cast_to=MemoryAddResponse,
|
|
433
399
|
)
|
|
434
400
|
|
|
435
401
|
async def get(
|
|
@@ -451,55 +417,6 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
451
417
|
cast_to=MemoryGetResponse,
|
|
452
418
|
)
|
|
453
419
|
|
|
454
|
-
async def load(
|
|
455
|
-
self,
|
|
456
|
-
*,
|
|
457
|
-
conversation_meta: memory_load_params.ConversationMeta,
|
|
458
|
-
conversation_list: Optional[Iterable[memory_load_params.ConversationList]] | Omit = omit,
|
|
459
|
-
version: Optional[str] | Omit = omit,
|
|
460
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
461
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
462
|
-
extra_headers: Headers | None = None,
|
|
463
|
-
extra_query: Query | None = None,
|
|
464
|
-
extra_body: Body | None = None,
|
|
465
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
466
|
-
) -> MemoryLoadResponse:
|
|
467
|
-
"""Import conversation metadata and message list in one request.
|
|
468
|
-
|
|
469
|
-
Messages are
|
|
470
|
-
queued for processing.
|
|
471
|
-
|
|
472
|
-
Args:
|
|
473
|
-
conversation_meta: Conversation metadata for batch import.
|
|
474
|
-
|
|
475
|
-
conversation_list: Message list.
|
|
476
|
-
|
|
477
|
-
version: Format version.
|
|
478
|
-
|
|
479
|
-
extra_headers: Send extra headers
|
|
480
|
-
|
|
481
|
-
extra_query: Add additional query parameters to the request
|
|
482
|
-
|
|
483
|
-
extra_body: Add additional JSON properties to the request
|
|
484
|
-
|
|
485
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
486
|
-
"""
|
|
487
|
-
return await self._post(
|
|
488
|
-
"/api/v1/memories/import",
|
|
489
|
-
body=await async_maybe_transform(
|
|
490
|
-
{
|
|
491
|
-
"conversation_meta": conversation_meta,
|
|
492
|
-
"conversation_list": conversation_list,
|
|
493
|
-
"version": version,
|
|
494
|
-
},
|
|
495
|
-
memory_load_params.MemoryLoadParams,
|
|
496
|
-
),
|
|
497
|
-
options=make_request_options(
|
|
498
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
499
|
-
),
|
|
500
|
-
cast_to=MemoryLoadResponse,
|
|
501
|
-
)
|
|
502
|
-
|
|
503
420
|
async def search(
|
|
504
421
|
self,
|
|
505
422
|
*,
|
|
@@ -527,18 +444,15 @@ class MemoriesResourceWithRawResponse:
|
|
|
527
444
|
def __init__(self, memories: MemoriesResource) -> None:
|
|
528
445
|
self._memories = memories
|
|
529
446
|
|
|
530
|
-
self.create = to_raw_response_wrapper(
|
|
531
|
-
memories.create,
|
|
532
|
-
)
|
|
533
447
|
self.delete = to_raw_response_wrapper(
|
|
534
448
|
memories.delete,
|
|
535
449
|
)
|
|
450
|
+
self.add = to_raw_response_wrapper(
|
|
451
|
+
memories.add,
|
|
452
|
+
)
|
|
536
453
|
self.get = to_raw_response_wrapper(
|
|
537
454
|
memories.get,
|
|
538
455
|
)
|
|
539
|
-
self.load = to_raw_response_wrapper(
|
|
540
|
-
memories.load,
|
|
541
|
-
)
|
|
542
456
|
self.search = to_raw_response_wrapper(
|
|
543
457
|
memories.search,
|
|
544
458
|
)
|
|
@@ -552,18 +466,15 @@ class AsyncMemoriesResourceWithRawResponse:
|
|
|
552
466
|
def __init__(self, memories: AsyncMemoriesResource) -> None:
|
|
553
467
|
self._memories = memories
|
|
554
468
|
|
|
555
|
-
self.create = async_to_raw_response_wrapper(
|
|
556
|
-
memories.create,
|
|
557
|
-
)
|
|
558
469
|
self.delete = async_to_raw_response_wrapper(
|
|
559
470
|
memories.delete,
|
|
560
471
|
)
|
|
472
|
+
self.add = async_to_raw_response_wrapper(
|
|
473
|
+
memories.add,
|
|
474
|
+
)
|
|
561
475
|
self.get = async_to_raw_response_wrapper(
|
|
562
476
|
memories.get,
|
|
563
477
|
)
|
|
564
|
-
self.load = async_to_raw_response_wrapper(
|
|
565
|
-
memories.load,
|
|
566
|
-
)
|
|
567
478
|
self.search = async_to_raw_response_wrapper(
|
|
568
479
|
memories.search,
|
|
569
480
|
)
|
|
@@ -577,18 +488,15 @@ class MemoriesResourceWithStreamingResponse:
|
|
|
577
488
|
def __init__(self, memories: MemoriesResource) -> None:
|
|
578
489
|
self._memories = memories
|
|
579
490
|
|
|
580
|
-
self.create = to_streamed_response_wrapper(
|
|
581
|
-
memories.create,
|
|
582
|
-
)
|
|
583
491
|
self.delete = to_streamed_response_wrapper(
|
|
584
492
|
memories.delete,
|
|
585
493
|
)
|
|
494
|
+
self.add = to_streamed_response_wrapper(
|
|
495
|
+
memories.add,
|
|
496
|
+
)
|
|
586
497
|
self.get = to_streamed_response_wrapper(
|
|
587
498
|
memories.get,
|
|
588
499
|
)
|
|
589
|
-
self.load = to_streamed_response_wrapper(
|
|
590
|
-
memories.load,
|
|
591
|
-
)
|
|
592
500
|
self.search = to_streamed_response_wrapper(
|
|
593
501
|
memories.search,
|
|
594
502
|
)
|
|
@@ -602,18 +510,15 @@ class AsyncMemoriesResourceWithStreamingResponse:
|
|
|
602
510
|
def __init__(self, memories: AsyncMemoriesResource) -> None:
|
|
603
511
|
self._memories = memories
|
|
604
512
|
|
|
605
|
-
self.create = async_to_streamed_response_wrapper(
|
|
606
|
-
memories.create,
|
|
607
|
-
)
|
|
608
513
|
self.delete = async_to_streamed_response_wrapper(
|
|
609
514
|
memories.delete,
|
|
610
515
|
)
|
|
516
|
+
self.add = async_to_streamed_response_wrapper(
|
|
517
|
+
memories.add,
|
|
518
|
+
)
|
|
611
519
|
self.get = async_to_streamed_response_wrapper(
|
|
612
520
|
memories.get,
|
|
613
521
|
)
|
|
614
|
-
self.load = async_to_streamed_response_wrapper(
|
|
615
|
-
memories.load,
|
|
616
|
-
)
|
|
617
522
|
self.search = async_to_streamed_response_wrapper(
|
|
618
523
|
memories.search,
|
|
619
524
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from .status import (
|
|
4
|
+
StatusResource,
|
|
5
|
+
AsyncStatusResource,
|
|
6
|
+
StatusResourceWithRawResponse,
|
|
7
|
+
AsyncStatusResourceWithRawResponse,
|
|
8
|
+
StatusResourceWithStreamingResponse,
|
|
9
|
+
AsyncStatusResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
11
|
from .request import (
|
|
12
12
|
RequestResource,
|
|
@@ -24,10 +24,10 @@ __all__ = [
|
|
|
24
24
|
"AsyncRequestResourceWithRawResponse",
|
|
25
25
|
"RequestResourceWithStreamingResponse",
|
|
26
26
|
"AsyncRequestResourceWithStreamingResponse",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
27
|
+
"StatusResource",
|
|
28
|
+
"AsyncStatusResource",
|
|
29
|
+
"StatusResourceWithRawResponse",
|
|
30
|
+
"AsyncStatusResourceWithRawResponse",
|
|
31
|
+
"StatusResourceWithStreamingResponse",
|
|
32
|
+
"AsyncStatusResourceWithStreamingResponse",
|
|
33
33
|
]
|
|
@@ -17,8 +17,8 @@ from ...._response import (
|
|
|
17
17
|
async_to_streamed_response_wrapper,
|
|
18
18
|
)
|
|
19
19
|
from ...._base_client import make_request_options
|
|
20
|
-
from ....types.v1.
|
|
21
|
-
from ....types.v1.
|
|
20
|
+
from ....types.v1.status import request_get_params
|
|
21
|
+
from ....types.v1.status.request_get_response import RequestGetResponse
|
|
22
22
|
|
|
23
23
|
__all__ = ["RequestResource", "AsyncRequestResource"]
|
|
24
24
|
|
|
@@ -58,7 +58,7 @@ class RequestResource(SyncAPIResource):
|
|
|
58
58
|
Query the processing status of a specific request
|
|
59
59
|
|
|
60
60
|
Args:
|
|
61
|
-
request_id:
|
|
61
|
+
request_id: which is returned by add_memories api
|
|
62
62
|
|
|
63
63
|
extra_headers: Send extra headers
|
|
64
64
|
|
|
@@ -69,7 +69,7 @@ class RequestResource(SyncAPIResource):
|
|
|
69
69
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
70
70
|
"""
|
|
71
71
|
return self._get(
|
|
72
|
-
"/api/v1/
|
|
72
|
+
"/api/v1/status/request",
|
|
73
73
|
options=make_request_options(
|
|
74
74
|
extra_headers=extra_headers,
|
|
75
75
|
extra_query=extra_query,
|
|
@@ -116,7 +116,7 @@ class AsyncRequestResource(AsyncAPIResource):
|
|
|
116
116
|
Query the processing status of a specific request
|
|
117
117
|
|
|
118
118
|
Args:
|
|
119
|
-
request_id:
|
|
119
|
+
request_id: which is returned by add_memories api
|
|
120
120
|
|
|
121
121
|
extra_headers: Send extra headers
|
|
122
122
|
|
|
@@ -127,7 +127,7 @@ class AsyncRequestResource(AsyncAPIResource):
|
|
|
127
127
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
128
|
"""
|
|
129
129
|
return await self._get(
|
|
130
|
-
"/api/v1/
|
|
130
|
+
"/api/v1/status/request",
|
|
131
131
|
options=make_request_options(
|
|
132
132
|
extra_headers=extra_headers,
|
|
133
133
|
extra_query=extra_query,
|
|
@@ -13,90 +13,90 @@ from .request import (
|
|
|
13
13
|
from ...._compat import cached_property
|
|
14
14
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
15
15
|
|
|
16
|
-
__all__ = ["
|
|
16
|
+
__all__ = ["StatusResource", "AsyncStatusResource"]
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
19
|
+
class StatusResource(SyncAPIResource):
|
|
20
20
|
@cached_property
|
|
21
21
|
def request(self) -> RequestResource:
|
|
22
22
|
return RequestResource(self._client)
|
|
23
23
|
|
|
24
24
|
@cached_property
|
|
25
|
-
def with_raw_response(self) ->
|
|
25
|
+
def with_raw_response(self) -> StatusResourceWithRawResponse:
|
|
26
26
|
"""
|
|
27
27
|
This property can be used as a prefix for any HTTP method call to return
|
|
28
28
|
the raw response object instead of the parsed content.
|
|
29
29
|
|
|
30
30
|
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
31
31
|
"""
|
|
32
|
-
return
|
|
32
|
+
return StatusResourceWithRawResponse(self)
|
|
33
33
|
|
|
34
34
|
@cached_property
|
|
35
|
-
def with_streaming_response(self) ->
|
|
35
|
+
def with_streaming_response(self) -> StatusResourceWithStreamingResponse:
|
|
36
36
|
"""
|
|
37
37
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
38
|
|
|
39
39
|
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
40
40
|
"""
|
|
41
|
-
return
|
|
41
|
+
return StatusResourceWithStreamingResponse(self)
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
class
|
|
44
|
+
class AsyncStatusResource(AsyncAPIResource):
|
|
45
45
|
@cached_property
|
|
46
46
|
def request(self) -> AsyncRequestResource:
|
|
47
47
|
return AsyncRequestResource(self._client)
|
|
48
48
|
|
|
49
49
|
@cached_property
|
|
50
|
-
def with_raw_response(self) ->
|
|
50
|
+
def with_raw_response(self) -> AsyncStatusResourceWithRawResponse:
|
|
51
51
|
"""
|
|
52
52
|
This property can be used as a prefix for any HTTP method call to return
|
|
53
53
|
the raw response object instead of the parsed content.
|
|
54
54
|
|
|
55
55
|
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
56
56
|
"""
|
|
57
|
-
return
|
|
57
|
+
return AsyncStatusResourceWithRawResponse(self)
|
|
58
58
|
|
|
59
59
|
@cached_property
|
|
60
|
-
def with_streaming_response(self) ->
|
|
60
|
+
def with_streaming_response(self) -> AsyncStatusResourceWithStreamingResponse:
|
|
61
61
|
"""
|
|
62
62
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
63
|
|
|
64
64
|
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
65
65
|
"""
|
|
66
|
-
return
|
|
66
|
+
return AsyncStatusResourceWithStreamingResponse(self)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
class
|
|
70
|
-
def __init__(self,
|
|
71
|
-
self.
|
|
69
|
+
class StatusResourceWithRawResponse:
|
|
70
|
+
def __init__(self, status: StatusResource) -> None:
|
|
71
|
+
self._status = status
|
|
72
72
|
|
|
73
73
|
@cached_property
|
|
74
74
|
def request(self) -> RequestResourceWithRawResponse:
|
|
75
|
-
return RequestResourceWithRawResponse(self.
|
|
75
|
+
return RequestResourceWithRawResponse(self._status.request)
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
class
|
|
79
|
-
def __init__(self,
|
|
80
|
-
self.
|
|
78
|
+
class AsyncStatusResourceWithRawResponse:
|
|
79
|
+
def __init__(self, status: AsyncStatusResource) -> None:
|
|
80
|
+
self._status = status
|
|
81
81
|
|
|
82
82
|
@cached_property
|
|
83
83
|
def request(self) -> AsyncRequestResourceWithRawResponse:
|
|
84
|
-
return AsyncRequestResourceWithRawResponse(self.
|
|
84
|
+
return AsyncRequestResourceWithRawResponse(self._status.request)
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
class
|
|
88
|
-
def __init__(self,
|
|
89
|
-
self.
|
|
87
|
+
class StatusResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, status: StatusResource) -> None:
|
|
89
|
+
self._status = status
|
|
90
90
|
|
|
91
91
|
@cached_property
|
|
92
92
|
def request(self) -> RequestResourceWithStreamingResponse:
|
|
93
|
-
return RequestResourceWithStreamingResponse(self.
|
|
93
|
+
return RequestResourceWithStreamingResponse(self._status.request)
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
class
|
|
97
|
-
def __init__(self,
|
|
98
|
-
self.
|
|
96
|
+
class AsyncStatusResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, status: AsyncStatusResource) -> None:
|
|
98
|
+
self._status = status
|
|
99
99
|
|
|
100
100
|
@cached_property
|
|
101
101
|
def request(self) -> AsyncRequestResourceWithStreamingResponse:
|
|
102
|
-
return AsyncRequestResourceWithStreamingResponse(self.
|
|
102
|
+
return AsyncRequestResourceWithStreamingResponse(self._status.request)
|