groundx 2.0.16__py3-none-any.whl → 2.0.17__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.
- groundx/core/client_wrapper.py +1 -1
- groundx/documents/client.py +26 -12
- {groundx-2.0.16.dist-info → groundx-2.0.17.dist-info}/METADATA +1 -1
- {groundx-2.0.16.dist-info → groundx-2.0.17.dist-info}/RECORD +6 -6
- {groundx-2.0.16.dist-info → groundx-2.0.17.dist-info}/LICENSE +0 -0
- {groundx-2.0.16.dist-info → groundx-2.0.17.dist-info}/WHEEL +0 -0
groundx/core/client_wrapper.py
CHANGED
groundx/documents/client.py
CHANGED
@@ -122,7 +122,10 @@ class DocumentsClient:
|
|
122
122
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
123
123
|
|
124
124
|
def ingest_local(
|
125
|
-
self,
|
125
|
+
self,
|
126
|
+
*,
|
127
|
+
documents: typing.Optional[typing.List[IngestLocalDocument]] = OMIT,
|
128
|
+
request_options: typing.Optional[RequestOptions] = None,
|
126
129
|
) -> IngestResponse:
|
127
130
|
"""
|
128
131
|
Upload documents hosted on a local file system for ingestion into a GroundX bucket.
|
@@ -131,7 +134,7 @@ class DocumentsClient:
|
|
131
134
|
|
132
135
|
Parameters
|
133
136
|
----------
|
134
|
-
|
137
|
+
documents : typing.Optional[typing.List[IngestLocalDocument]]
|
135
138
|
|
136
139
|
request_options : typing.Optional[RequestOptions]
|
137
140
|
Request-specific configuration.
|
@@ -149,12 +152,13 @@ class DocumentsClient:
|
|
149
152
|
api_key="YOUR_API_KEY",
|
150
153
|
)
|
151
154
|
client.documents.ingest_local(
|
152
|
-
|
155
|
+
documents=[
|
153
156
|
IngestLocalDocument(
|
154
157
|
bucket_id=1234,
|
155
|
-
file_data="binary data
|
158
|
+
file_data="binary data",
|
156
159
|
file_name="my_file.txt",
|
157
160
|
file_type="txt",
|
161
|
+
search_data={"key": "value"},
|
158
162
|
)
|
159
163
|
],
|
160
164
|
)
|
@@ -163,7 +167,7 @@ class DocumentsClient:
|
|
163
167
|
"v1/ingest/documents/local",
|
164
168
|
method="POST",
|
165
169
|
data={
|
166
|
-
"
|
170
|
+
"documents": documents,
|
167
171
|
},
|
168
172
|
files={},
|
169
173
|
request_options=request_options,
|
@@ -233,7 +237,10 @@ class DocumentsClient:
|
|
233
237
|
client.documents.crawl_website(
|
234
238
|
websites=[
|
235
239
|
CrawlWebsiteSource(
|
236
|
-
bucket_id=
|
240
|
+
bucket_id=1234,
|
241
|
+
cap=100,
|
242
|
+
depth=3,
|
243
|
+
search_data={"key": "value"},
|
237
244
|
source_url="https://my.website.com",
|
238
245
|
)
|
239
246
|
],
|
@@ -863,7 +870,10 @@ class AsyncDocumentsClient:
|
|
863
870
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
864
871
|
|
865
872
|
async def ingest_local(
|
866
|
-
self,
|
873
|
+
self,
|
874
|
+
*,
|
875
|
+
documents: typing.Optional[typing.List[IngestLocalDocument]] = OMIT,
|
876
|
+
request_options: typing.Optional[RequestOptions] = None,
|
867
877
|
) -> IngestResponse:
|
868
878
|
"""
|
869
879
|
Upload documents hosted on a local file system for ingestion into a GroundX bucket.
|
@@ -872,7 +882,7 @@ class AsyncDocumentsClient:
|
|
872
882
|
|
873
883
|
Parameters
|
874
884
|
----------
|
875
|
-
|
885
|
+
documents : typing.Optional[typing.List[IngestLocalDocument]]
|
876
886
|
|
877
887
|
request_options : typing.Optional[RequestOptions]
|
878
888
|
Request-specific configuration.
|
@@ -895,12 +905,13 @@ class AsyncDocumentsClient:
|
|
895
905
|
|
896
906
|
async def main() -> None:
|
897
907
|
await client.documents.ingest_local(
|
898
|
-
|
908
|
+
documents=[
|
899
909
|
IngestLocalDocument(
|
900
910
|
bucket_id=1234,
|
901
|
-
file_data="binary data
|
911
|
+
file_data="binary data",
|
902
912
|
file_name="my_file.txt",
|
903
913
|
file_type="txt",
|
914
|
+
search_data={"key": "value"},
|
904
915
|
)
|
905
916
|
],
|
906
917
|
)
|
@@ -912,7 +923,7 @@ class AsyncDocumentsClient:
|
|
912
923
|
"v1/ingest/documents/local",
|
913
924
|
method="POST",
|
914
925
|
data={
|
915
|
-
"
|
926
|
+
"documents": documents,
|
916
927
|
},
|
917
928
|
files={},
|
918
929
|
request_options=request_options,
|
@@ -987,7 +998,10 @@ class AsyncDocumentsClient:
|
|
987
998
|
await client.documents.crawl_website(
|
988
999
|
websites=[
|
989
1000
|
CrawlWebsiteSource(
|
990
|
-
bucket_id=
|
1001
|
+
bucket_id=1234,
|
1002
|
+
cap=100,
|
1003
|
+
depth=3,
|
1004
|
+
search_data={"key": "value"},
|
991
1005
|
source_url="https://my.website.com",
|
992
1006
|
)
|
993
1007
|
],
|
@@ -4,7 +4,7 @@ groundx/buckets/client.py,sha256=TofNrkej1AC_-FU5rf_y8KG8ubFUpHtLa8PQ7rqax6E,265
|
|
4
4
|
groundx/client.py,sha256=Q1Kw0z6K-z-ShhNyuuPe5fYonM9M2I_55-ukUrUWk1U,6507
|
5
5
|
groundx/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
6
6
|
groundx/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
7
|
-
groundx/core/client_wrapper.py,sha256=
|
7
|
+
groundx/core/client_wrapper.py,sha256=zY1z1mzje1H39BKU9IR7OxYeBRV-PVvs004iAgfDqxI,1803
|
8
8
|
groundx/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
9
9
|
groundx/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
10
10
|
groundx/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
@@ -17,7 +17,7 @@ groundx/core/serialization.py,sha256=D9h_t-RQON3-CHWs1C4ESY9B-Yd5d-l5lnTLb_X896g
|
|
17
17
|
groundx/customer/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
18
18
|
groundx/customer/client.py,sha256=C_JANeDewRD1Kg-q7LPxdiOSWbYSTOiYlBYZLRYPI44,3467
|
19
19
|
groundx/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
20
|
-
groundx/documents/client.py,sha256=
|
20
|
+
groundx/documents/client.py,sha256=_l8K11r-p3qaMd0Qn43JjnSN68stMiaRoTzbbukQxl8,58882
|
21
21
|
groundx/environment.py,sha256=CInm1_DKtZ1mrxutmKb1qqv82P33r_S87hZD3Hc1VB0,159
|
22
22
|
groundx/errors/__init__.py,sha256=-prNYsFd8xxM4va0vR1raZjcd10tllOJKyEWjX_pwdU,214
|
23
23
|
groundx/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcsZe1HKV9GDWJY,264
|
@@ -75,7 +75,7 @@ groundx/types/sort_order.py,sha256=hfJkStz6zHf3iWQFaVLkNCZPdyj5JS7TsQlN4Ij8Q5A,1
|
|
75
75
|
groundx/types/subscription_detail.py,sha256=WNfUw2EMVECIvNYcV2s51zZ6T3Utc4zYXw63bPaeM6U,768
|
76
76
|
groundx/types/subscription_detail_meters.py,sha256=lBa8-1QlMVHjr5RLGqhiTKnD1KMM0AAHTWvz9TVtG8w,830
|
77
77
|
groundx/version.py,sha256=1yVogKaq260fQfckM2RYN2144SEw0QROsZW8ICtkG4U,74
|
78
|
-
groundx-2.0.
|
79
|
-
groundx-2.0.
|
80
|
-
groundx-2.0.
|
81
|
-
groundx-2.0.
|
78
|
+
groundx-2.0.17.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
|
79
|
+
groundx-2.0.17.dist-info/METADATA,sha256=HZspuVrfswC62NtJa1cUVkS53KO8stJ8xnqTNfFx4lE,5206
|
80
|
+
groundx-2.0.17.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
81
|
+
groundx-2.0.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|