usecortex-ai 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- usecortex_ai/__init__.py +20 -3
- usecortex_ai/client.py +7 -78
- usecortex_ai/core/client_wrapper.py +6 -8
- usecortex_ai/document/__init__.py +4 -0
- usecortex_ai/document/client.py +139 -0
- usecortex_ai/document/raw_client.py +312 -0
- usecortex_ai/embeddings/client.py +50 -82
- usecortex_ai/embeddings/raw_client.py +48 -80
- usecortex_ai/fetch/client.py +10 -0
- usecortex_ai/fetch/raw_client.py +10 -0
- usecortex_ai/search/client.py +74 -80
- usecortex_ai/search/raw_client.py +74 -80
- usecortex_ai/sources/client.py +28 -0
- usecortex_ai/sources/raw_client.py +28 -0
- usecortex_ai/tenant/client.py +152 -4
- usecortex_ai/tenant/raw_client.py +502 -4
- usecortex_ai/types/__init__.py +18 -2
- usecortex_ai/types/add_user_memory_response.py +36 -0
- usecortex_ai/types/app_sources_upload_data.py +10 -2
- usecortex_ai/types/attachment_model.py +34 -7
- usecortex_ai/types/batch_upload_data.py +10 -2
- usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
- usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
- usecortex_ai/types/content_model.py +33 -6
- usecortex_ai/types/delete_memory_request.py +14 -3
- usecortex_ai/types/delete_sources.py +20 -0
- usecortex_ai/types/delete_sub_tenant_data.py +42 -0
- usecortex_ai/types/delete_user_memory_response.py +31 -0
- usecortex_ai/types/embeddings_create_collection_data.py +19 -4
- usecortex_ai/types/embeddings_delete_data.py +19 -4
- usecortex_ai/types/embeddings_get_data.py +19 -4
- usecortex_ai/types/embeddings_search_data.py +19 -4
- usecortex_ai/types/error_response.py +0 -1
- usecortex_ai/types/fetch_content_data.py +19 -5
- usecortex_ai/types/file_upload_result.py +9 -2
- usecortex_ai/types/generate_user_memory_response.py +32 -0
- usecortex_ai/types/list_sources_response.py +14 -3
- usecortex_ai/types/list_user_memories_response.py +32 -0
- usecortex_ai/types/markdown_upload_request.py +18 -3
- usecortex_ai/types/processing_status.py +14 -3
- usecortex_ai/types/relations.py +2 -2
- usecortex_ai/types/retrieve_user_memory_response.py +32 -0
- usecortex_ai/types/search_chunk.py +54 -16
- usecortex_ai/types/single_upload_data.py +10 -2
- usecortex_ai/types/source.py +34 -14
- usecortex_ai/types/source_model.py +63 -12
- usecortex_ai/types/sub_tenant_ids_data.py +42 -0
- usecortex_ai/types/tenant_create_data.py +19 -4
- usecortex_ai/types/tenant_stats.py +24 -5
- usecortex_ai/types/user_memory.py +31 -0
- usecortex_ai/upload/client.py +508 -132
- usecortex_ai/upload/raw_client.py +492 -152
- usecortex_ai/user/client.py +14 -6
- usecortex_ai/user/raw_client.py +14 -6
- usecortex_ai/user_memory/client.py +184 -50
- usecortex_ai/user_memory/raw_client.py +905 -88
- {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/METADATA +1 -1
- usecortex_ai-0.2.2.dist-info/RECORD +100 -0
- usecortex_ai/raw_client.py +0 -90
- usecortex_ai/types/source_content.py +0 -26
- usecortex_ai-0.2.0.dist-info/RECORD +0 -90
- {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/WHEEL +0 -0
- {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.2.dist-info}/top_level.txt +0 -0
|
@@ -20,9 +20,7 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
|
20
20
|
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
|
-
from ..types.markdown_upload_request import MarkdownUploadRequest
|
|
24
23
|
from ..types.processing_status import ProcessingStatus
|
|
25
|
-
from ..types.relations import Relations
|
|
26
24
|
from ..types.single_upload_data import SingleUploadData
|
|
27
25
|
from ..types.source_model import SourceModel
|
|
28
26
|
|
|
@@ -42,24 +40,38 @@ class RawUploadClient:
|
|
|
42
40
|
sub_tenant_id: typing.Optional[str] = None,
|
|
43
41
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
44
42
|
document_metadata: typing.Optional[str] = OMIT,
|
|
45
|
-
relations: typing.Optional[str] = OMIT,
|
|
46
43
|
request_options: typing.Optional[RequestOptions] = None,
|
|
47
44
|
) -> HttpResponse[BatchUploadData]:
|
|
48
45
|
"""
|
|
46
|
+
Upload multiple documents simultaneously for efficient bulk processing.
|
|
47
|
+
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
49
52
|
Parameters
|
|
50
53
|
----------
|
|
51
54
|
tenant_id : str
|
|
55
|
+
Unique identifier for the tenant/organization
|
|
52
56
|
|
|
53
57
|
files : typing.List[core.File]
|
|
54
58
|
See core.File for more documentation
|
|
55
59
|
|
|
56
60
|
sub_tenant_id : typing.Optional[str]
|
|
61
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
57
62
|
|
|
58
63
|
tenant_metadata : typing.Optional[str]
|
|
64
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
65
|
+
|
|
66
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
67
|
+
|
|
59
68
|
|
|
60
69
|
document_metadata : typing.Optional[str]
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
73
|
+
|
|
61
74
|
|
|
62
|
-
relations : typing.Optional[str]
|
|
63
75
|
|
|
64
76
|
request_options : typing.Optional[RequestOptions]
|
|
65
77
|
Request-specific configuration.
|
|
@@ -79,7 +91,6 @@ class RawUploadClient:
|
|
|
79
91
|
data={
|
|
80
92
|
"tenant_metadata": tenant_metadata,
|
|
81
93
|
"document_metadata": document_metadata,
|
|
82
|
-
"relations": relations,
|
|
83
94
|
},
|
|
84
95
|
files={
|
|
85
96
|
"files": files,
|
|
@@ -189,26 +200,41 @@ class RawUploadClient:
|
|
|
189
200
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
190
201
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
191
202
|
document_metadata: typing.Optional[str] = OMIT,
|
|
192
|
-
relations: typing.Optional[str] = OMIT,
|
|
193
203
|
request_options: typing.Optional[RequestOptions] = None,
|
|
194
204
|
) -> HttpResponse[BatchUploadData]:
|
|
195
205
|
"""
|
|
206
|
+
Update multiple existing documents with new content and metadata.
|
|
207
|
+
|
|
208
|
+
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.
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
|
|
196
212
|
Parameters
|
|
197
213
|
----------
|
|
198
214
|
tenant_id : str
|
|
215
|
+
Unique identifier for the tenant/organization
|
|
199
216
|
|
|
200
217
|
files : typing.List[core.File]
|
|
201
218
|
See core.File for more documentation
|
|
202
219
|
|
|
203
220
|
sub_tenant_id : typing.Optional[str]
|
|
221
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
204
222
|
|
|
205
223
|
source_ids : typing.Optional[typing.List[str]]
|
|
224
|
+
List of source IDs corresponding to the files being updated
|
|
206
225
|
|
|
207
226
|
tenant_metadata : typing.Optional[str]
|
|
227
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
228
|
+
|
|
229
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
230
|
+
|
|
208
231
|
|
|
209
232
|
document_metadata : typing.Optional[str]
|
|
233
|
+
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.
|
|
234
|
+
|
|
235
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
236
|
+
|
|
210
237
|
|
|
211
|
-
relations : typing.Optional[str]
|
|
212
238
|
|
|
213
239
|
request_options : typing.Optional[RequestOptions]
|
|
214
240
|
Request-specific configuration.
|
|
@@ -229,7 +255,6 @@ class RawUploadClient:
|
|
|
229
255
|
"source_ids": source_ids,
|
|
230
256
|
"tenant_metadata": tenant_metadata,
|
|
231
257
|
"document_metadata": document_metadata,
|
|
232
|
-
"relations": relations,
|
|
233
258
|
},
|
|
234
259
|
files={
|
|
235
260
|
"files": files,
|
|
@@ -338,24 +363,38 @@ class RawUploadClient:
|
|
|
338
363
|
sub_tenant_id: typing.Optional[str] = None,
|
|
339
364
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
340
365
|
document_metadata: typing.Optional[str] = OMIT,
|
|
341
|
-
relations: typing.Optional[str] = OMIT,
|
|
342
366
|
request_options: typing.Optional[RequestOptions] = None,
|
|
343
367
|
) -> HttpResponse[SingleUploadData]:
|
|
344
368
|
"""
|
|
369
|
+
Upload a single document for processing and indexing into your knowledge base.
|
|
370
|
+
|
|
371
|
+
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.
|
|
372
|
+
|
|
373
|
+
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.
|
|
374
|
+
|
|
345
375
|
Parameters
|
|
346
376
|
----------
|
|
347
377
|
tenant_id : str
|
|
378
|
+
Unique identifier for the tenant/organization
|
|
348
379
|
|
|
349
380
|
file : core.File
|
|
350
381
|
See core.File for more documentation
|
|
351
382
|
|
|
352
383
|
sub_tenant_id : typing.Optional[str]
|
|
384
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
353
385
|
|
|
354
386
|
tenant_metadata : typing.Optional[str]
|
|
387
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
388
|
+
|
|
389
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
390
|
+
|
|
355
391
|
|
|
356
392
|
document_metadata : typing.Optional[str]
|
|
393
|
+
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.
|
|
394
|
+
|
|
395
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
396
|
+
|
|
357
397
|
|
|
358
|
-
relations : typing.Optional[str]
|
|
359
398
|
|
|
360
399
|
request_options : typing.Optional[RequestOptions]
|
|
361
400
|
Request-specific configuration.
|
|
@@ -375,7 +414,6 @@ class RawUploadClient:
|
|
|
375
414
|
data={
|
|
376
415
|
"tenant_metadata": tenant_metadata,
|
|
377
416
|
"document_metadata": document_metadata,
|
|
378
|
-
"relations": relations,
|
|
379
417
|
},
|
|
380
418
|
files={
|
|
381
419
|
"file": file,
|
|
@@ -485,26 +523,41 @@ class RawUploadClient:
|
|
|
485
523
|
sub_tenant_id: typing.Optional[str] = None,
|
|
486
524
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
487
525
|
document_metadata: typing.Optional[str] = OMIT,
|
|
488
|
-
relations: typing.Optional[str] = OMIT,
|
|
489
526
|
request_options: typing.Optional[RequestOptions] = None,
|
|
490
527
|
) -> HttpResponse[SingleUploadData]:
|
|
491
528
|
"""
|
|
529
|
+
Replace an existing document with updated content.
|
|
530
|
+
|
|
531
|
+
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.
|
|
532
|
+
|
|
533
|
+
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.
|
|
534
|
+
|
|
492
535
|
Parameters
|
|
493
536
|
----------
|
|
494
537
|
source_id : str
|
|
538
|
+
The source ID of the document to update
|
|
495
539
|
|
|
496
540
|
tenant_id : str
|
|
541
|
+
Unique identifier for the tenant/organization
|
|
497
542
|
|
|
498
543
|
file : core.File
|
|
499
544
|
See core.File for more documentation
|
|
500
545
|
|
|
501
546
|
sub_tenant_id : typing.Optional[str]
|
|
547
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
502
548
|
|
|
503
549
|
tenant_metadata : typing.Optional[str]
|
|
550
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
551
|
+
|
|
552
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
553
|
+
|
|
504
554
|
|
|
505
555
|
document_metadata : typing.Optional[str]
|
|
556
|
+
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.
|
|
557
|
+
|
|
558
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
559
|
+
|
|
506
560
|
|
|
507
|
-
relations : typing.Optional[str]
|
|
508
561
|
|
|
509
562
|
request_options : typing.Optional[RequestOptions]
|
|
510
563
|
Request-specific configuration.
|
|
@@ -525,7 +578,6 @@ class RawUploadClient:
|
|
|
525
578
|
data={
|
|
526
579
|
"tenant_metadata": tenant_metadata,
|
|
527
580
|
"document_metadata": document_metadata,
|
|
528
|
-
"relations": relations,
|
|
529
581
|
},
|
|
530
582
|
files={
|
|
531
583
|
"file": file,
|
|
@@ -635,13 +687,21 @@ class RawUploadClient:
|
|
|
635
687
|
request_options: typing.Optional[RequestOptions] = None,
|
|
636
688
|
) -> HttpResponse[AppSourcesUploadData]:
|
|
637
689
|
"""
|
|
690
|
+
Upload structured data from applications or APIs for indexing.
|
|
691
|
+
|
|
692
|
+
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
|
|
693
|
+
|
|
694
|
+
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.
|
|
695
|
+
|
|
638
696
|
Parameters
|
|
639
697
|
----------
|
|
640
698
|
tenant_id : str
|
|
699
|
+
Unique identifier for the tenant/organization
|
|
641
700
|
|
|
642
701
|
request : typing.Sequence[SourceModel]
|
|
643
702
|
|
|
644
703
|
sub_tenant_id : typing.Optional[str]
|
|
704
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
645
705
|
|
|
646
706
|
request_options : typing.Optional[RequestOptions]
|
|
647
707
|
Request-specific configuration.
|
|
@@ -763,24 +823,40 @@ class RawUploadClient:
|
|
|
763
823
|
self,
|
|
764
824
|
*,
|
|
765
825
|
tenant_id: str,
|
|
766
|
-
|
|
826
|
+
content: str,
|
|
767
827
|
sub_tenant_id: typing.Optional[str] = None,
|
|
768
|
-
|
|
828
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
829
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
769
830
|
request_options: typing.Optional[RequestOptions] = None,
|
|
770
831
|
) -> HttpResponse[SingleUploadData]:
|
|
771
832
|
"""
|
|
772
|
-
Upload markdown content
|
|
773
|
-
|
|
833
|
+
Upload text or markdown content directly for processing.
|
|
834
|
+
|
|
835
|
+
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.
|
|
836
|
+
|
|
837
|
+
You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
|
|
774
838
|
|
|
775
839
|
Parameters
|
|
776
840
|
----------
|
|
777
841
|
tenant_id : str
|
|
842
|
+
Unique identifier for the tenant/organization
|
|
778
843
|
|
|
779
|
-
|
|
844
|
+
content : str
|
|
845
|
+
The text or markdown content to upload
|
|
780
846
|
|
|
781
847
|
sub_tenant_id : typing.Optional[str]
|
|
848
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
849
|
+
|
|
850
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
851
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
852
|
+
|
|
853
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
854
|
+
|
|
855
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
856
|
+
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.
|
|
857
|
+
|
|
858
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
782
859
|
|
|
783
|
-
relations : typing.Optional[Relations]
|
|
784
860
|
|
|
785
861
|
request_options : typing.Optional[RequestOptions]
|
|
786
862
|
Request-specific configuration.
|
|
@@ -798,12 +874,9 @@ class RawUploadClient:
|
|
|
798
874
|
"sub_tenant_id": sub_tenant_id,
|
|
799
875
|
},
|
|
800
876
|
json={
|
|
801
|
-
"
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
805
|
-
object_=relations, annotation=Relations, direction="write"
|
|
806
|
-
),
|
|
877
|
+
"content": content,
|
|
878
|
+
"tenant_metadata": tenant_metadata,
|
|
879
|
+
"document_metadata": document_metadata,
|
|
807
880
|
},
|
|
808
881
|
headers={
|
|
809
882
|
"content-type": "application/json",
|
|
@@ -907,24 +980,40 @@ class RawUploadClient:
|
|
|
907
980
|
self,
|
|
908
981
|
*,
|
|
909
982
|
tenant_id: str,
|
|
910
|
-
|
|
983
|
+
content: str,
|
|
911
984
|
sub_tenant_id: typing.Optional[str] = None,
|
|
912
|
-
|
|
985
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
986
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
913
987
|
request_options: typing.Optional[RequestOptions] = None,
|
|
914
988
|
) -> HttpResponse[SingleUploadData]:
|
|
915
989
|
"""
|
|
916
|
-
Upload markdown content
|
|
917
|
-
|
|
990
|
+
Upload text or markdown content directly for processing.
|
|
991
|
+
|
|
992
|
+
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.
|
|
993
|
+
|
|
994
|
+
You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
|
|
918
995
|
|
|
919
996
|
Parameters
|
|
920
997
|
----------
|
|
921
998
|
tenant_id : str
|
|
999
|
+
Unique identifier for the tenant/organization
|
|
922
1000
|
|
|
923
|
-
|
|
1001
|
+
content : str
|
|
1002
|
+
The text or markdown content to upload
|
|
924
1003
|
|
|
925
1004
|
sub_tenant_id : typing.Optional[str]
|
|
1005
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1006
|
+
|
|
1007
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1008
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
1009
|
+
|
|
1010
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
1011
|
+
|
|
1012
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1013
|
+
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.
|
|
1014
|
+
|
|
1015
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
926
1016
|
|
|
927
|
-
relations : typing.Optional[Relations]
|
|
928
1017
|
|
|
929
1018
|
request_options : typing.Optional[RequestOptions]
|
|
930
1019
|
Request-specific configuration.
|
|
@@ -942,12 +1031,9 @@ class RawUploadClient:
|
|
|
942
1031
|
"sub_tenant_id": sub_tenant_id,
|
|
943
1032
|
},
|
|
944
1033
|
json={
|
|
945
|
-
"
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
949
|
-
object_=relations, annotation=Relations, direction="write"
|
|
950
|
-
),
|
|
1034
|
+
"content": content,
|
|
1035
|
+
"tenant_metadata": tenant_metadata,
|
|
1036
|
+
"document_metadata": document_metadata,
|
|
951
1037
|
},
|
|
952
1038
|
headers={
|
|
953
1039
|
"content-type": "application/json",
|
|
@@ -1052,23 +1138,43 @@ class RawUploadClient:
|
|
|
1052
1138
|
*,
|
|
1053
1139
|
source_id: str,
|
|
1054
1140
|
tenant_id: str,
|
|
1055
|
-
|
|
1141
|
+
content: str,
|
|
1056
1142
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1057
|
-
|
|
1143
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1144
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1058
1145
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1059
1146
|
) -> HttpResponse[SingleUploadData]:
|
|
1060
1147
|
"""
|
|
1148
|
+
Update existing text or markdown content with new information.
|
|
1149
|
+
|
|
1150
|
+
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.
|
|
1151
|
+
|
|
1152
|
+
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.
|
|
1153
|
+
|
|
1061
1154
|
Parameters
|
|
1062
1155
|
----------
|
|
1063
1156
|
source_id : str
|
|
1157
|
+
The source ID of the document to update
|
|
1064
1158
|
|
|
1065
1159
|
tenant_id : str
|
|
1160
|
+
Unique identifier for the tenant/organization
|
|
1066
1161
|
|
|
1067
|
-
|
|
1162
|
+
content : str
|
|
1163
|
+
The text or markdown content to upload
|
|
1068
1164
|
|
|
1069
1165
|
sub_tenant_id : typing.Optional[str]
|
|
1166
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1167
|
+
|
|
1168
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1169
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
1170
|
+
|
|
1171
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
1172
|
+
|
|
1173
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1174
|
+
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.
|
|
1175
|
+
|
|
1176
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
1070
1177
|
|
|
1071
|
-
relations : typing.Optional[Relations]
|
|
1072
1178
|
|
|
1073
1179
|
request_options : typing.Optional[RequestOptions]
|
|
1074
1180
|
Request-specific configuration.
|
|
@@ -1087,12 +1193,9 @@ class RawUploadClient:
|
|
|
1087
1193
|
"sub_tenant_id": sub_tenant_id,
|
|
1088
1194
|
},
|
|
1089
1195
|
json={
|
|
1090
|
-
"
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
1094
|
-
object_=relations, annotation=Relations, direction="write"
|
|
1095
|
-
),
|
|
1196
|
+
"content": content,
|
|
1197
|
+
"tenant_metadata": tenant_metadata,
|
|
1198
|
+
"document_metadata": document_metadata,
|
|
1096
1199
|
},
|
|
1097
1200
|
headers={
|
|
1098
1201
|
"content-type": "application/json",
|
|
@@ -1197,23 +1300,43 @@ class RawUploadClient:
|
|
|
1197
1300
|
*,
|
|
1198
1301
|
source_id: str,
|
|
1199
1302
|
tenant_id: str,
|
|
1200
|
-
|
|
1303
|
+
content: str,
|
|
1201
1304
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1202
|
-
|
|
1305
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1306
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1203
1307
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1204
1308
|
) -> HttpResponse[SingleUploadData]:
|
|
1205
1309
|
"""
|
|
1310
|
+
Update existing text or markdown content with new information.
|
|
1311
|
+
|
|
1312
|
+
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.
|
|
1313
|
+
|
|
1314
|
+
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.
|
|
1315
|
+
|
|
1206
1316
|
Parameters
|
|
1207
1317
|
----------
|
|
1208
1318
|
source_id : str
|
|
1319
|
+
The source ID of the document to update
|
|
1209
1320
|
|
|
1210
1321
|
tenant_id : str
|
|
1322
|
+
Unique identifier for the tenant/organization
|
|
1211
1323
|
|
|
1212
|
-
|
|
1324
|
+
content : str
|
|
1325
|
+
The text or markdown content to upload
|
|
1213
1326
|
|
|
1214
1327
|
sub_tenant_id : typing.Optional[str]
|
|
1328
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1329
|
+
|
|
1330
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1331
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
1332
|
+
|
|
1333
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
1334
|
+
|
|
1335
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1336
|
+
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.
|
|
1337
|
+
|
|
1338
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
1215
1339
|
|
|
1216
|
-
relations : typing.Optional[Relations]
|
|
1217
1340
|
|
|
1218
1341
|
request_options : typing.Optional[RequestOptions]
|
|
1219
1342
|
Request-specific configuration.
|
|
@@ -1232,12 +1355,9 @@ class RawUploadClient:
|
|
|
1232
1355
|
"sub_tenant_id": sub_tenant_id,
|
|
1233
1356
|
},
|
|
1234
1357
|
json={
|
|
1235
|
-
"
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
1239
|
-
object_=relations, annotation=Relations, direction="write"
|
|
1240
|
-
),
|
|
1358
|
+
"content": content,
|
|
1359
|
+
"tenant_metadata": tenant_metadata,
|
|
1360
|
+
"document_metadata": document_metadata,
|
|
1241
1361
|
},
|
|
1242
1362
|
headers={
|
|
1243
1363
|
"content-type": "application/json",
|
|
@@ -1347,15 +1467,25 @@ class RawUploadClient:
|
|
|
1347
1467
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1348
1468
|
) -> HttpResponse[SingleUploadData]:
|
|
1349
1469
|
"""
|
|
1470
|
+
Upload pre-computed embeddings for advanced similarity search.
|
|
1471
|
+
|
|
1472
|
+
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.
|
|
1473
|
+
|
|
1474
|
+
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.
|
|
1475
|
+
|
|
1350
1476
|
Parameters
|
|
1351
1477
|
----------
|
|
1352
1478
|
tenant_id : str
|
|
1479
|
+
Unique identifier for the tenant/organization
|
|
1353
1480
|
|
|
1354
1481
|
embeddings : typing.Sequence[typing.Sequence[float]]
|
|
1482
|
+
The embeddings of source you want to index
|
|
1355
1483
|
|
|
1356
1484
|
sub_tenant_id : typing.Optional[str]
|
|
1485
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1357
1486
|
|
|
1358
1487
|
file_id : typing.Optional[str]
|
|
1488
|
+
The Source ID of the target source you want to index
|
|
1359
1489
|
|
|
1360
1490
|
request_options : typing.Optional[RequestOptions]
|
|
1361
1491
|
Request-specific configuration.
|
|
@@ -1478,19 +1608,27 @@ class RawUploadClient:
|
|
|
1478
1608
|
self,
|
|
1479
1609
|
*,
|
|
1480
1610
|
tenant_id: str,
|
|
1481
|
-
embeddings: typing.Dict[str, typing.Sequence[float]],
|
|
1482
1611
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1612
|
+
embeddings: typing.Optional[typing.Dict[str, typing.Sequence[float]]] = OMIT,
|
|
1483
1613
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1484
1614
|
) -> HttpResponse[SingleUploadData]:
|
|
1485
1615
|
"""
|
|
1616
|
+
Update existing embeddings with new vector representations.
|
|
1617
|
+
|
|
1618
|
+
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.
|
|
1619
|
+
|
|
1620
|
+
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.
|
|
1621
|
+
|
|
1486
1622
|
Parameters
|
|
1487
1623
|
----------
|
|
1488
1624
|
tenant_id : str
|
|
1489
|
-
|
|
1490
|
-
embeddings : typing.Dict[str, typing.Sequence[float]]
|
|
1491
|
-
Dictionary with chunk_id as key and embedding array as value
|
|
1625
|
+
Unique identifier for the tenant/organization
|
|
1492
1626
|
|
|
1493
1627
|
sub_tenant_id : typing.Optional[str]
|
|
1628
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1629
|
+
|
|
1630
|
+
embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
|
|
1631
|
+
The embeddings of source you want to index
|
|
1494
1632
|
|
|
1495
1633
|
request_options : typing.Optional[RequestOptions]
|
|
1496
1634
|
Request-specific configuration.
|
|
@@ -1615,21 +1753,28 @@ class RawUploadClient:
|
|
|
1615
1753
|
tenant_id: str,
|
|
1616
1754
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1617
1755
|
file_id: typing.Optional[str] = None,
|
|
1618
|
-
relations: typing.Optional[str] = OMIT,
|
|
1619
1756
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1620
1757
|
) -> HttpResponse[SingleUploadData]:
|
|
1621
1758
|
"""
|
|
1759
|
+
Extract and index content from web pages automatically.
|
|
1760
|
+
|
|
1761
|
+
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.
|
|
1762
|
+
|
|
1763
|
+
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.
|
|
1764
|
+
|
|
1622
1765
|
Parameters
|
|
1623
1766
|
----------
|
|
1624
1767
|
web_url : str
|
|
1768
|
+
The URL of the webpage to scrape and index
|
|
1625
1769
|
|
|
1626
1770
|
tenant_id : str
|
|
1771
|
+
Unique identifier for the tenant/organization
|
|
1627
1772
|
|
|
1628
1773
|
sub_tenant_id : typing.Optional[str]
|
|
1774
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1629
1775
|
|
|
1630
1776
|
file_id : typing.Optional[str]
|
|
1631
|
-
|
|
1632
|
-
relations : typing.Optional[str]
|
|
1777
|
+
Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
|
|
1633
1778
|
|
|
1634
1779
|
request_options : typing.Optional[RequestOptions]
|
|
1635
1780
|
Request-specific configuration.
|
|
@@ -1648,9 +1793,7 @@ class RawUploadClient:
|
|
|
1648
1793
|
"sub_tenant_id": sub_tenant_id,
|
|
1649
1794
|
"file_id": file_id,
|
|
1650
1795
|
},
|
|
1651
|
-
data={
|
|
1652
|
-
"relations": relations,
|
|
1653
|
-
},
|
|
1796
|
+
data={},
|
|
1654
1797
|
headers={
|
|
1655
1798
|
"content-type": "application/x-www-form-urlencoded",
|
|
1656
1799
|
},
|
|
@@ -1756,21 +1899,28 @@ class RawUploadClient:
|
|
|
1756
1899
|
source_id: str,
|
|
1757
1900
|
tenant_id: str,
|
|
1758
1901
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1759
|
-
relations: typing.Optional[str] = OMIT,
|
|
1760
1902
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1761
1903
|
) -> HttpResponse[SingleUploadData]:
|
|
1762
1904
|
"""
|
|
1905
|
+
Update web scraping content with fresh data from the source URL.
|
|
1906
|
+
|
|
1907
|
+
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.
|
|
1908
|
+
|
|
1909
|
+
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.
|
|
1910
|
+
|
|
1763
1911
|
Parameters
|
|
1764
1912
|
----------
|
|
1765
1913
|
web_url : str
|
|
1914
|
+
The URL of the webpage to re-scrape
|
|
1766
1915
|
|
|
1767
1916
|
source_id : str
|
|
1917
|
+
The file ID of the existing web scraping job to update
|
|
1768
1918
|
|
|
1769
1919
|
tenant_id : str
|
|
1920
|
+
Unique identifier for the tenant/organization
|
|
1770
1921
|
|
|
1771
1922
|
sub_tenant_id : typing.Optional[str]
|
|
1772
|
-
|
|
1773
|
-
relations : typing.Optional[str]
|
|
1923
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1774
1924
|
|
|
1775
1925
|
request_options : typing.Optional[RequestOptions]
|
|
1776
1926
|
Request-specific configuration.
|
|
@@ -1789,9 +1939,7 @@ class RawUploadClient:
|
|
|
1789
1939
|
"tenant_id": tenant_id,
|
|
1790
1940
|
"sub_tenant_id": sub_tenant_id,
|
|
1791
1941
|
},
|
|
1792
|
-
data={
|
|
1793
|
-
"relations": relations,
|
|
1794
|
-
},
|
|
1942
|
+
data={},
|
|
1795
1943
|
headers={
|
|
1796
1944
|
"content-type": "application/x-www-form-urlencoded",
|
|
1797
1945
|
},
|
|
@@ -1899,13 +2047,22 @@ class RawUploadClient:
|
|
|
1899
2047
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1900
2048
|
) -> HttpResponse[typing.Optional[typing.Any]]:
|
|
1901
2049
|
"""
|
|
2050
|
+
Remove documents and content from your knowledge base.
|
|
2051
|
+
|
|
2052
|
+
This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
|
|
2053
|
+
|
|
2054
|
+
Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
|
|
2055
|
+
|
|
1902
2056
|
Parameters
|
|
1903
2057
|
----------
|
|
1904
2058
|
tenant_id : str
|
|
2059
|
+
Unique identifier for the tenant/organization
|
|
1905
2060
|
|
|
1906
2061
|
source_ids : typing.Sequence[str]
|
|
2062
|
+
List of source IDs to delete
|
|
1907
2063
|
|
|
1908
2064
|
sub_tenant_id : typing.Optional[str]
|
|
2065
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1909
2066
|
|
|
1910
2067
|
request_options : typing.Optional[RequestOptions]
|
|
1911
2068
|
Request-specific configuration.
|
|
@@ -1966,13 +2123,22 @@ class RawUploadClient:
|
|
|
1966
2123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1967
2124
|
) -> HttpResponse[typing.Optional[typing.Any]]:
|
|
1968
2125
|
"""
|
|
2126
|
+
Remove documents and content from your knowledge base.
|
|
2127
|
+
|
|
2128
|
+
This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
|
|
2129
|
+
|
|
2130
|
+
Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
|
|
2131
|
+
|
|
1969
2132
|
Parameters
|
|
1970
2133
|
----------
|
|
1971
2134
|
tenant_id : str
|
|
2135
|
+
Unique identifier for the tenant/organization
|
|
1972
2136
|
|
|
1973
2137
|
source_ids : typing.Sequence[str]
|
|
2138
|
+
List of source IDs to delete
|
|
1974
2139
|
|
|
1975
2140
|
sub_tenant_id : typing.Optional[str]
|
|
2141
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1976
2142
|
|
|
1977
2143
|
request_options : typing.Optional[RequestOptions]
|
|
1978
2144
|
Request-specific configuration.
|
|
@@ -2032,16 +2198,19 @@ class RawUploadClient:
|
|
|
2032
2198
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2033
2199
|
) -> HttpResponse[ProcessingStatus]:
|
|
2034
2200
|
"""
|
|
2035
|
-
|
|
2201
|
+
Check the current processing status of your uploaded content.
|
|
2202
|
+
|
|
2203
|
+
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.
|
|
2036
2204
|
|
|
2037
|
-
|
|
2038
|
-
ProcessingStatusResponse: Processing status information
|
|
2205
|
+
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
2039
2206
|
|
|
2040
2207
|
Parameters
|
|
2041
2208
|
----------
|
|
2042
2209
|
file_id : str
|
|
2210
|
+
The file ID to check processing status for
|
|
2043
2211
|
|
|
2044
2212
|
tenant_id : typing.Optional[str]
|
|
2213
|
+
Unique identifier for the tenant/organization
|
|
2045
2214
|
|
|
2046
2215
|
request_options : typing.Optional[RequestOptions]
|
|
2047
2216
|
Request-specific configuration.
|
|
@@ -2165,24 +2334,38 @@ class AsyncRawUploadClient:
|
|
|
2165
2334
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2166
2335
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2167
2336
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2168
|
-
relations: typing.Optional[str] = OMIT,
|
|
2169
2337
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2170
2338
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2171
2339
|
"""
|
|
2340
|
+
Upload multiple documents simultaneously for efficient bulk processing.
|
|
2341
|
+
|
|
2342
|
+
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.
|
|
2343
|
+
|
|
2344
|
+
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.
|
|
2345
|
+
|
|
2172
2346
|
Parameters
|
|
2173
2347
|
----------
|
|
2174
2348
|
tenant_id : str
|
|
2349
|
+
Unique identifier for the tenant/organization
|
|
2175
2350
|
|
|
2176
2351
|
files : typing.List[core.File]
|
|
2177
2352
|
See core.File for more documentation
|
|
2178
2353
|
|
|
2179
2354
|
sub_tenant_id : typing.Optional[str]
|
|
2355
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
2180
2356
|
|
|
2181
2357
|
tenant_metadata : typing.Optional[str]
|
|
2358
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
2359
|
+
|
|
2360
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
2361
|
+
|
|
2182
2362
|
|
|
2183
2363
|
document_metadata : typing.Optional[str]
|
|
2364
|
+
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.
|
|
2365
|
+
|
|
2366
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
2367
|
+
|
|
2184
2368
|
|
|
2185
|
-
relations : typing.Optional[str]
|
|
2186
2369
|
|
|
2187
2370
|
request_options : typing.Optional[RequestOptions]
|
|
2188
2371
|
Request-specific configuration.
|
|
@@ -2202,7 +2385,6 @@ class AsyncRawUploadClient:
|
|
|
2202
2385
|
data={
|
|
2203
2386
|
"tenant_metadata": tenant_metadata,
|
|
2204
2387
|
"document_metadata": document_metadata,
|
|
2205
|
-
"relations": relations,
|
|
2206
2388
|
},
|
|
2207
2389
|
files={
|
|
2208
2390
|
"files": files,
|
|
@@ -2312,26 +2494,41 @@ class AsyncRawUploadClient:
|
|
|
2312
2494
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
2313
2495
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2314
2496
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2315
|
-
relations: typing.Optional[str] = OMIT,
|
|
2316
2497
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2317
2498
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2318
2499
|
"""
|
|
2500
|
+
Update multiple existing documents with new content and metadata.
|
|
2501
|
+
|
|
2502
|
+
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.
|
|
2503
|
+
|
|
2504
|
+
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.
|
|
2505
|
+
|
|
2319
2506
|
Parameters
|
|
2320
2507
|
----------
|
|
2321
2508
|
tenant_id : str
|
|
2509
|
+
Unique identifier for the tenant/organization
|
|
2322
2510
|
|
|
2323
2511
|
files : typing.List[core.File]
|
|
2324
2512
|
See core.File for more documentation
|
|
2325
2513
|
|
|
2326
2514
|
sub_tenant_id : typing.Optional[str]
|
|
2515
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
2327
2516
|
|
|
2328
2517
|
source_ids : typing.Optional[typing.List[str]]
|
|
2518
|
+
List of source IDs corresponding to the files being updated
|
|
2329
2519
|
|
|
2330
2520
|
tenant_metadata : typing.Optional[str]
|
|
2521
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
2522
|
+
|
|
2523
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
2524
|
+
|
|
2331
2525
|
|
|
2332
2526
|
document_metadata : typing.Optional[str]
|
|
2527
|
+
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.
|
|
2528
|
+
|
|
2529
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
2530
|
+
|
|
2333
2531
|
|
|
2334
|
-
relations : typing.Optional[str]
|
|
2335
2532
|
|
|
2336
2533
|
request_options : typing.Optional[RequestOptions]
|
|
2337
2534
|
Request-specific configuration.
|
|
@@ -2352,7 +2549,6 @@ class AsyncRawUploadClient:
|
|
|
2352
2549
|
"source_ids": source_ids,
|
|
2353
2550
|
"tenant_metadata": tenant_metadata,
|
|
2354
2551
|
"document_metadata": document_metadata,
|
|
2355
|
-
"relations": relations,
|
|
2356
2552
|
},
|
|
2357
2553
|
files={
|
|
2358
2554
|
"files": files,
|
|
@@ -2461,24 +2657,38 @@ class AsyncRawUploadClient:
|
|
|
2461
2657
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2462
2658
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2463
2659
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2464
|
-
relations: typing.Optional[str] = OMIT,
|
|
2465
2660
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2466
2661
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2467
2662
|
"""
|
|
2663
|
+
Upload a single document for processing and indexing into your knowledge base.
|
|
2664
|
+
|
|
2665
|
+
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.
|
|
2666
|
+
|
|
2667
|
+
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.
|
|
2668
|
+
|
|
2468
2669
|
Parameters
|
|
2469
2670
|
----------
|
|
2470
2671
|
tenant_id : str
|
|
2672
|
+
Unique identifier for the tenant/organization
|
|
2471
2673
|
|
|
2472
2674
|
file : core.File
|
|
2473
2675
|
See core.File for more documentation
|
|
2474
2676
|
|
|
2475
2677
|
sub_tenant_id : typing.Optional[str]
|
|
2678
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
2476
2679
|
|
|
2477
2680
|
tenant_metadata : typing.Optional[str]
|
|
2681
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
2682
|
+
|
|
2683
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
2684
|
+
|
|
2478
2685
|
|
|
2479
2686
|
document_metadata : typing.Optional[str]
|
|
2687
|
+
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.
|
|
2688
|
+
|
|
2689
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
2690
|
+
|
|
2480
2691
|
|
|
2481
|
-
relations : typing.Optional[str]
|
|
2482
2692
|
|
|
2483
2693
|
request_options : typing.Optional[RequestOptions]
|
|
2484
2694
|
Request-specific configuration.
|
|
@@ -2498,7 +2708,6 @@ class AsyncRawUploadClient:
|
|
|
2498
2708
|
data={
|
|
2499
2709
|
"tenant_metadata": tenant_metadata,
|
|
2500
2710
|
"document_metadata": document_metadata,
|
|
2501
|
-
"relations": relations,
|
|
2502
2711
|
},
|
|
2503
2712
|
files={
|
|
2504
2713
|
"file": file,
|
|
@@ -2608,26 +2817,41 @@ class AsyncRawUploadClient:
|
|
|
2608
2817
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2609
2818
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2610
2819
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2611
|
-
relations: typing.Optional[str] = OMIT,
|
|
2612
2820
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2613
2821
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2614
2822
|
"""
|
|
2823
|
+
Replace an existing document with updated content.
|
|
2824
|
+
|
|
2825
|
+
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.
|
|
2826
|
+
|
|
2827
|
+
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.
|
|
2828
|
+
|
|
2615
2829
|
Parameters
|
|
2616
2830
|
----------
|
|
2617
2831
|
source_id : str
|
|
2832
|
+
The source ID of the document to update
|
|
2618
2833
|
|
|
2619
2834
|
tenant_id : str
|
|
2835
|
+
Unique identifier for the tenant/organization
|
|
2620
2836
|
|
|
2621
2837
|
file : core.File
|
|
2622
2838
|
See core.File for more documentation
|
|
2623
2839
|
|
|
2624
2840
|
sub_tenant_id : typing.Optional[str]
|
|
2841
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
2625
2842
|
|
|
2626
2843
|
tenant_metadata : typing.Optional[str]
|
|
2844
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
2845
|
+
|
|
2846
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
2847
|
+
|
|
2627
2848
|
|
|
2628
2849
|
document_metadata : typing.Optional[str]
|
|
2850
|
+
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.
|
|
2851
|
+
|
|
2852
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
2853
|
+
|
|
2629
2854
|
|
|
2630
|
-
relations : typing.Optional[str]
|
|
2631
2855
|
|
|
2632
2856
|
request_options : typing.Optional[RequestOptions]
|
|
2633
2857
|
Request-specific configuration.
|
|
@@ -2648,7 +2872,6 @@ class AsyncRawUploadClient:
|
|
|
2648
2872
|
data={
|
|
2649
2873
|
"tenant_metadata": tenant_metadata,
|
|
2650
2874
|
"document_metadata": document_metadata,
|
|
2651
|
-
"relations": relations,
|
|
2652
2875
|
},
|
|
2653
2876
|
files={
|
|
2654
2877
|
"file": file,
|
|
@@ -2758,13 +2981,21 @@ class AsyncRawUploadClient:
|
|
|
2758
2981
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2759
2982
|
) -> AsyncHttpResponse[AppSourcesUploadData]:
|
|
2760
2983
|
"""
|
|
2984
|
+
Upload structured data from applications or APIs for indexing.
|
|
2985
|
+
|
|
2986
|
+
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
|
|
2987
|
+
|
|
2988
|
+
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.
|
|
2989
|
+
|
|
2761
2990
|
Parameters
|
|
2762
2991
|
----------
|
|
2763
2992
|
tenant_id : str
|
|
2993
|
+
Unique identifier for the tenant/organization
|
|
2764
2994
|
|
|
2765
2995
|
request : typing.Sequence[SourceModel]
|
|
2766
2996
|
|
|
2767
2997
|
sub_tenant_id : typing.Optional[str]
|
|
2998
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
2768
2999
|
|
|
2769
3000
|
request_options : typing.Optional[RequestOptions]
|
|
2770
3001
|
Request-specific configuration.
|
|
@@ -2886,24 +3117,40 @@ class AsyncRawUploadClient:
|
|
|
2886
3117
|
self,
|
|
2887
3118
|
*,
|
|
2888
3119
|
tenant_id: str,
|
|
2889
|
-
|
|
3120
|
+
content: str,
|
|
2890
3121
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2891
|
-
|
|
3122
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3123
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
2892
3124
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2893
3125
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2894
3126
|
"""
|
|
2895
|
-
Upload markdown content
|
|
2896
|
-
|
|
3127
|
+
Upload text or markdown content directly for processing.
|
|
3128
|
+
|
|
3129
|
+
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.
|
|
3130
|
+
|
|
3131
|
+
You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
|
|
2897
3132
|
|
|
2898
3133
|
Parameters
|
|
2899
3134
|
----------
|
|
2900
3135
|
tenant_id : str
|
|
3136
|
+
Unique identifier for the tenant/organization
|
|
2901
3137
|
|
|
2902
|
-
|
|
3138
|
+
content : str
|
|
3139
|
+
The text or markdown content to upload
|
|
2903
3140
|
|
|
2904
3141
|
sub_tenant_id : typing.Optional[str]
|
|
3142
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3143
|
+
|
|
3144
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3145
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
3146
|
+
|
|
3147
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
3148
|
+
|
|
3149
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3150
|
+
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.
|
|
3151
|
+
|
|
3152
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
2905
3153
|
|
|
2906
|
-
relations : typing.Optional[Relations]
|
|
2907
3154
|
|
|
2908
3155
|
request_options : typing.Optional[RequestOptions]
|
|
2909
3156
|
Request-specific configuration.
|
|
@@ -2921,12 +3168,9 @@ class AsyncRawUploadClient:
|
|
|
2921
3168
|
"sub_tenant_id": sub_tenant_id,
|
|
2922
3169
|
},
|
|
2923
3170
|
json={
|
|
2924
|
-
"
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
2928
|
-
object_=relations, annotation=Relations, direction="write"
|
|
2929
|
-
),
|
|
3171
|
+
"content": content,
|
|
3172
|
+
"tenant_metadata": tenant_metadata,
|
|
3173
|
+
"document_metadata": document_metadata,
|
|
2930
3174
|
},
|
|
2931
3175
|
headers={
|
|
2932
3176
|
"content-type": "application/json",
|
|
@@ -3030,24 +3274,40 @@ class AsyncRawUploadClient:
|
|
|
3030
3274
|
self,
|
|
3031
3275
|
*,
|
|
3032
3276
|
tenant_id: str,
|
|
3033
|
-
|
|
3277
|
+
content: str,
|
|
3034
3278
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3035
|
-
|
|
3279
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3280
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3036
3281
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3037
3282
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3038
3283
|
"""
|
|
3039
|
-
Upload markdown content
|
|
3040
|
-
|
|
3284
|
+
Upload text or markdown content directly for processing.
|
|
3285
|
+
|
|
3286
|
+
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.
|
|
3287
|
+
|
|
3288
|
+
You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
|
|
3041
3289
|
|
|
3042
3290
|
Parameters
|
|
3043
3291
|
----------
|
|
3044
3292
|
tenant_id : str
|
|
3293
|
+
Unique identifier for the tenant/organization
|
|
3045
3294
|
|
|
3046
|
-
|
|
3295
|
+
content : str
|
|
3296
|
+
The text or markdown content to upload
|
|
3047
3297
|
|
|
3048
3298
|
sub_tenant_id : typing.Optional[str]
|
|
3299
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3300
|
+
|
|
3301
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3302
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
3303
|
+
|
|
3304
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
3305
|
+
|
|
3306
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3307
|
+
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.
|
|
3308
|
+
|
|
3309
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
3049
3310
|
|
|
3050
|
-
relations : typing.Optional[Relations]
|
|
3051
3311
|
|
|
3052
3312
|
request_options : typing.Optional[RequestOptions]
|
|
3053
3313
|
Request-specific configuration.
|
|
@@ -3065,12 +3325,9 @@ class AsyncRawUploadClient:
|
|
|
3065
3325
|
"sub_tenant_id": sub_tenant_id,
|
|
3066
3326
|
},
|
|
3067
3327
|
json={
|
|
3068
|
-
"
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3072
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3073
|
-
),
|
|
3328
|
+
"content": content,
|
|
3329
|
+
"tenant_metadata": tenant_metadata,
|
|
3330
|
+
"document_metadata": document_metadata,
|
|
3074
3331
|
},
|
|
3075
3332
|
headers={
|
|
3076
3333
|
"content-type": "application/json",
|
|
@@ -3175,23 +3432,43 @@ class AsyncRawUploadClient:
|
|
|
3175
3432
|
*,
|
|
3176
3433
|
source_id: str,
|
|
3177
3434
|
tenant_id: str,
|
|
3178
|
-
|
|
3435
|
+
content: str,
|
|
3179
3436
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3180
|
-
|
|
3437
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3438
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3181
3439
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3182
3440
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3183
3441
|
"""
|
|
3442
|
+
Update existing text or markdown content with new information.
|
|
3443
|
+
|
|
3444
|
+
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.
|
|
3445
|
+
|
|
3446
|
+
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.
|
|
3447
|
+
|
|
3184
3448
|
Parameters
|
|
3185
3449
|
----------
|
|
3186
3450
|
source_id : str
|
|
3451
|
+
The source ID of the document to update
|
|
3187
3452
|
|
|
3188
3453
|
tenant_id : str
|
|
3454
|
+
Unique identifier for the tenant/organization
|
|
3189
3455
|
|
|
3190
|
-
|
|
3456
|
+
content : str
|
|
3457
|
+
The text or markdown content to upload
|
|
3191
3458
|
|
|
3192
3459
|
sub_tenant_id : typing.Optional[str]
|
|
3460
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3461
|
+
|
|
3462
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3463
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
3464
|
+
|
|
3465
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
3466
|
+
|
|
3467
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3468
|
+
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.
|
|
3469
|
+
|
|
3470
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
3193
3471
|
|
|
3194
|
-
relations : typing.Optional[Relations]
|
|
3195
3472
|
|
|
3196
3473
|
request_options : typing.Optional[RequestOptions]
|
|
3197
3474
|
Request-specific configuration.
|
|
@@ -3210,12 +3487,9 @@ class AsyncRawUploadClient:
|
|
|
3210
3487
|
"sub_tenant_id": sub_tenant_id,
|
|
3211
3488
|
},
|
|
3212
3489
|
json={
|
|
3213
|
-
"
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3217
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3218
|
-
),
|
|
3490
|
+
"content": content,
|
|
3491
|
+
"tenant_metadata": tenant_metadata,
|
|
3492
|
+
"document_metadata": document_metadata,
|
|
3219
3493
|
},
|
|
3220
3494
|
headers={
|
|
3221
3495
|
"content-type": "application/json",
|
|
@@ -3320,23 +3594,43 @@ class AsyncRawUploadClient:
|
|
|
3320
3594
|
*,
|
|
3321
3595
|
source_id: str,
|
|
3322
3596
|
tenant_id: str,
|
|
3323
|
-
|
|
3597
|
+
content: str,
|
|
3324
3598
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3325
|
-
|
|
3599
|
+
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3600
|
+
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3326
3601
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3327
3602
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3328
3603
|
"""
|
|
3604
|
+
Update existing text or markdown content with new information.
|
|
3605
|
+
|
|
3606
|
+
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.
|
|
3607
|
+
|
|
3608
|
+
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.
|
|
3609
|
+
|
|
3329
3610
|
Parameters
|
|
3330
3611
|
----------
|
|
3331
3612
|
source_id : str
|
|
3613
|
+
The source ID of the document to update
|
|
3332
3614
|
|
|
3333
3615
|
tenant_id : str
|
|
3616
|
+
Unique identifier for the tenant/organization
|
|
3334
3617
|
|
|
3335
|
-
|
|
3618
|
+
content : str
|
|
3619
|
+
The text or markdown content to upload
|
|
3336
3620
|
|
|
3337
3621
|
sub_tenant_id : typing.Optional[str]
|
|
3622
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3623
|
+
|
|
3624
|
+
tenant_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3625
|
+
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
3626
|
+
|
|
3627
|
+
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
3628
|
+
|
|
3629
|
+
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3630
|
+
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.
|
|
3631
|
+
|
|
3632
|
+
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
3338
3633
|
|
|
3339
|
-
relations : typing.Optional[Relations]
|
|
3340
3634
|
|
|
3341
3635
|
request_options : typing.Optional[RequestOptions]
|
|
3342
3636
|
Request-specific configuration.
|
|
@@ -3355,12 +3649,9 @@ class AsyncRawUploadClient:
|
|
|
3355
3649
|
"sub_tenant_id": sub_tenant_id,
|
|
3356
3650
|
},
|
|
3357
3651
|
json={
|
|
3358
|
-
"
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3362
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3363
|
-
),
|
|
3652
|
+
"content": content,
|
|
3653
|
+
"tenant_metadata": tenant_metadata,
|
|
3654
|
+
"document_metadata": document_metadata,
|
|
3364
3655
|
},
|
|
3365
3656
|
headers={
|
|
3366
3657
|
"content-type": "application/json",
|
|
@@ -3470,15 +3761,25 @@ class AsyncRawUploadClient:
|
|
|
3470
3761
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3471
3762
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3472
3763
|
"""
|
|
3764
|
+
Upload pre-computed embeddings for advanced similarity search.
|
|
3765
|
+
|
|
3766
|
+
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.
|
|
3767
|
+
|
|
3768
|
+
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.
|
|
3769
|
+
|
|
3473
3770
|
Parameters
|
|
3474
3771
|
----------
|
|
3475
3772
|
tenant_id : str
|
|
3773
|
+
Unique identifier for the tenant/organization
|
|
3476
3774
|
|
|
3477
3775
|
embeddings : typing.Sequence[typing.Sequence[float]]
|
|
3776
|
+
The embeddings of source you want to index
|
|
3478
3777
|
|
|
3479
3778
|
sub_tenant_id : typing.Optional[str]
|
|
3779
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3480
3780
|
|
|
3481
3781
|
file_id : typing.Optional[str]
|
|
3782
|
+
The Source ID of the target source you want to index
|
|
3482
3783
|
|
|
3483
3784
|
request_options : typing.Optional[RequestOptions]
|
|
3484
3785
|
Request-specific configuration.
|
|
@@ -3601,19 +3902,27 @@ class AsyncRawUploadClient:
|
|
|
3601
3902
|
self,
|
|
3602
3903
|
*,
|
|
3603
3904
|
tenant_id: str,
|
|
3604
|
-
embeddings: typing.Dict[str, typing.Sequence[float]],
|
|
3605
3905
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3906
|
+
embeddings: typing.Optional[typing.Dict[str, typing.Sequence[float]]] = OMIT,
|
|
3606
3907
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3607
3908
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3608
3909
|
"""
|
|
3910
|
+
Update existing embeddings with new vector representations.
|
|
3911
|
+
|
|
3912
|
+
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.
|
|
3913
|
+
|
|
3914
|
+
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.
|
|
3915
|
+
|
|
3609
3916
|
Parameters
|
|
3610
3917
|
----------
|
|
3611
3918
|
tenant_id : str
|
|
3612
|
-
|
|
3613
|
-
embeddings : typing.Dict[str, typing.Sequence[float]]
|
|
3614
|
-
Dictionary with chunk_id as key and embedding array as value
|
|
3919
|
+
Unique identifier for the tenant/organization
|
|
3615
3920
|
|
|
3616
3921
|
sub_tenant_id : typing.Optional[str]
|
|
3922
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3923
|
+
|
|
3924
|
+
embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
|
|
3925
|
+
The embeddings of source you want to index
|
|
3617
3926
|
|
|
3618
3927
|
request_options : typing.Optional[RequestOptions]
|
|
3619
3928
|
Request-specific configuration.
|
|
@@ -3738,21 +4047,28 @@ class AsyncRawUploadClient:
|
|
|
3738
4047
|
tenant_id: str,
|
|
3739
4048
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3740
4049
|
file_id: typing.Optional[str] = None,
|
|
3741
|
-
relations: typing.Optional[str] = OMIT,
|
|
3742
4050
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3743
4051
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3744
4052
|
"""
|
|
4053
|
+
Extract and index content from web pages automatically.
|
|
4054
|
+
|
|
4055
|
+
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.
|
|
4056
|
+
|
|
4057
|
+
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.
|
|
4058
|
+
|
|
3745
4059
|
Parameters
|
|
3746
4060
|
----------
|
|
3747
4061
|
web_url : str
|
|
4062
|
+
The URL of the webpage to scrape and index
|
|
3748
4063
|
|
|
3749
4064
|
tenant_id : str
|
|
4065
|
+
Unique identifier for the tenant/organization
|
|
3750
4066
|
|
|
3751
4067
|
sub_tenant_id : typing.Optional[str]
|
|
4068
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3752
4069
|
|
|
3753
4070
|
file_id : typing.Optional[str]
|
|
3754
|
-
|
|
3755
|
-
relations : typing.Optional[str]
|
|
4071
|
+
Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
|
|
3756
4072
|
|
|
3757
4073
|
request_options : typing.Optional[RequestOptions]
|
|
3758
4074
|
Request-specific configuration.
|
|
@@ -3771,9 +4087,7 @@ class AsyncRawUploadClient:
|
|
|
3771
4087
|
"sub_tenant_id": sub_tenant_id,
|
|
3772
4088
|
"file_id": file_id,
|
|
3773
4089
|
},
|
|
3774
|
-
data={
|
|
3775
|
-
"relations": relations,
|
|
3776
|
-
},
|
|
4090
|
+
data={},
|
|
3777
4091
|
headers={
|
|
3778
4092
|
"content-type": "application/x-www-form-urlencoded",
|
|
3779
4093
|
},
|
|
@@ -3879,21 +4193,28 @@ class AsyncRawUploadClient:
|
|
|
3879
4193
|
source_id: str,
|
|
3880
4194
|
tenant_id: str,
|
|
3881
4195
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3882
|
-
relations: typing.Optional[str] = OMIT,
|
|
3883
4196
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3884
4197
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3885
4198
|
"""
|
|
4199
|
+
Update web scraping content with fresh data from the source URL.
|
|
4200
|
+
|
|
4201
|
+
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.
|
|
4202
|
+
|
|
4203
|
+
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.
|
|
4204
|
+
|
|
3886
4205
|
Parameters
|
|
3887
4206
|
----------
|
|
3888
4207
|
web_url : str
|
|
4208
|
+
The URL of the webpage to re-scrape
|
|
3889
4209
|
|
|
3890
4210
|
source_id : str
|
|
4211
|
+
The file ID of the existing web scraping job to update
|
|
3891
4212
|
|
|
3892
4213
|
tenant_id : str
|
|
4214
|
+
Unique identifier for the tenant/organization
|
|
3893
4215
|
|
|
3894
4216
|
sub_tenant_id : typing.Optional[str]
|
|
3895
|
-
|
|
3896
|
-
relations : typing.Optional[str]
|
|
4217
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3897
4218
|
|
|
3898
4219
|
request_options : typing.Optional[RequestOptions]
|
|
3899
4220
|
Request-specific configuration.
|
|
@@ -3912,9 +4233,7 @@ class AsyncRawUploadClient:
|
|
|
3912
4233
|
"tenant_id": tenant_id,
|
|
3913
4234
|
"sub_tenant_id": sub_tenant_id,
|
|
3914
4235
|
},
|
|
3915
|
-
data={
|
|
3916
|
-
"relations": relations,
|
|
3917
|
-
},
|
|
4236
|
+
data={},
|
|
3918
4237
|
headers={
|
|
3919
4238
|
"content-type": "application/x-www-form-urlencoded",
|
|
3920
4239
|
},
|
|
@@ -4022,13 +4341,22 @@ class AsyncRawUploadClient:
|
|
|
4022
4341
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4023
4342
|
) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
|
|
4024
4343
|
"""
|
|
4344
|
+
Remove documents and content from your knowledge base.
|
|
4345
|
+
|
|
4346
|
+
This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
|
|
4347
|
+
|
|
4348
|
+
Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
|
|
4349
|
+
|
|
4025
4350
|
Parameters
|
|
4026
4351
|
----------
|
|
4027
4352
|
tenant_id : str
|
|
4353
|
+
Unique identifier for the tenant/organization
|
|
4028
4354
|
|
|
4029
4355
|
source_ids : typing.Sequence[str]
|
|
4356
|
+
List of source IDs to delete
|
|
4030
4357
|
|
|
4031
4358
|
sub_tenant_id : typing.Optional[str]
|
|
4359
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
4032
4360
|
|
|
4033
4361
|
request_options : typing.Optional[RequestOptions]
|
|
4034
4362
|
Request-specific configuration.
|
|
@@ -4089,13 +4417,22 @@ class AsyncRawUploadClient:
|
|
|
4089
4417
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4090
4418
|
) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
|
|
4091
4419
|
"""
|
|
4420
|
+
Remove documents and content from your knowledge base.
|
|
4421
|
+
|
|
4422
|
+
This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
|
|
4423
|
+
|
|
4424
|
+
Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
|
|
4425
|
+
|
|
4092
4426
|
Parameters
|
|
4093
4427
|
----------
|
|
4094
4428
|
tenant_id : str
|
|
4429
|
+
Unique identifier for the tenant/organization
|
|
4095
4430
|
|
|
4096
4431
|
source_ids : typing.Sequence[str]
|
|
4432
|
+
List of source IDs to delete
|
|
4097
4433
|
|
|
4098
4434
|
sub_tenant_id : typing.Optional[str]
|
|
4435
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
4099
4436
|
|
|
4100
4437
|
request_options : typing.Optional[RequestOptions]
|
|
4101
4438
|
Request-specific configuration.
|
|
@@ -4155,16 +4492,19 @@ class AsyncRawUploadClient:
|
|
|
4155
4492
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4156
4493
|
) -> AsyncHttpResponse[ProcessingStatus]:
|
|
4157
4494
|
"""
|
|
4158
|
-
|
|
4495
|
+
Check the current processing status of your uploaded content.
|
|
4496
|
+
|
|
4497
|
+
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.
|
|
4159
4498
|
|
|
4160
|
-
|
|
4161
|
-
ProcessingStatusResponse: Processing status information
|
|
4499
|
+
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
4162
4500
|
|
|
4163
4501
|
Parameters
|
|
4164
4502
|
----------
|
|
4165
4503
|
file_id : str
|
|
4504
|
+
The file ID to check processing status for
|
|
4166
4505
|
|
|
4167
4506
|
tenant_id : typing.Optional[str]
|
|
4507
|
+
Unique identifier for the tenant/organization
|
|
4168
4508
|
|
|
4169
4509
|
request_options : typing.Optional[RequestOptions]
|
|
4170
4510
|
Request-specific configuration.
|