usecortex-ai 0.4.0__py3-none-any.whl → 0.5.1__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.
- usecortex_ai/__init__.py +10 -4
- usecortex_ai/client.py +0 -4
- usecortex_ai/dashboard/client.py +2 -30
- usecortex_ai/dashboard/raw_client.py +0 -28
- usecortex_ai/embeddings/client.py +8 -58
- usecortex_ai/embeddings/raw_client.py +8 -58
- usecortex_ai/fetch/__init__.py +3 -0
- usecortex_ai/fetch/client.py +42 -165
- usecortex_ai/fetch/raw_client.py +38 -341
- usecortex_ai/fetch/types/__init__.py +7 -0
- usecortex_ai/fetch/types/fetch_list_knowledge_response.py +8 -0
- usecortex_ai/raw_client.py +0 -4
- usecortex_ai/search/client.py +40 -108
- usecortex_ai/search/raw_client.py +40 -108
- usecortex_ai/sources/client.py +2 -16
- usecortex_ai/sources/raw_client.py +2 -16
- usecortex_ai/tenant/client.py +4 -108
- usecortex_ai/tenant/raw_client.py +2 -106
- usecortex_ai/types/__init__.py +8 -2
- usecortex_ai/types/forceful_relations_payload.py +27 -0
- usecortex_ai/types/list_content_kind.py +5 -0
- usecortex_ai/types/list_user_memories_response.py +32 -0
- usecortex_ai/types/memory_item.py +7 -1
- usecortex_ai/types/retrieval_result.py +4 -0
- usecortex_ai/types/retrieve_mode.py +1 -1
- usecortex_ai/types/user_memory.py +31 -0
- usecortex_ai/types/vector_store_chunk.py +5 -0
- usecortex_ai/upload/__init__.py +0 -3
- usecortex_ai/upload/client.py +34 -204
- usecortex_ai/upload/raw_client.py +30 -382
- {usecortex_ai-0.4.0.dist-info → usecortex_ai-0.5.1.dist-info}/METADATA +1 -1
- {usecortex_ai-0.4.0.dist-info → usecortex_ai-0.5.1.dist-info}/RECORD +35 -32
- {usecortex_ai-0.4.0.dist-info → usecortex_ai-0.5.1.dist-info}/WHEEL +1 -1
- usecortex_ai/types/app_sources_upload_data.py +0 -39
- usecortex_ai/upload/types/__init__.py +0 -7
- usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +0 -7
- {usecortex_ai-0.4.0.dist-info → usecortex_ai-0.5.1.dist-info}/licenses/LICENSE +0 -0
- {usecortex_ai-0.4.0.dist-info → usecortex_ai-0.5.1.dist-info}/top_level.txt +0 -0
usecortex_ai/upload/client.py
CHANGED
|
@@ -6,13 +6,11 @@ from .. import core
|
|
|
6
6
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
7
|
from ..core.request_options import RequestOptions
|
|
8
8
|
from ..types.add_memory_response import AddMemoryResponse
|
|
9
|
-
from ..types.app_sources_upload_data import AppSourcesUploadData
|
|
10
9
|
from ..types.delete_user_memory_response import DeleteUserMemoryResponse
|
|
11
10
|
from ..types.memory_item import MemoryItem
|
|
12
11
|
from ..types.processing_status import ProcessingStatus
|
|
13
12
|
from ..types.source_upload_response import SourceUploadResponse
|
|
14
13
|
from .raw_client import AsyncRawUploadClient, RawUploadClient
|
|
15
|
-
from .types.body_upload_app_ingestion_upload_app_post_app_sources import BodyUploadAppIngestionUploadAppPostAppSources
|
|
16
14
|
|
|
17
15
|
# this is used as the default value for optional parameters
|
|
18
16
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -33,27 +31,20 @@ class UploadClient:
|
|
|
33
31
|
"""
|
|
34
32
|
return self._raw_client
|
|
35
33
|
|
|
36
|
-
def
|
|
34
|
+
def upload_knowledge(
|
|
37
35
|
self,
|
|
38
36
|
*,
|
|
39
|
-
files: typing.List[core.File],
|
|
40
37
|
tenant_id: str,
|
|
41
38
|
sub_tenant_id: typing.Optional[str] = OMIT,
|
|
42
39
|
upsert: typing.Optional[bool] = OMIT,
|
|
40
|
+
files: typing.Optional[typing.List[core.File]] = OMIT,
|
|
43
41
|
file_metadata: typing.Optional[str] = OMIT,
|
|
42
|
+
app_sources: typing.Optional[str] = OMIT,
|
|
44
43
|
request_options: typing.Optional[RequestOptions] = None,
|
|
45
44
|
) -> SourceUploadResponse:
|
|
46
45
|
"""
|
|
47
|
-
Upload one or more documents for ingestion.
|
|
48
|
-
Supports both single and batch uploads.
|
|
49
|
-
For single file: send one file with the 'files' field.
|
|
50
|
-
For batch: send multiple files with the 'files' field (FastAPI will parse as list).
|
|
51
|
-
|
|
52
46
|
Parameters
|
|
53
47
|
----------
|
|
54
|
-
files : typing.List[core.File]
|
|
55
|
-
See core.File for more documentation
|
|
56
|
-
|
|
57
48
|
tenant_id : str
|
|
58
49
|
Unique identifier for the tenant/organization
|
|
59
50
|
|
|
@@ -61,9 +52,16 @@ class UploadClient:
|
|
|
61
52
|
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
|
|
62
53
|
|
|
63
54
|
upsert : typing.Optional[bool]
|
|
55
|
+
If true, update existing sources with the same id.
|
|
56
|
+
|
|
57
|
+
files : typing.Optional[typing.List[core.File]]
|
|
58
|
+
See core.File for more documentation
|
|
64
59
|
|
|
65
60
|
file_metadata : typing.Optional[str]
|
|
66
|
-
JSON
|
|
61
|
+
JSON array of file metadata objects; length must match files when provided.
|
|
62
|
+
|
|
63
|
+
app_sources : typing.Optional[str]
|
|
64
|
+
JSON: single source object or array of app-generated sources to index. Omit when only uploading files.
|
|
67
65
|
|
|
68
66
|
request_options : typing.Optional[RequestOptions]
|
|
69
67
|
Request-specific configuration.
|
|
@@ -78,65 +76,15 @@ class UploadClient:
|
|
|
78
76
|
from usecortex-ai import CortexAI
|
|
79
77
|
|
|
80
78
|
client = CortexAI(token="YOUR_TOKEN", )
|
|
81
|
-
client.upload.
|
|
79
|
+
client.upload.upload_knowledge(tenant_id='tenant_id', )
|
|
82
80
|
"""
|
|
83
|
-
_response = self._raw_client.
|
|
84
|
-
files=files,
|
|
81
|
+
_response = self._raw_client.upload_knowledge(
|
|
85
82
|
tenant_id=tenant_id,
|
|
86
83
|
sub_tenant_id=sub_tenant_id,
|
|
87
84
|
upsert=upsert,
|
|
85
|
+
files=files,
|
|
88
86
|
file_metadata=file_metadata,
|
|
89
|
-
request_options=request_options,
|
|
90
|
-
)
|
|
91
|
-
return _response.data
|
|
92
|
-
|
|
93
|
-
def upload_app_sources(
|
|
94
|
-
self,
|
|
95
|
-
*,
|
|
96
|
-
app_sources: BodyUploadAppIngestionUploadAppPostAppSources,
|
|
97
|
-
tenant_id: str,
|
|
98
|
-
sub_tenant_id: typing.Optional[str] = OMIT,
|
|
99
|
-
upsert: typing.Optional[bool] = OMIT,
|
|
100
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
101
|
-
) -> AppSourcesUploadData:
|
|
102
|
-
"""
|
|
103
|
-
Upload structured sources generated by first-party or third-party apps.
|
|
104
|
-
Supports both single and batch uploads.
|
|
105
|
-
|
|
106
|
-
Parameters
|
|
107
|
-
----------
|
|
108
|
-
app_sources : BodyUploadAppIngestionUploadAppPostAppSources
|
|
109
|
-
Single source object or list of structured source objects containing app-generated data to be indexed
|
|
110
|
-
|
|
111
|
-
tenant_id : str
|
|
112
|
-
Unique identifier for the tenant/organization
|
|
113
|
-
|
|
114
|
-
sub_tenant_id : typing.Optional[str]
|
|
115
|
-
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
|
|
116
|
-
|
|
117
|
-
upsert : typing.Optional[bool]
|
|
118
|
-
If true, update existing sources with the same source_id. Defaults to True.
|
|
119
|
-
|
|
120
|
-
request_options : typing.Optional[RequestOptions]
|
|
121
|
-
Request-specific configuration.
|
|
122
|
-
|
|
123
|
-
Returns
|
|
124
|
-
-------
|
|
125
|
-
AppSourcesUploadData
|
|
126
|
-
Successful Response
|
|
127
|
-
|
|
128
|
-
Examples
|
|
129
|
-
--------
|
|
130
|
-
from usecortex-ai import CortexAI, SourceModel
|
|
131
|
-
|
|
132
|
-
client = CortexAI(token="YOUR_TOKEN", )
|
|
133
|
-
client.upload.upload_app_sources(app_sources=SourceModel(id='id', tenant_id='tenant_id', sub_tenant_id='sub_tenant_id', ), tenant_id='tenant_id', )
|
|
134
|
-
"""
|
|
135
|
-
_response = self._raw_client.upload_app_sources(
|
|
136
87
|
app_sources=app_sources,
|
|
137
|
-
tenant_id=tenant_id,
|
|
138
|
-
sub_tenant_id=sub_tenant_id,
|
|
139
|
-
upsert=upsert,
|
|
140
88
|
request_options=request_options,
|
|
141
89
|
)
|
|
142
90
|
return _response.data
|
|
@@ -150,12 +98,6 @@ class UploadClient:
|
|
|
150
98
|
request_options: typing.Optional[RequestOptions] = None,
|
|
151
99
|
) -> ProcessingStatus:
|
|
152
100
|
"""
|
|
153
|
-
Check the current processing status of your uploaded content.
|
|
154
|
-
|
|
155
|
-
This endpoint allows you to monitor the progress of documents, text, or other content you've uploaded. Simply provide the file ID to see whether processing is complete, still in progress, or if any errors occurred.
|
|
156
|
-
|
|
157
|
-
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
158
|
-
|
|
159
101
|
Parameters
|
|
160
102
|
----------
|
|
161
103
|
file_id : str
|
|
@@ -180,7 +122,7 @@ class UploadClient:
|
|
|
180
122
|
from usecortex-ai import CortexAI
|
|
181
123
|
|
|
182
124
|
client = CortexAI(token="YOUR_TOKEN", )
|
|
183
|
-
client.upload.verify_processing(file_id='
|
|
125
|
+
client.upload.verify_processing(file_id='<str>', tenant_id='tenant_1234', )
|
|
184
126
|
"""
|
|
185
127
|
_response = self._raw_client.verify_processing(
|
|
186
128
|
file_id=file_id, tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, request_options=request_options
|
|
@@ -197,24 +139,6 @@ class UploadClient:
|
|
|
197
139
|
request_options: typing.Optional[RequestOptions] = None,
|
|
198
140
|
) -> AddMemoryResponse:
|
|
199
141
|
"""
|
|
200
|
-
Add memories for indexing and retrieval.
|
|
201
|
-
|
|
202
|
-
This API provides a unified entry point for ingesting various types of content:
|
|
203
|
-
|
|
204
|
-
**Content Types Supported:**
|
|
205
|
-
- Raw text content (`text` field)
|
|
206
|
-
- Markdown formatted content (`text` + `is_markdown=true`)
|
|
207
|
-
- User/assistant conversation pairs (`user_assistant_pairs` field)
|
|
208
|
-
|
|
209
|
-
**Key Features:**
|
|
210
|
-
- **Inference Mode (`infer=true`)**: When enabled, the system extracts additional
|
|
211
|
-
insights and implicit information from your content. Useful for conversation
|
|
212
|
-
analysis and knowledge extraction.
|
|
213
|
-
- **Direct Mode (`infer=false`)**: Content is chunked and indexed as-is without
|
|
214
|
-
additional processing.
|
|
215
|
-
|
|
216
|
-
Use `/ingestion/verify-processing` endpoint to check the processing status.
|
|
217
|
-
|
|
218
142
|
Parameters
|
|
219
143
|
----------
|
|
220
144
|
memories : typing.Sequence[MemoryItem]
|
|
@@ -242,7 +166,7 @@ class UploadClient:
|
|
|
242
166
|
from usecortex-ai import CortexAI, MemoryItem
|
|
243
167
|
|
|
244
168
|
client = CortexAI(token="YOUR_TOKEN", )
|
|
245
|
-
client.upload.add_memory(memories=[MemoryItem()], tenant_id='
|
|
169
|
+
client.upload.add_memory(memories=[MemoryItem()], tenant_id='tenant_1234', )
|
|
246
170
|
"""
|
|
247
171
|
_response = self._raw_client.add_memory(
|
|
248
172
|
memories=memories,
|
|
@@ -262,14 +186,6 @@ class UploadClient:
|
|
|
262
186
|
request_options: typing.Optional[RequestOptions] = None,
|
|
263
187
|
) -> DeleteUserMemoryResponse:
|
|
264
188
|
"""
|
|
265
|
-
Permanently remove a specific memory from storage.
|
|
266
|
-
|
|
267
|
-
This API allows you to delete a memory by its unique identifier.
|
|
268
|
-
Once deleted, the memory cannot be recovered, so use this operation carefully.
|
|
269
|
-
|
|
270
|
-
The memory will be removed from your tenant's storage and will no longer
|
|
271
|
-
appear in search results or memory listings.
|
|
272
|
-
|
|
273
189
|
Parameters
|
|
274
190
|
----------
|
|
275
191
|
tenant_id : str
|
|
@@ -294,7 +210,7 @@ class UploadClient:
|
|
|
294
210
|
from usecortex-ai import CortexAI
|
|
295
211
|
|
|
296
212
|
client = CortexAI(token="YOUR_TOKEN", )
|
|
297
|
-
client.upload.delete_memory(tenant_id='
|
|
213
|
+
client.upload.delete_memory(tenant_id='tenant_1234', memory_id='memory_1234', )
|
|
298
214
|
"""
|
|
299
215
|
_response = self._raw_client.delete_memory(
|
|
300
216
|
tenant_id=tenant_id, memory_id=memory_id, sub_tenant_id=sub_tenant_id, request_options=request_options
|
|
@@ -317,27 +233,20 @@ class AsyncUploadClient:
|
|
|
317
233
|
"""
|
|
318
234
|
return self._raw_client
|
|
319
235
|
|
|
320
|
-
async def
|
|
236
|
+
async def upload_knowledge(
|
|
321
237
|
self,
|
|
322
238
|
*,
|
|
323
|
-
files: typing.List[core.File],
|
|
324
239
|
tenant_id: str,
|
|
325
240
|
sub_tenant_id: typing.Optional[str] = OMIT,
|
|
326
241
|
upsert: typing.Optional[bool] = OMIT,
|
|
242
|
+
files: typing.Optional[typing.List[core.File]] = OMIT,
|
|
327
243
|
file_metadata: typing.Optional[str] = OMIT,
|
|
244
|
+
app_sources: typing.Optional[str] = OMIT,
|
|
328
245
|
request_options: typing.Optional[RequestOptions] = None,
|
|
329
246
|
) -> SourceUploadResponse:
|
|
330
247
|
"""
|
|
331
|
-
Upload one or more documents for ingestion.
|
|
332
|
-
Supports both single and batch uploads.
|
|
333
|
-
For single file: send one file with the 'files' field.
|
|
334
|
-
For batch: send multiple files with the 'files' field (FastAPI will parse as list).
|
|
335
|
-
|
|
336
248
|
Parameters
|
|
337
249
|
----------
|
|
338
|
-
files : typing.List[core.File]
|
|
339
|
-
See core.File for more documentation
|
|
340
|
-
|
|
341
250
|
tenant_id : str
|
|
342
251
|
Unique identifier for the tenant/organization
|
|
343
252
|
|
|
@@ -345,9 +254,16 @@ class AsyncUploadClient:
|
|
|
345
254
|
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
|
|
346
255
|
|
|
347
256
|
upsert : typing.Optional[bool]
|
|
257
|
+
If true, update existing sources with the same id.
|
|
258
|
+
|
|
259
|
+
files : typing.Optional[typing.List[core.File]]
|
|
260
|
+
See core.File for more documentation
|
|
348
261
|
|
|
349
262
|
file_metadata : typing.Optional[str]
|
|
350
|
-
JSON
|
|
263
|
+
JSON array of file metadata objects; length must match files when provided.
|
|
264
|
+
|
|
265
|
+
app_sources : typing.Optional[str]
|
|
266
|
+
JSON: single source object or array of app-generated sources to index. Omit when only uploading files.
|
|
351
267
|
|
|
352
268
|
request_options : typing.Optional[RequestOptions]
|
|
353
269
|
Request-specific configuration.
|
|
@@ -365,70 +281,16 @@ class AsyncUploadClient:
|
|
|
365
281
|
|
|
366
282
|
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
367
283
|
async def main() -> None:
|
|
368
|
-
await client.upload.
|
|
284
|
+
await client.upload.upload_knowledge(tenant_id='tenant_id', )
|
|
369
285
|
asyncio.run(main())
|
|
370
286
|
"""
|
|
371
|
-
_response = await self._raw_client.
|
|
372
|
-
files=files,
|
|
287
|
+
_response = await self._raw_client.upload_knowledge(
|
|
373
288
|
tenant_id=tenant_id,
|
|
374
289
|
sub_tenant_id=sub_tenant_id,
|
|
375
290
|
upsert=upsert,
|
|
291
|
+
files=files,
|
|
376
292
|
file_metadata=file_metadata,
|
|
377
|
-
request_options=request_options,
|
|
378
|
-
)
|
|
379
|
-
return _response.data
|
|
380
|
-
|
|
381
|
-
async def upload_app_sources(
|
|
382
|
-
self,
|
|
383
|
-
*,
|
|
384
|
-
app_sources: BodyUploadAppIngestionUploadAppPostAppSources,
|
|
385
|
-
tenant_id: str,
|
|
386
|
-
sub_tenant_id: typing.Optional[str] = OMIT,
|
|
387
|
-
upsert: typing.Optional[bool] = OMIT,
|
|
388
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
389
|
-
) -> AppSourcesUploadData:
|
|
390
|
-
"""
|
|
391
|
-
Upload structured sources generated by first-party or third-party apps.
|
|
392
|
-
Supports both single and batch uploads.
|
|
393
|
-
|
|
394
|
-
Parameters
|
|
395
|
-
----------
|
|
396
|
-
app_sources : BodyUploadAppIngestionUploadAppPostAppSources
|
|
397
|
-
Single source object or list of structured source objects containing app-generated data to be indexed
|
|
398
|
-
|
|
399
|
-
tenant_id : str
|
|
400
|
-
Unique identifier for the tenant/organization
|
|
401
|
-
|
|
402
|
-
sub_tenant_id : typing.Optional[str]
|
|
403
|
-
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
|
|
404
|
-
|
|
405
|
-
upsert : typing.Optional[bool]
|
|
406
|
-
If true, update existing sources with the same source_id. Defaults to True.
|
|
407
|
-
|
|
408
|
-
request_options : typing.Optional[RequestOptions]
|
|
409
|
-
Request-specific configuration.
|
|
410
|
-
|
|
411
|
-
Returns
|
|
412
|
-
-------
|
|
413
|
-
AppSourcesUploadData
|
|
414
|
-
Successful Response
|
|
415
|
-
|
|
416
|
-
Examples
|
|
417
|
-
--------
|
|
418
|
-
import asyncio
|
|
419
|
-
|
|
420
|
-
from usecortex-ai import AsyncCortexAI, SourceModel
|
|
421
|
-
|
|
422
|
-
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
423
|
-
async def main() -> None:
|
|
424
|
-
await client.upload.upload_app_sources(app_sources=SourceModel(id='id', tenant_id='tenant_id', sub_tenant_id='sub_tenant_id', ), tenant_id='tenant_id', )
|
|
425
|
-
asyncio.run(main())
|
|
426
|
-
"""
|
|
427
|
-
_response = await self._raw_client.upload_app_sources(
|
|
428
293
|
app_sources=app_sources,
|
|
429
|
-
tenant_id=tenant_id,
|
|
430
|
-
sub_tenant_id=sub_tenant_id,
|
|
431
|
-
upsert=upsert,
|
|
432
294
|
request_options=request_options,
|
|
433
295
|
)
|
|
434
296
|
return _response.data
|
|
@@ -442,12 +304,6 @@ class AsyncUploadClient:
|
|
|
442
304
|
request_options: typing.Optional[RequestOptions] = None,
|
|
443
305
|
) -> ProcessingStatus:
|
|
444
306
|
"""
|
|
445
|
-
Check the current processing status of your uploaded content.
|
|
446
|
-
|
|
447
|
-
This endpoint allows you to monitor the progress of documents, text, or other content you've uploaded. Simply provide the file ID to see whether processing is complete, still in progress, or if any errors occurred.
|
|
448
|
-
|
|
449
|
-
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
450
|
-
|
|
451
307
|
Parameters
|
|
452
308
|
----------
|
|
453
309
|
file_id : str
|
|
@@ -475,7 +331,7 @@ class AsyncUploadClient:
|
|
|
475
331
|
|
|
476
332
|
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
477
333
|
async def main() -> None:
|
|
478
|
-
await client.upload.verify_processing(file_id='
|
|
334
|
+
await client.upload.verify_processing(file_id='<str>', tenant_id='tenant_1234', )
|
|
479
335
|
asyncio.run(main())
|
|
480
336
|
"""
|
|
481
337
|
_response = await self._raw_client.verify_processing(
|
|
@@ -493,24 +349,6 @@ class AsyncUploadClient:
|
|
|
493
349
|
request_options: typing.Optional[RequestOptions] = None,
|
|
494
350
|
) -> AddMemoryResponse:
|
|
495
351
|
"""
|
|
496
|
-
Add memories for indexing and retrieval.
|
|
497
|
-
|
|
498
|
-
This API provides a unified entry point for ingesting various types of content:
|
|
499
|
-
|
|
500
|
-
**Content Types Supported:**
|
|
501
|
-
- Raw text content (`text` field)
|
|
502
|
-
- Markdown formatted content (`text` + `is_markdown=true`)
|
|
503
|
-
- User/assistant conversation pairs (`user_assistant_pairs` field)
|
|
504
|
-
|
|
505
|
-
**Key Features:**
|
|
506
|
-
- **Inference Mode (`infer=true`)**: When enabled, the system extracts additional
|
|
507
|
-
insights and implicit information from your content. Useful for conversation
|
|
508
|
-
analysis and knowledge extraction.
|
|
509
|
-
- **Direct Mode (`infer=false`)**: Content is chunked and indexed as-is without
|
|
510
|
-
additional processing.
|
|
511
|
-
|
|
512
|
-
Use `/ingestion/verify-processing` endpoint to check the processing status.
|
|
513
|
-
|
|
514
352
|
Parameters
|
|
515
353
|
----------
|
|
516
354
|
memories : typing.Sequence[MemoryItem]
|
|
@@ -541,7 +379,7 @@ class AsyncUploadClient:
|
|
|
541
379
|
|
|
542
380
|
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
543
381
|
async def main() -> None:
|
|
544
|
-
await client.upload.add_memory(memories=[MemoryItem()], tenant_id='
|
|
382
|
+
await client.upload.add_memory(memories=[MemoryItem()], tenant_id='tenant_1234', )
|
|
545
383
|
asyncio.run(main())
|
|
546
384
|
"""
|
|
547
385
|
_response = await self._raw_client.add_memory(
|
|
@@ -562,14 +400,6 @@ class AsyncUploadClient:
|
|
|
562
400
|
request_options: typing.Optional[RequestOptions] = None,
|
|
563
401
|
) -> DeleteUserMemoryResponse:
|
|
564
402
|
"""
|
|
565
|
-
Permanently remove a specific memory from storage.
|
|
566
|
-
|
|
567
|
-
This API allows you to delete a memory by its unique identifier.
|
|
568
|
-
Once deleted, the memory cannot be recovered, so use this operation carefully.
|
|
569
|
-
|
|
570
|
-
The memory will be removed from your tenant's storage and will no longer
|
|
571
|
-
appear in search results or memory listings.
|
|
572
|
-
|
|
573
403
|
Parameters
|
|
574
404
|
----------
|
|
575
405
|
tenant_id : str
|
|
@@ -597,7 +427,7 @@ class AsyncUploadClient:
|
|
|
597
427
|
|
|
598
428
|
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
599
429
|
async def main() -> None:
|
|
600
|
-
await client.upload.delete_memory(tenant_id='
|
|
430
|
+
await client.upload.delete_memory(tenant_id='tenant_1234', memory_id='memory_1234', )
|
|
601
431
|
asyncio.run(main())
|
|
602
432
|
"""
|
|
603
433
|
_response = await self._raw_client.delete_memory(
|