usecortex-ai 0.2.0__py3-none-any.whl → 0.2.2__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.
Files changed (64) hide show
  1. usecortex_ai/__init__.py +20 -3
  2. usecortex_ai/client.py +7 -78
  3. usecortex_ai/core/client_wrapper.py +6 -8
  4. usecortex_ai/document/__init__.py +4 -0
  5. usecortex_ai/document/client.py +139 -0
  6. usecortex_ai/document/raw_client.py +312 -0
  7. usecortex_ai/embeddings/client.py +50 -82
  8. usecortex_ai/embeddings/raw_client.py +48 -80
  9. usecortex_ai/fetch/client.py +10 -0
  10. usecortex_ai/fetch/raw_client.py +10 -0
  11. usecortex_ai/search/client.py +74 -80
  12. usecortex_ai/search/raw_client.py +74 -80
  13. usecortex_ai/sources/client.py +28 -0
  14. usecortex_ai/sources/raw_client.py +28 -0
  15. usecortex_ai/tenant/client.py +152 -4
  16. usecortex_ai/tenant/raw_client.py +502 -4
  17. usecortex_ai/types/__init__.py +18 -2
  18. usecortex_ai/types/add_user_memory_response.py +36 -0
  19. usecortex_ai/types/app_sources_upload_data.py +10 -2
  20. usecortex_ai/types/attachment_model.py +34 -7
  21. usecortex_ai/types/batch_upload_data.py +10 -2
  22. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
  23. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
  24. usecortex_ai/types/content_model.py +33 -6
  25. usecortex_ai/types/delete_memory_request.py +14 -3
  26. usecortex_ai/types/delete_sources.py +20 -0
  27. usecortex_ai/types/delete_sub_tenant_data.py +42 -0
  28. usecortex_ai/types/delete_user_memory_response.py +31 -0
  29. usecortex_ai/types/embeddings_create_collection_data.py +19 -4
  30. usecortex_ai/types/embeddings_delete_data.py +19 -4
  31. usecortex_ai/types/embeddings_get_data.py +19 -4
  32. usecortex_ai/types/embeddings_search_data.py +19 -4
  33. usecortex_ai/types/error_response.py +0 -1
  34. usecortex_ai/types/fetch_content_data.py +19 -5
  35. usecortex_ai/types/file_upload_result.py +9 -2
  36. usecortex_ai/types/generate_user_memory_response.py +32 -0
  37. usecortex_ai/types/list_sources_response.py +14 -3
  38. usecortex_ai/types/list_user_memories_response.py +32 -0
  39. usecortex_ai/types/markdown_upload_request.py +18 -3
  40. usecortex_ai/types/processing_status.py +14 -3
  41. usecortex_ai/types/relations.py +2 -2
  42. usecortex_ai/types/retrieve_user_memory_response.py +32 -0
  43. usecortex_ai/types/search_chunk.py +54 -16
  44. usecortex_ai/types/single_upload_data.py +10 -2
  45. usecortex_ai/types/source.py +34 -14
  46. usecortex_ai/types/source_model.py +63 -12
  47. usecortex_ai/types/sub_tenant_ids_data.py +42 -0
  48. usecortex_ai/types/tenant_create_data.py +19 -4
  49. usecortex_ai/types/tenant_stats.py +24 -5
  50. usecortex_ai/types/user_memory.py +31 -0
  51. usecortex_ai/upload/client.py +508 -132
  52. usecortex_ai/upload/raw_client.py +492 -152
  53. usecortex_ai/user/client.py +14 -6
  54. usecortex_ai/user/raw_client.py +14 -6
  55. usecortex_ai/user_memory/client.py +184 -50
  56. usecortex_ai/user_memory/raw_client.py +905 -88
  57. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/METADATA +1 -1
  58. usecortex_ai-0.2.2.dist-info/RECORD +100 -0
  59. usecortex_ai/raw_client.py +0 -90
  60. usecortex_ai/types/source_content.py +0 -26
  61. usecortex_ai-0.2.0.dist-info/RECORD +0 -90
  62. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/WHEEL +0 -0
  63. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/licenses/LICENSE +0 -0
  64. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/top_level.txt +0 -0
@@ -7,9 +7,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
7
  from ..core.request_options import RequestOptions
8
8
  from ..types.app_sources_upload_data import AppSourcesUploadData
9
9
  from ..types.batch_upload_data import BatchUploadData
10
- from ..types.markdown_upload_request import MarkdownUploadRequest
11
10
  from ..types.processing_status import ProcessingStatus
12
- from ..types.relations import Relations
13
11
  from ..types.single_upload_data import SingleUploadData
14
12
  from ..types.source_model import SourceModel
15
13
  from .raw_client import AsyncRawUploadClient, RawUploadClient
@@ -41,24 +39,38 @@ class UploadClient:
41
39
  sub_tenant_id: typing.Optional[str] = None,
42
40
  tenant_metadata: typing.Optional[str] = OMIT,
43
41
  document_metadata: typing.Optional[str] = OMIT,
44
- relations: typing.Optional[str] = OMIT,
45
42
  request_options: typing.Optional[RequestOptions] = None,
46
43
  ) -> BatchUploadData:
47
44
  """
45
+ Upload multiple documents simultaneously for efficient bulk processing.
46
+
47
+ This endpoint allows you to upload several files at once, which is ideal for large document collections or periodic data imports. Each file gets processed asynchronously, and you can track the progress of individual files using their returned file IDs.
48
+
49
+ The system automatically handles file parsing, content extraction, and indexing across all uploaded documents. You'll receive confirmation once all files are queued for processing.
50
+
48
51
  Parameters
49
52
  ----------
50
53
  tenant_id : str
54
+ Unique identifier for the tenant/organization
51
55
 
52
56
  files : typing.List[core.File]
53
57
  See core.File for more documentation
54
58
 
55
59
  sub_tenant_id : typing.Optional[str]
60
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
56
61
 
57
62
  tenant_metadata : typing.Optional[str]
63
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
64
+
65
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
66
+
58
67
 
59
68
  document_metadata : typing.Optional[str]
69
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
70
+
71
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
72
+
60
73
 
61
- relations : typing.Optional[str]
62
74
 
63
75
  request_options : typing.Optional[RequestOptions]
64
76
  Request-specific configuration.
@@ -81,7 +93,6 @@ class UploadClient:
81
93
  sub_tenant_id=sub_tenant_id,
82
94
  tenant_metadata=tenant_metadata,
83
95
  document_metadata=document_metadata,
84
- relations=relations,
85
96
  request_options=request_options,
86
97
  )
87
98
  return _response.data
@@ -95,26 +106,41 @@ class UploadClient:
95
106
  source_ids: typing.Optional[typing.List[str]] = OMIT,
96
107
  tenant_metadata: typing.Optional[str] = OMIT,
97
108
  document_metadata: typing.Optional[str] = OMIT,
98
- relations: typing.Optional[str] = OMIT,
99
109
  request_options: typing.Optional[RequestOptions] = None,
100
110
  ) -> BatchUploadData:
101
111
  """
112
+ Update multiple existing documents with new content and metadata.
113
+
114
+ Use this endpoint when you need to replace or modify several documents that are already in your knowledge base. Each file must correspond to an existing source ID, ensuring that updates are applied to the correct documents.
115
+
116
+ The system processes updates asynchronously, allowing you to continue working while your documents are re-indexed. Track the progress using the returned file IDs to know when updates are complete.
117
+
102
118
  Parameters
103
119
  ----------
104
120
  tenant_id : str
121
+ Unique identifier for the tenant/organization
105
122
 
106
123
  files : typing.List[core.File]
107
124
  See core.File for more documentation
108
125
 
109
126
  sub_tenant_id : typing.Optional[str]
127
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
110
128
 
111
129
  source_ids : typing.Optional[typing.List[str]]
130
+ List of source IDs corresponding to the files being updated
112
131
 
113
132
  tenant_metadata : typing.Optional[str]
133
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
134
+
135
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
136
+
114
137
 
115
138
  document_metadata : typing.Optional[str]
139
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
140
+
141
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
142
+
116
143
 
117
- relations : typing.Optional[str]
118
144
 
119
145
  request_options : typing.Optional[RequestOptions]
120
146
  Request-specific configuration.
@@ -138,7 +164,6 @@ class UploadClient:
138
164
  source_ids=source_ids,
139
165
  tenant_metadata=tenant_metadata,
140
166
  document_metadata=document_metadata,
141
- relations=relations,
142
167
  request_options=request_options,
143
168
  )
144
169
  return _response.data
@@ -151,24 +176,38 @@ class UploadClient:
151
176
  sub_tenant_id: typing.Optional[str] = None,
152
177
  tenant_metadata: typing.Optional[str] = OMIT,
153
178
  document_metadata: typing.Optional[str] = OMIT,
154
- relations: typing.Optional[str] = OMIT,
155
179
  request_options: typing.Optional[RequestOptions] = None,
156
180
  ) -> SingleUploadData:
157
181
  """
182
+ Upload a single document for processing and indexing into your knowledge base.
183
+
184
+ This endpoint accepts documents in various formats and processes them for search and retrieval. You can include custom metadata to help organize and categorize your content.
185
+
186
+ The system extracts text content, processes it asynchronously, and makes it available for search queries. You can track the processing status using the returned file ID.
187
+
158
188
  Parameters
159
189
  ----------
160
190
  tenant_id : str
191
+ Unique identifier for the tenant/organization
161
192
 
162
193
  file : core.File
163
194
  See core.File for more documentation
164
195
 
165
196
  sub_tenant_id : typing.Optional[str]
197
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
166
198
 
167
199
  tenant_metadata : typing.Optional[str]
200
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
201
+
202
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
203
+
168
204
 
169
205
  document_metadata : typing.Optional[str]
206
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
207
+
208
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
209
+
170
210
 
171
- relations : typing.Optional[str]
172
211
 
173
212
  request_options : typing.Optional[RequestOptions]
174
213
  Request-specific configuration.
@@ -191,7 +230,6 @@ class UploadClient:
191
230
  sub_tenant_id=sub_tenant_id,
192
231
  tenant_metadata=tenant_metadata,
193
232
  document_metadata=document_metadata,
194
- relations=relations,
195
233
  request_options=request_options,
196
234
  )
197
235
  return _response.data
@@ -205,26 +243,41 @@ class UploadClient:
205
243
  sub_tenant_id: typing.Optional[str] = None,
206
244
  tenant_metadata: typing.Optional[str] = OMIT,
207
245
  document_metadata: typing.Optional[str] = OMIT,
208
- relations: typing.Optional[str] = OMIT,
209
246
  request_options: typing.Optional[RequestOptions] = None,
210
247
  ) -> SingleUploadData:
211
248
  """
249
+ Replace an existing document with updated content.
250
+
251
+ This endpoint allows you to update a specific document that's already in your knowledge base. Provide the source ID of the document you want to modify, along with the new file content.
252
+
253
+ The system will process your update asynchronously and re-index the document with the new content. You can monitor the progress using the returned file ID.
254
+
212
255
  Parameters
213
256
  ----------
214
257
  source_id : str
258
+ The source ID of the document to update
215
259
 
216
260
  tenant_id : str
261
+ Unique identifier for the tenant/organization
217
262
 
218
263
  file : core.File
219
264
  See core.File for more documentation
220
265
 
221
266
  sub_tenant_id : typing.Optional[str]
267
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
222
268
 
223
269
  tenant_metadata : typing.Optional[str]
270
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
271
+
272
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
273
+
224
274
 
225
275
  document_metadata : typing.Optional[str]
276
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
277
+
278
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
279
+
226
280
 
227
- relations : typing.Optional[str]
228
281
 
229
282
  request_options : typing.Optional[RequestOptions]
230
283
  Request-specific configuration.
@@ -248,7 +301,6 @@ class UploadClient:
248
301
  sub_tenant_id=sub_tenant_id,
249
302
  tenant_metadata=tenant_metadata,
250
303
  document_metadata=document_metadata,
251
- relations=relations,
252
304
  request_options=request_options,
253
305
  )
254
306
  return _response.data
@@ -262,13 +314,21 @@ class UploadClient:
262
314
  request_options: typing.Optional[RequestOptions] = None,
263
315
  ) -> AppSourcesUploadData:
264
316
  """
317
+ Upload structured data from applications or APIs for indexing.
318
+
319
+ This endpoint is designed for importing data from applications. If you are specifically using Cortex to provide search to an application, you should prefer this endpoint. It accepts structured source objects and allows you to clearly define contents of attachments
320
+
321
+ The system processes each source asynchronously and makes the content available for search and retrieval. Use this when you need to integrate search and indexing from data in your applications into your knowledge base.
322
+
265
323
  Parameters
266
324
  ----------
267
325
  tenant_id : str
326
+ Unique identifier for the tenant/organization
268
327
 
269
328
  request : typing.Sequence[SourceModel]
270
329
 
271
330
  sub_tenant_id : typing.Optional[str]
331
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
272
332
 
273
333
  request_options : typing.Optional[RequestOptions]
274
334
  Request-specific configuration.
@@ -294,24 +354,40 @@ class UploadClient:
294
354
  self,
295
355
  *,
296
356
  tenant_id: str,
297
- request: MarkdownUploadRequest,
357
+ content: str,
298
358
  sub_tenant_id: typing.Optional[str] = None,
299
- relations: typing.Optional[Relations] = OMIT,
359
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
360
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
300
361
  request_options: typing.Optional[RequestOptions] = None,
301
362
  ) -> SingleUploadData:
302
363
  """
303
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
304
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
364
+ Upload text or markdown content directly for processing.
365
+
366
+ This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
367
+
368
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
305
369
 
306
370
  Parameters
307
371
  ----------
308
372
  tenant_id : str
373
+ Unique identifier for the tenant/organization
309
374
 
310
- request : MarkdownUploadRequest
375
+ content : str
376
+ The text or markdown content to upload
311
377
 
312
378
  sub_tenant_id : typing.Optional[str]
379
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
380
+
381
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
382
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
383
+
384
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
385
+
386
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
387
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
388
+
389
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
313
390
 
314
- relations : typing.Optional[Relations]
315
391
 
316
392
  request_options : typing.Optional[RequestOptions]
317
393
  Request-specific configuration.
@@ -323,16 +399,17 @@ class UploadClient:
323
399
 
324
400
  Examples
325
401
  --------
326
- from usecortex-ai import CortexAI, MarkdownUploadRequest
402
+ from usecortex-ai import CortexAI
327
403
 
328
404
  client = CortexAI(token="YOUR_TOKEN", )
329
- client.upload.upload_markdown(tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
405
+ client.upload.upload_markdown(tenant_id='tenant_id', content='content', )
330
406
  """
331
407
  _response = self._raw_client.upload_markdown(
332
408
  tenant_id=tenant_id,
333
- request=request,
409
+ content=content,
334
410
  sub_tenant_id=sub_tenant_id,
335
- relations=relations,
411
+ tenant_metadata=tenant_metadata,
412
+ document_metadata=document_metadata,
336
413
  request_options=request_options,
337
414
  )
338
415
  return _response.data
@@ -341,24 +418,40 @@ class UploadClient:
341
418
  self,
342
419
  *,
343
420
  tenant_id: str,
344
- request: MarkdownUploadRequest,
421
+ content: str,
345
422
  sub_tenant_id: typing.Optional[str] = None,
346
- relations: typing.Optional[Relations] = OMIT,
423
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
424
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
347
425
  request_options: typing.Optional[RequestOptions] = None,
348
426
  ) -> SingleUploadData:
349
427
  """
350
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
351
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
428
+ Upload text or markdown content directly for processing.
429
+
430
+ This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
431
+
432
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
352
433
 
353
434
  Parameters
354
435
  ----------
355
436
  tenant_id : str
437
+ Unique identifier for the tenant/organization
356
438
 
357
- request : MarkdownUploadRequest
439
+ content : str
440
+ The text or markdown content to upload
358
441
 
359
442
  sub_tenant_id : typing.Optional[str]
443
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
444
+
445
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
446
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
447
+
448
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
449
+
450
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
451
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
452
+
453
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
360
454
 
361
- relations : typing.Optional[Relations]
362
455
 
363
456
  request_options : typing.Optional[RequestOptions]
364
457
  Request-specific configuration.
@@ -370,16 +463,17 @@ class UploadClient:
370
463
 
371
464
  Examples
372
465
  --------
373
- from usecortex-ai import CortexAI, MarkdownUploadRequest
466
+ from usecortex-ai import CortexAI
374
467
 
375
468
  client = CortexAI(token="YOUR_TOKEN", )
376
- client.upload.upload_text(tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
469
+ client.upload.upload_text(tenant_id='tenant_id', content='content', )
377
470
  """
378
471
  _response = self._raw_client.upload_text(
379
472
  tenant_id=tenant_id,
380
- request=request,
473
+ content=content,
381
474
  sub_tenant_id=sub_tenant_id,
382
- relations=relations,
475
+ tenant_metadata=tenant_metadata,
476
+ document_metadata=document_metadata,
383
477
  request_options=request_options,
384
478
  )
385
479
  return _response.data
@@ -389,23 +483,43 @@ class UploadClient:
389
483
  *,
390
484
  source_id: str,
391
485
  tenant_id: str,
392
- request: MarkdownUploadRequest,
486
+ content: str,
393
487
  sub_tenant_id: typing.Optional[str] = None,
394
- relations: typing.Optional[Relations] = OMIT,
488
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
489
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
395
490
  request_options: typing.Optional[RequestOptions] = None,
396
491
  ) -> SingleUploadData:
397
492
  """
493
+ Update existing text or markdown content with new information.
494
+
495
+ This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
496
+
497
+ The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
498
+
398
499
  Parameters
399
500
  ----------
400
501
  source_id : str
502
+ The source ID of the document to update
401
503
 
402
504
  tenant_id : str
505
+ Unique identifier for the tenant/organization
403
506
 
404
- request : MarkdownUploadRequest
507
+ content : str
508
+ The text or markdown content to upload
405
509
 
406
510
  sub_tenant_id : typing.Optional[str]
511
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
512
+
513
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
514
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
515
+
516
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
517
+
518
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
519
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
520
+
521
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
407
522
 
408
- relations : typing.Optional[Relations]
409
523
 
410
524
  request_options : typing.Optional[RequestOptions]
411
525
  Request-specific configuration.
@@ -417,17 +531,18 @@ class UploadClient:
417
531
 
418
532
  Examples
419
533
  --------
420
- from usecortex-ai import CortexAI, MarkdownUploadRequest
534
+ from usecortex-ai import CortexAI
421
535
 
422
536
  client = CortexAI(token="YOUR_TOKEN", )
423
- client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
537
+ client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', content='content', )
424
538
  """
425
539
  _response = self._raw_client.update_markdown(
426
540
  source_id=source_id,
427
541
  tenant_id=tenant_id,
428
- request=request,
542
+ content=content,
429
543
  sub_tenant_id=sub_tenant_id,
430
- relations=relations,
544
+ tenant_metadata=tenant_metadata,
545
+ document_metadata=document_metadata,
431
546
  request_options=request_options,
432
547
  )
433
548
  return _response.data
@@ -437,23 +552,43 @@ class UploadClient:
437
552
  *,
438
553
  source_id: str,
439
554
  tenant_id: str,
440
- request: MarkdownUploadRequest,
555
+ content: str,
441
556
  sub_tenant_id: typing.Optional[str] = None,
442
- relations: typing.Optional[Relations] = OMIT,
557
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
558
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
443
559
  request_options: typing.Optional[RequestOptions] = None,
444
560
  ) -> SingleUploadData:
445
561
  """
562
+ Update existing text or markdown content with new information.
563
+
564
+ This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
565
+
566
+ The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
567
+
446
568
  Parameters
447
569
  ----------
448
570
  source_id : str
571
+ The source ID of the document to update
449
572
 
450
573
  tenant_id : str
574
+ Unique identifier for the tenant/organization
451
575
 
452
- request : MarkdownUploadRequest
576
+ content : str
577
+ The text or markdown content to upload
453
578
 
454
579
  sub_tenant_id : typing.Optional[str]
580
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
581
+
582
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
583
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
584
+
585
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
586
+
587
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
588
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
589
+
590
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
455
591
 
456
- relations : typing.Optional[Relations]
457
592
 
458
593
  request_options : typing.Optional[RequestOptions]
459
594
  Request-specific configuration.
@@ -465,17 +600,18 @@ class UploadClient:
465
600
 
466
601
  Examples
467
602
  --------
468
- from usecortex-ai import CortexAI, MarkdownUploadRequest
603
+ from usecortex-ai import CortexAI
469
604
 
470
605
  client = CortexAI(token="YOUR_TOKEN", )
471
- client.upload.update_text(source_id='source_id', tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
606
+ client.upload.update_text(source_id='source_id', tenant_id='tenant_id', content='content', )
472
607
  """
473
608
  _response = self._raw_client.update_text(
474
609
  source_id=source_id,
475
610
  tenant_id=tenant_id,
476
- request=request,
611
+ content=content,
477
612
  sub_tenant_id=sub_tenant_id,
478
- relations=relations,
613
+ tenant_metadata=tenant_metadata,
614
+ document_metadata=document_metadata,
479
615
  request_options=request_options,
480
616
  )
481
617
  return _response.data
@@ -490,15 +626,25 @@ class UploadClient:
490
626
  request_options: typing.Optional[RequestOptions] = None,
491
627
  ) -> SingleUploadData:
492
628
  """
629
+ Upload pre-computed embeddings for advanced similarity search.
630
+
631
+ This endpoint accepts vector embeddings that you've generated externally, allowing you to integrate with custom embedding models or existing vector databases. The embeddings represent chunks of your content as numerical vectors.
632
+
633
+ The system stores these embeddings and makes them available for semantic search and similarity matching. Use this when you want to leverage specialized embedding models or have existing vector representations.
634
+
493
635
  Parameters
494
636
  ----------
495
637
  tenant_id : str
638
+ Unique identifier for the tenant/organization
496
639
 
497
640
  embeddings : typing.Sequence[typing.Sequence[float]]
641
+ The embeddings of source you want to index
498
642
 
499
643
  sub_tenant_id : typing.Optional[str]
644
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
500
645
 
501
646
  file_id : typing.Optional[str]
647
+ The Source ID of the target source you want to index
502
648
 
503
649
  request_options : typing.Optional[RequestOptions]
504
650
  Request-specific configuration.
@@ -528,19 +674,27 @@ class UploadClient:
528
674
  self,
529
675
  *,
530
676
  tenant_id: str,
531
- embeddings: typing.Dict[str, typing.Sequence[float]],
532
677
  sub_tenant_id: typing.Optional[str] = None,
678
+ embeddings: typing.Optional[typing.Dict[str, typing.Sequence[float]]] = OMIT,
533
679
  request_options: typing.Optional[RequestOptions] = None,
534
680
  ) -> SingleUploadData:
535
681
  """
682
+ Update existing embeddings with new vector representations.
683
+
684
+ This endpoint allows you to modify embeddings that are already stored in your knowledge base. Provide updated vector representations for specific chunks of content, identified by their chunk IDs.
685
+
686
+ The system will replace the existing embeddings with your new ones, ensuring that similarity searches reflect the most current vector representations. Use this when you need to update embeddings due to model improvements or content changes.
687
+
536
688
  Parameters
537
689
  ----------
538
690
  tenant_id : str
539
-
540
- embeddings : typing.Dict[str, typing.Sequence[float]]
541
- Dictionary with chunk_id as key and embedding array as value
691
+ Unique identifier for the tenant/organization
542
692
 
543
693
  sub_tenant_id : typing.Optional[str]
694
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
695
+
696
+ embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
697
+ The embeddings of source you want to index
544
698
 
545
699
  request_options : typing.Optional[RequestOptions]
546
700
  Request-specific configuration.
@@ -555,10 +709,10 @@ class UploadClient:
555
709
  from usecortex-ai import CortexAI
556
710
 
557
711
  client = CortexAI(token="YOUR_TOKEN", )
558
- client.upload.update_embeddings(tenant_id='tenant_id', embeddings={'key': [1.1]}, )
712
+ client.upload.update_embeddings(tenant_id='tenant_id', )
559
713
  """
560
714
  _response = self._raw_client.update_embeddings(
561
- tenant_id=tenant_id, embeddings=embeddings, sub_tenant_id=sub_tenant_id, request_options=request_options
715
+ tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, embeddings=embeddings, request_options=request_options
562
716
  )
563
717
  return _response.data
564
718
 
@@ -569,21 +723,28 @@ class UploadClient:
569
723
  tenant_id: str,
570
724
  sub_tenant_id: typing.Optional[str] = None,
571
725
  file_id: typing.Optional[str] = None,
572
- relations: typing.Optional[str] = OMIT,
573
726
  request_options: typing.Optional[RequestOptions] = None,
574
727
  ) -> SingleUploadData:
575
728
  """
729
+ Extract and index content from web pages automatically.
730
+
731
+ This endpoint initiates web scraping for the specified URL, extracting the main content, text, and structure from the webpage. It's perfect for capturing articles, documentation, or any web content you want to include in your knowledge base.
732
+
733
+ The system processes the webpage content asynchronously, cleaning and structuring the information for optimal search and retrieval. Use this when you need to add web content without manual copying and pasting.
734
+
576
735
  Parameters
577
736
  ----------
578
737
  web_url : str
738
+ The URL of the webpage to scrape and index
579
739
 
580
740
  tenant_id : str
741
+ Unique identifier for the tenant/organization
581
742
 
582
743
  sub_tenant_id : typing.Optional[str]
744
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
583
745
 
584
746
  file_id : typing.Optional[str]
585
-
586
- relations : typing.Optional[str]
747
+ Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
587
748
 
588
749
  request_options : typing.Optional[RequestOptions]
589
750
  Request-specific configuration.
@@ -605,7 +766,6 @@ class UploadClient:
605
766
  tenant_id=tenant_id,
606
767
  sub_tenant_id=sub_tenant_id,
607
768
  file_id=file_id,
608
- relations=relations,
609
769
  request_options=request_options,
610
770
  )
611
771
  return _response.data
@@ -617,21 +777,28 @@ class UploadClient:
617
777
  source_id: str,
618
778
  tenant_id: str,
619
779
  sub_tenant_id: typing.Optional[str] = None,
620
- relations: typing.Optional[str] = OMIT,
621
780
  request_options: typing.Optional[RequestOptions] = None,
622
781
  ) -> SingleUploadData:
623
782
  """
783
+ Update web scraping content with fresh data from the source URL.
784
+
785
+ This endpoint refreshes the content for an existing web scraping job. Provide the source ID of the webpage content you want to update, and the system will re-scrape the URL to capture any changes.
786
+
787
+ The updated content gets processed asynchronously and re-indexed in your knowledge base. Use this to keep web content current when the source pages are frequently updated.
788
+
624
789
  Parameters
625
790
  ----------
626
791
  web_url : str
792
+ The URL of the webpage to re-scrape
627
793
 
628
794
  source_id : str
795
+ The file ID of the existing web scraping job to update
629
796
 
630
797
  tenant_id : str
798
+ Unique identifier for the tenant/organization
631
799
 
632
800
  sub_tenant_id : typing.Optional[str]
633
-
634
- relations : typing.Optional[str]
801
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
635
802
 
636
803
  request_options : typing.Optional[RequestOptions]
637
804
  Request-specific configuration.
@@ -653,7 +820,6 @@ class UploadClient:
653
820
  source_id=source_id,
654
821
  tenant_id=tenant_id,
655
822
  sub_tenant_id=sub_tenant_id,
656
- relations=relations,
657
823
  request_options=request_options,
658
824
  )
659
825
  return _response.data
@@ -667,13 +833,22 @@ class UploadClient:
667
833
  request_options: typing.Optional[RequestOptions] = None,
668
834
  ) -> typing.Optional[typing.Any]:
669
835
  """
836
+ Remove documents and content from your knowledge base.
837
+
838
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
839
+
840
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
841
+
670
842
  Parameters
671
843
  ----------
672
844
  tenant_id : str
845
+ Unique identifier for the tenant/organization
673
846
 
674
847
  source_ids : typing.Sequence[str]
848
+ List of source IDs to delete
675
849
 
676
850
  sub_tenant_id : typing.Optional[str]
851
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
677
852
 
678
853
  request_options : typing.Optional[RequestOptions]
679
854
  Request-specific configuration.
@@ -704,13 +879,22 @@ class UploadClient:
704
879
  request_options: typing.Optional[RequestOptions] = None,
705
880
  ) -> typing.Optional[typing.Any]:
706
881
  """
882
+ Remove documents and content from your knowledge base.
883
+
884
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
885
+
886
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
887
+
707
888
  Parameters
708
889
  ----------
709
890
  tenant_id : str
891
+ Unique identifier for the tenant/organization
710
892
 
711
893
  source_ids : typing.Sequence[str]
894
+ List of source IDs to delete
712
895
 
713
896
  sub_tenant_id : typing.Optional[str]
897
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
714
898
 
715
899
  request_options : typing.Optional[RequestOptions]
716
900
  Request-specific configuration.
@@ -740,16 +924,19 @@ class UploadClient:
740
924
  request_options: typing.Optional[RequestOptions] = None,
741
925
  ) -> ProcessingStatus:
742
926
  """
743
- Verify the processing status of an uploaded file.
927
+ Check the current processing status of your uploaded content.
928
+
929
+ 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.
744
930
 
745
- Returns:
746
- ProcessingStatusResponse: Processing status information
931
+ Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
747
932
 
748
933
  Parameters
749
934
  ----------
750
935
  file_id : str
936
+ The file ID to check processing status for
751
937
 
752
938
  tenant_id : typing.Optional[str]
939
+ Unique identifier for the tenant/organization
753
940
 
754
941
  request_options : typing.Optional[RequestOptions]
755
942
  Request-specific configuration.
@@ -795,24 +982,38 @@ class AsyncUploadClient:
795
982
  sub_tenant_id: typing.Optional[str] = None,
796
983
  tenant_metadata: typing.Optional[str] = OMIT,
797
984
  document_metadata: typing.Optional[str] = OMIT,
798
- relations: typing.Optional[str] = OMIT,
799
985
  request_options: typing.Optional[RequestOptions] = None,
800
986
  ) -> BatchUploadData:
801
987
  """
988
+ Upload multiple documents simultaneously for efficient bulk processing.
989
+
990
+ This endpoint allows you to upload several files at once, which is ideal for large document collections or periodic data imports. Each file gets processed asynchronously, and you can track the progress of individual files using their returned file IDs.
991
+
992
+ The system automatically handles file parsing, content extraction, and indexing across all uploaded documents. You'll receive confirmation once all files are queued for processing.
993
+
802
994
  Parameters
803
995
  ----------
804
996
  tenant_id : str
997
+ Unique identifier for the tenant/organization
805
998
 
806
999
  files : typing.List[core.File]
807
1000
  See core.File for more documentation
808
1001
 
809
1002
  sub_tenant_id : typing.Optional[str]
1003
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
810
1004
 
811
1005
  tenant_metadata : typing.Optional[str]
1006
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1007
+
1008
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1009
+
812
1010
 
813
1011
  document_metadata : typing.Optional[str]
1012
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1013
+
1014
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1015
+
814
1016
 
815
- relations : typing.Optional[str]
816
1017
 
817
1018
  request_options : typing.Optional[RequestOptions]
818
1019
  Request-specific configuration.
@@ -839,7 +1040,6 @@ class AsyncUploadClient:
839
1040
  sub_tenant_id=sub_tenant_id,
840
1041
  tenant_metadata=tenant_metadata,
841
1042
  document_metadata=document_metadata,
842
- relations=relations,
843
1043
  request_options=request_options,
844
1044
  )
845
1045
  return _response.data
@@ -853,26 +1053,41 @@ class AsyncUploadClient:
853
1053
  source_ids: typing.Optional[typing.List[str]] = OMIT,
854
1054
  tenant_metadata: typing.Optional[str] = OMIT,
855
1055
  document_metadata: typing.Optional[str] = OMIT,
856
- relations: typing.Optional[str] = OMIT,
857
1056
  request_options: typing.Optional[RequestOptions] = None,
858
1057
  ) -> BatchUploadData:
859
1058
  """
1059
+ Update multiple existing documents with new content and metadata.
1060
+
1061
+ Use this endpoint when you need to replace or modify several documents that are already in your knowledge base. Each file must correspond to an existing source ID, ensuring that updates are applied to the correct documents.
1062
+
1063
+ The system processes updates asynchronously, allowing you to continue working while your documents are re-indexed. Track the progress using the returned file IDs to know when updates are complete.
1064
+
860
1065
  Parameters
861
1066
  ----------
862
1067
  tenant_id : str
1068
+ Unique identifier for the tenant/organization
863
1069
 
864
1070
  files : typing.List[core.File]
865
1071
  See core.File for more documentation
866
1072
 
867
1073
  sub_tenant_id : typing.Optional[str]
1074
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
868
1075
 
869
1076
  source_ids : typing.Optional[typing.List[str]]
1077
+ List of source IDs corresponding to the files being updated
870
1078
 
871
1079
  tenant_metadata : typing.Optional[str]
1080
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1081
+
1082
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1083
+
872
1084
 
873
1085
  document_metadata : typing.Optional[str]
1086
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1087
+
1088
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1089
+
874
1090
 
875
- relations : typing.Optional[str]
876
1091
 
877
1092
  request_options : typing.Optional[RequestOptions]
878
1093
  Request-specific configuration.
@@ -900,7 +1115,6 @@ class AsyncUploadClient:
900
1115
  source_ids=source_ids,
901
1116
  tenant_metadata=tenant_metadata,
902
1117
  document_metadata=document_metadata,
903
- relations=relations,
904
1118
  request_options=request_options,
905
1119
  )
906
1120
  return _response.data
@@ -913,24 +1127,38 @@ class AsyncUploadClient:
913
1127
  sub_tenant_id: typing.Optional[str] = None,
914
1128
  tenant_metadata: typing.Optional[str] = OMIT,
915
1129
  document_metadata: typing.Optional[str] = OMIT,
916
- relations: typing.Optional[str] = OMIT,
917
1130
  request_options: typing.Optional[RequestOptions] = None,
918
1131
  ) -> SingleUploadData:
919
1132
  """
1133
+ Upload a single document for processing and indexing into your knowledge base.
1134
+
1135
+ This endpoint accepts documents in various formats and processes them for search and retrieval. You can include custom metadata to help organize and categorize your content.
1136
+
1137
+ The system extracts text content, processes it asynchronously, and makes it available for search queries. You can track the processing status using the returned file ID.
1138
+
920
1139
  Parameters
921
1140
  ----------
922
1141
  tenant_id : str
1142
+ Unique identifier for the tenant/organization
923
1143
 
924
1144
  file : core.File
925
1145
  See core.File for more documentation
926
1146
 
927
1147
  sub_tenant_id : typing.Optional[str]
1148
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
928
1149
 
929
1150
  tenant_metadata : typing.Optional[str]
1151
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1152
+
1153
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1154
+
930
1155
 
931
1156
  document_metadata : typing.Optional[str]
1157
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1158
+
1159
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1160
+
932
1161
 
933
- relations : typing.Optional[str]
934
1162
 
935
1163
  request_options : typing.Optional[RequestOptions]
936
1164
  Request-specific configuration.
@@ -957,7 +1185,6 @@ class AsyncUploadClient:
957
1185
  sub_tenant_id=sub_tenant_id,
958
1186
  tenant_metadata=tenant_metadata,
959
1187
  document_metadata=document_metadata,
960
- relations=relations,
961
1188
  request_options=request_options,
962
1189
  )
963
1190
  return _response.data
@@ -971,26 +1198,41 @@ class AsyncUploadClient:
971
1198
  sub_tenant_id: typing.Optional[str] = None,
972
1199
  tenant_metadata: typing.Optional[str] = OMIT,
973
1200
  document_metadata: typing.Optional[str] = OMIT,
974
- relations: typing.Optional[str] = OMIT,
975
1201
  request_options: typing.Optional[RequestOptions] = None,
976
1202
  ) -> SingleUploadData:
977
1203
  """
1204
+ Replace an existing document with updated content.
1205
+
1206
+ This endpoint allows you to update a specific document that's already in your knowledge base. Provide the source ID of the document you want to modify, along with the new file content.
1207
+
1208
+ The system will process your update asynchronously and re-index the document with the new content. You can monitor the progress using the returned file ID.
1209
+
978
1210
  Parameters
979
1211
  ----------
980
1212
  source_id : str
1213
+ The source ID of the document to update
981
1214
 
982
1215
  tenant_id : str
1216
+ Unique identifier for the tenant/organization
983
1217
 
984
1218
  file : core.File
985
1219
  See core.File for more documentation
986
1220
 
987
1221
  sub_tenant_id : typing.Optional[str]
1222
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
988
1223
 
989
1224
  tenant_metadata : typing.Optional[str]
1225
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1226
+
1227
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1228
+
990
1229
 
991
1230
  document_metadata : typing.Optional[str]
1231
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1232
+
1233
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1234
+
992
1235
 
993
- relations : typing.Optional[str]
994
1236
 
995
1237
  request_options : typing.Optional[RequestOptions]
996
1238
  Request-specific configuration.
@@ -1018,7 +1260,6 @@ class AsyncUploadClient:
1018
1260
  sub_tenant_id=sub_tenant_id,
1019
1261
  tenant_metadata=tenant_metadata,
1020
1262
  document_metadata=document_metadata,
1021
- relations=relations,
1022
1263
  request_options=request_options,
1023
1264
  )
1024
1265
  return _response.data
@@ -1032,13 +1273,21 @@ class AsyncUploadClient:
1032
1273
  request_options: typing.Optional[RequestOptions] = None,
1033
1274
  ) -> AppSourcesUploadData:
1034
1275
  """
1276
+ Upload structured data from applications or APIs for indexing.
1277
+
1278
+ This endpoint is designed for importing data from applications. If you are specifically using Cortex to provide search to an application, you should prefer this endpoint. It accepts structured source objects and allows you to clearly define contents of attachments
1279
+
1280
+ The system processes each source asynchronously and makes the content available for search and retrieval. Use this when you need to integrate search and indexing from data in your applications into your knowledge base.
1281
+
1035
1282
  Parameters
1036
1283
  ----------
1037
1284
  tenant_id : str
1285
+ Unique identifier for the tenant/organization
1038
1286
 
1039
1287
  request : typing.Sequence[SourceModel]
1040
1288
 
1041
1289
  sub_tenant_id : typing.Optional[str]
1290
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1042
1291
 
1043
1292
  request_options : typing.Optional[RequestOptions]
1044
1293
  Request-specific configuration.
@@ -1068,24 +1317,40 @@ class AsyncUploadClient:
1068
1317
  self,
1069
1318
  *,
1070
1319
  tenant_id: str,
1071
- request: MarkdownUploadRequest,
1320
+ content: str,
1072
1321
  sub_tenant_id: typing.Optional[str] = None,
1073
- relations: typing.Optional[Relations] = OMIT,
1322
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1323
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1074
1324
  request_options: typing.Optional[RequestOptions] = None,
1075
1325
  ) -> SingleUploadData:
1076
1326
  """
1077
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
1078
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
1327
+ Upload text or markdown content directly for processing.
1328
+
1329
+ This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
1330
+
1331
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
1079
1332
 
1080
1333
  Parameters
1081
1334
  ----------
1082
1335
  tenant_id : str
1336
+ Unique identifier for the tenant/organization
1083
1337
 
1084
- request : MarkdownUploadRequest
1338
+ content : str
1339
+ The text or markdown content to upload
1085
1340
 
1086
1341
  sub_tenant_id : typing.Optional[str]
1342
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1343
+
1344
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1345
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1346
+
1347
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1348
+
1349
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1350
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1351
+
1352
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1087
1353
 
1088
- relations : typing.Optional[Relations]
1089
1354
 
1090
1355
  request_options : typing.Optional[RequestOptions]
1091
1356
  Request-specific configuration.
@@ -1099,18 +1364,19 @@ class AsyncUploadClient:
1099
1364
  --------
1100
1365
  import asyncio
1101
1366
 
1102
- from usecortex-ai import AsyncCortexAI, MarkdownUploadRequest
1367
+ from usecortex-ai import AsyncCortexAI
1103
1368
 
1104
1369
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1105
1370
  async def main() -> None:
1106
- await client.upload.upload_markdown(tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
1371
+ await client.upload.upload_markdown(tenant_id='tenant_id', content='content', )
1107
1372
  asyncio.run(main())
1108
1373
  """
1109
1374
  _response = await self._raw_client.upload_markdown(
1110
1375
  tenant_id=tenant_id,
1111
- request=request,
1376
+ content=content,
1112
1377
  sub_tenant_id=sub_tenant_id,
1113
- relations=relations,
1378
+ tenant_metadata=tenant_metadata,
1379
+ document_metadata=document_metadata,
1114
1380
  request_options=request_options,
1115
1381
  )
1116
1382
  return _response.data
@@ -1119,24 +1385,40 @@ class AsyncUploadClient:
1119
1385
  self,
1120
1386
  *,
1121
1387
  tenant_id: str,
1122
- request: MarkdownUploadRequest,
1388
+ content: str,
1123
1389
  sub_tenant_id: typing.Optional[str] = None,
1124
- relations: typing.Optional[Relations] = OMIT,
1390
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1391
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1125
1392
  request_options: typing.Optional[RequestOptions] = None,
1126
1393
  ) -> SingleUploadData:
1127
1394
  """
1128
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
1129
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
1395
+ Upload text or markdown content directly for processing.
1396
+
1397
+ This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
1398
+
1399
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
1130
1400
 
1131
1401
  Parameters
1132
1402
  ----------
1133
1403
  tenant_id : str
1404
+ Unique identifier for the tenant/organization
1134
1405
 
1135
- request : MarkdownUploadRequest
1406
+ content : str
1407
+ The text or markdown content to upload
1136
1408
 
1137
1409
  sub_tenant_id : typing.Optional[str]
1410
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1411
+
1412
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1413
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1414
+
1415
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1416
+
1417
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1418
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1419
+
1420
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1138
1421
 
1139
- relations : typing.Optional[Relations]
1140
1422
 
1141
1423
  request_options : typing.Optional[RequestOptions]
1142
1424
  Request-specific configuration.
@@ -1150,18 +1432,19 @@ class AsyncUploadClient:
1150
1432
  --------
1151
1433
  import asyncio
1152
1434
 
1153
- from usecortex-ai import AsyncCortexAI, MarkdownUploadRequest
1435
+ from usecortex-ai import AsyncCortexAI
1154
1436
 
1155
1437
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1156
1438
  async def main() -> None:
1157
- await client.upload.upload_text(tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
1439
+ await client.upload.upload_text(tenant_id='tenant_id', content='content', )
1158
1440
  asyncio.run(main())
1159
1441
  """
1160
1442
  _response = await self._raw_client.upload_text(
1161
1443
  tenant_id=tenant_id,
1162
- request=request,
1444
+ content=content,
1163
1445
  sub_tenant_id=sub_tenant_id,
1164
- relations=relations,
1446
+ tenant_metadata=tenant_metadata,
1447
+ document_metadata=document_metadata,
1165
1448
  request_options=request_options,
1166
1449
  )
1167
1450
  return _response.data
@@ -1171,23 +1454,43 @@ class AsyncUploadClient:
1171
1454
  *,
1172
1455
  source_id: str,
1173
1456
  tenant_id: str,
1174
- request: MarkdownUploadRequest,
1457
+ content: str,
1175
1458
  sub_tenant_id: typing.Optional[str] = None,
1176
- relations: typing.Optional[Relations] = OMIT,
1459
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1460
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1177
1461
  request_options: typing.Optional[RequestOptions] = None,
1178
1462
  ) -> SingleUploadData:
1179
1463
  """
1464
+ Update existing text or markdown content with new information.
1465
+
1466
+ This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
1467
+
1468
+ The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
1469
+
1180
1470
  Parameters
1181
1471
  ----------
1182
1472
  source_id : str
1473
+ The source ID of the document to update
1183
1474
 
1184
1475
  tenant_id : str
1476
+ Unique identifier for the tenant/organization
1185
1477
 
1186
- request : MarkdownUploadRequest
1478
+ content : str
1479
+ The text or markdown content to upload
1187
1480
 
1188
1481
  sub_tenant_id : typing.Optional[str]
1482
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1483
+
1484
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1485
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1486
+
1487
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1488
+
1489
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1490
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1491
+
1492
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1189
1493
 
1190
- relations : typing.Optional[Relations]
1191
1494
 
1192
1495
  request_options : typing.Optional[RequestOptions]
1193
1496
  Request-specific configuration.
@@ -1201,19 +1504,20 @@ class AsyncUploadClient:
1201
1504
  --------
1202
1505
  import asyncio
1203
1506
 
1204
- from usecortex-ai import AsyncCortexAI, MarkdownUploadRequest
1507
+ from usecortex-ai import AsyncCortexAI
1205
1508
 
1206
1509
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1207
1510
  async def main() -> None:
1208
- await client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
1511
+ await client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', content='content', )
1209
1512
  asyncio.run(main())
1210
1513
  """
1211
1514
  _response = await self._raw_client.update_markdown(
1212
1515
  source_id=source_id,
1213
1516
  tenant_id=tenant_id,
1214
- request=request,
1517
+ content=content,
1215
1518
  sub_tenant_id=sub_tenant_id,
1216
- relations=relations,
1519
+ tenant_metadata=tenant_metadata,
1520
+ document_metadata=document_metadata,
1217
1521
  request_options=request_options,
1218
1522
  )
1219
1523
  return _response.data
@@ -1223,23 +1527,43 @@ class AsyncUploadClient:
1223
1527
  *,
1224
1528
  source_id: str,
1225
1529
  tenant_id: str,
1226
- request: MarkdownUploadRequest,
1530
+ content: str,
1227
1531
  sub_tenant_id: typing.Optional[str] = None,
1228
- relations: typing.Optional[Relations] = OMIT,
1532
+ tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1533
+ document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1229
1534
  request_options: typing.Optional[RequestOptions] = None,
1230
1535
  ) -> SingleUploadData:
1231
1536
  """
1537
+ Update existing text or markdown content with new information.
1538
+
1539
+ This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
1540
+
1541
+ The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
1542
+
1232
1543
  Parameters
1233
1544
  ----------
1234
1545
  source_id : str
1546
+ The source ID of the document to update
1235
1547
 
1236
1548
  tenant_id : str
1549
+ Unique identifier for the tenant/organization
1237
1550
 
1238
- request : MarkdownUploadRequest
1551
+ content : str
1552
+ The text or markdown content to upload
1239
1553
 
1240
1554
  sub_tenant_id : typing.Optional[str]
1555
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1556
+
1557
+ tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1558
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1559
+
1560
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1561
+
1562
+ document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1563
+ JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
1564
+
1565
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1241
1566
 
1242
- relations : typing.Optional[Relations]
1243
1567
 
1244
1568
  request_options : typing.Optional[RequestOptions]
1245
1569
  Request-specific configuration.
@@ -1253,19 +1577,20 @@ class AsyncUploadClient:
1253
1577
  --------
1254
1578
  import asyncio
1255
1579
 
1256
- from usecortex-ai import AsyncCortexAI, MarkdownUploadRequest
1580
+ from usecortex-ai import AsyncCortexAI
1257
1581
 
1258
1582
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1259
1583
  async def main() -> None:
1260
- await client.upload.update_text(source_id='source_id', tenant_id='tenant_id', request=MarkdownUploadRequest(content='content', ), )
1584
+ await client.upload.update_text(source_id='source_id', tenant_id='tenant_id', content='content', )
1261
1585
  asyncio.run(main())
1262
1586
  """
1263
1587
  _response = await self._raw_client.update_text(
1264
1588
  source_id=source_id,
1265
1589
  tenant_id=tenant_id,
1266
- request=request,
1590
+ content=content,
1267
1591
  sub_tenant_id=sub_tenant_id,
1268
- relations=relations,
1592
+ tenant_metadata=tenant_metadata,
1593
+ document_metadata=document_metadata,
1269
1594
  request_options=request_options,
1270
1595
  )
1271
1596
  return _response.data
@@ -1280,15 +1605,25 @@ class AsyncUploadClient:
1280
1605
  request_options: typing.Optional[RequestOptions] = None,
1281
1606
  ) -> SingleUploadData:
1282
1607
  """
1608
+ Upload pre-computed embeddings for advanced similarity search.
1609
+
1610
+ This endpoint accepts vector embeddings that you've generated externally, allowing you to integrate with custom embedding models or existing vector databases. The embeddings represent chunks of your content as numerical vectors.
1611
+
1612
+ The system stores these embeddings and makes them available for semantic search and similarity matching. Use this when you want to leverage specialized embedding models or have existing vector representations.
1613
+
1283
1614
  Parameters
1284
1615
  ----------
1285
1616
  tenant_id : str
1617
+ Unique identifier for the tenant/organization
1286
1618
 
1287
1619
  embeddings : typing.Sequence[typing.Sequence[float]]
1620
+ The embeddings of source you want to index
1288
1621
 
1289
1622
  sub_tenant_id : typing.Optional[str]
1623
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1290
1624
 
1291
1625
  file_id : typing.Optional[str]
1626
+ The Source ID of the target source you want to index
1292
1627
 
1293
1628
  request_options : typing.Optional[RequestOptions]
1294
1629
  Request-specific configuration.
@@ -1322,19 +1657,27 @@ class AsyncUploadClient:
1322
1657
  self,
1323
1658
  *,
1324
1659
  tenant_id: str,
1325
- embeddings: typing.Dict[str, typing.Sequence[float]],
1326
1660
  sub_tenant_id: typing.Optional[str] = None,
1661
+ embeddings: typing.Optional[typing.Dict[str, typing.Sequence[float]]] = OMIT,
1327
1662
  request_options: typing.Optional[RequestOptions] = None,
1328
1663
  ) -> SingleUploadData:
1329
1664
  """
1665
+ Update existing embeddings with new vector representations.
1666
+
1667
+ This endpoint allows you to modify embeddings that are already stored in your knowledge base. Provide updated vector representations for specific chunks of content, identified by their chunk IDs.
1668
+
1669
+ The system will replace the existing embeddings with your new ones, ensuring that similarity searches reflect the most current vector representations. Use this when you need to update embeddings due to model improvements or content changes.
1670
+
1330
1671
  Parameters
1331
1672
  ----------
1332
1673
  tenant_id : str
1333
-
1334
- embeddings : typing.Dict[str, typing.Sequence[float]]
1335
- Dictionary with chunk_id as key and embedding array as value
1674
+ Unique identifier for the tenant/organization
1336
1675
 
1337
1676
  sub_tenant_id : typing.Optional[str]
1677
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1678
+
1679
+ embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
1680
+ The embeddings of source you want to index
1338
1681
 
1339
1682
  request_options : typing.Optional[RequestOptions]
1340
1683
  Request-specific configuration.
@@ -1352,11 +1695,11 @@ class AsyncUploadClient:
1352
1695
 
1353
1696
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1354
1697
  async def main() -> None:
1355
- await client.upload.update_embeddings(tenant_id='tenant_id', embeddings={'key': [1.1]}, )
1698
+ await client.upload.update_embeddings(tenant_id='tenant_id', )
1356
1699
  asyncio.run(main())
1357
1700
  """
1358
1701
  _response = await self._raw_client.update_embeddings(
1359
- tenant_id=tenant_id, embeddings=embeddings, sub_tenant_id=sub_tenant_id, request_options=request_options
1702
+ tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, embeddings=embeddings, request_options=request_options
1360
1703
  )
1361
1704
  return _response.data
1362
1705
 
@@ -1367,21 +1710,28 @@ class AsyncUploadClient:
1367
1710
  tenant_id: str,
1368
1711
  sub_tenant_id: typing.Optional[str] = None,
1369
1712
  file_id: typing.Optional[str] = None,
1370
- relations: typing.Optional[str] = OMIT,
1371
1713
  request_options: typing.Optional[RequestOptions] = None,
1372
1714
  ) -> SingleUploadData:
1373
1715
  """
1716
+ Extract and index content from web pages automatically.
1717
+
1718
+ This endpoint initiates web scraping for the specified URL, extracting the main content, text, and structure from the webpage. It's perfect for capturing articles, documentation, or any web content you want to include in your knowledge base.
1719
+
1720
+ The system processes the webpage content asynchronously, cleaning and structuring the information for optimal search and retrieval. Use this when you need to add web content without manual copying and pasting.
1721
+
1374
1722
  Parameters
1375
1723
  ----------
1376
1724
  web_url : str
1725
+ The URL of the webpage to scrape and index
1377
1726
 
1378
1727
  tenant_id : str
1728
+ Unique identifier for the tenant/organization
1379
1729
 
1380
1730
  sub_tenant_id : typing.Optional[str]
1731
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1381
1732
 
1382
1733
  file_id : typing.Optional[str]
1383
-
1384
- relations : typing.Optional[str]
1734
+ Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
1385
1735
 
1386
1736
  request_options : typing.Optional[RequestOptions]
1387
1737
  Request-specific configuration.
@@ -1407,7 +1757,6 @@ class AsyncUploadClient:
1407
1757
  tenant_id=tenant_id,
1408
1758
  sub_tenant_id=sub_tenant_id,
1409
1759
  file_id=file_id,
1410
- relations=relations,
1411
1760
  request_options=request_options,
1412
1761
  )
1413
1762
  return _response.data
@@ -1419,21 +1768,28 @@ class AsyncUploadClient:
1419
1768
  source_id: str,
1420
1769
  tenant_id: str,
1421
1770
  sub_tenant_id: typing.Optional[str] = None,
1422
- relations: typing.Optional[str] = OMIT,
1423
1771
  request_options: typing.Optional[RequestOptions] = None,
1424
1772
  ) -> SingleUploadData:
1425
1773
  """
1774
+ Update web scraping content with fresh data from the source URL.
1775
+
1776
+ This endpoint refreshes the content for an existing web scraping job. Provide the source ID of the webpage content you want to update, and the system will re-scrape the URL to capture any changes.
1777
+
1778
+ The updated content gets processed asynchronously and re-indexed in your knowledge base. Use this to keep web content current when the source pages are frequently updated.
1779
+
1426
1780
  Parameters
1427
1781
  ----------
1428
1782
  web_url : str
1783
+ The URL of the webpage to re-scrape
1429
1784
 
1430
1785
  source_id : str
1786
+ The file ID of the existing web scraping job to update
1431
1787
 
1432
1788
  tenant_id : str
1789
+ Unique identifier for the tenant/organization
1433
1790
 
1434
1791
  sub_tenant_id : typing.Optional[str]
1435
-
1436
- relations : typing.Optional[str]
1792
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1437
1793
 
1438
1794
  request_options : typing.Optional[RequestOptions]
1439
1795
  Request-specific configuration.
@@ -1459,7 +1815,6 @@ class AsyncUploadClient:
1459
1815
  source_id=source_id,
1460
1816
  tenant_id=tenant_id,
1461
1817
  sub_tenant_id=sub_tenant_id,
1462
- relations=relations,
1463
1818
  request_options=request_options,
1464
1819
  )
1465
1820
  return _response.data
@@ -1473,13 +1828,22 @@ class AsyncUploadClient:
1473
1828
  request_options: typing.Optional[RequestOptions] = None,
1474
1829
  ) -> typing.Optional[typing.Any]:
1475
1830
  """
1831
+ Remove documents and content from your knowledge base.
1832
+
1833
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
1834
+
1835
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
1836
+
1476
1837
  Parameters
1477
1838
  ----------
1478
1839
  tenant_id : str
1840
+ Unique identifier for the tenant/organization
1479
1841
 
1480
1842
  source_ids : typing.Sequence[str]
1843
+ List of source IDs to delete
1481
1844
 
1482
1845
  sub_tenant_id : typing.Optional[str]
1846
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1483
1847
 
1484
1848
  request_options : typing.Optional[RequestOptions]
1485
1849
  Request-specific configuration.
@@ -1514,13 +1878,22 @@ class AsyncUploadClient:
1514
1878
  request_options: typing.Optional[RequestOptions] = None,
1515
1879
  ) -> typing.Optional[typing.Any]:
1516
1880
  """
1881
+ Remove documents and content from your knowledge base.
1882
+
1883
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
1884
+
1885
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
1886
+
1517
1887
  Parameters
1518
1888
  ----------
1519
1889
  tenant_id : str
1890
+ Unique identifier for the tenant/organization
1520
1891
 
1521
1892
  source_ids : typing.Sequence[str]
1893
+ List of source IDs to delete
1522
1894
 
1523
1895
  sub_tenant_id : typing.Optional[str]
1896
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1524
1897
 
1525
1898
  request_options : typing.Optional[RequestOptions]
1526
1899
  Request-specific configuration.
@@ -1554,16 +1927,19 @@ class AsyncUploadClient:
1554
1927
  request_options: typing.Optional[RequestOptions] = None,
1555
1928
  ) -> ProcessingStatus:
1556
1929
  """
1557
- Verify the processing status of an uploaded file.
1930
+ Check the current processing status of your uploaded content.
1931
+
1932
+ 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.
1558
1933
 
1559
- Returns:
1560
- ProcessingStatusResponse: Processing status information
1934
+ Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
1561
1935
 
1562
1936
  Parameters
1563
1937
  ----------
1564
1938
  file_id : str
1939
+ The file ID to check processing status for
1565
1940
 
1566
1941
  tenant_id : typing.Optional[str]
1942
+ Unique identifier for the tenant/organization
1567
1943
 
1568
1944
  request_options : typing.Optional[RequestOptions]
1569
1945
  Request-specific configuration.