usecortex-ai 0.2.1__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 +18 -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 +40 -70
- usecortex_ai/embeddings/raw_client.py +40 -70
- 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 -83
- usecortex_ai/sources/raw_client.py +28 -259
- usecortex_ai/tenant/client.py +152 -4
- usecortex_ai/tenant/raw_client.py +502 -4
- usecortex_ai/types/__init__.py +16 -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 -5
- usecortex_ai/types/processing_status.py +14 -3
- usecortex_ai/types/relations.py +9 -2
- usecortex_ai/types/retrieve_user_memory_response.py +32 -0
- usecortex_ai/types/search_chunk.py +54 -17
- usecortex_ai/types/single_upload_data.py +10 -2
- usecortex_ai/types/source.py +34 -15
- usecortex_ai/types/source_model.py +63 -14
- usecortex_ai/types/sub_tenant_ids_data.py +24 -5
- 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 +394 -79
- usecortex_ai/upload/raw_client.py +398 -103
- 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.1.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.1.dist-info/RECORD +0 -91
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/WHEEL +0 -0
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.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
|
|
|
@@ -41,24 +40,38 @@ class RawUploadClient:
|
|
|
41
40
|
sub_tenant_id: typing.Optional[str] = None,
|
|
42
41
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
43
42
|
document_metadata: typing.Optional[str] = OMIT,
|
|
44
|
-
relations: typing.Optional[str] = OMIT,
|
|
45
43
|
request_options: typing.Optional[RequestOptions] = None,
|
|
46
44
|
) -> HttpResponse[BatchUploadData]:
|
|
47
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
|
+
|
|
48
52
|
Parameters
|
|
49
53
|
----------
|
|
50
54
|
tenant_id : str
|
|
55
|
+
Unique identifier for the tenant/organization
|
|
51
56
|
|
|
52
57
|
files : typing.List[core.File]
|
|
53
58
|
See core.File for more documentation
|
|
54
59
|
|
|
55
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
|
|
56
62
|
|
|
57
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
|
+
|
|
58
68
|
|
|
59
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
|
+
|
|
60
74
|
|
|
61
|
-
relations : typing.Optional[str]
|
|
62
75
|
|
|
63
76
|
request_options : typing.Optional[RequestOptions]
|
|
64
77
|
Request-specific configuration.
|
|
@@ -78,7 +91,6 @@ class RawUploadClient:
|
|
|
78
91
|
data={
|
|
79
92
|
"tenant_metadata": tenant_metadata,
|
|
80
93
|
"document_metadata": document_metadata,
|
|
81
|
-
"relations": relations,
|
|
82
94
|
},
|
|
83
95
|
files={
|
|
84
96
|
"files": files,
|
|
@@ -188,26 +200,41 @@ class RawUploadClient:
|
|
|
188
200
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
189
201
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
190
202
|
document_metadata: typing.Optional[str] = OMIT,
|
|
191
|
-
relations: typing.Optional[str] = OMIT,
|
|
192
203
|
request_options: typing.Optional[RequestOptions] = None,
|
|
193
204
|
) -> HttpResponse[BatchUploadData]:
|
|
194
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
|
+
|
|
195
212
|
Parameters
|
|
196
213
|
----------
|
|
197
214
|
tenant_id : str
|
|
215
|
+
Unique identifier for the tenant/organization
|
|
198
216
|
|
|
199
217
|
files : typing.List[core.File]
|
|
200
218
|
See core.File for more documentation
|
|
201
219
|
|
|
202
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
|
|
203
222
|
|
|
204
223
|
source_ids : typing.Optional[typing.List[str]]
|
|
224
|
+
List of source IDs corresponding to the files being updated
|
|
205
225
|
|
|
206
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
|
+
|
|
207
231
|
|
|
208
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
|
+
|
|
209
237
|
|
|
210
|
-
relations : typing.Optional[str]
|
|
211
238
|
|
|
212
239
|
request_options : typing.Optional[RequestOptions]
|
|
213
240
|
Request-specific configuration.
|
|
@@ -228,7 +255,6 @@ class RawUploadClient:
|
|
|
228
255
|
"source_ids": source_ids,
|
|
229
256
|
"tenant_metadata": tenant_metadata,
|
|
230
257
|
"document_metadata": document_metadata,
|
|
231
|
-
"relations": relations,
|
|
232
258
|
},
|
|
233
259
|
files={
|
|
234
260
|
"files": files,
|
|
@@ -337,24 +363,38 @@ class RawUploadClient:
|
|
|
337
363
|
sub_tenant_id: typing.Optional[str] = None,
|
|
338
364
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
339
365
|
document_metadata: typing.Optional[str] = OMIT,
|
|
340
|
-
relations: typing.Optional[str] = OMIT,
|
|
341
366
|
request_options: typing.Optional[RequestOptions] = None,
|
|
342
367
|
) -> HttpResponse[SingleUploadData]:
|
|
343
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
|
+
|
|
344
375
|
Parameters
|
|
345
376
|
----------
|
|
346
377
|
tenant_id : str
|
|
378
|
+
Unique identifier for the tenant/organization
|
|
347
379
|
|
|
348
380
|
file : core.File
|
|
349
381
|
See core.File for more documentation
|
|
350
382
|
|
|
351
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
|
|
352
385
|
|
|
353
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
|
+
|
|
354
391
|
|
|
355
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
|
+
|
|
356
397
|
|
|
357
|
-
relations : typing.Optional[str]
|
|
358
398
|
|
|
359
399
|
request_options : typing.Optional[RequestOptions]
|
|
360
400
|
Request-specific configuration.
|
|
@@ -374,7 +414,6 @@ class RawUploadClient:
|
|
|
374
414
|
data={
|
|
375
415
|
"tenant_metadata": tenant_metadata,
|
|
376
416
|
"document_metadata": document_metadata,
|
|
377
|
-
"relations": relations,
|
|
378
417
|
},
|
|
379
418
|
files={
|
|
380
419
|
"file": file,
|
|
@@ -484,26 +523,41 @@ class RawUploadClient:
|
|
|
484
523
|
sub_tenant_id: typing.Optional[str] = None,
|
|
485
524
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
486
525
|
document_metadata: typing.Optional[str] = OMIT,
|
|
487
|
-
relations: typing.Optional[str] = OMIT,
|
|
488
526
|
request_options: typing.Optional[RequestOptions] = None,
|
|
489
527
|
) -> HttpResponse[SingleUploadData]:
|
|
490
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
|
+
|
|
491
535
|
Parameters
|
|
492
536
|
----------
|
|
493
537
|
source_id : str
|
|
538
|
+
The source ID of the document to update
|
|
494
539
|
|
|
495
540
|
tenant_id : str
|
|
541
|
+
Unique identifier for the tenant/organization
|
|
496
542
|
|
|
497
543
|
file : core.File
|
|
498
544
|
See core.File for more documentation
|
|
499
545
|
|
|
500
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
|
|
501
548
|
|
|
502
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
|
+
|
|
503
554
|
|
|
504
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
|
+
|
|
505
560
|
|
|
506
|
-
relations : typing.Optional[str]
|
|
507
561
|
|
|
508
562
|
request_options : typing.Optional[RequestOptions]
|
|
509
563
|
Request-specific configuration.
|
|
@@ -524,7 +578,6 @@ class RawUploadClient:
|
|
|
524
578
|
data={
|
|
525
579
|
"tenant_metadata": tenant_metadata,
|
|
526
580
|
"document_metadata": document_metadata,
|
|
527
|
-
"relations": relations,
|
|
528
581
|
},
|
|
529
582
|
files={
|
|
530
583
|
"file": file,
|
|
@@ -634,13 +687,21 @@ class RawUploadClient:
|
|
|
634
687
|
request_options: typing.Optional[RequestOptions] = None,
|
|
635
688
|
) -> HttpResponse[AppSourcesUploadData]:
|
|
636
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
|
+
|
|
637
696
|
Parameters
|
|
638
697
|
----------
|
|
639
698
|
tenant_id : str
|
|
699
|
+
Unique identifier for the tenant/organization
|
|
640
700
|
|
|
641
701
|
request : typing.Sequence[SourceModel]
|
|
642
702
|
|
|
643
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
|
|
644
705
|
|
|
645
706
|
request_options : typing.Optional[RequestOptions]
|
|
646
707
|
Request-specific configuration.
|
|
@@ -766,26 +827,36 @@ class RawUploadClient:
|
|
|
766
827
|
sub_tenant_id: typing.Optional[str] = None,
|
|
767
828
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
768
829
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
769
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
770
830
|
request_options: typing.Optional[RequestOptions] = None,
|
|
771
831
|
) -> HttpResponse[SingleUploadData]:
|
|
772
832
|
"""
|
|
773
|
-
Upload markdown content
|
|
774
|
-
|
|
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.
|
|
775
838
|
|
|
776
839
|
Parameters
|
|
777
840
|
----------
|
|
778
841
|
tenant_id : str
|
|
842
|
+
Unique identifier for the tenant/organization
|
|
779
843
|
|
|
780
844
|
content : str
|
|
845
|
+
The text or markdown content to upload
|
|
781
846
|
|
|
782
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
|
|
783
849
|
|
|
784
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"}"
|
|
785
854
|
|
|
786
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"}"
|
|
787
859
|
|
|
788
|
-
relations : typing.Optional[Relations]
|
|
789
860
|
|
|
790
861
|
request_options : typing.Optional[RequestOptions]
|
|
791
862
|
Request-specific configuration.
|
|
@@ -806,9 +877,6 @@ class RawUploadClient:
|
|
|
806
877
|
"content": content,
|
|
807
878
|
"tenant_metadata": tenant_metadata,
|
|
808
879
|
"document_metadata": document_metadata,
|
|
809
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
810
|
-
object_=relations, annotation=Relations, direction="write"
|
|
811
|
-
),
|
|
812
880
|
},
|
|
813
881
|
headers={
|
|
814
882
|
"content-type": "application/json",
|
|
@@ -916,26 +984,36 @@ class RawUploadClient:
|
|
|
916
984
|
sub_tenant_id: typing.Optional[str] = None,
|
|
917
985
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
918
986
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
919
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
920
987
|
request_options: typing.Optional[RequestOptions] = None,
|
|
921
988
|
) -> HttpResponse[SingleUploadData]:
|
|
922
989
|
"""
|
|
923
|
-
Upload markdown content
|
|
924
|
-
|
|
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.
|
|
925
995
|
|
|
926
996
|
Parameters
|
|
927
997
|
----------
|
|
928
998
|
tenant_id : str
|
|
999
|
+
Unique identifier for the tenant/organization
|
|
929
1000
|
|
|
930
1001
|
content : str
|
|
1002
|
+
The text or markdown content to upload
|
|
931
1003
|
|
|
932
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
|
|
933
1006
|
|
|
934
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"}"
|
|
935
1011
|
|
|
936
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"}"
|
|
937
1016
|
|
|
938
|
-
relations : typing.Optional[Relations]
|
|
939
1017
|
|
|
940
1018
|
request_options : typing.Optional[RequestOptions]
|
|
941
1019
|
Request-specific configuration.
|
|
@@ -956,9 +1034,6 @@ class RawUploadClient:
|
|
|
956
1034
|
"content": content,
|
|
957
1035
|
"tenant_metadata": tenant_metadata,
|
|
958
1036
|
"document_metadata": document_metadata,
|
|
959
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
960
|
-
object_=relations, annotation=Relations, direction="write"
|
|
961
|
-
),
|
|
962
1037
|
},
|
|
963
1038
|
headers={
|
|
964
1039
|
"content-type": "application/json",
|
|
@@ -1067,25 +1142,39 @@ class RawUploadClient:
|
|
|
1067
1142
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1068
1143
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1069
1144
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1070
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
1071
1145
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1072
1146
|
) -> HttpResponse[SingleUploadData]:
|
|
1073
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
|
+
|
|
1074
1154
|
Parameters
|
|
1075
1155
|
----------
|
|
1076
1156
|
source_id : str
|
|
1157
|
+
The source ID of the document to update
|
|
1077
1158
|
|
|
1078
1159
|
tenant_id : str
|
|
1160
|
+
Unique identifier for the tenant/organization
|
|
1079
1161
|
|
|
1080
1162
|
content : str
|
|
1163
|
+
The text or markdown content to upload
|
|
1081
1164
|
|
|
1082
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
|
|
1083
1167
|
|
|
1084
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"}"
|
|
1085
1172
|
|
|
1086
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"}"
|
|
1087
1177
|
|
|
1088
|
-
relations : typing.Optional[Relations]
|
|
1089
1178
|
|
|
1090
1179
|
request_options : typing.Optional[RequestOptions]
|
|
1091
1180
|
Request-specific configuration.
|
|
@@ -1107,9 +1196,6 @@ class RawUploadClient:
|
|
|
1107
1196
|
"content": content,
|
|
1108
1197
|
"tenant_metadata": tenant_metadata,
|
|
1109
1198
|
"document_metadata": document_metadata,
|
|
1110
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
1111
|
-
object_=relations, annotation=Relations, direction="write"
|
|
1112
|
-
),
|
|
1113
1199
|
},
|
|
1114
1200
|
headers={
|
|
1115
1201
|
"content-type": "application/json",
|
|
@@ -1218,25 +1304,39 @@ class RawUploadClient:
|
|
|
1218
1304
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1219
1305
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1220
1306
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1221
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
1222
1307
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1223
1308
|
) -> HttpResponse[SingleUploadData]:
|
|
1224
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
|
+
|
|
1225
1316
|
Parameters
|
|
1226
1317
|
----------
|
|
1227
1318
|
source_id : str
|
|
1319
|
+
The source ID of the document to update
|
|
1228
1320
|
|
|
1229
1321
|
tenant_id : str
|
|
1322
|
+
Unique identifier for the tenant/organization
|
|
1230
1323
|
|
|
1231
1324
|
content : str
|
|
1325
|
+
The text or markdown content to upload
|
|
1232
1326
|
|
|
1233
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
|
|
1234
1329
|
|
|
1235
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"}"
|
|
1236
1334
|
|
|
1237
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"}"
|
|
1238
1339
|
|
|
1239
|
-
relations : typing.Optional[Relations]
|
|
1240
1340
|
|
|
1241
1341
|
request_options : typing.Optional[RequestOptions]
|
|
1242
1342
|
Request-specific configuration.
|
|
@@ -1258,9 +1358,6 @@ class RawUploadClient:
|
|
|
1258
1358
|
"content": content,
|
|
1259
1359
|
"tenant_metadata": tenant_metadata,
|
|
1260
1360
|
"document_metadata": document_metadata,
|
|
1261
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
1262
|
-
object_=relations, annotation=Relations, direction="write"
|
|
1263
|
-
),
|
|
1264
1361
|
},
|
|
1265
1362
|
headers={
|
|
1266
1363
|
"content-type": "application/json",
|
|
@@ -1370,15 +1467,25 @@ class RawUploadClient:
|
|
|
1370
1467
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1371
1468
|
) -> HttpResponse[SingleUploadData]:
|
|
1372
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
|
+
|
|
1373
1476
|
Parameters
|
|
1374
1477
|
----------
|
|
1375
1478
|
tenant_id : str
|
|
1479
|
+
Unique identifier for the tenant/organization
|
|
1376
1480
|
|
|
1377
1481
|
embeddings : typing.Sequence[typing.Sequence[float]]
|
|
1482
|
+
The embeddings of source you want to index
|
|
1378
1483
|
|
|
1379
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
|
|
1380
1486
|
|
|
1381
1487
|
file_id : typing.Optional[str]
|
|
1488
|
+
The Source ID of the target source you want to index
|
|
1382
1489
|
|
|
1383
1490
|
request_options : typing.Optional[RequestOptions]
|
|
1384
1491
|
Request-specific configuration.
|
|
@@ -1506,13 +1613,22 @@ class RawUploadClient:
|
|
|
1506
1613
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1507
1614
|
) -> HttpResponse[SingleUploadData]:
|
|
1508
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
|
+
|
|
1509
1622
|
Parameters
|
|
1510
1623
|
----------
|
|
1511
1624
|
tenant_id : str
|
|
1625
|
+
Unique identifier for the tenant/organization
|
|
1512
1626
|
|
|
1513
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
|
|
1514
1629
|
|
|
1515
1630
|
embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
|
|
1631
|
+
The embeddings of source you want to index
|
|
1516
1632
|
|
|
1517
1633
|
request_options : typing.Optional[RequestOptions]
|
|
1518
1634
|
Request-specific configuration.
|
|
@@ -1637,21 +1753,28 @@ class RawUploadClient:
|
|
|
1637
1753
|
tenant_id: str,
|
|
1638
1754
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1639
1755
|
file_id: typing.Optional[str] = None,
|
|
1640
|
-
relations: typing.Optional[str] = OMIT,
|
|
1641
1756
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1642
1757
|
) -> HttpResponse[SingleUploadData]:
|
|
1643
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
|
+
|
|
1644
1765
|
Parameters
|
|
1645
1766
|
----------
|
|
1646
1767
|
web_url : str
|
|
1768
|
+
The URL of the webpage to scrape and index
|
|
1647
1769
|
|
|
1648
1770
|
tenant_id : str
|
|
1771
|
+
Unique identifier for the tenant/organization
|
|
1649
1772
|
|
|
1650
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
|
|
1651
1775
|
|
|
1652
1776
|
file_id : typing.Optional[str]
|
|
1653
|
-
|
|
1654
|
-
relations : typing.Optional[str]
|
|
1777
|
+
Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
|
|
1655
1778
|
|
|
1656
1779
|
request_options : typing.Optional[RequestOptions]
|
|
1657
1780
|
Request-specific configuration.
|
|
@@ -1670,9 +1793,7 @@ class RawUploadClient:
|
|
|
1670
1793
|
"sub_tenant_id": sub_tenant_id,
|
|
1671
1794
|
"file_id": file_id,
|
|
1672
1795
|
},
|
|
1673
|
-
data={
|
|
1674
|
-
"relations": relations,
|
|
1675
|
-
},
|
|
1796
|
+
data={},
|
|
1676
1797
|
headers={
|
|
1677
1798
|
"content-type": "application/x-www-form-urlencoded",
|
|
1678
1799
|
},
|
|
@@ -1778,21 +1899,28 @@ class RawUploadClient:
|
|
|
1778
1899
|
source_id: str,
|
|
1779
1900
|
tenant_id: str,
|
|
1780
1901
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1781
|
-
relations: typing.Optional[str] = OMIT,
|
|
1782
1902
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1783
1903
|
) -> HttpResponse[SingleUploadData]:
|
|
1784
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
|
+
|
|
1785
1911
|
Parameters
|
|
1786
1912
|
----------
|
|
1787
1913
|
web_url : str
|
|
1914
|
+
The URL of the webpage to re-scrape
|
|
1788
1915
|
|
|
1789
1916
|
source_id : str
|
|
1917
|
+
The file ID of the existing web scraping job to update
|
|
1790
1918
|
|
|
1791
1919
|
tenant_id : str
|
|
1920
|
+
Unique identifier for the tenant/organization
|
|
1792
1921
|
|
|
1793
1922
|
sub_tenant_id : typing.Optional[str]
|
|
1794
|
-
|
|
1795
|
-
relations : typing.Optional[str]
|
|
1923
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
1796
1924
|
|
|
1797
1925
|
request_options : typing.Optional[RequestOptions]
|
|
1798
1926
|
Request-specific configuration.
|
|
@@ -1811,9 +1939,7 @@ class RawUploadClient:
|
|
|
1811
1939
|
"tenant_id": tenant_id,
|
|
1812
1940
|
"sub_tenant_id": sub_tenant_id,
|
|
1813
1941
|
},
|
|
1814
|
-
data={
|
|
1815
|
-
"relations": relations,
|
|
1816
|
-
},
|
|
1942
|
+
data={},
|
|
1817
1943
|
headers={
|
|
1818
1944
|
"content-type": "application/x-www-form-urlencoded",
|
|
1819
1945
|
},
|
|
@@ -1921,13 +2047,22 @@ class RawUploadClient:
|
|
|
1921
2047
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1922
2048
|
) -> HttpResponse[typing.Optional[typing.Any]]:
|
|
1923
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
|
+
|
|
1924
2056
|
Parameters
|
|
1925
2057
|
----------
|
|
1926
2058
|
tenant_id : str
|
|
2059
|
+
Unique identifier for the tenant/organization
|
|
1927
2060
|
|
|
1928
2061
|
source_ids : typing.Sequence[str]
|
|
2062
|
+
List of source IDs to delete
|
|
1929
2063
|
|
|
1930
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
|
|
1931
2066
|
|
|
1932
2067
|
request_options : typing.Optional[RequestOptions]
|
|
1933
2068
|
Request-specific configuration.
|
|
@@ -1988,13 +2123,22 @@ class RawUploadClient:
|
|
|
1988
2123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1989
2124
|
) -> HttpResponse[typing.Optional[typing.Any]]:
|
|
1990
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
|
+
|
|
1991
2132
|
Parameters
|
|
1992
2133
|
----------
|
|
1993
2134
|
tenant_id : str
|
|
2135
|
+
Unique identifier for the tenant/organization
|
|
1994
2136
|
|
|
1995
2137
|
source_ids : typing.Sequence[str]
|
|
2138
|
+
List of source IDs to delete
|
|
1996
2139
|
|
|
1997
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
|
|
1998
2142
|
|
|
1999
2143
|
request_options : typing.Optional[RequestOptions]
|
|
2000
2144
|
Request-specific configuration.
|
|
@@ -2054,16 +2198,19 @@ class RawUploadClient:
|
|
|
2054
2198
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2055
2199
|
) -> HttpResponse[ProcessingStatus]:
|
|
2056
2200
|
"""
|
|
2057
|
-
|
|
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.
|
|
2058
2204
|
|
|
2059
|
-
|
|
2060
|
-
ProcessingStatusResponse: Processing status information
|
|
2205
|
+
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
2061
2206
|
|
|
2062
2207
|
Parameters
|
|
2063
2208
|
----------
|
|
2064
2209
|
file_id : str
|
|
2210
|
+
The file ID to check processing status for
|
|
2065
2211
|
|
|
2066
2212
|
tenant_id : typing.Optional[str]
|
|
2213
|
+
Unique identifier for the tenant/organization
|
|
2067
2214
|
|
|
2068
2215
|
request_options : typing.Optional[RequestOptions]
|
|
2069
2216
|
Request-specific configuration.
|
|
@@ -2187,24 +2334,38 @@ class AsyncRawUploadClient:
|
|
|
2187
2334
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2188
2335
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2189
2336
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2190
|
-
relations: typing.Optional[str] = OMIT,
|
|
2191
2337
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2192
2338
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2193
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
|
+
|
|
2194
2346
|
Parameters
|
|
2195
2347
|
----------
|
|
2196
2348
|
tenant_id : str
|
|
2349
|
+
Unique identifier for the tenant/organization
|
|
2197
2350
|
|
|
2198
2351
|
files : typing.List[core.File]
|
|
2199
2352
|
See core.File for more documentation
|
|
2200
2353
|
|
|
2201
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
|
|
2202
2356
|
|
|
2203
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
|
+
|
|
2204
2362
|
|
|
2205
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
|
+
|
|
2206
2368
|
|
|
2207
|
-
relations : typing.Optional[str]
|
|
2208
2369
|
|
|
2209
2370
|
request_options : typing.Optional[RequestOptions]
|
|
2210
2371
|
Request-specific configuration.
|
|
@@ -2224,7 +2385,6 @@ class AsyncRawUploadClient:
|
|
|
2224
2385
|
data={
|
|
2225
2386
|
"tenant_metadata": tenant_metadata,
|
|
2226
2387
|
"document_metadata": document_metadata,
|
|
2227
|
-
"relations": relations,
|
|
2228
2388
|
},
|
|
2229
2389
|
files={
|
|
2230
2390
|
"files": files,
|
|
@@ -2334,26 +2494,41 @@ class AsyncRawUploadClient:
|
|
|
2334
2494
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
2335
2495
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2336
2496
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2337
|
-
relations: typing.Optional[str] = OMIT,
|
|
2338
2497
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2339
2498
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2340
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
|
+
|
|
2341
2506
|
Parameters
|
|
2342
2507
|
----------
|
|
2343
2508
|
tenant_id : str
|
|
2509
|
+
Unique identifier for the tenant/organization
|
|
2344
2510
|
|
|
2345
2511
|
files : typing.List[core.File]
|
|
2346
2512
|
See core.File for more documentation
|
|
2347
2513
|
|
|
2348
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
|
|
2349
2516
|
|
|
2350
2517
|
source_ids : typing.Optional[typing.List[str]]
|
|
2518
|
+
List of source IDs corresponding to the files being updated
|
|
2351
2519
|
|
|
2352
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
|
+
|
|
2353
2525
|
|
|
2354
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
|
+
|
|
2355
2531
|
|
|
2356
|
-
relations : typing.Optional[str]
|
|
2357
2532
|
|
|
2358
2533
|
request_options : typing.Optional[RequestOptions]
|
|
2359
2534
|
Request-specific configuration.
|
|
@@ -2374,7 +2549,6 @@ class AsyncRawUploadClient:
|
|
|
2374
2549
|
"source_ids": source_ids,
|
|
2375
2550
|
"tenant_metadata": tenant_metadata,
|
|
2376
2551
|
"document_metadata": document_metadata,
|
|
2377
|
-
"relations": relations,
|
|
2378
2552
|
},
|
|
2379
2553
|
files={
|
|
2380
2554
|
"files": files,
|
|
@@ -2483,24 +2657,38 @@ class AsyncRawUploadClient:
|
|
|
2483
2657
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2484
2658
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2485
2659
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2486
|
-
relations: typing.Optional[str] = OMIT,
|
|
2487
2660
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2488
2661
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2489
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
|
+
|
|
2490
2669
|
Parameters
|
|
2491
2670
|
----------
|
|
2492
2671
|
tenant_id : str
|
|
2672
|
+
Unique identifier for the tenant/organization
|
|
2493
2673
|
|
|
2494
2674
|
file : core.File
|
|
2495
2675
|
See core.File for more documentation
|
|
2496
2676
|
|
|
2497
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
|
|
2498
2679
|
|
|
2499
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
|
+
|
|
2500
2685
|
|
|
2501
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
|
+
|
|
2502
2691
|
|
|
2503
|
-
relations : typing.Optional[str]
|
|
2504
2692
|
|
|
2505
2693
|
request_options : typing.Optional[RequestOptions]
|
|
2506
2694
|
Request-specific configuration.
|
|
@@ -2520,7 +2708,6 @@ class AsyncRawUploadClient:
|
|
|
2520
2708
|
data={
|
|
2521
2709
|
"tenant_metadata": tenant_metadata,
|
|
2522
2710
|
"document_metadata": document_metadata,
|
|
2523
|
-
"relations": relations,
|
|
2524
2711
|
},
|
|
2525
2712
|
files={
|
|
2526
2713
|
"file": file,
|
|
@@ -2630,26 +2817,41 @@ class AsyncRawUploadClient:
|
|
|
2630
2817
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2631
2818
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2632
2819
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2633
|
-
relations: typing.Optional[str] = OMIT,
|
|
2634
2820
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2635
2821
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2636
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
|
+
|
|
2637
2829
|
Parameters
|
|
2638
2830
|
----------
|
|
2639
2831
|
source_id : str
|
|
2832
|
+
The source ID of the document to update
|
|
2640
2833
|
|
|
2641
2834
|
tenant_id : str
|
|
2835
|
+
Unique identifier for the tenant/organization
|
|
2642
2836
|
|
|
2643
2837
|
file : core.File
|
|
2644
2838
|
See core.File for more documentation
|
|
2645
2839
|
|
|
2646
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
|
|
2647
2842
|
|
|
2648
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
|
+
|
|
2649
2848
|
|
|
2650
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
|
+
|
|
2651
2854
|
|
|
2652
|
-
relations : typing.Optional[str]
|
|
2653
2855
|
|
|
2654
2856
|
request_options : typing.Optional[RequestOptions]
|
|
2655
2857
|
Request-specific configuration.
|
|
@@ -2670,7 +2872,6 @@ class AsyncRawUploadClient:
|
|
|
2670
2872
|
data={
|
|
2671
2873
|
"tenant_metadata": tenant_metadata,
|
|
2672
2874
|
"document_metadata": document_metadata,
|
|
2673
|
-
"relations": relations,
|
|
2674
2875
|
},
|
|
2675
2876
|
files={
|
|
2676
2877
|
"file": file,
|
|
@@ -2780,13 +2981,21 @@ class AsyncRawUploadClient:
|
|
|
2780
2981
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2781
2982
|
) -> AsyncHttpResponse[AppSourcesUploadData]:
|
|
2782
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
|
+
|
|
2783
2990
|
Parameters
|
|
2784
2991
|
----------
|
|
2785
2992
|
tenant_id : str
|
|
2993
|
+
Unique identifier for the tenant/organization
|
|
2786
2994
|
|
|
2787
2995
|
request : typing.Sequence[SourceModel]
|
|
2788
2996
|
|
|
2789
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
|
|
2790
2999
|
|
|
2791
3000
|
request_options : typing.Optional[RequestOptions]
|
|
2792
3001
|
Request-specific configuration.
|
|
@@ -2912,26 +3121,36 @@ class AsyncRawUploadClient:
|
|
|
2912
3121
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2913
3122
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
2914
3123
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
2915
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
2916
3124
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2917
3125
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2918
3126
|
"""
|
|
2919
|
-
Upload markdown content
|
|
2920
|
-
|
|
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.
|
|
2921
3132
|
|
|
2922
3133
|
Parameters
|
|
2923
3134
|
----------
|
|
2924
3135
|
tenant_id : str
|
|
3136
|
+
Unique identifier for the tenant/organization
|
|
2925
3137
|
|
|
2926
3138
|
content : str
|
|
3139
|
+
The text or markdown content to upload
|
|
2927
3140
|
|
|
2928
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
|
|
2929
3143
|
|
|
2930
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"}"
|
|
2931
3148
|
|
|
2932
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"}"
|
|
2933
3153
|
|
|
2934
|
-
relations : typing.Optional[Relations]
|
|
2935
3154
|
|
|
2936
3155
|
request_options : typing.Optional[RequestOptions]
|
|
2937
3156
|
Request-specific configuration.
|
|
@@ -2952,9 +3171,6 @@ class AsyncRawUploadClient:
|
|
|
2952
3171
|
"content": content,
|
|
2953
3172
|
"tenant_metadata": tenant_metadata,
|
|
2954
3173
|
"document_metadata": document_metadata,
|
|
2955
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
2956
|
-
object_=relations, annotation=Relations, direction="write"
|
|
2957
|
-
),
|
|
2958
3174
|
},
|
|
2959
3175
|
headers={
|
|
2960
3176
|
"content-type": "application/json",
|
|
@@ -3062,26 +3278,36 @@ class AsyncRawUploadClient:
|
|
|
3062
3278
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3063
3279
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3064
3280
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3065
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
3066
3281
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3067
3282
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3068
3283
|
"""
|
|
3069
|
-
Upload markdown content
|
|
3070
|
-
|
|
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.
|
|
3071
3289
|
|
|
3072
3290
|
Parameters
|
|
3073
3291
|
----------
|
|
3074
3292
|
tenant_id : str
|
|
3293
|
+
Unique identifier for the tenant/organization
|
|
3075
3294
|
|
|
3076
3295
|
content : str
|
|
3296
|
+
The text or markdown content to upload
|
|
3077
3297
|
|
|
3078
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
|
|
3079
3300
|
|
|
3080
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"}"
|
|
3081
3305
|
|
|
3082
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"}"
|
|
3083
3310
|
|
|
3084
|
-
relations : typing.Optional[Relations]
|
|
3085
3311
|
|
|
3086
3312
|
request_options : typing.Optional[RequestOptions]
|
|
3087
3313
|
Request-specific configuration.
|
|
@@ -3102,9 +3328,6 @@ class AsyncRawUploadClient:
|
|
|
3102
3328
|
"content": content,
|
|
3103
3329
|
"tenant_metadata": tenant_metadata,
|
|
3104
3330
|
"document_metadata": document_metadata,
|
|
3105
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3106
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3107
|
-
),
|
|
3108
3331
|
},
|
|
3109
3332
|
headers={
|
|
3110
3333
|
"content-type": "application/json",
|
|
@@ -3213,25 +3436,39 @@ class AsyncRawUploadClient:
|
|
|
3213
3436
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3214
3437
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3215
3438
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3216
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
3217
3439
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3218
3440
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3219
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
|
+
|
|
3220
3448
|
Parameters
|
|
3221
3449
|
----------
|
|
3222
3450
|
source_id : str
|
|
3451
|
+
The source ID of the document to update
|
|
3223
3452
|
|
|
3224
3453
|
tenant_id : str
|
|
3454
|
+
Unique identifier for the tenant/organization
|
|
3225
3455
|
|
|
3226
3456
|
content : str
|
|
3457
|
+
The text or markdown content to upload
|
|
3227
3458
|
|
|
3228
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
|
|
3229
3461
|
|
|
3230
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"}"
|
|
3231
3466
|
|
|
3232
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"}"
|
|
3233
3471
|
|
|
3234
|
-
relations : typing.Optional[Relations]
|
|
3235
3472
|
|
|
3236
3473
|
request_options : typing.Optional[RequestOptions]
|
|
3237
3474
|
Request-specific configuration.
|
|
@@ -3253,9 +3490,6 @@ class AsyncRawUploadClient:
|
|
|
3253
3490
|
"content": content,
|
|
3254
3491
|
"tenant_metadata": tenant_metadata,
|
|
3255
3492
|
"document_metadata": document_metadata,
|
|
3256
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3257
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3258
|
-
),
|
|
3259
3493
|
},
|
|
3260
3494
|
headers={
|
|
3261
3495
|
"content-type": "application/json",
|
|
@@ -3364,25 +3598,39 @@ class AsyncRawUploadClient:
|
|
|
3364
3598
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3365
3599
|
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3366
3600
|
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3367
|
-
relations: typing.Optional[Relations] = OMIT,
|
|
3368
3601
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3369
3602
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3370
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
|
+
|
|
3371
3610
|
Parameters
|
|
3372
3611
|
----------
|
|
3373
3612
|
source_id : str
|
|
3613
|
+
The source ID of the document to update
|
|
3374
3614
|
|
|
3375
3615
|
tenant_id : str
|
|
3616
|
+
Unique identifier for the tenant/organization
|
|
3376
3617
|
|
|
3377
3618
|
content : str
|
|
3619
|
+
The text or markdown content to upload
|
|
3378
3620
|
|
|
3379
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
|
|
3380
3623
|
|
|
3381
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"}"
|
|
3382
3628
|
|
|
3383
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"}"
|
|
3384
3633
|
|
|
3385
|
-
relations : typing.Optional[Relations]
|
|
3386
3634
|
|
|
3387
3635
|
request_options : typing.Optional[RequestOptions]
|
|
3388
3636
|
Request-specific configuration.
|
|
@@ -3404,9 +3652,6 @@ class AsyncRawUploadClient:
|
|
|
3404
3652
|
"content": content,
|
|
3405
3653
|
"tenant_metadata": tenant_metadata,
|
|
3406
3654
|
"document_metadata": document_metadata,
|
|
3407
|
-
"relations": convert_and_respect_annotation_metadata(
|
|
3408
|
-
object_=relations, annotation=Relations, direction="write"
|
|
3409
|
-
),
|
|
3410
3655
|
},
|
|
3411
3656
|
headers={
|
|
3412
3657
|
"content-type": "application/json",
|
|
@@ -3516,15 +3761,25 @@ class AsyncRawUploadClient:
|
|
|
3516
3761
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3517
3762
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3518
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
|
+
|
|
3519
3770
|
Parameters
|
|
3520
3771
|
----------
|
|
3521
3772
|
tenant_id : str
|
|
3773
|
+
Unique identifier for the tenant/organization
|
|
3522
3774
|
|
|
3523
3775
|
embeddings : typing.Sequence[typing.Sequence[float]]
|
|
3776
|
+
The embeddings of source you want to index
|
|
3524
3777
|
|
|
3525
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
|
|
3526
3780
|
|
|
3527
3781
|
file_id : typing.Optional[str]
|
|
3782
|
+
The Source ID of the target source you want to index
|
|
3528
3783
|
|
|
3529
3784
|
request_options : typing.Optional[RequestOptions]
|
|
3530
3785
|
Request-specific configuration.
|
|
@@ -3652,13 +3907,22 @@ class AsyncRawUploadClient:
|
|
|
3652
3907
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3653
3908
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3654
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
|
+
|
|
3655
3916
|
Parameters
|
|
3656
3917
|
----------
|
|
3657
3918
|
tenant_id : str
|
|
3919
|
+
Unique identifier for the tenant/organization
|
|
3658
3920
|
|
|
3659
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
|
|
3660
3923
|
|
|
3661
3924
|
embeddings : typing.Optional[typing.Dict[str, typing.Sequence[float]]]
|
|
3925
|
+
The embeddings of source you want to index
|
|
3662
3926
|
|
|
3663
3927
|
request_options : typing.Optional[RequestOptions]
|
|
3664
3928
|
Request-specific configuration.
|
|
@@ -3783,21 +4047,28 @@ class AsyncRawUploadClient:
|
|
|
3783
4047
|
tenant_id: str,
|
|
3784
4048
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3785
4049
|
file_id: typing.Optional[str] = None,
|
|
3786
|
-
relations: typing.Optional[str] = OMIT,
|
|
3787
4050
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3788
4051
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3789
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
|
+
|
|
3790
4059
|
Parameters
|
|
3791
4060
|
----------
|
|
3792
4061
|
web_url : str
|
|
4062
|
+
The URL of the webpage to scrape and index
|
|
3793
4063
|
|
|
3794
4064
|
tenant_id : str
|
|
4065
|
+
Unique identifier for the tenant/organization
|
|
3795
4066
|
|
|
3796
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
|
|
3797
4069
|
|
|
3798
4070
|
file_id : typing.Optional[str]
|
|
3799
|
-
|
|
3800
|
-
relations : typing.Optional[str]
|
|
4071
|
+
Optional custom file ID for the scraped content. If not provided, a unique ID will be generated
|
|
3801
4072
|
|
|
3802
4073
|
request_options : typing.Optional[RequestOptions]
|
|
3803
4074
|
Request-specific configuration.
|
|
@@ -3816,9 +4087,7 @@ class AsyncRawUploadClient:
|
|
|
3816
4087
|
"sub_tenant_id": sub_tenant_id,
|
|
3817
4088
|
"file_id": file_id,
|
|
3818
4089
|
},
|
|
3819
|
-
data={
|
|
3820
|
-
"relations": relations,
|
|
3821
|
-
},
|
|
4090
|
+
data={},
|
|
3822
4091
|
headers={
|
|
3823
4092
|
"content-type": "application/x-www-form-urlencoded",
|
|
3824
4093
|
},
|
|
@@ -3924,21 +4193,28 @@ class AsyncRawUploadClient:
|
|
|
3924
4193
|
source_id: str,
|
|
3925
4194
|
tenant_id: str,
|
|
3926
4195
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3927
|
-
relations: typing.Optional[str] = OMIT,
|
|
3928
4196
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3929
4197
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3930
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
|
+
|
|
3931
4205
|
Parameters
|
|
3932
4206
|
----------
|
|
3933
4207
|
web_url : str
|
|
4208
|
+
The URL of the webpage to re-scrape
|
|
3934
4209
|
|
|
3935
4210
|
source_id : str
|
|
4211
|
+
The file ID of the existing web scraping job to update
|
|
3936
4212
|
|
|
3937
4213
|
tenant_id : str
|
|
4214
|
+
Unique identifier for the tenant/organization
|
|
3938
4215
|
|
|
3939
4216
|
sub_tenant_id : typing.Optional[str]
|
|
3940
|
-
|
|
3941
|
-
relations : typing.Optional[str]
|
|
4217
|
+
Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
|
|
3942
4218
|
|
|
3943
4219
|
request_options : typing.Optional[RequestOptions]
|
|
3944
4220
|
Request-specific configuration.
|
|
@@ -3957,9 +4233,7 @@ class AsyncRawUploadClient:
|
|
|
3957
4233
|
"tenant_id": tenant_id,
|
|
3958
4234
|
"sub_tenant_id": sub_tenant_id,
|
|
3959
4235
|
},
|
|
3960
|
-
data={
|
|
3961
|
-
"relations": relations,
|
|
3962
|
-
},
|
|
4236
|
+
data={},
|
|
3963
4237
|
headers={
|
|
3964
4238
|
"content-type": "application/x-www-form-urlencoded",
|
|
3965
4239
|
},
|
|
@@ -4067,13 +4341,22 @@ class AsyncRawUploadClient:
|
|
|
4067
4341
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4068
4342
|
) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
|
|
4069
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
|
+
|
|
4070
4350
|
Parameters
|
|
4071
4351
|
----------
|
|
4072
4352
|
tenant_id : str
|
|
4353
|
+
Unique identifier for the tenant/organization
|
|
4073
4354
|
|
|
4074
4355
|
source_ids : typing.Sequence[str]
|
|
4356
|
+
List of source IDs to delete
|
|
4075
4357
|
|
|
4076
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
|
|
4077
4360
|
|
|
4078
4361
|
request_options : typing.Optional[RequestOptions]
|
|
4079
4362
|
Request-specific configuration.
|
|
@@ -4134,13 +4417,22 @@ class AsyncRawUploadClient:
|
|
|
4134
4417
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4135
4418
|
) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
|
|
4136
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
|
+
|
|
4137
4426
|
Parameters
|
|
4138
4427
|
----------
|
|
4139
4428
|
tenant_id : str
|
|
4429
|
+
Unique identifier for the tenant/organization
|
|
4140
4430
|
|
|
4141
4431
|
source_ids : typing.Sequence[str]
|
|
4432
|
+
List of source IDs to delete
|
|
4142
4433
|
|
|
4143
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
|
|
4144
4436
|
|
|
4145
4437
|
request_options : typing.Optional[RequestOptions]
|
|
4146
4438
|
Request-specific configuration.
|
|
@@ -4200,16 +4492,19 @@ class AsyncRawUploadClient:
|
|
|
4200
4492
|
request_options: typing.Optional[RequestOptions] = None,
|
|
4201
4493
|
) -> AsyncHttpResponse[ProcessingStatus]:
|
|
4202
4494
|
"""
|
|
4203
|
-
|
|
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.
|
|
4204
4498
|
|
|
4205
|
-
|
|
4206
|
-
ProcessingStatusResponse: Processing status information
|
|
4499
|
+
Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
4207
4500
|
|
|
4208
4501
|
Parameters
|
|
4209
4502
|
----------
|
|
4210
4503
|
file_id : str
|
|
4504
|
+
The file ID to check processing status for
|
|
4211
4505
|
|
|
4212
4506
|
tenant_id : typing.Optional[str]
|
|
4507
|
+
Unique identifier for the tenant/organization
|
|
4213
4508
|
|
|
4214
4509
|
request_options : typing.Optional[RequestOptions]
|
|
4215
4510
|
Request-specific configuration.
|