groundx 2.0.14__tar.gz → 2.0.16__tar.gz
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-2.0.14 → groundx-2.0.16}/PKG-INFO +5 -7
- {groundx-2.0.14 → groundx-2.0.16}/README.md +4 -6
- {groundx-2.0.14 → groundx-2.0.16}/pyproject.toml +1 -1
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/__init__.py +6 -8
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/client_wrapper.py +1 -1
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/documents/client.py +37 -59
- groundx-2.0.16/src/groundx/health/__init__.py +2 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/__init__.py +6 -0
- groundx-2.0.14/src/groundx/documents/types/website_crawl_request_websites_item.py → groundx-2.0.16/src/groundx/types/crawl_website_source.py +4 -4
- groundx-2.0.14/src/groundx/documents/types/documents_ingest_local_request_files_item.py → groundx-2.0.16/src/groundx/types/ingest_local_document.py +5 -5
- groundx-2.0.14/src/groundx/documents/types/document_remote_ingest_request_documents_item.py → groundx-2.0.16/src/groundx/types/ingest_remote_document.py +5 -5
- groundx-2.0.14/src/groundx/documents/__init__.py +0 -13
- groundx-2.0.14/src/groundx/documents/types/__init__.py +0 -11
- {groundx-2.0.14 → groundx-2.0.16}/LICENSE +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/buckets/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/buckets/client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/api_error.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/datetime_utils.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/file.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/http_client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/jsonable_encoder.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/pydantic_utilities.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/query_encoder.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/remove_none_from_dict.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/request_options.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/core/serialization.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/customer/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/customer/client.py +0 -0
- {groundx-2.0.14/src/groundx/groups → groundx-2.0.16/src/groundx/documents}/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/environment.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/errors/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/errors/bad_request_error.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/errors/unauthorized_error.py +0 -0
- {groundx-2.0.14/src/groundx/health → groundx-2.0.16/src/groundx/groups}/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/groups/client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/health/client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/py.typed +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/search/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/search/client.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/search/types/__init__.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/search/types/search_content_request_id.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bounding_box_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bucket_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bucket_list_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bucket_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bucket_update_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/bucket_update_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/customer_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/customer_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/document_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/document_list_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/document_lookup_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/document_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/document_type.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/group_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/group_list_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/group_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/health_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/health_response_health.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/health_service.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/health_service_status.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/ingest_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/ingest_response_ingest.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/message_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/meter_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress_cancelled.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress_complete.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress_errors.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress_processing.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/processing_status.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/search_response.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/search_response_search.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/search_result_item.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/sort.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/sort_order.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/subscription_detail.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/subscription_detail_meters.py +0 -0
- {groundx-2.0.14 → groundx-2.0.16}/src/groundx/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: groundx
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.16
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Requires-Python: >=3.8,<4.0
|
@@ -52,15 +52,14 @@ A full reference for this library is available [here](./reference.md).
|
|
52
52
|
Instantiate and use the client with the following:
|
53
53
|
|
54
54
|
```python
|
55
|
-
from groundx import GroundX
|
56
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
55
|
+
from groundx import GroundX, IngestRemoteDocument
|
57
56
|
|
58
57
|
client = GroundX(
|
59
58
|
api_key="YOUR_API_KEY",
|
60
59
|
)
|
61
60
|
client.documents.ingest_remote(
|
62
61
|
documents=[
|
63
|
-
|
62
|
+
IngestRemoteDocument(
|
64
63
|
bucket_id=1234,
|
65
64
|
file_name="my_file.txt",
|
66
65
|
file_type="txt",
|
@@ -78,8 +77,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
|
|
78
77
|
```python
|
79
78
|
import asyncio
|
80
79
|
|
81
|
-
from groundx import AsyncGroundX
|
82
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
80
|
+
from groundx import AsyncGroundX, IngestRemoteDocument
|
83
81
|
|
84
82
|
client = AsyncGroundX(
|
85
83
|
api_key="YOUR_API_KEY",
|
@@ -89,7 +87,7 @@ client = AsyncGroundX(
|
|
89
87
|
async def main() -> None:
|
90
88
|
await client.documents.ingest_remote(
|
91
89
|
documents=[
|
92
|
-
|
90
|
+
IngestRemoteDocument(
|
93
91
|
bucket_id=1234,
|
94
92
|
file_name="my_file.txt",
|
95
93
|
file_type="txt",
|
@@ -24,15 +24,14 @@ A full reference for this library is available [here](./reference.md).
|
|
24
24
|
Instantiate and use the client with the following:
|
25
25
|
|
26
26
|
```python
|
27
|
-
from groundx import GroundX
|
28
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
27
|
+
from groundx import GroundX, IngestRemoteDocument
|
29
28
|
|
30
29
|
client = GroundX(
|
31
30
|
api_key="YOUR_API_KEY",
|
32
31
|
)
|
33
32
|
client.documents.ingest_remote(
|
34
33
|
documents=[
|
35
|
-
|
34
|
+
IngestRemoteDocument(
|
36
35
|
bucket_id=1234,
|
37
36
|
file_name="my_file.txt",
|
38
37
|
file_type="txt",
|
@@ -50,8 +49,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
|
|
50
49
|
```python
|
51
50
|
import asyncio
|
52
51
|
|
53
|
-
from groundx import AsyncGroundX
|
54
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
52
|
+
from groundx import AsyncGroundX, IngestRemoteDocument
|
55
53
|
|
56
54
|
client = AsyncGroundX(
|
57
55
|
api_key="YOUR_API_KEY",
|
@@ -61,7 +59,7 @@ client = AsyncGroundX(
|
|
61
59
|
async def main() -> None:
|
62
60
|
await client.documents.ingest_remote(
|
63
61
|
documents=[
|
64
|
-
|
62
|
+
IngestRemoteDocument(
|
65
63
|
bucket_id=1234,
|
66
64
|
file_name="my_file.txt",
|
67
65
|
file_type="txt",
|
@@ -7,6 +7,7 @@ from .types import (
|
|
7
7
|
BucketResponse,
|
8
8
|
BucketUpdateDetail,
|
9
9
|
BucketUpdateResponse,
|
10
|
+
CrawlWebsiteSource,
|
10
11
|
CustomerDetail,
|
11
12
|
CustomerResponse,
|
12
13
|
DocumentDetail,
|
@@ -21,6 +22,8 @@ from .types import (
|
|
21
22
|
HealthResponseHealth,
|
22
23
|
HealthService,
|
23
24
|
HealthServiceStatus,
|
25
|
+
IngestLocalDocument,
|
26
|
+
IngestRemoteDocument,
|
24
27
|
IngestResponse,
|
25
28
|
IngestResponseIngest,
|
26
29
|
MessageResponse,
|
@@ -44,11 +47,6 @@ from .types import (
|
|
44
47
|
from .errors import BadRequestError, UnauthorizedError
|
45
48
|
from . import buckets, customer, documents, groups, health, search
|
46
49
|
from .client import AsyncGroundX, GroundX
|
47
|
-
from .documents import (
|
48
|
-
DocumentRemoteIngestRequestDocumentsItem,
|
49
|
-
DocumentsIngestLocalRequestFilesItem,
|
50
|
-
WebsiteCrawlRequestWebsitesItem,
|
51
|
-
)
|
52
50
|
from .environment import GroundXEnvironment
|
53
51
|
from .search import SearchContentRequestId
|
54
52
|
from .version import __version__
|
@@ -62,15 +60,14 @@ __all__ = [
|
|
62
60
|
"BucketResponse",
|
63
61
|
"BucketUpdateDetail",
|
64
62
|
"BucketUpdateResponse",
|
63
|
+
"CrawlWebsiteSource",
|
65
64
|
"CustomerDetail",
|
66
65
|
"CustomerResponse",
|
67
66
|
"DocumentDetail",
|
68
67
|
"DocumentListResponse",
|
69
68
|
"DocumentLookupResponse",
|
70
|
-
"DocumentRemoteIngestRequestDocumentsItem",
|
71
69
|
"DocumentResponse",
|
72
70
|
"DocumentType",
|
73
|
-
"DocumentsIngestLocalRequestFilesItem",
|
74
71
|
"GroundX",
|
75
72
|
"GroundXEnvironment",
|
76
73
|
"GroupDetail",
|
@@ -80,6 +77,8 @@ __all__ = [
|
|
80
77
|
"HealthResponseHealth",
|
81
78
|
"HealthService",
|
82
79
|
"HealthServiceStatus",
|
80
|
+
"IngestLocalDocument",
|
81
|
+
"IngestRemoteDocument",
|
83
82
|
"IngestResponse",
|
84
83
|
"IngestResponseIngest",
|
85
84
|
"MessageResponse",
|
@@ -101,7 +100,6 @@ __all__ = [
|
|
101
100
|
"SubscriptionDetail",
|
102
101
|
"SubscriptionDetailMeters",
|
103
102
|
"UnauthorizedError",
|
104
|
-
"WebsiteCrawlRequestWebsitesItem",
|
105
103
|
"__version__",
|
106
104
|
"buckets",
|
107
105
|
"customer",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
import typing
|
4
4
|
from ..core.client_wrapper import SyncClientWrapper
|
5
|
-
from
|
5
|
+
from ..types.ingest_remote_document import IngestRemoteDocument
|
6
6
|
from ..core.request_options import RequestOptions
|
7
7
|
from ..types.ingest_response import IngestResponse
|
8
8
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
@@ -11,8 +11,8 @@ from ..errors.bad_request_error import BadRequestError
|
|
11
11
|
from ..errors.unauthorized_error import UnauthorizedError
|
12
12
|
from json.decoder import JSONDecodeError
|
13
13
|
from ..core.api_error import ApiError
|
14
|
-
from
|
15
|
-
from
|
14
|
+
from ..types.ingest_local_document import IngestLocalDocument
|
15
|
+
from ..types.crawl_website_source import CrawlWebsiteSource
|
16
16
|
from ..types.process_status_response import ProcessStatusResponse
|
17
17
|
from ..core.jsonable_encoder import jsonable_encoder
|
18
18
|
from ..types.sort import Sort
|
@@ -34,7 +34,7 @@ class DocumentsClient:
|
|
34
34
|
def ingest_remote(
|
35
35
|
self,
|
36
36
|
*,
|
37
|
-
documents: typing.Sequence[
|
37
|
+
documents: typing.Sequence[IngestRemoteDocument],
|
38
38
|
request_options: typing.Optional[RequestOptions] = None,
|
39
39
|
) -> IngestResponse:
|
40
40
|
"""
|
@@ -44,7 +44,7 @@ class DocumentsClient:
|
|
44
44
|
|
45
45
|
Parameters
|
46
46
|
----------
|
47
|
-
documents : typing.Sequence[
|
47
|
+
documents : typing.Sequence[IngestRemoteDocument]
|
48
48
|
|
49
49
|
request_options : typing.Optional[RequestOptions]
|
50
50
|
Request-specific configuration.
|
@@ -56,15 +56,14 @@ class DocumentsClient:
|
|
56
56
|
|
57
57
|
Examples
|
58
58
|
--------
|
59
|
-
from groundx import GroundX
|
60
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
59
|
+
from groundx import GroundX, IngestRemoteDocument
|
61
60
|
|
62
61
|
client = GroundX(
|
63
62
|
api_key="YOUR_API_KEY",
|
64
63
|
)
|
65
64
|
client.documents.ingest_remote(
|
66
65
|
documents=[
|
67
|
-
|
66
|
+
IngestRemoteDocument(
|
68
67
|
bucket_id=1234,
|
69
68
|
file_name="my_file.txt",
|
70
69
|
file_type="txt",
|
@@ -79,9 +78,7 @@ class DocumentsClient:
|
|
79
78
|
method="POST",
|
80
79
|
json={
|
81
80
|
"documents": convert_and_respect_annotation_metadata(
|
82
|
-
object_=documents,
|
83
|
-
annotation=typing.Sequence[DocumentRemoteIngestRequestDocumentsItem],
|
84
|
-
direction="write",
|
81
|
+
object_=documents, annotation=typing.Sequence[IngestRemoteDocument], direction="write"
|
85
82
|
),
|
86
83
|
},
|
87
84
|
headers={
|
@@ -125,10 +122,7 @@ class DocumentsClient:
|
|
125
122
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
126
123
|
|
127
124
|
def ingest_local(
|
128
|
-
self,
|
129
|
-
*,
|
130
|
-
files: typing.List[DocumentsIngestLocalRequestFilesItem],
|
131
|
-
request_options: typing.Optional[RequestOptions] = None,
|
125
|
+
self, *, files: typing.List[IngestLocalDocument], request_options: typing.Optional[RequestOptions] = None
|
132
126
|
) -> IngestResponse:
|
133
127
|
"""
|
134
128
|
Upload documents hosted on a local file system for ingestion into a GroundX bucket.
|
@@ -137,7 +131,7 @@ class DocumentsClient:
|
|
137
131
|
|
138
132
|
Parameters
|
139
133
|
----------
|
140
|
-
files : typing.List[
|
134
|
+
files : typing.List[IngestLocalDocument]
|
141
135
|
|
142
136
|
request_options : typing.Optional[RequestOptions]
|
143
137
|
Request-specific configuration.
|
@@ -149,18 +143,17 @@ class DocumentsClient:
|
|
149
143
|
|
150
144
|
Examples
|
151
145
|
--------
|
152
|
-
from groundx import GroundX
|
153
|
-
from groundx.documents import DocumentsIngestLocalRequestFilesItem
|
146
|
+
from groundx import GroundX, IngestLocalDocument
|
154
147
|
|
155
148
|
client = GroundX(
|
156
149
|
api_key="YOUR_API_KEY",
|
157
150
|
)
|
158
151
|
client.documents.ingest_local(
|
159
152
|
files=[
|
160
|
-
|
161
|
-
bucket_id=
|
162
|
-
file_data="
|
163
|
-
file_name="
|
153
|
+
IngestLocalDocument(
|
154
|
+
bucket_id=1234,
|
155
|
+
file_data="binary data here",
|
156
|
+
file_name="my_file.txt",
|
164
157
|
file_type="txt",
|
165
158
|
)
|
166
159
|
],
|
@@ -211,10 +204,7 @@ class DocumentsClient:
|
|
211
204
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
212
205
|
|
213
206
|
def crawl_website(
|
214
|
-
self,
|
215
|
-
*,
|
216
|
-
websites: typing.Sequence[WebsiteCrawlRequestWebsitesItem],
|
217
|
-
request_options: typing.Optional[RequestOptions] = None,
|
207
|
+
self, *, websites: typing.Sequence[CrawlWebsiteSource], request_options: typing.Optional[RequestOptions] = None
|
218
208
|
) -> IngestResponse:
|
219
209
|
"""
|
220
210
|
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.
|
@@ -223,7 +213,7 @@ class DocumentsClient:
|
|
223
213
|
|
224
214
|
Parameters
|
225
215
|
----------
|
226
|
-
websites : typing.Sequence[
|
216
|
+
websites : typing.Sequence[CrawlWebsiteSource]
|
227
217
|
|
228
218
|
request_options : typing.Optional[RequestOptions]
|
229
219
|
Request-specific configuration.
|
@@ -235,15 +225,14 @@ class DocumentsClient:
|
|
235
225
|
|
236
226
|
Examples
|
237
227
|
--------
|
238
|
-
from groundx import GroundX
|
239
|
-
from groundx.documents import WebsiteCrawlRequestWebsitesItem
|
228
|
+
from groundx import CrawlWebsiteSource, GroundX
|
240
229
|
|
241
230
|
client = GroundX(
|
242
231
|
api_key="YOUR_API_KEY",
|
243
232
|
)
|
244
233
|
client.documents.crawl_website(
|
245
234
|
websites=[
|
246
|
-
|
235
|
+
CrawlWebsiteSource(
|
247
236
|
bucket_id=123,
|
248
237
|
source_url="https://my.website.com",
|
249
238
|
)
|
@@ -255,7 +244,7 @@ class DocumentsClient:
|
|
255
244
|
method="POST",
|
256
245
|
json={
|
257
246
|
"websites": convert_and_respect_annotation_metadata(
|
258
|
-
object_=websites, annotation=typing.Sequence[
|
247
|
+
object_=websites, annotation=typing.Sequence[CrawlWebsiteSource], direction="write"
|
259
248
|
),
|
260
249
|
},
|
261
250
|
headers={
|
@@ -778,7 +767,7 @@ class AsyncDocumentsClient:
|
|
778
767
|
async def ingest_remote(
|
779
768
|
self,
|
780
769
|
*,
|
781
|
-
documents: typing.Sequence[
|
770
|
+
documents: typing.Sequence[IngestRemoteDocument],
|
782
771
|
request_options: typing.Optional[RequestOptions] = None,
|
783
772
|
) -> IngestResponse:
|
784
773
|
"""
|
@@ -788,7 +777,7 @@ class AsyncDocumentsClient:
|
|
788
777
|
|
789
778
|
Parameters
|
790
779
|
----------
|
791
|
-
documents : typing.Sequence[
|
780
|
+
documents : typing.Sequence[IngestRemoteDocument]
|
792
781
|
|
793
782
|
request_options : typing.Optional[RequestOptions]
|
794
783
|
Request-specific configuration.
|
@@ -802,8 +791,7 @@ class AsyncDocumentsClient:
|
|
802
791
|
--------
|
803
792
|
import asyncio
|
804
793
|
|
805
|
-
from groundx import AsyncGroundX
|
806
|
-
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
794
|
+
from groundx import AsyncGroundX, IngestRemoteDocument
|
807
795
|
|
808
796
|
client = AsyncGroundX(
|
809
797
|
api_key="YOUR_API_KEY",
|
@@ -813,7 +801,7 @@ class AsyncDocumentsClient:
|
|
813
801
|
async def main() -> None:
|
814
802
|
await client.documents.ingest_remote(
|
815
803
|
documents=[
|
816
|
-
|
804
|
+
IngestRemoteDocument(
|
817
805
|
bucket_id=1234,
|
818
806
|
file_name="my_file.txt",
|
819
807
|
file_type="txt",
|
@@ -831,9 +819,7 @@ class AsyncDocumentsClient:
|
|
831
819
|
method="POST",
|
832
820
|
json={
|
833
821
|
"documents": convert_and_respect_annotation_metadata(
|
834
|
-
object_=documents,
|
835
|
-
annotation=typing.Sequence[DocumentRemoteIngestRequestDocumentsItem],
|
836
|
-
direction="write",
|
822
|
+
object_=documents, annotation=typing.Sequence[IngestRemoteDocument], direction="write"
|
837
823
|
),
|
838
824
|
},
|
839
825
|
headers={
|
@@ -877,10 +863,7 @@ class AsyncDocumentsClient:
|
|
877
863
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
878
864
|
|
879
865
|
async def ingest_local(
|
880
|
-
self,
|
881
|
-
*,
|
882
|
-
files: typing.List[DocumentsIngestLocalRequestFilesItem],
|
883
|
-
request_options: typing.Optional[RequestOptions] = None,
|
866
|
+
self, *, files: typing.List[IngestLocalDocument], request_options: typing.Optional[RequestOptions] = None
|
884
867
|
) -> IngestResponse:
|
885
868
|
"""
|
886
869
|
Upload documents hosted on a local file system for ingestion into a GroundX bucket.
|
@@ -889,7 +872,7 @@ class AsyncDocumentsClient:
|
|
889
872
|
|
890
873
|
Parameters
|
891
874
|
----------
|
892
|
-
files : typing.List[
|
875
|
+
files : typing.List[IngestLocalDocument]
|
893
876
|
|
894
877
|
request_options : typing.Optional[RequestOptions]
|
895
878
|
Request-specific configuration.
|
@@ -903,8 +886,7 @@ class AsyncDocumentsClient:
|
|
903
886
|
--------
|
904
887
|
import asyncio
|
905
888
|
|
906
|
-
from groundx import AsyncGroundX
|
907
|
-
from groundx.documents import DocumentsIngestLocalRequestFilesItem
|
889
|
+
from groundx import AsyncGroundX, IngestLocalDocument
|
908
890
|
|
909
891
|
client = AsyncGroundX(
|
910
892
|
api_key="YOUR_API_KEY",
|
@@ -914,10 +896,10 @@ class AsyncDocumentsClient:
|
|
914
896
|
async def main() -> None:
|
915
897
|
await client.documents.ingest_local(
|
916
898
|
files=[
|
917
|
-
|
918
|
-
bucket_id=
|
919
|
-
file_data="
|
920
|
-
file_name="
|
899
|
+
IngestLocalDocument(
|
900
|
+
bucket_id=1234,
|
901
|
+
file_data="binary data here",
|
902
|
+
file_name="my_file.txt",
|
921
903
|
file_type="txt",
|
922
904
|
)
|
923
905
|
],
|
@@ -971,10 +953,7 @@ class AsyncDocumentsClient:
|
|
971
953
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
972
954
|
|
973
955
|
async def crawl_website(
|
974
|
-
self,
|
975
|
-
*,
|
976
|
-
websites: typing.Sequence[WebsiteCrawlRequestWebsitesItem],
|
977
|
-
request_options: typing.Optional[RequestOptions] = None,
|
956
|
+
self, *, websites: typing.Sequence[CrawlWebsiteSource], request_options: typing.Optional[RequestOptions] = None
|
978
957
|
) -> IngestResponse:
|
979
958
|
"""
|
980
959
|
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.
|
@@ -983,7 +962,7 @@ class AsyncDocumentsClient:
|
|
983
962
|
|
984
963
|
Parameters
|
985
964
|
----------
|
986
|
-
websites : typing.Sequence[
|
965
|
+
websites : typing.Sequence[CrawlWebsiteSource]
|
987
966
|
|
988
967
|
request_options : typing.Optional[RequestOptions]
|
989
968
|
Request-specific configuration.
|
@@ -997,8 +976,7 @@ class AsyncDocumentsClient:
|
|
997
976
|
--------
|
998
977
|
import asyncio
|
999
978
|
|
1000
|
-
from groundx import AsyncGroundX
|
1001
|
-
from groundx.documents import WebsiteCrawlRequestWebsitesItem
|
979
|
+
from groundx import AsyncGroundX, CrawlWebsiteSource
|
1002
980
|
|
1003
981
|
client = AsyncGroundX(
|
1004
982
|
api_key="YOUR_API_KEY",
|
@@ -1008,7 +986,7 @@ class AsyncDocumentsClient:
|
|
1008
986
|
async def main() -> None:
|
1009
987
|
await client.documents.crawl_website(
|
1010
988
|
websites=[
|
1011
|
-
|
989
|
+
CrawlWebsiteSource(
|
1012
990
|
bucket_id=123,
|
1013
991
|
source_url="https://my.website.com",
|
1014
992
|
)
|
@@ -1023,7 +1001,7 @@ class AsyncDocumentsClient:
|
|
1023
1001
|
method="POST",
|
1024
1002
|
json={
|
1025
1003
|
"websites": convert_and_respect_annotation_metadata(
|
1026
|
-
object_=websites, annotation=typing.Sequence[
|
1004
|
+
object_=websites, annotation=typing.Sequence[CrawlWebsiteSource], direction="write"
|
1027
1005
|
),
|
1028
1006
|
},
|
1029
1007
|
headers={
|
@@ -6,6 +6,7 @@ from .bucket_list_response import BucketListResponse
|
|
6
6
|
from .bucket_response import BucketResponse
|
7
7
|
from .bucket_update_detail import BucketUpdateDetail
|
8
8
|
from .bucket_update_response import BucketUpdateResponse
|
9
|
+
from .crawl_website_source import CrawlWebsiteSource
|
9
10
|
from .customer_detail import CustomerDetail
|
10
11
|
from .customer_response import CustomerResponse
|
11
12
|
from .document_detail import DocumentDetail
|
@@ -20,6 +21,8 @@ from .health_response import HealthResponse
|
|
20
21
|
from .health_response_health import HealthResponseHealth
|
21
22
|
from .health_service import HealthService
|
22
23
|
from .health_service_status import HealthServiceStatus
|
24
|
+
from .ingest_local_document import IngestLocalDocument
|
25
|
+
from .ingest_remote_document import IngestRemoteDocument
|
23
26
|
from .ingest_response import IngestResponse
|
24
27
|
from .ingest_response_ingest import IngestResponseIngest
|
25
28
|
from .message_response import MessageResponse
|
@@ -47,6 +50,7 @@ __all__ = [
|
|
47
50
|
"BucketResponse",
|
48
51
|
"BucketUpdateDetail",
|
49
52
|
"BucketUpdateResponse",
|
53
|
+
"CrawlWebsiteSource",
|
50
54
|
"CustomerDetail",
|
51
55
|
"CustomerResponse",
|
52
56
|
"DocumentDetail",
|
@@ -61,6 +65,8 @@ __all__ = [
|
|
61
65
|
"HealthResponseHealth",
|
62
66
|
"HealthService",
|
63
67
|
"HealthServiceStatus",
|
68
|
+
"IngestLocalDocument",
|
69
|
+
"IngestRemoteDocument",
|
64
70
|
"IngestResponse",
|
65
71
|
"IngestResponseIngest",
|
66
72
|
"MessageResponse",
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
from
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing_extensions
|
5
|
-
from
|
5
|
+
from ..core.serialization import FieldMetadata
|
6
6
|
import pydantic
|
7
7
|
import typing
|
8
|
-
from
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class CrawlWebsiteSource(UniversalBaseModel):
|
12
12
|
bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
|
13
13
|
"""
|
14
14
|
the bucketId of the bucket which this website will be ingested to.
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
from
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing_extensions
|
5
|
-
from
|
5
|
+
from ..core.serialization import FieldMetadata
|
6
6
|
import pydantic
|
7
|
-
from
|
7
|
+
from .document_type import DocumentType
|
8
8
|
import typing
|
9
|
-
from
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class IngestLocalDocument(UniversalBaseModel):
|
13
13
|
bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
|
14
14
|
"""
|
15
15
|
the bucketId of the bucket which this local file will be ingested to.
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
from
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing_extensions
|
5
|
-
from
|
5
|
+
from ..core.serialization import FieldMetadata
|
6
6
|
import pydantic
|
7
7
|
import typing
|
8
|
-
from
|
9
|
-
from
|
8
|
+
from .document_type import DocumentType
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class IngestRemoteDocument(UniversalBaseModel):
|
13
13
|
bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
|
14
14
|
"""
|
15
15
|
the bucketId of the bucket which this remote file will be ingested to.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from .types import (
|
4
|
-
DocumentRemoteIngestRequestDocumentsItem,
|
5
|
-
DocumentsIngestLocalRequestFilesItem,
|
6
|
-
WebsiteCrawlRequestWebsitesItem,
|
7
|
-
)
|
8
|
-
|
9
|
-
__all__ = [
|
10
|
-
"DocumentRemoteIngestRequestDocumentsItem",
|
11
|
-
"DocumentsIngestLocalRequestFilesItem",
|
12
|
-
"WebsiteCrawlRequestWebsitesItem",
|
13
|
-
]
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from .document_remote_ingest_request_documents_item import DocumentRemoteIngestRequestDocumentsItem
|
4
|
-
from .documents_ingest_local_request_files_item import DocumentsIngestLocalRequestFilesItem
|
5
|
-
from .website_crawl_request_websites_item import WebsiteCrawlRequestWebsitesItem
|
6
|
-
|
7
|
-
__all__ = [
|
8
|
-
"DocumentRemoteIngestRequestDocumentsItem",
|
9
|
-
"DocumentsIngestLocalRequestFilesItem",
|
10
|
-
"WebsiteCrawlRequestWebsitesItem",
|
11
|
-
]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{groundx-2.0.14 → groundx-2.0.16}/src/groundx/types/process_status_response_ingest_progress.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|