groundx 2.0.21__py3-none-any.whl → 2.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
groundx/__init__.py CHANGED
@@ -9,6 +9,7 @@ from .types import (
9
9
  BucketUpdateResponse,
10
10
  CustomerDetail,
11
11
  CustomerResponse,
12
+ Document,
12
13
  DocumentDetail,
13
14
  DocumentListResponse,
14
15
  DocumentLocalIngestRequest,
@@ -48,8 +49,8 @@ from .types import (
48
49
  )
49
50
  from .errors import BadRequestError, UnauthorizedError
50
51
  from . import buckets, customer, documents, groups, health, search
51
- from .client import AsyncGroundX, GroundX
52
52
  from .environment import GroundXEnvironment
53
+ from .ingest import AsyncGroundX, GroundX
53
54
  from .search import SearchContentRequestId
54
55
  from .version import __version__
55
56
 
@@ -64,6 +65,7 @@ __all__ = [
64
65
  "BucketUpdateResponse",
65
66
  "CustomerDetail",
66
67
  "CustomerResponse",
68
+ "Document",
67
69
  "DocumentDetail",
68
70
  "DocumentListResponse",
69
71
  "DocumentLocalIngestRequest",
groundx/buckets/client.py CHANGED
@@ -33,8 +33,6 @@ class BucketsClient:
33
33
  """
34
34
  List all buckets within your GroundX account
35
35
 
36
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
37
-
38
36
  Parameters
39
37
  ----------
40
38
  n : typing.Optional[int]
@@ -87,8 +85,6 @@ class BucketsClient:
87
85
  """
88
86
  Create a new bucket.
89
87
 
90
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
91
-
92
88
  Parameters
93
89
  ----------
94
90
  name : str
@@ -152,8 +148,6 @@ class BucketsClient:
152
148
  """
153
149
  Look up a specific bucket by its bucketId.
154
150
 
155
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
156
-
157
151
  Parameters
158
152
  ----------
159
153
  bucket_id : int
@@ -223,8 +217,6 @@ class BucketsClient:
223
217
  """
224
218
  Rename a bucket.
225
219
 
226
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
227
-
228
220
  Parameters
229
221
  ----------
230
222
  bucket_id : int
@@ -303,8 +295,6 @@ class BucketsClient:
303
295
  """
304
296
  Delete a bucket.
305
297
 
306
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
307
-
308
298
  Parameters
309
299
  ----------
310
300
  bucket_id : int
@@ -383,8 +373,6 @@ class AsyncBucketsClient:
383
373
  """
384
374
  List all buckets within your GroundX account
385
375
 
386
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
387
-
388
376
  Parameters
389
377
  ----------
390
378
  n : typing.Optional[int]
@@ -445,8 +433,6 @@ class AsyncBucketsClient:
445
433
  """
446
434
  Create a new bucket.
447
435
 
448
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
449
-
450
436
  Parameters
451
437
  ----------
452
438
  name : str
@@ -518,8 +504,6 @@ class AsyncBucketsClient:
518
504
  """
519
505
  Look up a specific bucket by its bucketId.
520
506
 
521
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
522
-
523
507
  Parameters
524
508
  ----------
525
509
  bucket_id : int
@@ -597,8 +581,6 @@ class AsyncBucketsClient:
597
581
  """
598
582
  Rename a bucket.
599
583
 
600
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
601
-
602
584
  Parameters
603
585
  ----------
604
586
  bucket_id : int
@@ -687,8 +669,6 @@ class AsyncBucketsClient:
687
669
  """
688
670
  Delete a bucket.
689
671
 
690
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
691
-
692
672
  Parameters
693
673
  ----------
694
674
  bucket_id : int
groundx/client.py CHANGED
@@ -19,7 +19,7 @@ from .customer.client import AsyncCustomerClient
19
19
  from .health.client import AsyncHealthClient
20
20
 
21
21
 
22
- class GroundX:
22
+ class GroundXBase:
23
23
  """
24
24
  Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
25
25
 
@@ -85,7 +85,7 @@ class GroundX:
85
85
  self.health = HealthClient(client_wrapper=self._client_wrapper)
86
86
 
87
87
 
88
- class AsyncGroundX:
88
+ class AsyncGroundXBase:
89
89
  """
90
90
  Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
91
91
 
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "groundx",
19
- "X-Fern-SDK-Version": "2.0.21",
19
+ "X-Fern-SDK-Version": "2.1.0",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  return headers
@@ -40,8 +40,6 @@ class DocumentsClient:
40
40
  """
41
41
  Ingest documents hosted on public URLs into a GroundX bucket.
42
42
 
43
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
44
-
45
43
  Parameters
46
44
  ----------
47
45
  documents : typing.Sequence[IngestRemoteDocument]
@@ -126,8 +124,6 @@ class DocumentsClient:
126
124
  """
127
125
  Upload documents hosted on a local file system into a GroundX bucket.
128
126
 
129
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
130
-
131
127
  Parameters
132
128
  ----------
133
129
  request : DocumentLocalIngestRequest
@@ -209,8 +205,6 @@ class DocumentsClient:
209
205
  """
210
206
  Upload the content of a publicly accessible website for ingestion into a GroundX bucket. This is done by following links within a specified URL, recursively, up to a specified depth or number of pages.
211
207
 
212
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
213
-
214
208
  Parameters
215
209
  ----------
216
210
  websites : typing.Sequence[WebsiteSource]
@@ -234,8 +228,8 @@ class DocumentsClient:
234
228
  websites=[
235
229
  WebsiteSource(
236
230
  bucket_id=1234,
237
- cap=100,
238
- depth=3,
231
+ cap=10,
232
+ depth=2,
239
233
  search_data={"key": "value"},
240
234
  source_url="https://my.website.com",
241
235
  )
@@ -304,8 +298,6 @@ class DocumentsClient:
304
298
  """
305
299
  lookup all documents across all resources which are currently on GroundX
306
300
 
307
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
308
-
309
301
  Parameters
310
302
  ----------
311
303
  n : typing.Optional[int]
@@ -379,8 +371,6 @@ class DocumentsClient:
379
371
  """
380
372
  Delete multiple documents hosted on GroundX
381
373
 
382
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
383
-
384
374
  Parameters
385
375
  ----------
386
376
  document_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
@@ -401,7 +391,9 @@ class DocumentsClient:
401
391
  client = GroundX(
402
392
  api_key="YOUR_API_KEY",
403
393
  )
404
- client.documents.delete()
394
+ client.documents.delete(
395
+ document_ids="123e4567-e89b-12d3-a456-426614174000,9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49",
396
+ )
405
397
  """
406
398
  _response = self._client_wrapper.httpx_client.request(
407
399
  "v1/ingest/documents",
@@ -451,8 +443,6 @@ class DocumentsClient:
451
443
  """
452
444
  Get the current status of an ingest, initiated with documents.ingest_remote, documents.ingest_local, or documents.crawl_website, by specifying the processId (the processId is included in the response of the documents.ingest functions).
453
445
 
454
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
455
-
456
446
  Parameters
457
447
  ----------
458
448
  process_id : str
@@ -531,8 +521,6 @@ class DocumentsClient:
531
521
  """
532
522
  lookup the document(s) associated with a processId, bucketId, groupId, or projectId.
533
523
 
534
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
535
-
536
524
  Parameters
537
525
  ----------
538
526
  id : int
@@ -626,8 +614,6 @@ class DocumentsClient:
626
614
  """
627
615
  Look up an existing document by documentId.
628
616
 
629
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
630
-
631
617
  Parameters
632
618
  ----------
633
619
  document_id : str
@@ -697,8 +683,6 @@ class DocumentsClient:
697
683
  """
698
684
  Delete a single document hosted on GroundX
699
685
 
700
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
701
-
702
686
  Parameters
703
687
  ----------
704
688
  document_id : str
@@ -776,8 +760,6 @@ class AsyncDocumentsClient:
776
760
  """
777
761
  Ingest documents hosted on public URLs into a GroundX bucket.
778
762
 
779
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
780
-
781
763
  Parameters
782
764
  ----------
783
765
  documents : typing.Sequence[IngestRemoteDocument]
@@ -870,8 +852,6 @@ class AsyncDocumentsClient:
870
852
  """
871
853
  Upload documents hosted on a local file system into a GroundX bucket.
872
854
 
873
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
874
-
875
855
  Parameters
876
856
  ----------
877
857
  request : DocumentLocalIngestRequest
@@ -965,8 +945,6 @@ class AsyncDocumentsClient:
965
945
  """
966
946
  Upload the content of a publicly accessible website for ingestion into a GroundX bucket. This is done by following links within a specified URL, recursively, up to a specified depth or number of pages.
967
947
 
968
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
969
-
970
948
  Parameters
971
949
  ----------
972
950
  websites : typing.Sequence[WebsiteSource]
@@ -995,8 +973,8 @@ class AsyncDocumentsClient:
995
973
  websites=[
996
974
  WebsiteSource(
997
975
  bucket_id=1234,
998
- cap=100,
999
- depth=3,
976
+ cap=10,
977
+ depth=2,
1000
978
  search_data={"key": "value"},
1001
979
  source_url="https://my.website.com",
1002
980
  )
@@ -1068,8 +1046,6 @@ class AsyncDocumentsClient:
1068
1046
  """
1069
1047
  lookup all documents across all resources which are currently on GroundX
1070
1048
 
1071
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1072
-
1073
1049
  Parameters
1074
1050
  ----------
1075
1051
  n : typing.Optional[int]
@@ -1151,8 +1127,6 @@ class AsyncDocumentsClient:
1151
1127
  """
1152
1128
  Delete multiple documents hosted on GroundX
1153
1129
 
1154
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1155
-
1156
1130
  Parameters
1157
1131
  ----------
1158
1132
  document_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
@@ -1178,7 +1152,9 @@ class AsyncDocumentsClient:
1178
1152
 
1179
1153
 
1180
1154
  async def main() -> None:
1181
- await client.documents.delete()
1155
+ await client.documents.delete(
1156
+ document_ids="123e4567-e89b-12d3-a456-426614174000,9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49",
1157
+ )
1182
1158
 
1183
1159
 
1184
1160
  asyncio.run(main())
@@ -1231,8 +1207,6 @@ class AsyncDocumentsClient:
1231
1207
  """
1232
1208
  Get the current status of an ingest, initiated with documents.ingest_remote, documents.ingest_local, or documents.crawl_website, by specifying the processId (the processId is included in the response of the documents.ingest functions).
1233
1209
 
1234
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1235
-
1236
1210
  Parameters
1237
1211
  ----------
1238
1212
  process_id : str
@@ -1319,8 +1293,6 @@ class AsyncDocumentsClient:
1319
1293
  """
1320
1294
  lookup the document(s) associated with a processId, bucketId, groupId, or projectId.
1321
1295
 
1322
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1323
-
1324
1296
  Parameters
1325
1297
  ----------
1326
1298
  id : int
@@ -1424,8 +1396,6 @@ class AsyncDocumentsClient:
1424
1396
  """
1425
1397
  Look up an existing document by documentId.
1426
1398
 
1427
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1428
-
1429
1399
  Parameters
1430
1400
  ----------
1431
1401
  document_id : str
@@ -1503,8 +1473,6 @@ class AsyncDocumentsClient:
1503
1473
  """
1504
1474
  Delete a single document hosted on GroundX
1505
1475
 
1506
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1507
-
1508
1476
  Parameters
1509
1477
  ----------
1510
1478
  document_id : str
groundx/groups/client.py CHANGED
@@ -32,8 +32,6 @@ class GroupsClient:
32
32
  """
33
33
  list all groups within your GroundX account.
34
34
 
35
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
36
-
37
35
  Parameters
38
36
  ----------
39
37
  n : typing.Optional[int]
@@ -92,8 +90,6 @@ class GroupsClient:
92
90
  """
93
91
  create a new group, a group being a collection of buckets which can be searched.
94
92
 
95
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
96
-
97
93
  Parameters
98
94
  ----------
99
95
  name : str
@@ -162,8 +158,6 @@ class GroupsClient:
162
158
  """
163
159
  look up a specific group by its groupId.
164
160
 
165
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
166
-
167
161
  Parameters
168
162
  ----------
169
163
  group_id : int
@@ -233,8 +227,6 @@ class GroupsClient:
233
227
  """
234
228
  Rename a group
235
229
 
236
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
237
-
238
230
  Parameters
239
231
  ----------
240
232
  group_id : int
@@ -313,8 +305,6 @@ class GroupsClient:
313
305
  """
314
306
  Delete a group.
315
307
 
316
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
317
-
318
308
  Parameters
319
309
  ----------
320
310
  group_id : int
@@ -384,8 +374,6 @@ class GroupsClient:
384
374
  """
385
375
  Add an existing bucket to an existing group. Buckets and groups can be associated many to many.
386
376
 
387
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
388
-
389
377
  Parameters
390
378
  ----------
391
379
  group_id : int
@@ -459,8 +447,6 @@ class GroupsClient:
459
447
  """
460
448
  remove a bucket from a group. Buckets and groups can be associated many to many, this removes one bucket to group association without disturbing others.
461
449
 
462
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
463
-
464
450
  Parameters
465
451
  ----------
466
452
  group_id : int
@@ -543,8 +529,6 @@ class AsyncGroupsClient:
543
529
  """
544
530
  list all groups within your GroundX account.
545
531
 
546
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
547
-
548
532
  Parameters
549
533
  ----------
550
534
  n : typing.Optional[int]
@@ -611,8 +595,6 @@ class AsyncGroupsClient:
611
595
  """
612
596
  create a new group, a group being a collection of buckets which can be searched.
613
597
 
614
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
615
-
616
598
  Parameters
617
599
  ----------
618
600
  name : str
@@ -689,8 +671,6 @@ class AsyncGroupsClient:
689
671
  """
690
672
  look up a specific group by its groupId.
691
673
 
692
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
693
-
694
674
  Parameters
695
675
  ----------
696
676
  group_id : int
@@ -768,8 +748,6 @@ class AsyncGroupsClient:
768
748
  """
769
749
  Rename a group
770
750
 
771
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
772
-
773
751
  Parameters
774
752
  ----------
775
753
  group_id : int
@@ -858,8 +836,6 @@ class AsyncGroupsClient:
858
836
  """
859
837
  Delete a group.
860
838
 
861
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
862
-
863
839
  Parameters
864
840
  ----------
865
841
  group_id : int
@@ -937,8 +913,6 @@ class AsyncGroupsClient:
937
913
  """
938
914
  Add an existing bucket to an existing group. Buckets and groups can be associated many to many.
939
915
 
940
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
941
-
942
916
  Parameters
943
917
  ----------
944
918
  group_id : int
@@ -1020,8 +994,6 @@ class AsyncGroupsClient:
1020
994
  """
1021
995
  remove a bucket from a group. Buckets and groups can be associated many to many, this removes one bucket to group association without disturbing others.
1022
996
 
1023
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
1024
-
1025
997
  Parameters
1026
998
  ----------
1027
999
  group_id : int
groundx/ingest.py ADDED
@@ -0,0 +1,332 @@
1
+ import aiohttp, io, json, mimetypes, requests, typing, os
2
+ from asyncio import TimeoutError
3
+ from urllib.parse import urlparse
4
+
5
+ from json.decoder import JSONDecodeError
6
+
7
+ from .client import GroundXBase, AsyncGroundXBase
8
+ from .core.api_error import ApiError
9
+ from .core.pydantic_utilities import parse_obj_as
10
+ from .core.request_options import RequestOptions
11
+ from .errors.bad_request_error import BadRequestError
12
+ from .errors.unauthorized_error import UnauthorizedError
13
+ from .types.document import Document
14
+ from .types.ingest_remote_document import IngestRemoteDocument
15
+ from .types.ingest_response import IngestResponse
16
+
17
+ # this is used as the default value for optional parameters
18
+ OMIT = typing.cast(typing.Any, ...)
19
+
20
+
21
+ DOCUMENT_TYPE_TO_MIME = {
22
+ "txt": "text/plain",
23
+ "docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
24
+ "pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
25
+ "xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
26
+ "pdf": "application/pdf",
27
+ "png": "image/png",
28
+ "jpg": "image/jpeg",
29
+ "csv": "text/csv",
30
+ "tsv": "text/tab-separated-values",
31
+ "json": "application/json",
32
+ }
33
+ MIME_TO_DOCUMENT_TYPE = {v: k for k, v in DOCUMENT_TYPE_TO_MIME.items()}
34
+
35
+
36
+ def prep_documents(
37
+ documents: typing.Sequence[Document],
38
+ ) -> typing.Tuple[
39
+ typing.List[IngestRemoteDocument],
40
+ typing.List[
41
+ typing.Tuple[str, typing.Tuple[typing.Union[str, None], typing.BinaryIO, str]]
42
+ ],
43
+ ]:
44
+ """
45
+ Process documents and separate them into remote and local documents.
46
+ """
47
+ if not documents:
48
+ raise ValueError("No documents provided for ingestion.")
49
+
50
+ def is_valid_local_path(path: str) -> bool:
51
+ expanded_path = os.path.expanduser(path)
52
+ return os.path.exists(expanded_path)
53
+
54
+ def is_valid_url(path: str) -> bool:
55
+ try:
56
+ result = urlparse(path)
57
+ return all([result.scheme, result.netloc])
58
+ except ValueError:
59
+ return False
60
+
61
+ local_documents: typing.List[
62
+ typing.Tuple[str, typing.Tuple[typing.Union[str, None], typing.BinaryIO, str]]
63
+ ] = []
64
+ remote_documents: typing.List[IngestRemoteDocument] = []
65
+
66
+ for document in documents:
67
+ if not hasattr(document, "file_path"):
68
+ raise ValueError("Each document must have a 'file_path' attribute.")
69
+
70
+ if is_valid_url(document.file_path):
71
+ remote_document = IngestRemoteDocument(
72
+ bucket_id=document.bucket_id,
73
+ file_name=document.file_name,
74
+ file_type=document.file_type,
75
+ search_data=document.search_data,
76
+ source_url=document.file_path,
77
+ )
78
+ remote_documents.append(remote_document)
79
+ elif is_valid_local_path(document.file_path):
80
+ expanded_path = os.path.expanduser(document.file_path)
81
+ file_name = os.path.basename(expanded_path)
82
+ mime_type = mimetypes.guess_type(file_name)[0] or "application/octet-stream"
83
+ file_type = MIME_TO_DOCUMENT_TYPE.get(mime_type, None)
84
+ if document.file_type:
85
+ file_type = document.file_type
86
+ mime_type = DOCUMENT_TYPE_TO_MIME.get(
87
+ document.file_type, "application/octet-stream"
88
+ )
89
+
90
+ if document.file_name:
91
+ file_name = document.file_name
92
+
93
+ try:
94
+ local_documents.append(
95
+ (
96
+ "blob",
97
+ (
98
+ file_name,
99
+ open(expanded_path, "rb"),
100
+ mime_type,
101
+ ),
102
+ )
103
+ )
104
+ except Exception as e:
105
+ raise ValueError(f"Error reading file {expanded_path}: {e}")
106
+
107
+ metadata = {
108
+ "bucketId": document.bucket_id,
109
+ "fileName": file_name,
110
+ "fileType": file_type,
111
+ }
112
+ if document.search_data:
113
+ metadata["searchData"] = document.search_data
114
+
115
+ local_documents.append(
116
+ (
117
+ "metadata",
118
+ (
119
+ f"data.json",
120
+ io.BytesIO(json.dumps(metadata).encode("utf-8")),
121
+ "application/json",
122
+ ),
123
+ )
124
+ )
125
+ else:
126
+ raise ValueError(f"Invalid file path: {document.file_path}")
127
+
128
+ return remote_documents, local_documents
129
+
130
+
131
+ class GroundX(GroundXBase):
132
+ def ingest(
133
+ self,
134
+ *,
135
+ documents: typing.Sequence[Document],
136
+ request_options: typing.Optional[RequestOptions] = None,
137
+ ) -> IngestResponse:
138
+ """
139
+ Ingest local or hosted documents into a GroundX bucket.
140
+
141
+ Parameters
142
+ ----------
143
+ documents : typing.Sequence[Document]
144
+
145
+ request_options : typing.Optional[RequestOptions]
146
+ Request-specific configuration.
147
+
148
+ Returns
149
+ -------
150
+ IngestResponse
151
+ Documents successfully uploaded
152
+
153
+ Examples
154
+ --------
155
+ from groundx import Document, GroundX
156
+
157
+ client = GroundX(
158
+ api_key="YOUR_API_KEY",
159
+ )
160
+
161
+ client.ingest(
162
+ documents=[
163
+ Document(
164
+ bucket_id=1234,
165
+ file_name="my_file1.txt",
166
+ file_path="https://my.source.url.com/file1.txt",
167
+ file_type="txt",
168
+ )
169
+ ],
170
+ )
171
+ """
172
+ remote_documents, local_documents = prep_documents(documents)
173
+
174
+ if local_documents and remote_documents:
175
+ raise ValueError("Documents must all be either local or remote, not a mix.")
176
+
177
+ if len(remote_documents) > 0:
178
+ return self.documents.ingest_remote(
179
+ documents=remote_documents,
180
+ request_options=request_options,
181
+ )
182
+
183
+ timeout = self._client_wrapper.get_timeout()
184
+ headers = self._client_wrapper.get_headers()
185
+ base_url = self._client_wrapper.get_base_url().rstrip("/")
186
+ follow_redirects = getattr(
187
+ self._client_wrapper.httpx_client, "follow_redirects", True
188
+ )
189
+
190
+ url = f"{base_url}/v1/ingest/documents/local"
191
+ _response = requests.post(
192
+ url,
193
+ files=local_documents,
194
+ headers=headers,
195
+ timeout=timeout,
196
+ allow_redirects=follow_redirects,
197
+ )
198
+
199
+ try:
200
+ if 200 <= _response.status_code < 300:
201
+ return typing.cast(
202
+ IngestResponse,
203
+ parse_obj_as(
204
+ type_=IngestResponse, # type: ignore
205
+ object_=_response.json(),
206
+ ),
207
+ )
208
+ if _response.status_code == 400:
209
+ raise BadRequestError(
210
+ typing.cast(
211
+ typing.Optional[typing.Any],
212
+ parse_obj_as(
213
+ type_=typing.Optional[typing.Any], # type: ignore
214
+ object_=_response.json(),
215
+ ),
216
+ )
217
+ )
218
+ if _response.status_code == 401:
219
+ raise UnauthorizedError(
220
+ typing.cast(
221
+ typing.Optional[typing.Any],
222
+ parse_obj_as(
223
+ type_=typing.Optional[typing.Any], # type: ignore
224
+ object_=_response.json(),
225
+ ),
226
+ )
227
+ )
228
+ _response_json = _response.json()
229
+ except JSONDecodeError:
230
+ raise ApiError(status_code=_response.status_code, body=_response.text)
231
+
232
+ raise ApiError(status_code=_response.status_code, body=_response_json)
233
+
234
+
235
+ class AsyncGroundX(AsyncGroundXBase):
236
+ async def ingest(
237
+ self,
238
+ *,
239
+ documents: typing.Sequence[Document],
240
+ request_options: typing.Optional[RequestOptions] = None,
241
+ ) -> IngestResponse:
242
+ """
243
+ Ingest local or hosted documents into a GroundX bucket.
244
+
245
+ Parameters
246
+ ----------
247
+ documents : typing.Sequence[Document]
248
+
249
+ request_options : typing.Optional[RequestOptions]
250
+ Request-specific configuration.
251
+
252
+ Returns
253
+ -------
254
+ IngestResponse
255
+ Documents successfully uploaded
256
+
257
+ Examples
258
+ --------
259
+ import asyncio
260
+
261
+ from groundx import AsyncGroundX, Document
262
+
263
+ client = AsyncGroundX(
264
+ api_key="YOUR_API_KEY",
265
+ )
266
+
267
+ async def main() -> None:
268
+ await client.ingest(
269
+ documents=[
270
+ Document(
271
+ bucket_id=1234,
272
+ file_name="my_file1.txt",
273
+ file_path="https://my.source.url.com/file1.txt",
274
+ file_type="txt",
275
+ )
276
+ ],
277
+ )
278
+
279
+ asyncio.run(main())
280
+ """
281
+ remote_documents, local_documents = prep_documents(documents)
282
+
283
+ if local_documents and remote_documents:
284
+ raise ValueError("Documents must all be either local or remote, not a mix.")
285
+
286
+ if len(remote_documents) > 0:
287
+ return await self.documents.ingest_remote(
288
+ documents=remote_documents,
289
+ request_options=request_options,
290
+ )
291
+
292
+ timeout = self._client_wrapper.get_timeout()
293
+ headers = self._client_wrapper.get_headers()
294
+ base_url = self._client_wrapper.get_base_url().rstrip("/")
295
+
296
+ url = f"{base_url}/v1/ingest/documents/local"
297
+
298
+ try:
299
+ async with aiohttp.ClientSession() as session:
300
+ data = aiohttp.FormData()
301
+ for field_name, (file_name, file_obj, content_type) in local_documents:
302
+ data.add_field(
303
+ name=field_name,
304
+ value=file_obj,
305
+ filename=file_name,
306
+ content_type=content_type,
307
+ )
308
+
309
+ async with session.post(
310
+ url, data=data, headers=headers, timeout=timeout
311
+ ) as response:
312
+ if 200 <= response.status < 300:
313
+ response_data = await response.json()
314
+ return typing.cast(
315
+ IngestResponse,
316
+ parse_obj_as(
317
+ type_=IngestResponse, # type: ignore
318
+ object_=response_data,
319
+ ),
320
+ )
321
+ if response.status == 400:
322
+ raise BadRequestError(await response.json())
323
+ if response.status == 401:
324
+ raise UnauthorizedError(await response.json())
325
+
326
+ raise ApiError(
327
+ status_code=response.status, body=await response.text()
328
+ )
329
+ except TimeoutError:
330
+ raise ApiError(status_code=408, body="Request timed out")
331
+ except aiohttp.ClientError as e:
332
+ raise ApiError(status_code=500, body=str(e))
groundx/search/client.py CHANGED
@@ -34,10 +34,7 @@ class SearchClient:
34
34
  ) -> SearchResponse:
35
35
  """
36
36
  Search documents on GroundX for the most relevant information to a given query.
37
-
38
- The result of this query is typically used in one of two ways; result['search']['text'] can be used to provide context to a language model, facilitating RAG, or result['search']['results'] can be used to observe chunks of text which are relevant to the query, facilitating citation.
39
-
40
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
37
+ The result of this query is typically used in one of two ways; `result.search.text` can be used to provide context to a language model, facilitating RAG, or `result.search.results` can be used to observe chunks of text which are relevant to the query, facilitating citation.
41
38
 
42
39
  Parameters
43
40
  ----------
@@ -145,10 +142,7 @@ class SearchClient:
145
142
  ) -> SearchResponse:
146
143
  """
147
144
  Search documents on GroundX for the most relevant information to a given query by documentId(s).
148
-
149
- The result of this query is typically used in one of two ways; result['search']['text'] can be used to provide context to a language model, facilitating RAG, or result['search']['results'] can be used to observe chunks of text which are relevant to the query, facilitating citation.
150
-
151
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
145
+ The result of this query is typically used in one of two ways; `result.search.text` can be used to provide context to a language model, facilitating RAG, or `result.search.results` can be used to observe chunks of text which are relevant to the query, facilitating citation.
152
146
 
153
147
  Parameters
154
148
  ----------
@@ -262,10 +256,7 @@ class AsyncSearchClient:
262
256
  ) -> SearchResponse:
263
257
  """
264
258
  Search documents on GroundX for the most relevant information to a given query.
265
-
266
- The result of this query is typically used in one of two ways; result['search']['text'] can be used to provide context to a language model, facilitating RAG, or result['search']['results'] can be used to observe chunks of text which are relevant to the query, facilitating citation.
267
-
268
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
259
+ The result of this query is typically used in one of two ways; `result.search.text` can be used to provide context to a language model, facilitating RAG, or `result.search.results` can be used to observe chunks of text which are relevant to the query, facilitating citation.
269
260
 
270
261
  Parameters
271
262
  ----------
@@ -381,10 +372,7 @@ class AsyncSearchClient:
381
372
  ) -> SearchResponse:
382
373
  """
383
374
  Search documents on GroundX for the most relevant information to a given query by documentId(s).
384
-
385
- The result of this query is typically used in one of two ways; result['search']['text'] can be used to provide context to a language model, facilitating RAG, or result['search']['results'] can be used to observe chunks of text which are relevant to the query, facilitating citation.
386
-
387
- Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
375
+ The result of this query is typically used in one of two ways; `result.search.text` can be used to provide context to a language model, facilitating RAG, or `result.search.results` can be used to observe chunks of text which are relevant to the query, facilitating citation.
388
376
 
389
377
  Parameters
390
378
  ----------
groundx/types/__init__.py CHANGED
@@ -8,6 +8,7 @@ from .bucket_update_detail import BucketUpdateDetail
8
8
  from .bucket_update_response import BucketUpdateResponse
9
9
  from .customer_detail import CustomerDetail
10
10
  from .customer_response import CustomerResponse
11
+ from .document import Document
11
12
  from .document_detail import DocumentDetail
12
13
  from .document_list_response import DocumentListResponse
13
14
  from .document_local_ingest_request import DocumentLocalIngestRequest
@@ -54,6 +55,7 @@ __all__ = [
54
55
  "BucketUpdateResponse",
55
56
  "CustomerDetail",
56
57
  "CustomerResponse",
58
+ "Document",
57
59
  "DocumentDetail",
58
60
  "DocumentListResponse",
59
61
  "DocumentLocalIngestRequest",
@@ -0,0 +1,45 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ..core.serialization import FieldMetadata
6
+ import pydantic
7
+ import typing
8
+ from .document_type import DocumentType
9
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
+
11
+
12
+ class Document(UniversalBaseModel):
13
+ bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
14
+ """
15
+ The bucketId of the bucket which this file will be ingested into.
16
+ """
17
+
18
+ file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
19
+ default=None
20
+ )
21
+ """
22
+ The name of the file being ingested.
23
+ """
24
+
25
+ file_path: typing_extensions.Annotated[str, FieldMetadata(alias="filePath")] = pydantic.Field()
26
+ """
27
+ The local file path or remote URL of the document being ingested by GroundX.
28
+ """
29
+
30
+ file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
31
+ search_data: typing_extensions.Annotated[
32
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
33
+ ] = pydantic.Field(default=None)
34
+ """
35
+ Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
36
+ """
37
+
38
+ if IS_PYDANTIC_V2:
39
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
40
+ else:
41
+
42
+ class Config:
43
+ frozen = True
44
+ smart_union = True
45
+ extra = pydantic.Extra.allow
@@ -14,7 +14,7 @@ class IngestLocalDocumentMetadata(UniversalBaseModel):
14
14
  default=None
15
15
  )
16
16
  """
17
- The bucketId of the bucket which this local file will be ingested to.
17
+ The bucketId of the bucket which this local file will be ingested into.
18
18
  """
19
19
 
20
20
  file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
@@ -12,7 +12,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
12
12
  class IngestRemoteDocument(UniversalBaseModel):
13
13
  bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
14
14
  """
15
- the bucketId of the bucket which this remote file will be ingested to.
15
+ The bucketId of the bucket which this remote file will be ingested into.
16
16
  """
17
17
 
18
18
  file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
@@ -11,7 +11,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
11
  class WebsiteSource(UniversalBaseModel):
12
12
  bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
13
13
  """
14
- the bucketId of the bucket which this website will be ingested to.
14
+ The bucketId of the bucket which this website will be ingested into.
15
15
  """
16
16
 
17
17
  cap: typing.Optional[int] = pydantic.Field(default=None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: groundx
3
- Version: 2.0.21
3
+ Version: 2.1.0
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -20,18 +20,20 @@ Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
22
  Classifier: Typing :: Typed
23
+ Requires-Dist: aiohttp (>=3.8.0)
23
24
  Requires-Dist: httpx (>=0.21.2)
24
25
  Requires-Dist: pydantic (>=1.9.2)
25
26
  Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
27
+ Requires-Dist: requests (>=2.4.0)
26
28
  Requires-Dist: typing_extensions (>=4.0.0)
27
29
  Description-Content-Type: text/markdown
28
30
 
29
- # Eyelevel Python Library
31
+ # GroundX Python Library
30
32
 
31
33
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Feyelevelai%2Fgroundx-python)
32
34
  [![pypi](https://img.shields.io/pypi/v/groundx)](https://pypi.python.org/pypi/groundx)
33
35
 
34
- The Eyelevel Python library provides convenient access to the Eyelevel API from Python.
36
+ The GroundX Python library provides convenient access to the GroundX API from Python.
35
37
 
36
38
  ## Documentation
37
39
 
@@ -52,14 +54,15 @@ A full reference for this library is available [here](./reference.md).
52
54
  Instantiate and use the client with the following:
53
55
 
54
56
  ```python
55
- from groundx import GroundX, IngestRemoteDocument
57
+ from groundx import Document, GroundX
56
58
 
57
59
  client = GroundX(
58
60
  api_key="YOUR_API_KEY",
59
61
  )
60
- client.documents.ingest_remote(
62
+
63
+ client.ingest(
61
64
  documents=[
62
- IngestRemoteDocument(
65
+ Document(
63
66
  bucket_id=1234,
64
67
  file_name="my_file1.txt",
65
68
  file_type="txt",
@@ -76,17 +79,16 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
76
79
  ```python
77
80
  import asyncio
78
81
 
79
- from groundx import AsyncGroundX, IngestRemoteDocument
82
+ from groundx import AsyncGroundX, Document
80
83
 
81
84
  client = AsyncGroundX(
82
85
  api_key="YOUR_API_KEY",
83
86
  )
84
87
 
85
-
86
88
  async def main() -> None:
87
- await client.documents.ingest_remote(
89
+ await client.ingest(
88
90
  documents=[
89
- IngestRemoteDocument(
91
+ Document(
90
92
  bucket_id=1234,
91
93
  file_name="my_file1.txt",
92
94
  file_type="txt",
@@ -95,7 +97,6 @@ async def main() -> None:
95
97
  ],
96
98
  )
97
99
 
98
-
99
100
  asyncio.run(main())
100
101
  ```
101
102
 
@@ -108,7 +109,7 @@ will be thrown.
108
109
  from groundx.core.api_error import ApiError
109
110
 
110
111
  try:
111
- client.documents.ingest_remote(...)
112
+ client.ingest(...)
112
113
  except ApiError as e:
113
114
  print(e.status_code)
114
115
  print(e.body)
@@ -131,7 +132,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
131
132
  Use the `max_retries` request option to configure this behavior.
132
133
 
133
134
  ```python
134
- client.documents.ingest_remote(..., request_options={
135
+ client.ingest(..., request_options={
135
136
  "max_retries": 1
136
137
  })
137
138
  ```
@@ -151,7 +152,7 @@ client = GroundX(
151
152
 
152
153
 
153
154
  # Override timeout for a specific method
154
- client.documents.ingest_remote(..., request_options={
155
+ client.ingest(..., request_options={
155
156
  "timeout_in_seconds": 1
156
157
  })
157
158
  ```
@@ -1,10 +1,10 @@
1
- groundx/__init__.py,sha256=_IGBowwyPGd2Yc8c-X8b4FRu5rNA_SoTj4e3bhtB69Y,2975
1
+ groundx/__init__.py,sha256=hl6bFr_FJ0R5Ux_bQErYlWDZQcOF10rkda_r3pah3NQ,3005
2
2
  groundx/buckets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
3
- groundx/buckets/client.py,sha256=TofNrkej1AC_-FU5rf_y8KG8ubFUpHtLa8PQ7rqax6E,26537
4
- groundx/client.py,sha256=Q1Kw0z6K-z-ShhNyuuPe5fYonM9M2I_55-ukUrUWk1U,6507
3
+ groundx/buckets/client.py,sha256=4jlc9vfIult1mMJ4FZW4_KFJybZPStZt1FUplIgrxbU,23947
4
+ groundx/client.py,sha256=dIW9OyrMyfC1N7HSxRrHh0w_8rJ8osNUOPdYD6ueQ6g,6515
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=ZCThAGYPgh2zcfTO99ZP-m7Fdgqktuyv7kfz-Y1Q6FY,1803
7
+ groundx/core/client_wrapper.py,sha256=y8onqbSUErX8E-86o2ZOvLGnwI4mzGnG87L-FUdLWHo,1802
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,21 +17,22 @@ 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=94t45T3Z9RHj4OBh454qYbjke8HdW1ad_-TPiocPmeE,58853
20
+ groundx/documents/client.py,sha256=Jz8Kc7Z7fPjAAaiXfNhjo0GhvcwXyjGoCH2Jldd4ycM,54419
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
24
24
  groundx/errors/unauthorized_error.py,sha256=1ewNCqSG1P-uogB5yCNwreq4Bf3VRor0woSOXS4NjPU,266
25
25
  groundx/groups/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
26
- groundx/groups/client.py,sha256=CiCent5Wb8iC2QtR_xI2kNCvMdONuE0-HSfpy3QbL2I,38863
26
+ groundx/groups/client.py,sha256=bytQRh9m7e4vIuYHb7dD1kCTQZvyBxedCqGnmmLqrsI,35237
27
27
  groundx/health/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
28
28
  groundx/health/client.py,sha256=fcTa21RWPyBuT77PQ0EncC6rBaW_DrYlRvudy9-0H58,7545
29
+ groundx/ingest.py,sha256=5uTL3iSp3HQYSAbzUkZ6_RM0KbKuqdkPZ8_bLxMpvDM,11377
29
30
  groundx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
31
  groundx/search/__init__.py,sha256=RagVzjShP33mDg9o4N3kGzV0egL1RYNjCpXPE8VzMYE,145
31
- groundx/search/client.py,sha256=10ifg9GyIwIZF13ULfCXF8iFIydq6H6QRDrGPDjpanw,19756
32
+ groundx/search/client.py,sha256=zrrqFy0HowDUYPsMU4nfvDV2RgmkEQ4E8WYNktu3xcs,18684
32
33
  groundx/search/types/__init__.py,sha256=fNFXQloPa1PHHO8VZim6KQNMA9N5EZtfSkissdxtY_c,165
33
34
  groundx/search/types/search_content_request_id.py,sha256=us7mYdzR0qPur_wR5I9BhHaLEzC5nLBRna6-xq4M1ec,128
34
- groundx/types/__init__.py,sha256=ViqDRA9l-OWZP4_Zl7nVOvd_EZKpTFFvyYkxdHB9vco,3762
35
+ groundx/types/__init__.py,sha256=GO3it8Adm7ZaxMnc8ZP_9CNZkKpZX7X36hUKi1NgYWA,3809
35
36
  groundx/types/bounding_box_detail.py,sha256=51qcen326NTHY2ZqH1cFXut0_MCmk39EbLoDAwotdq4,1832
36
37
  groundx/types/bucket_detail.py,sha256=bQjCvfyWydjItmzNNTvH-iWxNDOggd7R7X1alFZzlEY,1511
37
38
  groundx/types/bucket_list_response.py,sha256=jC0NBsLCYDSwQrBzuW0g3PWFycjtKl8YRkKhic_-1DA,650
@@ -40,6 +41,7 @@ groundx/types/bucket_update_detail.py,sha256=B4atQMDSXEdx7otcDbvgsrAHtXNz9swMnOs
40
41
  groundx/types/bucket_update_response.py,sha256=h5RJTEpc4WPI_C4sPvsJZo7IxKppnPR-I9VGEQryRlc,633
41
42
  groundx/types/customer_detail.py,sha256=RNm0qXvKx6YvVmkVJZeCNIz7n8_siFMXJ_AGtH3i5Z0,1094
42
43
  groundx/types/customer_response.py,sha256=_RbuanXhCWQkCeQ0dkwPgsjNBoBgNpixiNfRpXcMew8,618
44
+ groundx/types/document.py,sha256=wfhVkqNnYvRmmICXQR-jGp6P1KuJTC7aSq3kE7e9j5s,1691
43
45
  groundx/types/document_detail.py,sha256=i1UfcQAGYo9v1HwrrpzQPw_O0qA7IOXwOUuPV1yU8nI,2323
44
46
  groundx/types/document_list_response.py,sha256=Z0Hm5VBwI0qatbSp6nYHh0RrGwJN3Gqh2D72FfDseZk,839
45
47
  groundx/types/document_local_ingest_request.py,sha256=zqaT_QgYcEc8AfVwZm-O5jLTEiYSsO-i3VVgZ_7xl7w,197
@@ -54,8 +56,8 @@ groundx/types/health_response_health.py,sha256=I0QeEljFp6l5LCJbCTArW031Om84egePg
54
56
  groundx/types/health_service.py,sha256=M1-h1EJSpAXw-j3pY-09_g_WKkO0spdj8e7pgPzSGf0,1083
55
57
  groundx/types/health_service_status.py,sha256=ugKJXlx8QGi83n_J6s1frFrW1hYfOn3Dlb_pPNexwMA,185
56
58
  groundx/types/ingest_local_document.py,sha256=am6TPgHu40S4Lzo9hMkDRauYnc-AWBuYL0Lgk85Fseg,753
57
- groundx/types/ingest_local_document_metadata.py,sha256=I4CSafx8kLSHLbU5_TkU6igy2plevkzUzdsR7vhovHg,1558
58
- groundx/types/ingest_remote_document.py,sha256=xlPA4SYoUgoGXpxZhyORdezxIPGmr4wneav2ZEVmmOY,1683
59
+ groundx/types/ingest_local_document_metadata.py,sha256=TIMHo_4a-sS_ZwveoSmMS3R8SL3k3W7iH49ffcu8W1U,1560
60
+ groundx/types/ingest_remote_document.py,sha256=LpS8R1zWwM07lUaSwrNzTCg9jok8u5tP0EOf2Q9_7eI,1685
59
61
  groundx/types/ingest_response.py,sha256=139rn8wpT44jlUzYXiy0r8XzN2U_OtdLltpSbRU0TyA,633
60
62
  groundx/types/ingest_response_ingest.py,sha256=8FKApYNvS6KFxEKm05pKpKJ0BAagxoE0cWeTt-qjm1g,781
61
63
  groundx/types/message_response.py,sha256=g_FJJyXYg_3fjZQueXkcy11q-qUfZGdVdALddHBieh4,585
@@ -75,9 +77,9 @@ groundx/types/sort.py,sha256=oXap7qO8jI5I2wRhjdEfei4x0sEk2OEId2ll92EFOF8,147
75
77
  groundx/types/sort_order.py,sha256=hfJkStz6zHf3iWQFaVLkNCZPdyj5JS7TsQlN4Ij8Q5A,148
76
78
  groundx/types/subscription_detail.py,sha256=WNfUw2EMVECIvNYcV2s51zZ6T3Utc4zYXw63bPaeM6U,768
77
79
  groundx/types/subscription_detail_meters.py,sha256=lBa8-1QlMVHjr5RLGqhiTKnD1KMM0AAHTWvz9TVtG8w,830
78
- groundx/types/website_source.py,sha256=0TYZqyR16bUO9dfVrNwmph-ICmRzgje02aim1M17x7k,1576
80
+ groundx/types/website_source.py,sha256=3WeRCiilNKKBTfhwgjo3jbcVI3vLTeM-KxI6dVzpg9o,1578
79
81
  groundx/version.py,sha256=1yVogKaq260fQfckM2RYN2144SEw0QROsZW8ICtkG4U,74
80
- groundx-2.0.21.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
81
- groundx-2.0.21.dist-info/METADATA,sha256=4SvJFYtth9J6AYAv5SuzIsB-KGtAaLYVGiqCv_CZD90,5122
82
- groundx-2.0.21.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
83
- groundx-2.0.21.dist-info/RECORD,,
82
+ groundx-2.1.0.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
83
+ groundx-2.1.0.dist-info/METADATA,sha256=pGPjHDleNTPidtKmZBOR6bVoJivWzbdLn5fhhlQPTVo,5051
84
+ groundx-2.1.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
85
+ groundx-2.1.0.dist-info/RECORD,,