usecortex-ai 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cortex_ai/__init__.py +6 -4
- cortex_ai/client.py +4 -4
- cortex_ai/embeddings/client.py +8 -8
- cortex_ai/fetch/client.py +2 -2
- cortex_ai/search/client.py +15 -16
- cortex_ai/search/raw_client.py +17 -18
- cortex_ai/sources/client.py +4 -4
- cortex_ai/tenant/client.py +2 -2
- cortex_ai/types/__init__.py +6 -4
- cortex_ai/types/app_sources_upload_data.py +1 -1
- cortex_ai/types/batch_upload_data.py +1 -1
- cortex_ai/types/{search_data.py → body_scrape_webpage_upload_scrape_webpage_post.py} +2 -5
- cortex_ai/types/{full_text_search_data.py → body_update_scrape_job_upload_update_webpage_patch.py} +2 -5
- cortex_ai/types/embeddings_create_collection_data.py +1 -1
- cortex_ai/types/embeddings_delete_data.py +1 -1
- cortex_ai/types/embeddings_get_data.py +1 -1
- cortex_ai/types/embeddings_search_data.py +1 -1
- cortex_ai/types/error_response.py +1 -1
- cortex_ai/types/extended_context.py +1 -1
- cortex_ai/types/fetch_content_data.py +1 -1
- cortex_ai/types/list_sources_response.py +1 -1
- cortex_ai/types/processing_status.py +1 -1
- cortex_ai/types/relations.py +27 -0
- cortex_ai/types/single_upload_data.py +1 -1
- cortex_ai/types/tenant_create_data.py +1 -1
- cortex_ai/types/tenant_stats.py +1 -1
- cortex_ai/upload/client.py +138 -120
- cortex_ai/upload/raw_client.py +154 -80
- cortex_ai/user/client.py +2 -2
- cortex_ai/user_memory/client.py +10 -10
- {usecortex_ai-0.1.0.dist-info → usecortex_ai-0.1.1.dist-info}/METADATA +1 -1
- {usecortex_ai-0.1.0.dist-info → usecortex_ai-0.1.1.dist-info}/RECORD +35 -34
- {usecortex_ai-0.1.0.dist-info → usecortex_ai-0.1.1.dist-info}/WHEEL +0 -0
- {usecortex_ai-0.1.0.dist-info → usecortex_ai-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {usecortex_ai-0.1.0.dist-info → usecortex_ai-0.1.1.dist-info}/top_level.txt +0 -0
cortex_ai/upload/raw_client.py
CHANGED
|
@@ -20,7 +20,9 @@ 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
|
|
23
24
|
from ..types.processing_status import ProcessingStatus
|
|
25
|
+
from ..types.relations import Relations
|
|
24
26
|
from ..types.single_upload_data import SingleUploadData
|
|
25
27
|
from ..types.source_model import SourceModel
|
|
26
28
|
|
|
@@ -40,6 +42,7 @@ class RawUploadClient:
|
|
|
40
42
|
sub_tenant_id: typing.Optional[str] = None,
|
|
41
43
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
42
44
|
document_metadata: typing.Optional[str] = OMIT,
|
|
45
|
+
relations: typing.Optional[str] = OMIT,
|
|
43
46
|
request_options: typing.Optional[RequestOptions] = None,
|
|
44
47
|
) -> HttpResponse[BatchUploadData]:
|
|
45
48
|
"""
|
|
@@ -56,6 +59,8 @@ class RawUploadClient:
|
|
|
56
59
|
|
|
57
60
|
document_metadata : typing.Optional[str]
|
|
58
61
|
|
|
62
|
+
relations : typing.Optional[str]
|
|
63
|
+
|
|
59
64
|
request_options : typing.Optional[RequestOptions]
|
|
60
65
|
Request-specific configuration.
|
|
61
66
|
|
|
@@ -74,6 +79,7 @@ class RawUploadClient:
|
|
|
74
79
|
data={
|
|
75
80
|
"tenant_metadata": tenant_metadata,
|
|
76
81
|
"document_metadata": document_metadata,
|
|
82
|
+
"relations": relations,
|
|
77
83
|
},
|
|
78
84
|
files={
|
|
79
85
|
"files": files,
|
|
@@ -183,6 +189,7 @@ class RawUploadClient:
|
|
|
183
189
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
184
190
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
185
191
|
document_metadata: typing.Optional[str] = OMIT,
|
|
192
|
+
relations: typing.Optional[str] = OMIT,
|
|
186
193
|
request_options: typing.Optional[RequestOptions] = None,
|
|
187
194
|
) -> HttpResponse[BatchUploadData]:
|
|
188
195
|
"""
|
|
@@ -201,6 +208,8 @@ class RawUploadClient:
|
|
|
201
208
|
|
|
202
209
|
document_metadata : typing.Optional[str]
|
|
203
210
|
|
|
211
|
+
relations : typing.Optional[str]
|
|
212
|
+
|
|
204
213
|
request_options : typing.Optional[RequestOptions]
|
|
205
214
|
Request-specific configuration.
|
|
206
215
|
|
|
@@ -220,6 +229,7 @@ class RawUploadClient:
|
|
|
220
229
|
"source_ids": source_ids,
|
|
221
230
|
"tenant_metadata": tenant_metadata,
|
|
222
231
|
"document_metadata": document_metadata,
|
|
232
|
+
"relations": relations,
|
|
223
233
|
},
|
|
224
234
|
files={
|
|
225
235
|
"files": files,
|
|
@@ -328,6 +338,7 @@ class RawUploadClient:
|
|
|
328
338
|
sub_tenant_id: typing.Optional[str] = None,
|
|
329
339
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
330
340
|
document_metadata: typing.Optional[str] = OMIT,
|
|
341
|
+
relations: typing.Optional[str] = OMIT,
|
|
331
342
|
request_options: typing.Optional[RequestOptions] = None,
|
|
332
343
|
) -> HttpResponse[SingleUploadData]:
|
|
333
344
|
"""
|
|
@@ -344,6 +355,8 @@ class RawUploadClient:
|
|
|
344
355
|
|
|
345
356
|
document_metadata : typing.Optional[str]
|
|
346
357
|
|
|
358
|
+
relations : typing.Optional[str]
|
|
359
|
+
|
|
347
360
|
request_options : typing.Optional[RequestOptions]
|
|
348
361
|
Request-specific configuration.
|
|
349
362
|
|
|
@@ -362,6 +375,7 @@ class RawUploadClient:
|
|
|
362
375
|
data={
|
|
363
376
|
"tenant_metadata": tenant_metadata,
|
|
364
377
|
"document_metadata": document_metadata,
|
|
378
|
+
"relations": relations,
|
|
365
379
|
},
|
|
366
380
|
files={
|
|
367
381
|
"file": file,
|
|
@@ -471,6 +485,7 @@ class RawUploadClient:
|
|
|
471
485
|
sub_tenant_id: typing.Optional[str] = None,
|
|
472
486
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
473
487
|
document_metadata: typing.Optional[str] = OMIT,
|
|
488
|
+
relations: typing.Optional[str] = OMIT,
|
|
474
489
|
request_options: typing.Optional[RequestOptions] = None,
|
|
475
490
|
) -> HttpResponse[SingleUploadData]:
|
|
476
491
|
"""
|
|
@@ -489,6 +504,8 @@ class RawUploadClient:
|
|
|
489
504
|
|
|
490
505
|
document_metadata : typing.Optional[str]
|
|
491
506
|
|
|
507
|
+
relations : typing.Optional[str]
|
|
508
|
+
|
|
492
509
|
request_options : typing.Optional[RequestOptions]
|
|
493
510
|
Request-specific configuration.
|
|
494
511
|
|
|
@@ -508,6 +525,7 @@ class RawUploadClient:
|
|
|
508
525
|
data={
|
|
509
526
|
"tenant_metadata": tenant_metadata,
|
|
510
527
|
"document_metadata": document_metadata,
|
|
528
|
+
"relations": relations,
|
|
511
529
|
},
|
|
512
530
|
files={
|
|
513
531
|
"file": file,
|
|
@@ -745,10 +763,9 @@ class RawUploadClient:
|
|
|
745
763
|
self,
|
|
746
764
|
*,
|
|
747
765
|
tenant_id: str,
|
|
748
|
-
|
|
766
|
+
request: MarkdownUploadRequest,
|
|
749
767
|
sub_tenant_id: typing.Optional[str] = None,
|
|
750
|
-
|
|
751
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
768
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
752
769
|
request_options: typing.Optional[RequestOptions] = None,
|
|
753
770
|
) -> HttpResponse[SingleUploadData]:
|
|
754
771
|
"""
|
|
@@ -759,13 +776,11 @@ class RawUploadClient:
|
|
|
759
776
|
----------
|
|
760
777
|
tenant_id : str
|
|
761
778
|
|
|
762
|
-
|
|
779
|
+
request : MarkdownUploadRequest
|
|
763
780
|
|
|
764
781
|
sub_tenant_id : typing.Optional[str]
|
|
765
782
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
783
|
+
relations : typing.Optional[Relations]
|
|
769
784
|
|
|
770
785
|
request_options : typing.Optional[RequestOptions]
|
|
771
786
|
Request-specific configuration.
|
|
@@ -783,9 +798,12 @@ class RawUploadClient:
|
|
|
783
798
|
"sub_tenant_id": sub_tenant_id,
|
|
784
799
|
},
|
|
785
800
|
json={
|
|
786
|
-
"
|
|
787
|
-
|
|
788
|
-
|
|
801
|
+
"request": convert_and_respect_annotation_metadata(
|
|
802
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
803
|
+
),
|
|
804
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
805
|
+
object_=relations, annotation=Relations, direction="write"
|
|
806
|
+
),
|
|
789
807
|
},
|
|
790
808
|
headers={
|
|
791
809
|
"content-type": "application/json",
|
|
@@ -889,10 +907,9 @@ class RawUploadClient:
|
|
|
889
907
|
self,
|
|
890
908
|
*,
|
|
891
909
|
tenant_id: str,
|
|
892
|
-
|
|
910
|
+
request: MarkdownUploadRequest,
|
|
893
911
|
sub_tenant_id: typing.Optional[str] = None,
|
|
894
|
-
|
|
895
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
912
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
896
913
|
request_options: typing.Optional[RequestOptions] = None,
|
|
897
914
|
) -> HttpResponse[SingleUploadData]:
|
|
898
915
|
"""
|
|
@@ -903,13 +920,11 @@ class RawUploadClient:
|
|
|
903
920
|
----------
|
|
904
921
|
tenant_id : str
|
|
905
922
|
|
|
906
|
-
|
|
923
|
+
request : MarkdownUploadRequest
|
|
907
924
|
|
|
908
925
|
sub_tenant_id : typing.Optional[str]
|
|
909
926
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
927
|
+
relations : typing.Optional[Relations]
|
|
913
928
|
|
|
914
929
|
request_options : typing.Optional[RequestOptions]
|
|
915
930
|
Request-specific configuration.
|
|
@@ -927,9 +942,12 @@ class RawUploadClient:
|
|
|
927
942
|
"sub_tenant_id": sub_tenant_id,
|
|
928
943
|
},
|
|
929
944
|
json={
|
|
930
|
-
"
|
|
931
|
-
|
|
932
|
-
|
|
945
|
+
"request": convert_and_respect_annotation_metadata(
|
|
946
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
947
|
+
),
|
|
948
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
949
|
+
object_=relations, annotation=Relations, direction="write"
|
|
950
|
+
),
|
|
933
951
|
},
|
|
934
952
|
headers={
|
|
935
953
|
"content-type": "application/json",
|
|
@@ -1034,10 +1052,9 @@ class RawUploadClient:
|
|
|
1034
1052
|
*,
|
|
1035
1053
|
source_id: str,
|
|
1036
1054
|
tenant_id: str,
|
|
1037
|
-
|
|
1055
|
+
request: MarkdownUploadRequest,
|
|
1038
1056
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1039
|
-
|
|
1040
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1057
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
1041
1058
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1042
1059
|
) -> HttpResponse[SingleUploadData]:
|
|
1043
1060
|
"""
|
|
@@ -1047,13 +1064,11 @@ class RawUploadClient:
|
|
|
1047
1064
|
|
|
1048
1065
|
tenant_id : str
|
|
1049
1066
|
|
|
1050
|
-
|
|
1067
|
+
request : MarkdownUploadRequest
|
|
1051
1068
|
|
|
1052
1069
|
sub_tenant_id : typing.Optional[str]
|
|
1053
1070
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1071
|
+
relations : typing.Optional[Relations]
|
|
1057
1072
|
|
|
1058
1073
|
request_options : typing.Optional[RequestOptions]
|
|
1059
1074
|
Request-specific configuration.
|
|
@@ -1072,9 +1087,12 @@ class RawUploadClient:
|
|
|
1072
1087
|
"sub_tenant_id": sub_tenant_id,
|
|
1073
1088
|
},
|
|
1074
1089
|
json={
|
|
1075
|
-
"
|
|
1076
|
-
|
|
1077
|
-
|
|
1090
|
+
"request": convert_and_respect_annotation_metadata(
|
|
1091
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
1092
|
+
),
|
|
1093
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
1094
|
+
object_=relations, annotation=Relations, direction="write"
|
|
1095
|
+
),
|
|
1078
1096
|
},
|
|
1079
1097
|
headers={
|
|
1080
1098
|
"content-type": "application/json",
|
|
@@ -1179,10 +1197,9 @@ class RawUploadClient:
|
|
|
1179
1197
|
*,
|
|
1180
1198
|
source_id: str,
|
|
1181
1199
|
tenant_id: str,
|
|
1182
|
-
|
|
1200
|
+
request: MarkdownUploadRequest,
|
|
1183
1201
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1184
|
-
|
|
1185
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1202
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
1186
1203
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1187
1204
|
) -> HttpResponse[SingleUploadData]:
|
|
1188
1205
|
"""
|
|
@@ -1192,13 +1209,11 @@ class RawUploadClient:
|
|
|
1192
1209
|
|
|
1193
1210
|
tenant_id : str
|
|
1194
1211
|
|
|
1195
|
-
|
|
1212
|
+
request : MarkdownUploadRequest
|
|
1196
1213
|
|
|
1197
1214
|
sub_tenant_id : typing.Optional[str]
|
|
1198
1215
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1216
|
+
relations : typing.Optional[Relations]
|
|
1202
1217
|
|
|
1203
1218
|
request_options : typing.Optional[RequestOptions]
|
|
1204
1219
|
Request-specific configuration.
|
|
@@ -1217,9 +1232,12 @@ class RawUploadClient:
|
|
|
1217
1232
|
"sub_tenant_id": sub_tenant_id,
|
|
1218
1233
|
},
|
|
1219
1234
|
json={
|
|
1220
|
-
"
|
|
1221
|
-
|
|
1222
|
-
|
|
1235
|
+
"request": convert_and_respect_annotation_metadata(
|
|
1236
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
1237
|
+
),
|
|
1238
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
1239
|
+
object_=relations, annotation=Relations, direction="write"
|
|
1240
|
+
),
|
|
1223
1241
|
},
|
|
1224
1242
|
headers={
|
|
1225
1243
|
"content-type": "application/json",
|
|
@@ -1597,6 +1615,7 @@ class RawUploadClient:
|
|
|
1597
1615
|
tenant_id: str,
|
|
1598
1616
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1599
1617
|
file_id: typing.Optional[str] = None,
|
|
1618
|
+
relations: typing.Optional[str] = OMIT,
|
|
1600
1619
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1601
1620
|
) -> HttpResponse[SingleUploadData]:
|
|
1602
1621
|
"""
|
|
@@ -1610,6 +1629,8 @@ class RawUploadClient:
|
|
|
1610
1629
|
|
|
1611
1630
|
file_id : typing.Optional[str]
|
|
1612
1631
|
|
|
1632
|
+
relations : typing.Optional[str]
|
|
1633
|
+
|
|
1613
1634
|
request_options : typing.Optional[RequestOptions]
|
|
1614
1635
|
Request-specific configuration.
|
|
1615
1636
|
|
|
@@ -1627,7 +1648,14 @@ class RawUploadClient:
|
|
|
1627
1648
|
"sub_tenant_id": sub_tenant_id,
|
|
1628
1649
|
"file_id": file_id,
|
|
1629
1650
|
},
|
|
1651
|
+
data={
|
|
1652
|
+
"relations": relations,
|
|
1653
|
+
},
|
|
1654
|
+
headers={
|
|
1655
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
1656
|
+
},
|
|
1630
1657
|
request_options=request_options,
|
|
1658
|
+
omit=OMIT,
|
|
1631
1659
|
)
|
|
1632
1660
|
try:
|
|
1633
1661
|
if 200 <= _response.status_code < 300:
|
|
@@ -1728,6 +1756,7 @@ class RawUploadClient:
|
|
|
1728
1756
|
source_id: str,
|
|
1729
1757
|
tenant_id: str,
|
|
1730
1758
|
sub_tenant_id: typing.Optional[str] = None,
|
|
1759
|
+
relations: typing.Optional[str] = OMIT,
|
|
1731
1760
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1732
1761
|
) -> HttpResponse[SingleUploadData]:
|
|
1733
1762
|
"""
|
|
@@ -1741,6 +1770,8 @@ class RawUploadClient:
|
|
|
1741
1770
|
|
|
1742
1771
|
sub_tenant_id : typing.Optional[str]
|
|
1743
1772
|
|
|
1773
|
+
relations : typing.Optional[str]
|
|
1774
|
+
|
|
1744
1775
|
request_options : typing.Optional[RequestOptions]
|
|
1745
1776
|
Request-specific configuration.
|
|
1746
1777
|
|
|
@@ -1758,7 +1789,14 @@ class RawUploadClient:
|
|
|
1758
1789
|
"tenant_id": tenant_id,
|
|
1759
1790
|
"sub_tenant_id": sub_tenant_id,
|
|
1760
1791
|
},
|
|
1792
|
+
data={
|
|
1793
|
+
"relations": relations,
|
|
1794
|
+
},
|
|
1795
|
+
headers={
|
|
1796
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
1797
|
+
},
|
|
1761
1798
|
request_options=request_options,
|
|
1799
|
+
omit=OMIT,
|
|
1762
1800
|
)
|
|
1763
1801
|
try:
|
|
1764
1802
|
if 200 <= _response.status_code < 300:
|
|
@@ -2127,6 +2165,7 @@ class AsyncRawUploadClient:
|
|
|
2127
2165
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2128
2166
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2129
2167
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2168
|
+
relations: typing.Optional[str] = OMIT,
|
|
2130
2169
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2131
2170
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2132
2171
|
"""
|
|
@@ -2143,6 +2182,8 @@ class AsyncRawUploadClient:
|
|
|
2143
2182
|
|
|
2144
2183
|
document_metadata : typing.Optional[str]
|
|
2145
2184
|
|
|
2185
|
+
relations : typing.Optional[str]
|
|
2186
|
+
|
|
2146
2187
|
request_options : typing.Optional[RequestOptions]
|
|
2147
2188
|
Request-specific configuration.
|
|
2148
2189
|
|
|
@@ -2161,6 +2202,7 @@ class AsyncRawUploadClient:
|
|
|
2161
2202
|
data={
|
|
2162
2203
|
"tenant_metadata": tenant_metadata,
|
|
2163
2204
|
"document_metadata": document_metadata,
|
|
2205
|
+
"relations": relations,
|
|
2164
2206
|
},
|
|
2165
2207
|
files={
|
|
2166
2208
|
"files": files,
|
|
@@ -2270,6 +2312,7 @@ class AsyncRawUploadClient:
|
|
|
2270
2312
|
source_ids: typing.Optional[typing.List[str]] = OMIT,
|
|
2271
2313
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2272
2314
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2315
|
+
relations: typing.Optional[str] = OMIT,
|
|
2273
2316
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2274
2317
|
) -> AsyncHttpResponse[BatchUploadData]:
|
|
2275
2318
|
"""
|
|
@@ -2288,6 +2331,8 @@ class AsyncRawUploadClient:
|
|
|
2288
2331
|
|
|
2289
2332
|
document_metadata : typing.Optional[str]
|
|
2290
2333
|
|
|
2334
|
+
relations : typing.Optional[str]
|
|
2335
|
+
|
|
2291
2336
|
request_options : typing.Optional[RequestOptions]
|
|
2292
2337
|
Request-specific configuration.
|
|
2293
2338
|
|
|
@@ -2307,6 +2352,7 @@ class AsyncRawUploadClient:
|
|
|
2307
2352
|
"source_ids": source_ids,
|
|
2308
2353
|
"tenant_metadata": tenant_metadata,
|
|
2309
2354
|
"document_metadata": document_metadata,
|
|
2355
|
+
"relations": relations,
|
|
2310
2356
|
},
|
|
2311
2357
|
files={
|
|
2312
2358
|
"files": files,
|
|
@@ -2415,6 +2461,7 @@ class AsyncRawUploadClient:
|
|
|
2415
2461
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2416
2462
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2417
2463
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2464
|
+
relations: typing.Optional[str] = OMIT,
|
|
2418
2465
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2419
2466
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2420
2467
|
"""
|
|
@@ -2431,6 +2478,8 @@ class AsyncRawUploadClient:
|
|
|
2431
2478
|
|
|
2432
2479
|
document_metadata : typing.Optional[str]
|
|
2433
2480
|
|
|
2481
|
+
relations : typing.Optional[str]
|
|
2482
|
+
|
|
2434
2483
|
request_options : typing.Optional[RequestOptions]
|
|
2435
2484
|
Request-specific configuration.
|
|
2436
2485
|
|
|
@@ -2449,6 +2498,7 @@ class AsyncRawUploadClient:
|
|
|
2449
2498
|
data={
|
|
2450
2499
|
"tenant_metadata": tenant_metadata,
|
|
2451
2500
|
"document_metadata": document_metadata,
|
|
2501
|
+
"relations": relations,
|
|
2452
2502
|
},
|
|
2453
2503
|
files={
|
|
2454
2504
|
"file": file,
|
|
@@ -2558,6 +2608,7 @@ class AsyncRawUploadClient:
|
|
|
2558
2608
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2559
2609
|
tenant_metadata: typing.Optional[str] = OMIT,
|
|
2560
2610
|
document_metadata: typing.Optional[str] = OMIT,
|
|
2611
|
+
relations: typing.Optional[str] = OMIT,
|
|
2561
2612
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2562
2613
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2563
2614
|
"""
|
|
@@ -2576,6 +2627,8 @@ class AsyncRawUploadClient:
|
|
|
2576
2627
|
|
|
2577
2628
|
document_metadata : typing.Optional[str]
|
|
2578
2629
|
|
|
2630
|
+
relations : typing.Optional[str]
|
|
2631
|
+
|
|
2579
2632
|
request_options : typing.Optional[RequestOptions]
|
|
2580
2633
|
Request-specific configuration.
|
|
2581
2634
|
|
|
@@ -2595,6 +2648,7 @@ class AsyncRawUploadClient:
|
|
|
2595
2648
|
data={
|
|
2596
2649
|
"tenant_metadata": tenant_metadata,
|
|
2597
2650
|
"document_metadata": document_metadata,
|
|
2651
|
+
"relations": relations,
|
|
2598
2652
|
},
|
|
2599
2653
|
files={
|
|
2600
2654
|
"file": file,
|
|
@@ -2832,10 +2886,9 @@ class AsyncRawUploadClient:
|
|
|
2832
2886
|
self,
|
|
2833
2887
|
*,
|
|
2834
2888
|
tenant_id: str,
|
|
2835
|
-
|
|
2889
|
+
request: MarkdownUploadRequest,
|
|
2836
2890
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2837
|
-
|
|
2838
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
2891
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
2839
2892
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2840
2893
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2841
2894
|
"""
|
|
@@ -2846,13 +2899,11 @@ class AsyncRawUploadClient:
|
|
|
2846
2899
|
----------
|
|
2847
2900
|
tenant_id : str
|
|
2848
2901
|
|
|
2849
|
-
|
|
2902
|
+
request : MarkdownUploadRequest
|
|
2850
2903
|
|
|
2851
2904
|
sub_tenant_id : typing.Optional[str]
|
|
2852
2905
|
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
2906
|
+
relations : typing.Optional[Relations]
|
|
2856
2907
|
|
|
2857
2908
|
request_options : typing.Optional[RequestOptions]
|
|
2858
2909
|
Request-specific configuration.
|
|
@@ -2870,9 +2921,12 @@ class AsyncRawUploadClient:
|
|
|
2870
2921
|
"sub_tenant_id": sub_tenant_id,
|
|
2871
2922
|
},
|
|
2872
2923
|
json={
|
|
2873
|
-
"
|
|
2874
|
-
|
|
2875
|
-
|
|
2924
|
+
"request": convert_and_respect_annotation_metadata(
|
|
2925
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
2926
|
+
),
|
|
2927
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
2928
|
+
object_=relations, annotation=Relations, direction="write"
|
|
2929
|
+
),
|
|
2876
2930
|
},
|
|
2877
2931
|
headers={
|
|
2878
2932
|
"content-type": "application/json",
|
|
@@ -2976,10 +3030,9 @@ class AsyncRawUploadClient:
|
|
|
2976
3030
|
self,
|
|
2977
3031
|
*,
|
|
2978
3032
|
tenant_id: str,
|
|
2979
|
-
|
|
3033
|
+
request: MarkdownUploadRequest,
|
|
2980
3034
|
sub_tenant_id: typing.Optional[str] = None,
|
|
2981
|
-
|
|
2982
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3035
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
2983
3036
|
request_options: typing.Optional[RequestOptions] = None,
|
|
2984
3037
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
2985
3038
|
"""
|
|
@@ -2990,13 +3043,11 @@ class AsyncRawUploadClient:
|
|
|
2990
3043
|
----------
|
|
2991
3044
|
tenant_id : str
|
|
2992
3045
|
|
|
2993
|
-
|
|
3046
|
+
request : MarkdownUploadRequest
|
|
2994
3047
|
|
|
2995
3048
|
sub_tenant_id : typing.Optional[str]
|
|
2996
3049
|
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3050
|
+
relations : typing.Optional[Relations]
|
|
3000
3051
|
|
|
3001
3052
|
request_options : typing.Optional[RequestOptions]
|
|
3002
3053
|
Request-specific configuration.
|
|
@@ -3014,9 +3065,12 @@ class AsyncRawUploadClient:
|
|
|
3014
3065
|
"sub_tenant_id": sub_tenant_id,
|
|
3015
3066
|
},
|
|
3016
3067
|
json={
|
|
3017
|
-
"
|
|
3018
|
-
|
|
3019
|
-
|
|
3068
|
+
"request": convert_and_respect_annotation_metadata(
|
|
3069
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
3070
|
+
),
|
|
3071
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
3072
|
+
object_=relations, annotation=Relations, direction="write"
|
|
3073
|
+
),
|
|
3020
3074
|
},
|
|
3021
3075
|
headers={
|
|
3022
3076
|
"content-type": "application/json",
|
|
@@ -3121,10 +3175,9 @@ class AsyncRawUploadClient:
|
|
|
3121
3175
|
*,
|
|
3122
3176
|
source_id: str,
|
|
3123
3177
|
tenant_id: str,
|
|
3124
|
-
|
|
3178
|
+
request: MarkdownUploadRequest,
|
|
3125
3179
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3126
|
-
|
|
3127
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3180
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
3128
3181
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3129
3182
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3130
3183
|
"""
|
|
@@ -3134,13 +3187,11 @@ class AsyncRawUploadClient:
|
|
|
3134
3187
|
|
|
3135
3188
|
tenant_id : str
|
|
3136
3189
|
|
|
3137
|
-
|
|
3190
|
+
request : MarkdownUploadRequest
|
|
3138
3191
|
|
|
3139
3192
|
sub_tenant_id : typing.Optional[str]
|
|
3140
3193
|
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3194
|
+
relations : typing.Optional[Relations]
|
|
3144
3195
|
|
|
3145
3196
|
request_options : typing.Optional[RequestOptions]
|
|
3146
3197
|
Request-specific configuration.
|
|
@@ -3159,9 +3210,12 @@ class AsyncRawUploadClient:
|
|
|
3159
3210
|
"sub_tenant_id": sub_tenant_id,
|
|
3160
3211
|
},
|
|
3161
3212
|
json={
|
|
3162
|
-
"
|
|
3163
|
-
|
|
3164
|
-
|
|
3213
|
+
"request": convert_and_respect_annotation_metadata(
|
|
3214
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
3215
|
+
),
|
|
3216
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
3217
|
+
object_=relations, annotation=Relations, direction="write"
|
|
3218
|
+
),
|
|
3165
3219
|
},
|
|
3166
3220
|
headers={
|
|
3167
3221
|
"content-type": "application/json",
|
|
@@ -3266,10 +3320,9 @@ class AsyncRawUploadClient:
|
|
|
3266
3320
|
*,
|
|
3267
3321
|
source_id: str,
|
|
3268
3322
|
tenant_id: str,
|
|
3269
|
-
|
|
3323
|
+
request: MarkdownUploadRequest,
|
|
3270
3324
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3271
|
-
|
|
3272
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
3325
|
+
relations: typing.Optional[Relations] = OMIT,
|
|
3273
3326
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3274
3327
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3275
3328
|
"""
|
|
@@ -3279,13 +3332,11 @@ class AsyncRawUploadClient:
|
|
|
3279
3332
|
|
|
3280
3333
|
tenant_id : str
|
|
3281
3334
|
|
|
3282
|
-
|
|
3335
|
+
request : MarkdownUploadRequest
|
|
3283
3336
|
|
|
3284
3337
|
sub_tenant_id : typing.Optional[str]
|
|
3285
3338
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
document_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
3339
|
+
relations : typing.Optional[Relations]
|
|
3289
3340
|
|
|
3290
3341
|
request_options : typing.Optional[RequestOptions]
|
|
3291
3342
|
Request-specific configuration.
|
|
@@ -3304,9 +3355,12 @@ class AsyncRawUploadClient:
|
|
|
3304
3355
|
"sub_tenant_id": sub_tenant_id,
|
|
3305
3356
|
},
|
|
3306
3357
|
json={
|
|
3307
|
-
"
|
|
3308
|
-
|
|
3309
|
-
|
|
3358
|
+
"request": convert_and_respect_annotation_metadata(
|
|
3359
|
+
object_=request, annotation=MarkdownUploadRequest, direction="write"
|
|
3360
|
+
),
|
|
3361
|
+
"relations": convert_and_respect_annotation_metadata(
|
|
3362
|
+
object_=relations, annotation=Relations, direction="write"
|
|
3363
|
+
),
|
|
3310
3364
|
},
|
|
3311
3365
|
headers={
|
|
3312
3366
|
"content-type": "application/json",
|
|
@@ -3684,6 +3738,7 @@ class AsyncRawUploadClient:
|
|
|
3684
3738
|
tenant_id: str,
|
|
3685
3739
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3686
3740
|
file_id: typing.Optional[str] = None,
|
|
3741
|
+
relations: typing.Optional[str] = OMIT,
|
|
3687
3742
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3688
3743
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3689
3744
|
"""
|
|
@@ -3697,6 +3752,8 @@ class AsyncRawUploadClient:
|
|
|
3697
3752
|
|
|
3698
3753
|
file_id : typing.Optional[str]
|
|
3699
3754
|
|
|
3755
|
+
relations : typing.Optional[str]
|
|
3756
|
+
|
|
3700
3757
|
request_options : typing.Optional[RequestOptions]
|
|
3701
3758
|
Request-specific configuration.
|
|
3702
3759
|
|
|
@@ -3714,7 +3771,14 @@ class AsyncRawUploadClient:
|
|
|
3714
3771
|
"sub_tenant_id": sub_tenant_id,
|
|
3715
3772
|
"file_id": file_id,
|
|
3716
3773
|
},
|
|
3774
|
+
data={
|
|
3775
|
+
"relations": relations,
|
|
3776
|
+
},
|
|
3777
|
+
headers={
|
|
3778
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
3779
|
+
},
|
|
3717
3780
|
request_options=request_options,
|
|
3781
|
+
omit=OMIT,
|
|
3718
3782
|
)
|
|
3719
3783
|
try:
|
|
3720
3784
|
if 200 <= _response.status_code < 300:
|
|
@@ -3815,6 +3879,7 @@ class AsyncRawUploadClient:
|
|
|
3815
3879
|
source_id: str,
|
|
3816
3880
|
tenant_id: str,
|
|
3817
3881
|
sub_tenant_id: typing.Optional[str] = None,
|
|
3882
|
+
relations: typing.Optional[str] = OMIT,
|
|
3818
3883
|
request_options: typing.Optional[RequestOptions] = None,
|
|
3819
3884
|
) -> AsyncHttpResponse[SingleUploadData]:
|
|
3820
3885
|
"""
|
|
@@ -3828,6 +3893,8 @@ class AsyncRawUploadClient:
|
|
|
3828
3893
|
|
|
3829
3894
|
sub_tenant_id : typing.Optional[str]
|
|
3830
3895
|
|
|
3896
|
+
relations : typing.Optional[str]
|
|
3897
|
+
|
|
3831
3898
|
request_options : typing.Optional[RequestOptions]
|
|
3832
3899
|
Request-specific configuration.
|
|
3833
3900
|
|
|
@@ -3845,7 +3912,14 @@ class AsyncRawUploadClient:
|
|
|
3845
3912
|
"tenant_id": tenant_id,
|
|
3846
3913
|
"sub_tenant_id": sub_tenant_id,
|
|
3847
3914
|
},
|
|
3915
|
+
data={
|
|
3916
|
+
"relations": relations,
|
|
3917
|
+
},
|
|
3918
|
+
headers={
|
|
3919
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
3920
|
+
},
|
|
3848
3921
|
request_options=request_options,
|
|
3922
|
+
omit=OMIT,
|
|
3849
3923
|
)
|
|
3850
3924
|
try:
|
|
3851
3925
|
if 200 <= _response.status_code < 300:
|