usecortex-ai 0.2.2__py3-none-any.whl → 0.3.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.
@@ -37,6 +37,7 @@ class UploadClient:
37
37
  tenant_id: str,
38
38
  files: typing.List[core.File],
39
39
  sub_tenant_id: typing.Optional[str] = None,
40
+ file_ids: typing.Optional[str] = OMIT,
40
41
  tenant_metadata: typing.Optional[str] = OMIT,
41
42
  document_metadata: typing.Optional[str] = OMIT,
42
43
  request_options: typing.Optional[RequestOptions] = None,
@@ -57,7 +58,10 @@ class UploadClient:
57
58
  See core.File for more documentation
58
59
 
59
60
  sub_tenant_id : typing.Optional[str]
60
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
61
+ 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
+
63
+ file_ids : typing.Optional[str]
64
+ Optional JSON string array of file IDs for the uploaded content. If not provided or empty, will be generated automatically.
61
65
 
62
66
  tenant_metadata : typing.Optional[str]
63
67
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -85,12 +89,13 @@ class UploadClient:
85
89
  from usecortex-ai import CortexAI
86
90
 
87
91
  client = CortexAI(token="YOUR_TOKEN", )
88
- client.upload.batch_upload(tenant_id='tenant_id', )
92
+ client.upload.batch_upload(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
89
93
  """
90
94
  _response = self._raw_client.batch_upload(
91
95
  tenant_id=tenant_id,
92
96
  files=files,
93
97
  sub_tenant_id=sub_tenant_id,
98
+ file_ids=file_ids,
94
99
  tenant_metadata=tenant_metadata,
95
100
  document_metadata=document_metadata,
96
101
  request_options=request_options,
@@ -124,7 +129,7 @@ class UploadClient:
124
129
  See core.File for more documentation
125
130
 
126
131
  sub_tenant_id : typing.Optional[str]
127
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
132
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
128
133
 
129
134
  source_ids : typing.Optional[typing.List[str]]
130
135
  List of source IDs corresponding to the files being updated
@@ -155,7 +160,7 @@ class UploadClient:
155
160
  from usecortex-ai import CortexAI
156
161
 
157
162
  client = CortexAI(token="YOUR_TOKEN", )
158
- client.upload.batch_update(tenant_id='tenant_id', )
163
+ client.upload.batch_update(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
159
164
  """
160
165
  _response = self._raw_client.batch_update(
161
166
  tenant_id=tenant_id,
@@ -174,6 +179,7 @@ class UploadClient:
174
179
  tenant_id: str,
175
180
  file: core.File,
176
181
  sub_tenant_id: typing.Optional[str] = None,
182
+ file_id: typing.Optional[str] = OMIT,
177
183
  tenant_metadata: typing.Optional[str] = OMIT,
178
184
  document_metadata: typing.Optional[str] = OMIT,
179
185
  request_options: typing.Optional[RequestOptions] = None,
@@ -194,7 +200,10 @@ class UploadClient:
194
200
  See core.File for more documentation
195
201
 
196
202
  sub_tenant_id : typing.Optional[str]
197
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
203
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
204
+
205
+ file_id : typing.Optional[str]
206
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
198
207
 
199
208
  tenant_metadata : typing.Optional[str]
200
209
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -222,12 +231,13 @@ class UploadClient:
222
231
  from usecortex-ai import CortexAI
223
232
 
224
233
  client = CortexAI(token="YOUR_TOKEN", )
225
- client.upload.upload_document(tenant_id='tenant_id', )
234
+ client.upload.upload_document(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
226
235
  """
227
236
  _response = self._raw_client.upload_document(
228
237
  tenant_id=tenant_id,
229
238
  file=file,
230
239
  sub_tenant_id=sub_tenant_id,
240
+ file_id=file_id,
231
241
  tenant_metadata=tenant_metadata,
232
242
  document_metadata=document_metadata,
233
243
  request_options=request_options,
@@ -264,7 +274,7 @@ class UploadClient:
264
274
  See core.File for more documentation
265
275
 
266
276
  sub_tenant_id : typing.Optional[str]
267
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
277
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
268
278
 
269
279
  tenant_metadata : typing.Optional[str]
270
280
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -292,7 +302,7 @@ class UploadClient:
292
302
  from usecortex-ai import CortexAI
293
303
 
294
304
  client = CortexAI(token="YOUR_TOKEN", )
295
- client.upload.update_document(source_id='source_id', tenant_id='tenant_id', )
305
+ client.upload.update_document(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
296
306
  """
297
307
  _response = self._raw_client.update_document(
298
308
  source_id=source_id,
@@ -328,7 +338,7 @@ class UploadClient:
328
338
  request : typing.Sequence[SourceModel]
329
339
 
330
340
  sub_tenant_id : typing.Optional[str]
331
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
341
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
332
342
 
333
343
  request_options : typing.Optional[RequestOptions]
334
344
  Request-specific configuration.
@@ -343,7 +353,7 @@ class UploadClient:
343
353
  from usecortex-ai import CortexAI, SourceModel
344
354
 
345
355
  client = CortexAI(token="YOUR_TOKEN", )
346
- client.upload.upload_app_sources(tenant_id='tenant_id', request=[SourceModel()], )
356
+ client.upload.upload_app_sources(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', request=[SourceModel()], )
347
357
  """
348
358
  _response = self._raw_client.upload_app_sources(
349
359
  tenant_id=tenant_id, request=request, sub_tenant_id=sub_tenant_id, request_options=request_options
@@ -356,6 +366,7 @@ class UploadClient:
356
366
  tenant_id: str,
357
367
  content: str,
358
368
  sub_tenant_id: typing.Optional[str] = None,
369
+ file_id: typing.Optional[str] = OMIT,
359
370
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
360
371
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
361
372
  request_options: typing.Optional[RequestOptions] = None,
@@ -376,7 +387,10 @@ class UploadClient:
376
387
  The text or markdown content to upload
377
388
 
378
389
  sub_tenant_id : typing.Optional[str]
379
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
390
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
391
+
392
+ file_id : typing.Optional[str]
393
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
380
394
 
381
395
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
382
396
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -402,12 +416,13 @@ class UploadClient:
402
416
  from usecortex-ai import CortexAI
403
417
 
404
418
  client = CortexAI(token="YOUR_TOKEN", )
405
- client.upload.upload_markdown(tenant_id='tenant_id', content='content', )
419
+ client.upload.upload_markdown(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
406
420
  """
407
421
  _response = self._raw_client.upload_markdown(
408
422
  tenant_id=tenant_id,
409
423
  content=content,
410
424
  sub_tenant_id=sub_tenant_id,
425
+ file_id=file_id,
411
426
  tenant_metadata=tenant_metadata,
412
427
  document_metadata=document_metadata,
413
428
  request_options=request_options,
@@ -420,6 +435,7 @@ class UploadClient:
420
435
  tenant_id: str,
421
436
  content: str,
422
437
  sub_tenant_id: typing.Optional[str] = None,
438
+ file_id: typing.Optional[str] = OMIT,
423
439
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
424
440
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
425
441
  request_options: typing.Optional[RequestOptions] = None,
@@ -440,7 +456,10 @@ class UploadClient:
440
456
  The text or markdown content to upload
441
457
 
442
458
  sub_tenant_id : typing.Optional[str]
443
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
459
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
460
+
461
+ file_id : typing.Optional[str]
462
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
444
463
 
445
464
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
446
465
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -466,12 +485,13 @@ class UploadClient:
466
485
  from usecortex-ai import CortexAI
467
486
 
468
487
  client = CortexAI(token="YOUR_TOKEN", )
469
- client.upload.upload_text(tenant_id='tenant_id', content='content', )
488
+ client.upload.upload_text(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
470
489
  """
471
490
  _response = self._raw_client.upload_text(
472
491
  tenant_id=tenant_id,
473
492
  content=content,
474
493
  sub_tenant_id=sub_tenant_id,
494
+ file_id=file_id,
475
495
  tenant_metadata=tenant_metadata,
476
496
  document_metadata=document_metadata,
477
497
  request_options=request_options,
@@ -485,6 +505,7 @@ class UploadClient:
485
505
  tenant_id: str,
486
506
  content: str,
487
507
  sub_tenant_id: typing.Optional[str] = None,
508
+ file_id: typing.Optional[str] = OMIT,
488
509
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
489
510
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
490
511
  request_options: typing.Optional[RequestOptions] = None,
@@ -508,7 +529,10 @@ class UploadClient:
508
529
  The text or markdown content to upload
509
530
 
510
531
  sub_tenant_id : typing.Optional[str]
511
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
532
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
533
+
534
+ file_id : typing.Optional[str]
535
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
512
536
 
513
537
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
514
538
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -534,13 +558,14 @@ class UploadClient:
534
558
  from usecortex-ai import CortexAI
535
559
 
536
560
  client = CortexAI(token="YOUR_TOKEN", )
537
- client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', content='content', )
561
+ client.upload.update_markdown(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
538
562
  """
539
563
  _response = self._raw_client.update_markdown(
540
564
  source_id=source_id,
541
565
  tenant_id=tenant_id,
542
566
  content=content,
543
567
  sub_tenant_id=sub_tenant_id,
568
+ file_id=file_id,
544
569
  tenant_metadata=tenant_metadata,
545
570
  document_metadata=document_metadata,
546
571
  request_options=request_options,
@@ -554,6 +579,7 @@ class UploadClient:
554
579
  tenant_id: str,
555
580
  content: str,
556
581
  sub_tenant_id: typing.Optional[str] = None,
582
+ file_id: typing.Optional[str] = OMIT,
557
583
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
558
584
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
559
585
  request_options: typing.Optional[RequestOptions] = None,
@@ -577,7 +603,10 @@ class UploadClient:
577
603
  The text or markdown content to upload
578
604
 
579
605
  sub_tenant_id : typing.Optional[str]
580
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
606
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
607
+
608
+ file_id : typing.Optional[str]
609
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
581
610
 
582
611
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
583
612
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -603,13 +632,14 @@ class UploadClient:
603
632
  from usecortex-ai import CortexAI
604
633
 
605
634
  client = CortexAI(token="YOUR_TOKEN", )
606
- client.upload.update_text(source_id='source_id', tenant_id='tenant_id', content='content', )
635
+ client.upload.update_text(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
607
636
  """
608
637
  _response = self._raw_client.update_text(
609
638
  source_id=source_id,
610
639
  tenant_id=tenant_id,
611
640
  content=content,
612
641
  sub_tenant_id=sub_tenant_id,
642
+ file_id=file_id,
613
643
  tenant_metadata=tenant_metadata,
614
644
  document_metadata=document_metadata,
615
645
  request_options=request_options,
@@ -641,7 +671,7 @@ class UploadClient:
641
671
  The embeddings of source you want to index
642
672
 
643
673
  sub_tenant_id : typing.Optional[str]
644
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
674
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
645
675
 
646
676
  file_id : typing.Optional[str]
647
677
  The Source ID of the target source you want to index
@@ -659,7 +689,7 @@ class UploadClient:
659
689
  from usecortex-ai import CortexAI
660
690
 
661
691
  client = CortexAI(token="YOUR_TOKEN", )
662
- client.upload.upload_embeddings(tenant_id='tenant_id', embeddings=[[1.1]], )
692
+ client.upload.upload_embeddings(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', embeddings=[[0.123413, 0.655367, 0.987654, 0.123456, 0.789012], [0.123413, 0.655367, 0.987654, 0.123456, 0.789012]], )
663
693
  """
664
694
  _response = self._raw_client.upload_embeddings(
665
695
  tenant_id=tenant_id,
@@ -691,7 +721,7 @@ class UploadClient:
691
721
  Unique identifier for the tenant/organization
692
722
 
693
723
  sub_tenant_id : typing.Optional[str]
694
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
724
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
695
725
 
696
726
  embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
697
727
  The embeddings of source you want to index
@@ -709,7 +739,7 @@ class UploadClient:
709
739
  from usecortex-ai import CortexAI
710
740
 
711
741
  client = CortexAI(token="YOUR_TOKEN", )
712
- client.upload.update_embeddings(tenant_id='tenant_id', )
742
+ client.upload.update_embeddings(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
713
743
  """
714
744
  _response = self._raw_client.update_embeddings(
715
745
  tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, embeddings=embeddings, request_options=request_options
@@ -741,7 +771,7 @@ class UploadClient:
741
771
  Unique identifier for the tenant/organization
742
772
 
743
773
  sub_tenant_id : typing.Optional[str]
744
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
774
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
745
775
 
746
776
  file_id : typing.Optional[str]
747
777
  Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
@@ -759,7 +789,7 @@ class UploadClient:
759
789
  from usecortex-ai import CortexAI
760
790
 
761
791
  client = CortexAI(token="YOUR_TOKEN", )
762
- client.upload.scrape_webpage(web_url='web_url', tenant_id='tenant_id', )
792
+ client.upload.scrape_webpage(web_url='https://www.usecortex.ai/', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', file_id='CortexDoc1234', )
763
793
  """
764
794
  _response = self._raw_client.scrape_webpage(
765
795
  web_url=web_url,
@@ -798,7 +828,7 @@ class UploadClient:
798
828
  Unique identifier for the tenant/organization
799
829
 
800
830
  sub_tenant_id : typing.Optional[str]
801
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
831
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
802
832
 
803
833
  request_options : typing.Optional[RequestOptions]
804
834
  Request-specific configuration.
@@ -813,7 +843,7 @@ class UploadClient:
813
843
  from usecortex-ai import CortexAI
814
844
 
815
845
  client = CortexAI(token="YOUR_TOKEN", )
816
- client.upload.update_webpage(web_url='web_url', source_id='source_id', tenant_id='tenant_id', )
846
+ client.upload.update_webpage(web_url='https://www.usecortex.ai/', source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
817
847
  """
818
848
  _response = self._raw_client.update_webpage(
819
849
  web_url=web_url,
@@ -848,7 +878,7 @@ class UploadClient:
848
878
  List of source IDs to delete
849
879
 
850
880
  sub_tenant_id : typing.Optional[str]
851
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
881
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
852
882
 
853
883
  request_options : typing.Optional[RequestOptions]
854
884
  Request-specific configuration.
@@ -863,7 +893,7 @@ class UploadClient:
863
893
  from usecortex-ai import CortexAI
864
894
 
865
895
  client = CortexAI(token="YOUR_TOKEN", )
866
- client.upload.delete_source(tenant_id='tenant_id', source_ids=['source_ids'], )
896
+ client.upload.delete_source(tenant_id='tenant_1234', source_ids=['CortexDoc1234', 'CortexDoc4567'], )
867
897
  """
868
898
  _response = self._raw_client.delete_source(
869
899
  tenant_id=tenant_id, source_ids=source_ids, sub_tenant_id=sub_tenant_id, request_options=request_options
@@ -894,7 +924,7 @@ class UploadClient:
894
924
  List of source IDs to delete
895
925
 
896
926
  sub_tenant_id : typing.Optional[str]
897
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
927
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
898
928
 
899
929
  request_options : typing.Optional[RequestOptions]
900
930
  Request-specific configuration.
@@ -909,7 +939,7 @@ class UploadClient:
909
939
  from usecortex-ai import CortexAI
910
940
 
911
941
  client = CortexAI(token="YOUR_TOKEN", )
912
- client.upload.delete_memory(tenant_id='tenant_id', source_ids=['source_ids'], )
942
+ client.upload.delete_memory(tenant_id='tenant_1234', source_ids=['CortexDoc1234', 'CortexDoc4567'], )
913
943
  """
914
944
  _response = self._raw_client.delete_memory(
915
945
  tenant_id=tenant_id, source_ids=source_ids, sub_tenant_id=sub_tenant_id, request_options=request_options
@@ -951,7 +981,7 @@ class UploadClient:
951
981
  from usecortex-ai import CortexAI
952
982
 
953
983
  client = CortexAI(token="YOUR_TOKEN", )
954
- client.upload.verify_processing(file_id='file_id', )
984
+ client.upload.verify_processing(file_id='CortexDoc1234', tenant_id='tenant_1234', )
955
985
  """
956
986
  _response = self._raw_client.verify_processing(
957
987
  file_id=file_id, tenant_id=tenant_id, request_options=request_options
@@ -980,6 +1010,7 @@ class AsyncUploadClient:
980
1010
  tenant_id: str,
981
1011
  files: typing.List[core.File],
982
1012
  sub_tenant_id: typing.Optional[str] = None,
1013
+ file_ids: typing.Optional[str] = OMIT,
983
1014
  tenant_metadata: typing.Optional[str] = OMIT,
984
1015
  document_metadata: typing.Optional[str] = OMIT,
985
1016
  request_options: typing.Optional[RequestOptions] = None,
@@ -1000,7 +1031,10 @@ class AsyncUploadClient:
1000
1031
  See core.File for more documentation
1001
1032
 
1002
1033
  sub_tenant_id : typing.Optional[str]
1003
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1034
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1035
+
1036
+ file_ids : typing.Optional[str]
1037
+ Optional JSON string array of file IDs for the uploaded content. If not provided or empty, will be generated automatically.
1004
1038
 
1005
1039
  tenant_metadata : typing.Optional[str]
1006
1040
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1031,13 +1065,14 @@ class AsyncUploadClient:
1031
1065
 
1032
1066
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1033
1067
  async def main() -> None:
1034
- await client.upload.batch_upload(tenant_id='tenant_id', )
1068
+ await client.upload.batch_upload(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1035
1069
  asyncio.run(main())
1036
1070
  """
1037
1071
  _response = await self._raw_client.batch_upload(
1038
1072
  tenant_id=tenant_id,
1039
1073
  files=files,
1040
1074
  sub_tenant_id=sub_tenant_id,
1075
+ file_ids=file_ids,
1041
1076
  tenant_metadata=tenant_metadata,
1042
1077
  document_metadata=document_metadata,
1043
1078
  request_options=request_options,
@@ -1071,7 +1106,7 @@ class AsyncUploadClient:
1071
1106
  See core.File for more documentation
1072
1107
 
1073
1108
  sub_tenant_id : typing.Optional[str]
1074
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1109
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1075
1110
 
1076
1111
  source_ids : typing.Optional[typing.List[str]]
1077
1112
  List of source IDs corresponding to the files being updated
@@ -1105,7 +1140,7 @@ class AsyncUploadClient:
1105
1140
 
1106
1141
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1107
1142
  async def main() -> None:
1108
- await client.upload.batch_update(tenant_id='tenant_id', )
1143
+ await client.upload.batch_update(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1109
1144
  asyncio.run(main())
1110
1145
  """
1111
1146
  _response = await self._raw_client.batch_update(
@@ -1125,6 +1160,7 @@ class AsyncUploadClient:
1125
1160
  tenant_id: str,
1126
1161
  file: core.File,
1127
1162
  sub_tenant_id: typing.Optional[str] = None,
1163
+ file_id: typing.Optional[str] = OMIT,
1128
1164
  tenant_metadata: typing.Optional[str] = OMIT,
1129
1165
  document_metadata: typing.Optional[str] = OMIT,
1130
1166
  request_options: typing.Optional[RequestOptions] = None,
@@ -1145,7 +1181,10 @@ class AsyncUploadClient:
1145
1181
  See core.File for more documentation
1146
1182
 
1147
1183
  sub_tenant_id : typing.Optional[str]
1148
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1184
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1185
+
1186
+ file_id : typing.Optional[str]
1187
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1149
1188
 
1150
1189
  tenant_metadata : typing.Optional[str]
1151
1190
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1176,13 +1215,14 @@ class AsyncUploadClient:
1176
1215
 
1177
1216
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1178
1217
  async def main() -> None:
1179
- await client.upload.upload_document(tenant_id='tenant_id', )
1218
+ await client.upload.upload_document(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1180
1219
  asyncio.run(main())
1181
1220
  """
1182
1221
  _response = await self._raw_client.upload_document(
1183
1222
  tenant_id=tenant_id,
1184
1223
  file=file,
1185
1224
  sub_tenant_id=sub_tenant_id,
1225
+ file_id=file_id,
1186
1226
  tenant_metadata=tenant_metadata,
1187
1227
  document_metadata=document_metadata,
1188
1228
  request_options=request_options,
@@ -1219,7 +1259,7 @@ class AsyncUploadClient:
1219
1259
  See core.File for more documentation
1220
1260
 
1221
1261
  sub_tenant_id : typing.Optional[str]
1222
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1262
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1223
1263
 
1224
1264
  tenant_metadata : typing.Optional[str]
1225
1265
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1250,7 +1290,7 @@ class AsyncUploadClient:
1250
1290
 
1251
1291
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1252
1292
  async def main() -> None:
1253
- await client.upload.update_document(source_id='source_id', tenant_id='tenant_id', )
1293
+ await client.upload.update_document(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1254
1294
  asyncio.run(main())
1255
1295
  """
1256
1296
  _response = await self._raw_client.update_document(
@@ -1287,7 +1327,7 @@ class AsyncUploadClient:
1287
1327
  request : typing.Sequence[SourceModel]
1288
1328
 
1289
1329
  sub_tenant_id : typing.Optional[str]
1290
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1330
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1291
1331
 
1292
1332
  request_options : typing.Optional[RequestOptions]
1293
1333
  Request-specific configuration.
@@ -1305,7 +1345,7 @@ class AsyncUploadClient:
1305
1345
 
1306
1346
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1307
1347
  async def main() -> None:
1308
- await client.upload.upload_app_sources(tenant_id='tenant_id', request=[SourceModel()], )
1348
+ await client.upload.upload_app_sources(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', request=[SourceModel()], )
1309
1349
  asyncio.run(main())
1310
1350
  """
1311
1351
  _response = await self._raw_client.upload_app_sources(
@@ -1319,6 +1359,7 @@ class AsyncUploadClient:
1319
1359
  tenant_id: str,
1320
1360
  content: str,
1321
1361
  sub_tenant_id: typing.Optional[str] = None,
1362
+ file_id: typing.Optional[str] = OMIT,
1322
1363
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1323
1364
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1324
1365
  request_options: typing.Optional[RequestOptions] = None,
@@ -1339,7 +1380,10 @@ class AsyncUploadClient:
1339
1380
  The text or markdown content to upload
1340
1381
 
1341
1382
  sub_tenant_id : typing.Optional[str]
1342
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1383
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1384
+
1385
+ file_id : typing.Optional[str]
1386
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1343
1387
 
1344
1388
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1345
1389
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1368,13 +1412,14 @@ class AsyncUploadClient:
1368
1412
 
1369
1413
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1370
1414
  async def main() -> None:
1371
- await client.upload.upload_markdown(tenant_id='tenant_id', content='content', )
1415
+ await client.upload.upload_markdown(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
1372
1416
  asyncio.run(main())
1373
1417
  """
1374
1418
  _response = await self._raw_client.upload_markdown(
1375
1419
  tenant_id=tenant_id,
1376
1420
  content=content,
1377
1421
  sub_tenant_id=sub_tenant_id,
1422
+ file_id=file_id,
1378
1423
  tenant_metadata=tenant_metadata,
1379
1424
  document_metadata=document_metadata,
1380
1425
  request_options=request_options,
@@ -1387,6 +1432,7 @@ class AsyncUploadClient:
1387
1432
  tenant_id: str,
1388
1433
  content: str,
1389
1434
  sub_tenant_id: typing.Optional[str] = None,
1435
+ file_id: typing.Optional[str] = OMIT,
1390
1436
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1391
1437
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1392
1438
  request_options: typing.Optional[RequestOptions] = None,
@@ -1407,7 +1453,10 @@ class AsyncUploadClient:
1407
1453
  The text or markdown content to upload
1408
1454
 
1409
1455
  sub_tenant_id : typing.Optional[str]
1410
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1456
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1457
+
1458
+ file_id : typing.Optional[str]
1459
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1411
1460
 
1412
1461
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1413
1462
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1436,13 +1485,14 @@ class AsyncUploadClient:
1436
1485
 
1437
1486
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1438
1487
  async def main() -> None:
1439
- await client.upload.upload_text(tenant_id='tenant_id', content='content', )
1488
+ await client.upload.upload_text(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
1440
1489
  asyncio.run(main())
1441
1490
  """
1442
1491
  _response = await self._raw_client.upload_text(
1443
1492
  tenant_id=tenant_id,
1444
1493
  content=content,
1445
1494
  sub_tenant_id=sub_tenant_id,
1495
+ file_id=file_id,
1446
1496
  tenant_metadata=tenant_metadata,
1447
1497
  document_metadata=document_metadata,
1448
1498
  request_options=request_options,
@@ -1456,6 +1506,7 @@ class AsyncUploadClient:
1456
1506
  tenant_id: str,
1457
1507
  content: str,
1458
1508
  sub_tenant_id: typing.Optional[str] = None,
1509
+ file_id: typing.Optional[str] = OMIT,
1459
1510
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1460
1511
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1461
1512
  request_options: typing.Optional[RequestOptions] = None,
@@ -1479,7 +1530,10 @@ class AsyncUploadClient:
1479
1530
  The text or markdown content to upload
1480
1531
 
1481
1532
  sub_tenant_id : typing.Optional[str]
1482
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1533
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1534
+
1535
+ file_id : typing.Optional[str]
1536
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1483
1537
 
1484
1538
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1485
1539
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1508,7 +1562,7 @@ class AsyncUploadClient:
1508
1562
 
1509
1563
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1510
1564
  async def main() -> None:
1511
- await client.upload.update_markdown(source_id='source_id', tenant_id='tenant_id', content='content', )
1565
+ await client.upload.update_markdown(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
1512
1566
  asyncio.run(main())
1513
1567
  """
1514
1568
  _response = await self._raw_client.update_markdown(
@@ -1516,6 +1570,7 @@ class AsyncUploadClient:
1516
1570
  tenant_id=tenant_id,
1517
1571
  content=content,
1518
1572
  sub_tenant_id=sub_tenant_id,
1573
+ file_id=file_id,
1519
1574
  tenant_metadata=tenant_metadata,
1520
1575
  document_metadata=document_metadata,
1521
1576
  request_options=request_options,
@@ -1529,6 +1584,7 @@ class AsyncUploadClient:
1529
1584
  tenant_id: str,
1530
1585
  content: str,
1531
1586
  sub_tenant_id: typing.Optional[str] = None,
1587
+ file_id: typing.Optional[str] = OMIT,
1532
1588
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1533
1589
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1534
1590
  request_options: typing.Optional[RequestOptions] = None,
@@ -1552,7 +1608,10 @@ class AsyncUploadClient:
1552
1608
  The text or markdown content to upload
1553
1609
 
1554
1610
  sub_tenant_id : typing.Optional[str]
1555
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1611
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1612
+
1613
+ file_id : typing.Optional[str]
1614
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1556
1615
 
1557
1616
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1558
1617
  JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
@@ -1581,7 +1640,7 @@ class AsyncUploadClient:
1581
1640
 
1582
1641
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1583
1642
  async def main() -> None:
1584
- await client.upload.update_text(source_id='source_id', tenant_id='tenant_id', content='content', )
1643
+ await client.upload.update_text(source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', content='<content>', )
1585
1644
  asyncio.run(main())
1586
1645
  """
1587
1646
  _response = await self._raw_client.update_text(
@@ -1589,6 +1648,7 @@ class AsyncUploadClient:
1589
1648
  tenant_id=tenant_id,
1590
1649
  content=content,
1591
1650
  sub_tenant_id=sub_tenant_id,
1651
+ file_id=file_id,
1592
1652
  tenant_metadata=tenant_metadata,
1593
1653
  document_metadata=document_metadata,
1594
1654
  request_options=request_options,
@@ -1620,7 +1680,7 @@ class AsyncUploadClient:
1620
1680
  The embeddings of source you want to index
1621
1681
 
1622
1682
  sub_tenant_id : typing.Optional[str]
1623
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1683
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1624
1684
 
1625
1685
  file_id : typing.Optional[str]
1626
1686
  The Source ID of the target source you want to index
@@ -1641,7 +1701,7 @@ class AsyncUploadClient:
1641
1701
 
1642
1702
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1643
1703
  async def main() -> None:
1644
- await client.upload.upload_embeddings(tenant_id='tenant_id', embeddings=[[1.1]], )
1704
+ await client.upload.upload_embeddings(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', embeddings=[[0.123413, 0.655367, 0.987654, 0.123456, 0.789012], [0.123413, 0.655367, 0.987654, 0.123456, 0.789012]], )
1645
1705
  asyncio.run(main())
1646
1706
  """
1647
1707
  _response = await self._raw_client.upload_embeddings(
@@ -1674,7 +1734,7 @@ class AsyncUploadClient:
1674
1734
  Unique identifier for the tenant/organization
1675
1735
 
1676
1736
  sub_tenant_id : typing.Optional[str]
1677
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1737
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1678
1738
 
1679
1739
  embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
1680
1740
  The embeddings of source you want to index
@@ -1695,7 +1755,7 @@ class AsyncUploadClient:
1695
1755
 
1696
1756
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1697
1757
  async def main() -> None:
1698
- await client.upload.update_embeddings(tenant_id='tenant_id', )
1758
+ await client.upload.update_embeddings(tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1699
1759
  asyncio.run(main())
1700
1760
  """
1701
1761
  _response = await self._raw_client.update_embeddings(
@@ -1728,7 +1788,7 @@ class AsyncUploadClient:
1728
1788
  Unique identifier for the tenant/organization
1729
1789
 
1730
1790
  sub_tenant_id : typing.Optional[str]
1731
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1791
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1732
1792
 
1733
1793
  file_id : typing.Optional[str]
1734
1794
  Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
@@ -1749,7 +1809,7 @@ class AsyncUploadClient:
1749
1809
 
1750
1810
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1751
1811
  async def main() -> None:
1752
- await client.upload.scrape_webpage(web_url='web_url', tenant_id='tenant_id', )
1812
+ await client.upload.scrape_webpage(web_url='https://www.usecortex.ai/', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', file_id='CortexDoc1234', )
1753
1813
  asyncio.run(main())
1754
1814
  """
1755
1815
  _response = await self._raw_client.scrape_webpage(
@@ -1789,7 +1849,7 @@ class AsyncUploadClient:
1789
1849
  Unique identifier for the tenant/organization
1790
1850
 
1791
1851
  sub_tenant_id : typing.Optional[str]
1792
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1852
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1793
1853
 
1794
1854
  request_options : typing.Optional[RequestOptions]
1795
1855
  Request-specific configuration.
@@ -1807,7 +1867,7 @@ class AsyncUploadClient:
1807
1867
 
1808
1868
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1809
1869
  async def main() -> None:
1810
- await client.upload.update_webpage(web_url='web_url', source_id='source_id', tenant_id='tenant_id', )
1870
+ await client.upload.update_webpage(web_url='https://www.usecortex.ai/', source_id='CortexDoc1234', tenant_id='tenant_1234', sub_tenant_id='sub_tenant_4567', )
1811
1871
  asyncio.run(main())
1812
1872
  """
1813
1873
  _response = await self._raw_client.update_webpage(
@@ -1843,7 +1903,7 @@ class AsyncUploadClient:
1843
1903
  List of source IDs to delete
1844
1904
 
1845
1905
  sub_tenant_id : typing.Optional[str]
1846
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1906
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1847
1907
 
1848
1908
  request_options : typing.Optional[RequestOptions]
1849
1909
  Request-specific configuration.
@@ -1861,7 +1921,7 @@ class AsyncUploadClient:
1861
1921
 
1862
1922
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1863
1923
  async def main() -> None:
1864
- await client.upload.delete_source(tenant_id='tenant_id', source_ids=['source_ids'], )
1924
+ await client.upload.delete_source(tenant_id='tenant_1234', source_ids=['CortexDoc1234', 'CortexDoc4567'], )
1865
1925
  asyncio.run(main())
1866
1926
  """
1867
1927
  _response = await self._raw_client.delete_source(
@@ -1893,7 +1953,7 @@ class AsyncUploadClient:
1893
1953
  List of source IDs to delete
1894
1954
 
1895
1955
  sub_tenant_id : typing.Optional[str]
1896
- Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
1956
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1897
1957
 
1898
1958
  request_options : typing.Optional[RequestOptions]
1899
1959
  Request-specific configuration.
@@ -1911,7 +1971,7 @@ class AsyncUploadClient:
1911
1971
 
1912
1972
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1913
1973
  async def main() -> None:
1914
- await client.upload.delete_memory(tenant_id='tenant_id', source_ids=['source_ids'], )
1974
+ await client.upload.delete_memory(tenant_id='tenant_1234', source_ids=['CortexDoc1234', 'CortexDoc4567'], )
1915
1975
  asyncio.run(main())
1916
1976
  """
1917
1977
  _response = await self._raw_client.delete_memory(
@@ -1957,7 +2017,7 @@ class AsyncUploadClient:
1957
2017
 
1958
2018
  client = AsyncCortexAI(token="YOUR_TOKEN", )
1959
2019
  async def main() -> None:
1960
- await client.upload.verify_processing(file_id='file_id', )
2020
+ await client.upload.verify_processing(file_id='CortexDoc1234', tenant_id='tenant_1234', )
1961
2021
  asyncio.run(main())
1962
2022
  """
1963
2023
  _response = await self._raw_client.verify_processing(