usecortex-ai 0.2.1__py3-none-any.whl → 0.3.0__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 (61) hide show
  1. usecortex_ai/__init__.py +18 -3
  2. usecortex_ai/client.py +3 -0
  3. usecortex_ai/document/__init__.py +4 -0
  4. usecortex_ai/document/client.py +139 -0
  5. usecortex_ai/document/raw_client.py +312 -0
  6. usecortex_ai/embeddings/client.py +48 -78
  7. usecortex_ai/embeddings/raw_client.py +44 -74
  8. usecortex_ai/fetch/client.py +2 -2
  9. usecortex_ai/search/client.py +88 -84
  10. usecortex_ai/search/raw_client.py +82 -78
  11. usecortex_ai/sources/client.py +26 -157
  12. usecortex_ai/sources/raw_client.py +22 -501
  13. usecortex_ai/tenant/client.py +154 -6
  14. usecortex_ai/tenant/raw_client.py +502 -4
  15. usecortex_ai/types/__init__.py +16 -2
  16. usecortex_ai/types/add_user_memory_response.py +36 -0
  17. usecortex_ai/types/app_sources_upload_data.py +10 -2
  18. usecortex_ai/types/attachment_model.py +34 -7
  19. usecortex_ai/types/batch_upload_data.py +10 -2
  20. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
  21. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
  22. usecortex_ai/types/content_model.py +33 -6
  23. usecortex_ai/types/delete_memory_request.py +14 -3
  24. usecortex_ai/types/delete_sources.py +20 -0
  25. usecortex_ai/types/delete_sub_tenant_data.py +42 -0
  26. usecortex_ai/types/delete_user_memory_response.py +31 -0
  27. usecortex_ai/types/embeddings_create_collection_data.py +19 -4
  28. usecortex_ai/types/embeddings_delete_data.py +19 -4
  29. usecortex_ai/types/embeddings_get_data.py +19 -4
  30. usecortex_ai/types/embeddings_search_data.py +19 -4
  31. usecortex_ai/types/error_response.py +0 -1
  32. usecortex_ai/types/fetch_content_data.py +19 -5
  33. usecortex_ai/types/file_upload_result.py +9 -2
  34. usecortex_ai/types/generate_user_memory_response.py +32 -0
  35. usecortex_ai/types/list_sources_response.py +14 -3
  36. usecortex_ai/types/list_user_memories_response.py +32 -0
  37. usecortex_ai/types/markdown_upload_request.py +23 -5
  38. usecortex_ai/types/processing_status.py +14 -3
  39. usecortex_ai/types/relations.py +9 -2
  40. usecortex_ai/types/retrieve_user_memory_response.py +32 -0
  41. usecortex_ai/types/search_chunk.py +54 -17
  42. usecortex_ai/types/single_upload_data.py +10 -2
  43. usecortex_ai/types/source.py +34 -15
  44. usecortex_ai/types/source_model.py +63 -14
  45. usecortex_ai/types/sub_tenant_ids_data.py +29 -5
  46. usecortex_ai/types/tenant_create_data.py +19 -4
  47. usecortex_ai/types/tenant_stats.py +24 -5
  48. usecortex_ai/types/user_memory.py +31 -0
  49. usecortex_ai/upload/client.py +486 -111
  50. usecortex_ai/upload/raw_client.py +458 -103
  51. usecortex_ai/user/client.py +30 -10
  52. usecortex_ai/user/raw_client.py +22 -6
  53. usecortex_ai/user_memory/client.py +200 -56
  54. usecortex_ai/user_memory/raw_client.py +921 -94
  55. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/METADATA +1 -1
  56. usecortex_ai-0.3.0.dist-info/RECORD +101 -0
  57. usecortex_ai/types/source_content.py +0 -26
  58. usecortex_ai-0.2.1.dist-info/RECORD +0 -91
  59. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/WHEEL +0 -0
  60. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/licenses/LICENSE +0 -0
  61. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/top_level.txt +0 -0
@@ -21,7 +21,6 @@ from ..types.actual_error_response import ActualErrorResponse
21
21
  from ..types.app_sources_upload_data import AppSourcesUploadData
22
22
  from ..types.batch_upload_data import BatchUploadData
23
23
  from ..types.processing_status import ProcessingStatus
24
- from ..types.relations import Relations
25
24
  from ..types.single_upload_data import SingleUploadData
26
25
  from ..types.source_model import SourceModel
27
26
 
@@ -39,26 +38,44 @@ class RawUploadClient:
39
38
  tenant_id: str,
40
39
  files: typing.List[core.File],
41
40
  sub_tenant_id: typing.Optional[str] = None,
41
+ file_ids: typing.Optional[str] = OMIT,
42
42
  tenant_metadata: typing.Optional[str] = OMIT,
43
43
  document_metadata: typing.Optional[str] = OMIT,
44
- relations: typing.Optional[str] = OMIT,
45
44
  request_options: typing.Optional[RequestOptions] = None,
46
45
  ) -> HttpResponse[BatchUploadData]:
47
46
  """
47
+ Upload multiple documents simultaneously for efficient bulk processing.
48
+
49
+ 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.
50
+
51
+ 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.
52
+
48
53
  Parameters
49
54
  ----------
50
55
  tenant_id : str
56
+ Unique identifier for the tenant/organization
51
57
 
52
58
  files : typing.List[core.File]
53
59
  See core.File for more documentation
54
60
 
55
61
  sub_tenant_id : typing.Optional[str]
62
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
63
+
64
+ file_ids : typing.Optional[str]
65
+ Optional JSON string array of file IDs for the uploaded content. If not provided or empty, will be generated automatically.
56
66
 
57
67
  tenant_metadata : typing.Optional[str]
68
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
69
+
70
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
71
+
58
72
 
59
73
  document_metadata : typing.Optional[str]
74
+ 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.
75
+
76
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
77
+
60
78
 
61
- relations : typing.Optional[str]
62
79
 
63
80
  request_options : typing.Optional[RequestOptions]
64
81
  Request-specific configuration.
@@ -76,9 +93,9 @@ class RawUploadClient:
76
93
  "sub_tenant_id": sub_tenant_id,
77
94
  },
78
95
  data={
96
+ "file_ids": file_ids,
79
97
  "tenant_metadata": tenant_metadata,
80
98
  "document_metadata": document_metadata,
81
- "relations": relations,
82
99
  },
83
100
  files={
84
101
  "files": files,
@@ -188,26 +205,41 @@ class RawUploadClient:
188
205
  source_ids: typing.Optional[typing.List[str]] = OMIT,
189
206
  tenant_metadata: typing.Optional[str] = OMIT,
190
207
  document_metadata: typing.Optional[str] = OMIT,
191
- relations: typing.Optional[str] = OMIT,
192
208
  request_options: typing.Optional[RequestOptions] = None,
193
209
  ) -> HttpResponse[BatchUploadData]:
194
210
  """
211
+ Update multiple existing documents with new content and metadata.
212
+
213
+ 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.
214
+
215
+ 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.
216
+
195
217
  Parameters
196
218
  ----------
197
219
  tenant_id : str
220
+ Unique identifier for the tenant/organization
198
221
 
199
222
  files : typing.List[core.File]
200
223
  See core.File for more documentation
201
224
 
202
225
  sub_tenant_id : typing.Optional[str]
226
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
203
227
 
204
228
  source_ids : typing.Optional[typing.List[str]]
229
+ List of source IDs corresponding to the files being updated
205
230
 
206
231
  tenant_metadata : typing.Optional[str]
232
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
233
+
234
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
235
+
207
236
 
208
237
  document_metadata : typing.Optional[str]
238
+ 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.
239
+
240
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
241
+
209
242
 
210
- relations : typing.Optional[str]
211
243
 
212
244
  request_options : typing.Optional[RequestOptions]
213
245
  Request-specific configuration.
@@ -228,7 +260,6 @@ class RawUploadClient:
228
260
  "source_ids": source_ids,
229
261
  "tenant_metadata": tenant_metadata,
230
262
  "document_metadata": document_metadata,
231
- "relations": relations,
232
263
  },
233
264
  files={
234
265
  "files": files,
@@ -335,26 +366,44 @@ class RawUploadClient:
335
366
  tenant_id: str,
336
367
  file: core.File,
337
368
  sub_tenant_id: typing.Optional[str] = None,
369
+ file_id: typing.Optional[str] = OMIT,
338
370
  tenant_metadata: typing.Optional[str] = OMIT,
339
371
  document_metadata: typing.Optional[str] = OMIT,
340
- relations: typing.Optional[str] = OMIT,
341
372
  request_options: typing.Optional[RequestOptions] = None,
342
373
  ) -> HttpResponse[SingleUploadData]:
343
374
  """
375
+ Upload a single document for processing and indexing into your knowledge base.
376
+
377
+ 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.
378
+
379
+ 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.
380
+
344
381
  Parameters
345
382
  ----------
346
383
  tenant_id : str
384
+ Unique identifier for the tenant/organization
347
385
 
348
386
  file : core.File
349
387
  See core.File for more documentation
350
388
 
351
389
  sub_tenant_id : typing.Optional[str]
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.
352
394
 
353
395
  tenant_metadata : typing.Optional[str]
396
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
397
+
398
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
399
+
354
400
 
355
401
  document_metadata : typing.Optional[str]
402
+ 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.
403
+
404
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
405
+
356
406
 
357
- relations : typing.Optional[str]
358
407
 
359
408
  request_options : typing.Optional[RequestOptions]
360
409
  Request-specific configuration.
@@ -372,9 +421,9 @@ class RawUploadClient:
372
421
  "sub_tenant_id": sub_tenant_id,
373
422
  },
374
423
  data={
424
+ "file_id": file_id,
375
425
  "tenant_metadata": tenant_metadata,
376
426
  "document_metadata": document_metadata,
377
- "relations": relations,
378
427
  },
379
428
  files={
380
429
  "file": file,
@@ -484,26 +533,41 @@ class RawUploadClient:
484
533
  sub_tenant_id: typing.Optional[str] = None,
485
534
  tenant_metadata: typing.Optional[str] = OMIT,
486
535
  document_metadata: typing.Optional[str] = OMIT,
487
- relations: typing.Optional[str] = OMIT,
488
536
  request_options: typing.Optional[RequestOptions] = None,
489
537
  ) -> HttpResponse[SingleUploadData]:
490
538
  """
539
+ Replace an existing document with updated content.
540
+
541
+ 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.
542
+
543
+ 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.
544
+
491
545
  Parameters
492
546
  ----------
493
547
  source_id : str
548
+ The source ID of the document to update
494
549
 
495
550
  tenant_id : str
551
+ Unique identifier for the tenant/organization
496
552
 
497
553
  file : core.File
498
554
  See core.File for more documentation
499
555
 
500
556
  sub_tenant_id : typing.Optional[str]
557
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
501
558
 
502
559
  tenant_metadata : typing.Optional[str]
560
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
561
+
562
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
563
+
503
564
 
504
565
  document_metadata : typing.Optional[str]
566
+ 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.
567
+
568
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
569
+
505
570
 
506
- relations : typing.Optional[str]
507
571
 
508
572
  request_options : typing.Optional[RequestOptions]
509
573
  Request-specific configuration.
@@ -524,7 +588,6 @@ class RawUploadClient:
524
588
  data={
525
589
  "tenant_metadata": tenant_metadata,
526
590
  "document_metadata": document_metadata,
527
- "relations": relations,
528
591
  },
529
592
  files={
530
593
  "file": file,
@@ -634,13 +697,21 @@ class RawUploadClient:
634
697
  request_options: typing.Optional[RequestOptions] = None,
635
698
  ) -> HttpResponse[AppSourcesUploadData]:
636
699
  """
700
+ Upload structured data from applications or APIs for indexing.
701
+
702
+ 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
703
+
704
+ 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.
705
+
637
706
  Parameters
638
707
  ----------
639
708
  tenant_id : str
709
+ Unique identifier for the tenant/organization
640
710
 
641
711
  request : typing.Sequence[SourceModel]
642
712
 
643
713
  sub_tenant_id : typing.Optional[str]
714
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
644
715
 
645
716
  request_options : typing.Optional[RequestOptions]
646
717
  Request-specific configuration.
@@ -764,28 +835,42 @@ class RawUploadClient:
764
835
  tenant_id: str,
765
836
  content: str,
766
837
  sub_tenant_id: typing.Optional[str] = None,
838
+ file_id: typing.Optional[str] = OMIT,
767
839
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
768
840
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
769
- relations: typing.Optional[Relations] = OMIT,
770
841
  request_options: typing.Optional[RequestOptions] = None,
771
842
  ) -> HttpResponse[SingleUploadData]:
772
843
  """
773
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
774
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
844
+ Upload text or markdown content directly for processing.
845
+
846
+ 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.
847
+
848
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
775
849
 
776
850
  Parameters
777
851
  ----------
778
852
  tenant_id : str
853
+ Unique identifier for the tenant/organization
779
854
 
780
855
  content : str
856
+ The text or markdown content to upload
781
857
 
782
858
  sub_tenant_id : typing.Optional[str]
859
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
860
+
861
+ file_id : typing.Optional[str]
862
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
783
863
 
784
864
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
865
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
866
+
867
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
785
868
 
786
869
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
870
+ 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.
871
+
872
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
787
873
 
788
- relations : typing.Optional[Relations]
789
874
 
790
875
  request_options : typing.Optional[RequestOptions]
791
876
  Request-specific configuration.
@@ -804,11 +889,9 @@ class RawUploadClient:
804
889
  },
805
890
  json={
806
891
  "content": content,
892
+ "file_id": file_id,
807
893
  "tenant_metadata": tenant_metadata,
808
894
  "document_metadata": document_metadata,
809
- "relations": convert_and_respect_annotation_metadata(
810
- object_=relations, annotation=Relations, direction="write"
811
- ),
812
895
  },
813
896
  headers={
814
897
  "content-type": "application/json",
@@ -914,28 +997,42 @@ class RawUploadClient:
914
997
  tenant_id: str,
915
998
  content: str,
916
999
  sub_tenant_id: typing.Optional[str] = None,
1000
+ file_id: typing.Optional[str] = OMIT,
917
1001
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
918
1002
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
919
- relations: typing.Optional[Relations] = OMIT,
920
1003
  request_options: typing.Optional[RequestOptions] = None,
921
1004
  ) -> HttpResponse[SingleUploadData]:
922
1005
  """
923
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
924
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
1006
+ Upload text or markdown content directly for processing.
1007
+
1008
+ 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.
1009
+
1010
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
925
1011
 
926
1012
  Parameters
927
1013
  ----------
928
1014
  tenant_id : str
1015
+ Unique identifier for the tenant/organization
929
1016
 
930
1017
  content : str
1018
+ The text or markdown content to upload
931
1019
 
932
1020
  sub_tenant_id : typing.Optional[str]
1021
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1022
+
1023
+ file_id : typing.Optional[str]
1024
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
933
1025
 
934
1026
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1027
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1028
+
1029
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
935
1030
 
936
1031
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1032
+ 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.
1033
+
1034
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
937
1035
 
938
- relations : typing.Optional[Relations]
939
1036
 
940
1037
  request_options : typing.Optional[RequestOptions]
941
1038
  Request-specific configuration.
@@ -954,11 +1051,9 @@ class RawUploadClient:
954
1051
  },
955
1052
  json={
956
1053
  "content": content,
1054
+ "file_id": file_id,
957
1055
  "tenant_metadata": tenant_metadata,
958
1056
  "document_metadata": document_metadata,
959
- "relations": convert_and_respect_annotation_metadata(
960
- object_=relations, annotation=Relations, direction="write"
961
- ),
962
1057
  },
963
1058
  headers={
964
1059
  "content-type": "application/json",
@@ -1065,27 +1160,45 @@ class RawUploadClient:
1065
1160
  tenant_id: str,
1066
1161
  content: str,
1067
1162
  sub_tenant_id: typing.Optional[str] = None,
1163
+ file_id: typing.Optional[str] = OMIT,
1068
1164
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1069
1165
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1070
- relations: typing.Optional[Relations] = OMIT,
1071
1166
  request_options: typing.Optional[RequestOptions] = None,
1072
1167
  ) -> HttpResponse[SingleUploadData]:
1073
1168
  """
1169
+ Update existing text or markdown content with new information.
1170
+
1171
+ 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.
1172
+
1173
+ 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.
1174
+
1074
1175
  Parameters
1075
1176
  ----------
1076
1177
  source_id : str
1178
+ The source ID of the document to update
1077
1179
 
1078
1180
  tenant_id : str
1181
+ Unique identifier for the tenant/organization
1079
1182
 
1080
1183
  content : str
1184
+ The text or markdown content to upload
1081
1185
 
1082
1186
  sub_tenant_id : typing.Optional[str]
1187
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1188
+
1189
+ file_id : typing.Optional[str]
1190
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1083
1191
 
1084
1192
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1193
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1194
+
1195
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1085
1196
 
1086
1197
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1198
+ 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.
1199
+
1200
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1087
1201
 
1088
- relations : typing.Optional[Relations]
1089
1202
 
1090
1203
  request_options : typing.Optional[RequestOptions]
1091
1204
  Request-specific configuration.
@@ -1105,11 +1218,9 @@ class RawUploadClient:
1105
1218
  },
1106
1219
  json={
1107
1220
  "content": content,
1221
+ "file_id": file_id,
1108
1222
  "tenant_metadata": tenant_metadata,
1109
1223
  "document_metadata": document_metadata,
1110
- "relations": convert_and_respect_annotation_metadata(
1111
- object_=relations, annotation=Relations, direction="write"
1112
- ),
1113
1224
  },
1114
1225
  headers={
1115
1226
  "content-type": "application/json",
@@ -1216,27 +1327,45 @@ class RawUploadClient:
1216
1327
  tenant_id: str,
1217
1328
  content: str,
1218
1329
  sub_tenant_id: typing.Optional[str] = None,
1330
+ file_id: typing.Optional[str] = OMIT,
1219
1331
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1220
1332
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
1221
- relations: typing.Optional[Relations] = OMIT,
1222
1333
  request_options: typing.Optional[RequestOptions] = None,
1223
1334
  ) -> HttpResponse[SingleUploadData]:
1224
1335
  """
1336
+ Update existing text or markdown content with new information.
1337
+
1338
+ 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.
1339
+
1340
+ 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.
1341
+
1225
1342
  Parameters
1226
1343
  ----------
1227
1344
  source_id : str
1345
+ The source ID of the document to update
1228
1346
 
1229
1347
  tenant_id : str
1348
+ Unique identifier for the tenant/organization
1230
1349
 
1231
1350
  content : str
1351
+ The text or markdown content to upload
1232
1352
 
1233
1353
  sub_tenant_id : typing.Optional[str]
1354
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1355
+
1356
+ file_id : typing.Optional[str]
1357
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
1234
1358
 
1235
1359
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1360
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
1361
+
1362
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
1236
1363
 
1237
1364
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1365
+ 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.
1366
+
1367
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
1238
1368
 
1239
- relations : typing.Optional[Relations]
1240
1369
 
1241
1370
  request_options : typing.Optional[RequestOptions]
1242
1371
  Request-specific configuration.
@@ -1256,11 +1385,9 @@ class RawUploadClient:
1256
1385
  },
1257
1386
  json={
1258
1387
  "content": content,
1388
+ "file_id": file_id,
1259
1389
  "tenant_metadata": tenant_metadata,
1260
1390
  "document_metadata": document_metadata,
1261
- "relations": convert_and_respect_annotation_metadata(
1262
- object_=relations, annotation=Relations, direction="write"
1263
- ),
1264
1391
  },
1265
1392
  headers={
1266
1393
  "content-type": "application/json",
@@ -1370,15 +1497,25 @@ class RawUploadClient:
1370
1497
  request_options: typing.Optional[RequestOptions] = None,
1371
1498
  ) -> HttpResponse[SingleUploadData]:
1372
1499
  """
1500
+ Upload pre-computed embeddings for advanced similarity search.
1501
+
1502
+ 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.
1503
+
1504
+ 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.
1505
+
1373
1506
  Parameters
1374
1507
  ----------
1375
1508
  tenant_id : str
1509
+ Unique identifier for the tenant/organization
1376
1510
 
1377
1511
  embeddings : typing.Sequence[typing.Sequence[float]]
1512
+ The embeddings of source you want to index
1378
1513
 
1379
1514
  sub_tenant_id : typing.Optional[str]
1515
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1380
1516
 
1381
1517
  file_id : typing.Optional[str]
1518
+ The Source ID of the target source you want to index
1382
1519
 
1383
1520
  request_options : typing.Optional[RequestOptions]
1384
1521
  Request-specific configuration.
@@ -1506,13 +1643,22 @@ class RawUploadClient:
1506
1643
  request_options: typing.Optional[RequestOptions] = None,
1507
1644
  ) -> HttpResponse[SingleUploadData]:
1508
1645
  """
1646
+ Update existing embeddings with new vector representations.
1647
+
1648
+ 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.
1649
+
1650
+ 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.
1651
+
1509
1652
  Parameters
1510
1653
  ----------
1511
1654
  tenant_id : str
1655
+ Unique identifier for the tenant/organization
1512
1656
 
1513
1657
  sub_tenant_id : typing.Optional[str]
1658
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1514
1659
 
1515
1660
  embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
1661
+ The embeddings of source you want to index
1516
1662
 
1517
1663
  request_options : typing.Optional[RequestOptions]
1518
1664
  Request-specific configuration.
@@ -1637,21 +1783,28 @@ class RawUploadClient:
1637
1783
  tenant_id: str,
1638
1784
  sub_tenant_id: typing.Optional[str] = None,
1639
1785
  file_id: typing.Optional[str] = None,
1640
- relations: typing.Optional[str] = OMIT,
1641
1786
  request_options: typing.Optional[RequestOptions] = None,
1642
1787
  ) -> HttpResponse[SingleUploadData]:
1643
1788
  """
1789
+ Extract and index content from web pages automatically.
1790
+
1791
+ 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.
1792
+
1793
+ 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.
1794
+
1644
1795
  Parameters
1645
1796
  ----------
1646
1797
  web_url : str
1798
+ The URL of the webpage to scrape and index
1647
1799
 
1648
1800
  tenant_id : str
1801
+ Unique identifier for the tenant/organization
1649
1802
 
1650
1803
  sub_tenant_id : typing.Optional[str]
1804
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1651
1805
 
1652
1806
  file_id : typing.Optional[str]
1653
-
1654
- relations : typing.Optional[str]
1807
+ Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
1655
1808
 
1656
1809
  request_options : typing.Optional[RequestOptions]
1657
1810
  Request-specific configuration.
@@ -1670,9 +1823,7 @@ class RawUploadClient:
1670
1823
  "sub_tenant_id": sub_tenant_id,
1671
1824
  "file_id": file_id,
1672
1825
  },
1673
- data={
1674
- "relations": relations,
1675
- },
1826
+ data={},
1676
1827
  headers={
1677
1828
  "content-type": "application/x-www-form-urlencoded",
1678
1829
  },
@@ -1778,21 +1929,28 @@ class RawUploadClient:
1778
1929
  source_id: str,
1779
1930
  tenant_id: str,
1780
1931
  sub_tenant_id: typing.Optional[str] = None,
1781
- relations: typing.Optional[str] = OMIT,
1782
1932
  request_options: typing.Optional[RequestOptions] = None,
1783
1933
  ) -> HttpResponse[SingleUploadData]:
1784
1934
  """
1935
+ Update web scraping content with fresh data from the source URL.
1936
+
1937
+ 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.
1938
+
1939
+ 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.
1940
+
1785
1941
  Parameters
1786
1942
  ----------
1787
1943
  web_url : str
1944
+ The URL of the webpage to re-scrape
1788
1945
 
1789
1946
  source_id : str
1947
+ The file ID of the existing web scraping job to update
1790
1948
 
1791
1949
  tenant_id : str
1950
+ Unique identifier for the tenant/organization
1792
1951
 
1793
1952
  sub_tenant_id : typing.Optional[str]
1794
-
1795
- relations : typing.Optional[str]
1953
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1796
1954
 
1797
1955
  request_options : typing.Optional[RequestOptions]
1798
1956
  Request-specific configuration.
@@ -1811,9 +1969,7 @@ class RawUploadClient:
1811
1969
  "tenant_id": tenant_id,
1812
1970
  "sub_tenant_id": sub_tenant_id,
1813
1971
  },
1814
- data={
1815
- "relations": relations,
1816
- },
1972
+ data={},
1817
1973
  headers={
1818
1974
  "content-type": "application/x-www-form-urlencoded",
1819
1975
  },
@@ -1921,13 +2077,22 @@ class RawUploadClient:
1921
2077
  request_options: typing.Optional[RequestOptions] = None,
1922
2078
  ) -> HttpResponse[typing.Optional[typing.Any]]:
1923
2079
  """
2080
+ Remove documents and content from your knowledge base.
2081
+
2082
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
2083
+
2084
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
2085
+
1924
2086
  Parameters
1925
2087
  ----------
1926
2088
  tenant_id : str
2089
+ Unique identifier for the tenant/organization
1927
2090
 
1928
2091
  source_ids : typing.Sequence[str]
2092
+ List of source IDs to delete
1929
2093
 
1930
2094
  sub_tenant_id : typing.Optional[str]
2095
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1931
2096
 
1932
2097
  request_options : typing.Optional[RequestOptions]
1933
2098
  Request-specific configuration.
@@ -1988,13 +2153,22 @@ class RawUploadClient:
1988
2153
  request_options: typing.Optional[RequestOptions] = None,
1989
2154
  ) -> HttpResponse[typing.Optional[typing.Any]]:
1990
2155
  """
2156
+ Remove documents and content from your knowledge base.
2157
+
2158
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
2159
+
2160
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
2161
+
1991
2162
  Parameters
1992
2163
  ----------
1993
2164
  tenant_id : str
2165
+ Unique identifier for the tenant/organization
1994
2166
 
1995
2167
  source_ids : typing.Sequence[str]
2168
+ List of source IDs to delete
1996
2169
 
1997
2170
  sub_tenant_id : typing.Optional[str]
2171
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
1998
2172
 
1999
2173
  request_options : typing.Optional[RequestOptions]
2000
2174
  Request-specific configuration.
@@ -2054,16 +2228,19 @@ class RawUploadClient:
2054
2228
  request_options: typing.Optional[RequestOptions] = None,
2055
2229
  ) -> HttpResponse[ProcessingStatus]:
2056
2230
  """
2057
- Verify the processing status of an uploaded file.
2231
+ Check the current processing status of your uploaded content.
2232
+
2233
+ 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.
2058
2234
 
2059
- Returns:
2060
- ProcessingStatusResponse: Processing status information
2235
+ Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
2061
2236
 
2062
2237
  Parameters
2063
2238
  ----------
2064
2239
  file_id : str
2240
+ The file ID to check processing status for
2065
2241
 
2066
2242
  tenant_id : typing.Optional[str]
2243
+ Unique identifier for the tenant/organization
2067
2244
 
2068
2245
  request_options : typing.Optional[RequestOptions]
2069
2246
  Request-specific configuration.
@@ -2185,26 +2362,44 @@ class AsyncRawUploadClient:
2185
2362
  tenant_id: str,
2186
2363
  files: typing.List[core.File],
2187
2364
  sub_tenant_id: typing.Optional[str] = None,
2365
+ file_ids: typing.Optional[str] = OMIT,
2188
2366
  tenant_metadata: typing.Optional[str] = OMIT,
2189
2367
  document_metadata: typing.Optional[str] = OMIT,
2190
- relations: typing.Optional[str] = OMIT,
2191
2368
  request_options: typing.Optional[RequestOptions] = None,
2192
2369
  ) -> AsyncHttpResponse[BatchUploadData]:
2193
2370
  """
2371
+ Upload multiple documents simultaneously for efficient bulk processing.
2372
+
2373
+ 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.
2374
+
2375
+ 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.
2376
+
2194
2377
  Parameters
2195
2378
  ----------
2196
2379
  tenant_id : str
2380
+ Unique identifier for the tenant/organization
2197
2381
 
2198
2382
  files : typing.List[core.File]
2199
2383
  See core.File for more documentation
2200
2384
 
2201
2385
  sub_tenant_id : typing.Optional[str]
2386
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
2387
+
2388
+ file_ids : typing.Optional[str]
2389
+ Optional JSON string array of file IDs for the uploaded content. If not provided or empty, will be generated automatically.
2202
2390
 
2203
2391
  tenant_metadata : typing.Optional[str]
2392
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
2393
+
2394
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
2395
+
2204
2396
 
2205
2397
  document_metadata : typing.Optional[str]
2398
+ 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.
2399
+
2400
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
2401
+
2206
2402
 
2207
- relations : typing.Optional[str]
2208
2403
 
2209
2404
  request_options : typing.Optional[RequestOptions]
2210
2405
  Request-specific configuration.
@@ -2222,9 +2417,9 @@ class AsyncRawUploadClient:
2222
2417
  "sub_tenant_id": sub_tenant_id,
2223
2418
  },
2224
2419
  data={
2420
+ "file_ids": file_ids,
2225
2421
  "tenant_metadata": tenant_metadata,
2226
2422
  "document_metadata": document_metadata,
2227
- "relations": relations,
2228
2423
  },
2229
2424
  files={
2230
2425
  "files": files,
@@ -2334,26 +2529,41 @@ class AsyncRawUploadClient:
2334
2529
  source_ids: typing.Optional[typing.List[str]] = OMIT,
2335
2530
  tenant_metadata: typing.Optional[str] = OMIT,
2336
2531
  document_metadata: typing.Optional[str] = OMIT,
2337
- relations: typing.Optional[str] = OMIT,
2338
2532
  request_options: typing.Optional[RequestOptions] = None,
2339
2533
  ) -> AsyncHttpResponse[BatchUploadData]:
2340
2534
  """
2535
+ Update multiple existing documents with new content and metadata.
2536
+
2537
+ 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.
2538
+
2539
+ 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.
2540
+
2341
2541
  Parameters
2342
2542
  ----------
2343
2543
  tenant_id : str
2544
+ Unique identifier for the tenant/organization
2344
2545
 
2345
2546
  files : typing.List[core.File]
2346
2547
  See core.File for more documentation
2347
2548
 
2348
2549
  sub_tenant_id : typing.Optional[str]
2550
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
2349
2551
 
2350
2552
  source_ids : typing.Optional[typing.List[str]]
2553
+ List of source IDs corresponding to the files being updated
2351
2554
 
2352
2555
  tenant_metadata : typing.Optional[str]
2556
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
2557
+
2558
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
2559
+
2353
2560
 
2354
2561
  document_metadata : typing.Optional[str]
2562
+ 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.
2563
+
2564
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
2565
+
2355
2566
 
2356
- relations : typing.Optional[str]
2357
2567
 
2358
2568
  request_options : typing.Optional[RequestOptions]
2359
2569
  Request-specific configuration.
@@ -2374,7 +2584,6 @@ class AsyncRawUploadClient:
2374
2584
  "source_ids": source_ids,
2375
2585
  "tenant_metadata": tenant_metadata,
2376
2586
  "document_metadata": document_metadata,
2377
- "relations": relations,
2378
2587
  },
2379
2588
  files={
2380
2589
  "files": files,
@@ -2481,26 +2690,44 @@ class AsyncRawUploadClient:
2481
2690
  tenant_id: str,
2482
2691
  file: core.File,
2483
2692
  sub_tenant_id: typing.Optional[str] = None,
2693
+ file_id: typing.Optional[str] = OMIT,
2484
2694
  tenant_metadata: typing.Optional[str] = OMIT,
2485
2695
  document_metadata: typing.Optional[str] = OMIT,
2486
- relations: typing.Optional[str] = OMIT,
2487
2696
  request_options: typing.Optional[RequestOptions] = None,
2488
2697
  ) -> AsyncHttpResponse[SingleUploadData]:
2489
2698
  """
2699
+ Upload a single document for processing and indexing into your knowledge base.
2700
+
2701
+ 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.
2702
+
2703
+ 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.
2704
+
2490
2705
  Parameters
2491
2706
  ----------
2492
2707
  tenant_id : str
2708
+ Unique identifier for the tenant/organization
2493
2709
 
2494
2710
  file : core.File
2495
2711
  See core.File for more documentation
2496
2712
 
2497
2713
  sub_tenant_id : typing.Optional[str]
2714
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
2715
+
2716
+ file_id : typing.Optional[str]
2717
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
2498
2718
 
2499
2719
  tenant_metadata : typing.Optional[str]
2720
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
2721
+
2722
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
2723
+
2500
2724
 
2501
2725
  document_metadata : typing.Optional[str]
2726
+ 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.
2727
+
2728
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
2729
+
2502
2730
 
2503
- relations : typing.Optional[str]
2504
2731
 
2505
2732
  request_options : typing.Optional[RequestOptions]
2506
2733
  Request-specific configuration.
@@ -2518,9 +2745,9 @@ class AsyncRawUploadClient:
2518
2745
  "sub_tenant_id": sub_tenant_id,
2519
2746
  },
2520
2747
  data={
2748
+ "file_id": file_id,
2521
2749
  "tenant_metadata": tenant_metadata,
2522
2750
  "document_metadata": document_metadata,
2523
- "relations": relations,
2524
2751
  },
2525
2752
  files={
2526
2753
  "file": file,
@@ -2630,26 +2857,41 @@ class AsyncRawUploadClient:
2630
2857
  sub_tenant_id: typing.Optional[str] = None,
2631
2858
  tenant_metadata: typing.Optional[str] = OMIT,
2632
2859
  document_metadata: typing.Optional[str] = OMIT,
2633
- relations: typing.Optional[str] = OMIT,
2634
2860
  request_options: typing.Optional[RequestOptions] = None,
2635
2861
  ) -> AsyncHttpResponse[SingleUploadData]:
2636
2862
  """
2863
+ Replace an existing document with updated content.
2864
+
2865
+ 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.
2866
+
2867
+ 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.
2868
+
2637
2869
  Parameters
2638
2870
  ----------
2639
2871
  source_id : str
2872
+ The source ID of the document to update
2640
2873
 
2641
2874
  tenant_id : str
2875
+ Unique identifier for the tenant/organization
2642
2876
 
2643
2877
  file : core.File
2644
2878
  See core.File for more documentation
2645
2879
 
2646
2880
  sub_tenant_id : typing.Optional[str]
2881
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
2647
2882
 
2648
2883
  tenant_metadata : typing.Optional[str]
2884
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
2885
+
2886
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
2887
+
2649
2888
 
2650
2889
  document_metadata : typing.Optional[str]
2890
+ 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.
2891
+
2892
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
2893
+
2651
2894
 
2652
- relations : typing.Optional[str]
2653
2895
 
2654
2896
  request_options : typing.Optional[RequestOptions]
2655
2897
  Request-specific configuration.
@@ -2670,7 +2912,6 @@ class AsyncRawUploadClient:
2670
2912
  data={
2671
2913
  "tenant_metadata": tenant_metadata,
2672
2914
  "document_metadata": document_metadata,
2673
- "relations": relations,
2674
2915
  },
2675
2916
  files={
2676
2917
  "file": file,
@@ -2780,13 +3021,21 @@ class AsyncRawUploadClient:
2780
3021
  request_options: typing.Optional[RequestOptions] = None,
2781
3022
  ) -> AsyncHttpResponse[AppSourcesUploadData]:
2782
3023
  """
3024
+ Upload structured data from applications or APIs for indexing.
3025
+
3026
+ 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
3027
+
3028
+ 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.
3029
+
2783
3030
  Parameters
2784
3031
  ----------
2785
3032
  tenant_id : str
3033
+ Unique identifier for the tenant/organization
2786
3034
 
2787
3035
  request : typing.Sequence[SourceModel]
2788
3036
 
2789
3037
  sub_tenant_id : typing.Optional[str]
3038
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
2790
3039
 
2791
3040
  request_options : typing.Optional[RequestOptions]
2792
3041
  Request-specific configuration.
@@ -2910,28 +3159,42 @@ class AsyncRawUploadClient:
2910
3159
  tenant_id: str,
2911
3160
  content: str,
2912
3161
  sub_tenant_id: typing.Optional[str] = None,
3162
+ file_id: typing.Optional[str] = OMIT,
2913
3163
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
2914
3164
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
2915
- relations: typing.Optional[Relations] = OMIT,
2916
3165
  request_options: typing.Optional[RequestOptions] = None,
2917
3166
  ) -> AsyncHttpResponse[SingleUploadData]:
2918
3167
  """
2919
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
2920
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
3168
+ Upload text or markdown content directly for processing.
3169
+
3170
+ 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.
3171
+
3172
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
2921
3173
 
2922
3174
  Parameters
2923
3175
  ----------
2924
3176
  tenant_id : str
3177
+ Unique identifier for the tenant/organization
2925
3178
 
2926
3179
  content : str
3180
+ The text or markdown content to upload
2927
3181
 
2928
3182
  sub_tenant_id : typing.Optional[str]
3183
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3184
+
3185
+ file_id : typing.Optional[str]
3186
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
2929
3187
 
2930
3188
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3189
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
3190
+
3191
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
2931
3192
 
2932
3193
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3194
+ 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.
3195
+
3196
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
2933
3197
 
2934
- relations : typing.Optional[Relations]
2935
3198
 
2936
3199
  request_options : typing.Optional[RequestOptions]
2937
3200
  Request-specific configuration.
@@ -2950,11 +3213,9 @@ class AsyncRawUploadClient:
2950
3213
  },
2951
3214
  json={
2952
3215
  "content": content,
3216
+ "file_id": file_id,
2953
3217
  "tenant_metadata": tenant_metadata,
2954
3218
  "document_metadata": document_metadata,
2955
- "relations": convert_and_respect_annotation_metadata(
2956
- object_=relations, annotation=Relations, direction="write"
2957
- ),
2958
3219
  },
2959
3220
  headers={
2960
3221
  "content-type": "application/json",
@@ -3060,28 +3321,42 @@ class AsyncRawUploadClient:
3060
3321
  tenant_id: str,
3061
3322
  content: str,
3062
3323
  sub_tenant_id: typing.Optional[str] = None,
3324
+ file_id: typing.Optional[str] = OMIT,
3063
3325
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3064
3326
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3065
- relations: typing.Optional[Relations] = OMIT,
3066
3327
  request_options: typing.Optional[RequestOptions] = None,
3067
3328
  ) -> AsyncHttpResponse[SingleUploadData]:
3068
3329
  """
3069
- Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
3070
- otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
3330
+ Upload text or markdown content directly for processing.
3331
+
3332
+ 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.
3333
+
3334
+ You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
3071
3335
 
3072
3336
  Parameters
3073
3337
  ----------
3074
3338
  tenant_id : str
3339
+ Unique identifier for the tenant/organization
3075
3340
 
3076
3341
  content : str
3342
+ The text or markdown content to upload
3077
3343
 
3078
3344
  sub_tenant_id : typing.Optional[str]
3345
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3346
+
3347
+ file_id : typing.Optional[str]
3348
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
3079
3349
 
3080
3350
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3351
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
3352
+
3353
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
3081
3354
 
3082
3355
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3356
+ 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.
3357
+
3358
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
3083
3359
 
3084
- relations : typing.Optional[Relations]
3085
3360
 
3086
3361
  request_options : typing.Optional[RequestOptions]
3087
3362
  Request-specific configuration.
@@ -3100,11 +3375,9 @@ class AsyncRawUploadClient:
3100
3375
  },
3101
3376
  json={
3102
3377
  "content": content,
3378
+ "file_id": file_id,
3103
3379
  "tenant_metadata": tenant_metadata,
3104
3380
  "document_metadata": document_metadata,
3105
- "relations": convert_and_respect_annotation_metadata(
3106
- object_=relations, annotation=Relations, direction="write"
3107
- ),
3108
3381
  },
3109
3382
  headers={
3110
3383
  "content-type": "application/json",
@@ -3211,27 +3484,45 @@ class AsyncRawUploadClient:
3211
3484
  tenant_id: str,
3212
3485
  content: str,
3213
3486
  sub_tenant_id: typing.Optional[str] = None,
3487
+ file_id: typing.Optional[str] = OMIT,
3214
3488
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3215
3489
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3216
- relations: typing.Optional[Relations] = OMIT,
3217
3490
  request_options: typing.Optional[RequestOptions] = None,
3218
3491
  ) -> AsyncHttpResponse[SingleUploadData]:
3219
3492
  """
3493
+ Update existing text or markdown content with new information.
3494
+
3495
+ 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.
3496
+
3497
+ 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.
3498
+
3220
3499
  Parameters
3221
3500
  ----------
3222
3501
  source_id : str
3502
+ The source ID of the document to update
3223
3503
 
3224
3504
  tenant_id : str
3505
+ Unique identifier for the tenant/organization
3225
3506
 
3226
3507
  content : str
3508
+ The text or markdown content to upload
3227
3509
 
3228
3510
  sub_tenant_id : typing.Optional[str]
3511
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3512
+
3513
+ file_id : typing.Optional[str]
3514
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
3229
3515
 
3230
3516
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3517
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
3518
+
3519
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
3231
3520
 
3232
3521
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3522
+ 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.
3523
+
3524
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
3233
3525
 
3234
- relations : typing.Optional[Relations]
3235
3526
 
3236
3527
  request_options : typing.Optional[RequestOptions]
3237
3528
  Request-specific configuration.
@@ -3251,11 +3542,9 @@ class AsyncRawUploadClient:
3251
3542
  },
3252
3543
  json={
3253
3544
  "content": content,
3545
+ "file_id": file_id,
3254
3546
  "tenant_metadata": tenant_metadata,
3255
3547
  "document_metadata": document_metadata,
3256
- "relations": convert_and_respect_annotation_metadata(
3257
- object_=relations, annotation=Relations, direction="write"
3258
- ),
3259
3548
  },
3260
3549
  headers={
3261
3550
  "content-type": "application/json",
@@ -3362,27 +3651,45 @@ class AsyncRawUploadClient:
3362
3651
  tenant_id: str,
3363
3652
  content: str,
3364
3653
  sub_tenant_id: typing.Optional[str] = None,
3654
+ file_id: typing.Optional[str] = OMIT,
3365
3655
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3366
3656
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
3367
- relations: typing.Optional[Relations] = OMIT,
3368
3657
  request_options: typing.Optional[RequestOptions] = None,
3369
3658
  ) -> AsyncHttpResponse[SingleUploadData]:
3370
3659
  """
3660
+ Update existing text or markdown content with new information.
3661
+
3662
+ 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.
3663
+
3664
+ 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.
3665
+
3371
3666
  Parameters
3372
3667
  ----------
3373
3668
  source_id : str
3669
+ The source ID of the document to update
3374
3670
 
3375
3671
  tenant_id : str
3672
+ Unique identifier for the tenant/organization
3376
3673
 
3377
3674
  content : str
3675
+ The text or markdown content to upload
3378
3676
 
3379
3677
  sub_tenant_id : typing.Optional[str]
3678
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3679
+
3680
+ file_id : typing.Optional[str]
3681
+ Optional file ID for the uploaded content. If not provided, will be generated automatically.
3380
3682
 
3381
3683
  tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3684
+ JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
3685
+
3686
+ Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
3382
3687
 
3383
3688
  document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
3689
+ 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.
3690
+
3691
+ Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
3384
3692
 
3385
- relations : typing.Optional[Relations]
3386
3693
 
3387
3694
  request_options : typing.Optional[RequestOptions]
3388
3695
  Request-specific configuration.
@@ -3402,11 +3709,9 @@ class AsyncRawUploadClient:
3402
3709
  },
3403
3710
  json={
3404
3711
  "content": content,
3712
+ "file_id": file_id,
3405
3713
  "tenant_metadata": tenant_metadata,
3406
3714
  "document_metadata": document_metadata,
3407
- "relations": convert_and_respect_annotation_metadata(
3408
- object_=relations, annotation=Relations, direction="write"
3409
- ),
3410
3715
  },
3411
3716
  headers={
3412
3717
  "content-type": "application/json",
@@ -3516,15 +3821,25 @@ class AsyncRawUploadClient:
3516
3821
  request_options: typing.Optional[RequestOptions] = None,
3517
3822
  ) -> AsyncHttpResponse[SingleUploadData]:
3518
3823
  """
3824
+ Upload pre-computed embeddings for advanced similarity search.
3825
+
3826
+ 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.
3827
+
3828
+ 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.
3829
+
3519
3830
  Parameters
3520
3831
  ----------
3521
3832
  tenant_id : str
3833
+ Unique identifier for the tenant/organization
3522
3834
 
3523
3835
  embeddings : typing.Sequence[typing.Sequence[float]]
3836
+ The embeddings of source you want to index
3524
3837
 
3525
3838
  sub_tenant_id : typing.Optional[str]
3839
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3526
3840
 
3527
3841
  file_id : typing.Optional[str]
3842
+ The Source ID of the target source you want to index
3528
3843
 
3529
3844
  request_options : typing.Optional[RequestOptions]
3530
3845
  Request-specific configuration.
@@ -3652,13 +3967,22 @@ class AsyncRawUploadClient:
3652
3967
  request_options: typing.Optional[RequestOptions] = None,
3653
3968
  ) -> AsyncHttpResponse[SingleUploadData]:
3654
3969
  """
3970
+ Update existing embeddings with new vector representations.
3971
+
3972
+ 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.
3973
+
3974
+ 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.
3975
+
3655
3976
  Parameters
3656
3977
  ----------
3657
3978
  tenant_id : str
3979
+ Unique identifier for the tenant/organization
3658
3980
 
3659
3981
  sub_tenant_id : typing.Optional[str]
3982
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3660
3983
 
3661
3984
  embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
3985
+ The embeddings of source you want to index
3662
3986
 
3663
3987
  request_options : typing.Optional[RequestOptions]
3664
3988
  Request-specific configuration.
@@ -3783,21 +4107,28 @@ class AsyncRawUploadClient:
3783
4107
  tenant_id: str,
3784
4108
  sub_tenant_id: typing.Optional[str] = None,
3785
4109
  file_id: typing.Optional[str] = None,
3786
- relations: typing.Optional[str] = OMIT,
3787
4110
  request_options: typing.Optional[RequestOptions] = None,
3788
4111
  ) -> AsyncHttpResponse[SingleUploadData]:
3789
4112
  """
4113
+ Extract and index content from web pages automatically.
4114
+
4115
+ 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.
4116
+
4117
+ 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.
4118
+
3790
4119
  Parameters
3791
4120
  ----------
3792
4121
  web_url : str
4122
+ The URL of the webpage to scrape and index
3793
4123
 
3794
4124
  tenant_id : str
4125
+ Unique identifier for the tenant/organization
3795
4126
 
3796
4127
  sub_tenant_id : typing.Optional[str]
4128
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3797
4129
 
3798
4130
  file_id : typing.Optional[str]
3799
-
3800
- relations : typing.Optional[str]
4131
+ Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
3801
4132
 
3802
4133
  request_options : typing.Optional[RequestOptions]
3803
4134
  Request-specific configuration.
@@ -3816,9 +4147,7 @@ class AsyncRawUploadClient:
3816
4147
  "sub_tenant_id": sub_tenant_id,
3817
4148
  "file_id": file_id,
3818
4149
  },
3819
- data={
3820
- "relations": relations,
3821
- },
4150
+ data={},
3822
4151
  headers={
3823
4152
  "content-type": "application/x-www-form-urlencoded",
3824
4153
  },
@@ -3924,21 +4253,28 @@ class AsyncRawUploadClient:
3924
4253
  source_id: str,
3925
4254
  tenant_id: str,
3926
4255
  sub_tenant_id: typing.Optional[str] = None,
3927
- relations: typing.Optional[str] = OMIT,
3928
4256
  request_options: typing.Optional[RequestOptions] = None,
3929
4257
  ) -> AsyncHttpResponse[SingleUploadData]:
3930
4258
  """
4259
+ Update web scraping content with fresh data from the source URL.
4260
+
4261
+ 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.
4262
+
4263
+ 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.
4264
+
3931
4265
  Parameters
3932
4266
  ----------
3933
4267
  web_url : str
4268
+ The URL of the webpage to re-scrape
3934
4269
 
3935
4270
  source_id : str
4271
+ The file ID of the existing web scraping job to update
3936
4272
 
3937
4273
  tenant_id : str
4274
+ Unique identifier for the tenant/organization
3938
4275
 
3939
4276
  sub_tenant_id : typing.Optional[str]
3940
-
3941
- relations : typing.Optional[str]
4277
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
3942
4278
 
3943
4279
  request_options : typing.Optional[RequestOptions]
3944
4280
  Request-specific configuration.
@@ -3957,9 +4293,7 @@ class AsyncRawUploadClient:
3957
4293
  "tenant_id": tenant_id,
3958
4294
  "sub_tenant_id": sub_tenant_id,
3959
4295
  },
3960
- data={
3961
- "relations": relations,
3962
- },
4296
+ data={},
3963
4297
  headers={
3964
4298
  "content-type": "application/x-www-form-urlencoded",
3965
4299
  },
@@ -4067,13 +4401,22 @@ class AsyncRawUploadClient:
4067
4401
  request_options: typing.Optional[RequestOptions] = None,
4068
4402
  ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
4069
4403
  """
4404
+ Remove documents and content from your knowledge base.
4405
+
4406
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
4407
+
4408
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
4409
+
4070
4410
  Parameters
4071
4411
  ----------
4072
4412
  tenant_id : str
4413
+ Unique identifier for the tenant/organization
4073
4414
 
4074
4415
  source_ids : typing.Sequence[str]
4416
+ List of source IDs to delete
4075
4417
 
4076
4418
  sub_tenant_id : typing.Optional[str]
4419
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
4077
4420
 
4078
4421
  request_options : typing.Optional[RequestOptions]
4079
4422
  Request-specific configuration.
@@ -4134,13 +4477,22 @@ class AsyncRawUploadClient:
4134
4477
  request_options: typing.Optional[RequestOptions] = None,
4135
4478
  ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
4136
4479
  """
4480
+ Remove documents and content from your knowledge base.
4481
+
4482
+ This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
4483
+
4484
+ Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
4485
+
4137
4486
  Parameters
4138
4487
  ----------
4139
4488
  tenant_id : str
4489
+ Unique identifier for the tenant/organization
4140
4490
 
4141
4491
  source_ids : typing.Sequence[str]
4492
+ List of source IDs to delete
4142
4493
 
4143
4494
  sub_tenant_id : typing.Optional[str]
4495
+ Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
4144
4496
 
4145
4497
  request_options : typing.Optional[RequestOptions]
4146
4498
  Request-specific configuration.
@@ -4200,16 +4552,19 @@ class AsyncRawUploadClient:
4200
4552
  request_options: typing.Optional[RequestOptions] = None,
4201
4553
  ) -> AsyncHttpResponse[ProcessingStatus]:
4202
4554
  """
4203
- Verify the processing status of an uploaded file.
4555
+ Check the current processing status of your uploaded content.
4556
+
4557
+ 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.
4204
4558
 
4205
- Returns:
4206
- ProcessingStatusResponse: Processing status information
4559
+ Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
4207
4560
 
4208
4561
  Parameters
4209
4562
  ----------
4210
4563
  file_id : str
4564
+ The file ID to check processing status for
4211
4565
 
4212
4566
  tenant_id : typing.Optional[str]
4567
+ Unique identifier for the tenant/organization
4213
4568
 
4214
4569
  request_options : typing.Optional[RequestOptions]
4215
4570
  Request-specific configuration.