groundx 2.0.15__py3-none-any.whl → 2.7.7__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.
Files changed (147) hide show
  1. groundx/__init__.py +73 -21
  2. groundx/buckets/__init__.py +2 -0
  3. groundx/buckets/client.py +55 -388
  4. groundx/buckets/raw_client.py +628 -0
  5. groundx/client.py +22 -21
  6. groundx/core/__init__.py +5 -0
  7. groundx/core/api_error.py +13 -5
  8. groundx/core/client_wrapper.py +4 -3
  9. groundx/core/force_multipart.py +16 -0
  10. groundx/core/http_client.py +76 -32
  11. groundx/core/http_response.py +55 -0
  12. groundx/core/jsonable_encoder.py +0 -1
  13. groundx/core/pydantic_utilities.py +71 -112
  14. groundx/core/serialization.py +7 -3
  15. groundx/csv_splitter.py +64 -0
  16. groundx/customer/__init__.py +2 -0
  17. groundx/customer/client.py +31 -43
  18. groundx/customer/raw_client.py +91 -0
  19. groundx/documents/__init__.py +1 -2
  20. groundx/documents/client.py +455 -953
  21. groundx/documents/raw_client.py +1450 -0
  22. groundx/errors/__init__.py +2 -0
  23. groundx/errors/bad_request_error.py +4 -3
  24. groundx/errors/unauthorized_error.py +4 -3
  25. groundx/extract/__init__.py +48 -0
  26. groundx/extract/agents/__init__.py +7 -0
  27. groundx/extract/agents/agent.py +202 -0
  28. groundx/extract/classes/__init__.py +24 -0
  29. groundx/extract/classes/agent.py +23 -0
  30. groundx/extract/classes/api.py +15 -0
  31. groundx/extract/classes/document.py +338 -0
  32. groundx/extract/classes/field.py +88 -0
  33. groundx/extract/classes/groundx.py +147 -0
  34. groundx/extract/classes/prompt.py +36 -0
  35. groundx/extract/classes/test_document.py +109 -0
  36. groundx/extract/classes/test_field.py +43 -0
  37. groundx/extract/classes/test_groundx.py +223 -0
  38. groundx/extract/classes/test_prompt.py +68 -0
  39. groundx/extract/post_process/__init__.py +7 -0
  40. groundx/extract/post_process/post_process.py +33 -0
  41. groundx/extract/services/.DS_Store +0 -0
  42. groundx/extract/services/__init__.py +14 -0
  43. groundx/extract/services/csv.py +76 -0
  44. groundx/extract/services/logger.py +126 -0
  45. groundx/extract/services/logging_cfg.py +53 -0
  46. groundx/extract/services/ratelimit.py +104 -0
  47. groundx/extract/services/sheets_client.py +160 -0
  48. groundx/extract/services/status.py +197 -0
  49. groundx/extract/services/upload.py +68 -0
  50. groundx/extract/services/upload_minio.py +122 -0
  51. groundx/extract/services/upload_s3.py +91 -0
  52. groundx/extract/services/utility.py +52 -0
  53. groundx/extract/settings/__init__.py +15 -0
  54. groundx/extract/settings/settings.py +212 -0
  55. groundx/extract/settings/test_settings.py +512 -0
  56. groundx/extract/tasks/__init__.py +6 -0
  57. groundx/extract/tasks/utility.py +27 -0
  58. groundx/extract/utility/__init__.py +15 -0
  59. groundx/extract/utility/classes.py +193 -0
  60. groundx/extract/utility/test_utility.py +81 -0
  61. groundx/groups/__init__.py +2 -0
  62. groundx/groups/client.py +63 -550
  63. groundx/groups/raw_client.py +901 -0
  64. groundx/health/__init__.py +2 -0
  65. groundx/health/client.py +35 -101
  66. groundx/health/raw_client.py +193 -0
  67. groundx/ingest.py +771 -0
  68. groundx/search/__init__.py +2 -0
  69. groundx/search/client.py +94 -227
  70. groundx/search/raw_client.py +442 -0
  71. groundx/search/types/__init__.py +2 -0
  72. groundx/types/__init__.py +68 -16
  73. groundx/types/bounding_box_detail.py +4 -4
  74. groundx/types/bucket_detail.py +5 -5
  75. groundx/types/bucket_list_response.py +17 -3
  76. groundx/types/bucket_response.py +3 -3
  77. groundx/types/bucket_update_detail.py +4 -4
  78. groundx/types/bucket_update_response.py +3 -3
  79. groundx/types/customer_detail.py +2 -2
  80. groundx/types/customer_response.py +3 -3
  81. groundx/types/document.py +54 -0
  82. groundx/types/document_detail.py +16 -4
  83. groundx/types/document_list_response.py +4 -4
  84. groundx/types/document_local_ingest_request.py +7 -0
  85. groundx/types/document_lookup_response.py +8 -3
  86. groundx/types/document_response.py +3 -3
  87. groundx/types/document_type.py +21 -1
  88. groundx/types/group_detail.py +4 -4
  89. groundx/types/group_list_response.py +17 -3
  90. groundx/types/group_response.py +3 -3
  91. groundx/types/health_response.py +3 -3
  92. groundx/types/health_response_health.py +3 -3
  93. groundx/types/health_service.py +5 -5
  94. groundx/types/ingest_local_document.py +25 -0
  95. groundx/types/ingest_local_document_metadata.py +51 -0
  96. groundx/types/ingest_remote_document.py +15 -6
  97. groundx/types/ingest_response.py +4 -4
  98. groundx/types/{process_status_response_ingest.py → ingest_status.py} +8 -7
  99. groundx/types/{ingest_response_ingest.py → ingest_status_light.py} +7 -5
  100. groundx/types/ingest_status_progress.py +26 -0
  101. groundx/types/{process_status_response_ingest_progress_errors.py → ingest_status_progress_cancelled.py} +4 -4
  102. groundx/types/{process_status_response_ingest_progress_complete.py → ingest_status_progress_complete.py} +4 -4
  103. groundx/types/{process_status_response_ingest_progress_cancelled.py → ingest_status_progress_errors.py} +4 -4
  104. groundx/types/{process_status_response_ingest_progress_processing.py → ingest_status_progress_processing.py} +4 -4
  105. groundx/types/message_response.py +2 -2
  106. groundx/types/meter_detail.py +2 -2
  107. groundx/types/process_level.py +5 -0
  108. groundx/types/{process_status_response.py → processes_status_response.py} +8 -5
  109. groundx/types/processing_status.py +3 -1
  110. groundx/types/search_response.py +3 -3
  111. groundx/types/search_response_search.py +3 -3
  112. groundx/types/search_result_item.py +7 -5
  113. groundx/types/search_result_item_pages_item.py +41 -0
  114. groundx/types/subscription_detail.py +3 -3
  115. groundx/types/subscription_detail_meters.py +5 -5
  116. groundx/{documents/types/website_crawl_request_websites_item.py → types/website_source.py} +7 -7
  117. groundx/types/workflow_apply_request.py +24 -0
  118. groundx/types/workflow_detail.py +59 -0
  119. groundx/types/workflow_detail_chunk_strategy.py +5 -0
  120. groundx/types/workflow_detail_relationships.py +36 -0
  121. groundx/types/workflow_engine.py +58 -0
  122. groundx/types/workflow_engine_reasoning_effort.py +5 -0
  123. groundx/types/workflow_engine_service.py +7 -0
  124. groundx/types/workflow_prompt.py +37 -0
  125. groundx/types/workflow_prompt_group.py +25 -0
  126. groundx/types/workflow_prompt_role.py +5 -0
  127. groundx/types/workflow_request.py +31 -0
  128. groundx/types/workflow_request_chunk_strategy.py +5 -0
  129. groundx/types/workflow_response.py +20 -0
  130. groundx/types/workflow_step.py +33 -0
  131. groundx/types/workflow_step_config.py +33 -0
  132. groundx/types/workflow_step_config_field.py +8 -0
  133. groundx/types/workflow_steps.py +38 -0
  134. groundx/types/workflows_response.py +20 -0
  135. groundx/workflows/__init__.py +7 -0
  136. groundx/workflows/client.py +736 -0
  137. groundx/workflows/raw_client.py +841 -0
  138. groundx/workflows/types/__init__.py +7 -0
  139. groundx/workflows/types/workflows_get_request_id.py +5 -0
  140. {groundx-2.0.15.dist-info → groundx-2.7.7.dist-info}/LICENSE +1 -1
  141. {groundx-2.0.15.dist-info → groundx-2.7.7.dist-info}/METADATA +39 -22
  142. groundx-2.7.7.dist-info/RECORD +155 -0
  143. groundx/documents/types/__init__.py +0 -6
  144. groundx/documents/types/documents_ingest_local_request_files_item.py +0 -43
  145. groundx/types/process_status_response_ingest_progress.py +0 -26
  146. groundx-2.0.15.dist-info/RECORD +0 -82
  147. {groundx-2.0.15.dist-info → groundx-2.7.7.dist-info}/WHEEL +0 -0
@@ -1,11 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing_extensions
5
- from ..core.serialization import FieldMetadata
6
3
  import typing
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
8
5
  import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
9
 
10
10
 
11
11
  class BucketUpdateDetail(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .bucket_update_detail import BucketUpdateDetail
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .bucket_update_detail import BucketUpdateDetail
8
8
 
9
9
 
10
10
  class BucketUpdateResponse(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
4
+
5
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
6
7
  from .subscription_detail import SubscriptionDetail
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
10
  class CustomerDetail(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .customer_detail import CustomerDetail
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .customer_detail import CustomerDetail
8
8
 
9
9
 
10
10
  class CustomerResponse(UniversalBaseModel):
@@ -0,0 +1,54 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .document_type import DocumentType
10
+ from .process_level import ProcessLevel
11
+
12
+
13
+ class Document(UniversalBaseModel):
14
+ bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
15
+ """
16
+ The bucketId of the bucket which this file will be ingested into.
17
+ """
18
+
19
+ file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
20
+ default=None
21
+ )
22
+ """
23
+ The name of the file being ingested.
24
+ """
25
+
26
+ file_path: typing_extensions.Annotated[str, FieldMetadata(alias="filePath")] = pydantic.Field()
27
+ """
28
+ The local file path or remote URL of the document being ingested by GroundX.
29
+ """
30
+
31
+ file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
32
+ filter: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
33
+ """
34
+ A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.
35
+ """
36
+
37
+ process_level: typing_extensions.Annotated[typing.Optional[ProcessLevel], FieldMetadata(alias="processLevel")] = (
38
+ None
39
+ )
40
+ search_data: typing_extensions.Annotated[
41
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
42
+ ] = pydantic.Field(default=None)
43
+ """
44
+ Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
45
+ """
46
+
47
+ if IS_PYDANTIC_V2:
48
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
49
+ else:
50
+
51
+ class Config:
52
+ frozen = True
53
+ smart_union = True
54
+ extra = pydantic.Extra.allow
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing_extensions
5
3
  import typing
6
- from ..core.serialization import FieldMetadata
4
+
7
5
  import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
8
9
  from .document_type import DocumentType
9
10
  from .processing_status import ProcessingStatus
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
11
 
12
12
 
13
13
  class DocumentDetail(UniversalBaseModel):
@@ -26,6 +26,11 @@ class DocumentDetail(UniversalBaseModel):
26
26
  """
27
27
 
28
28
  file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
29
+ filter: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
30
+ """
31
+ A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.
32
+ """
33
+
29
34
  process_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="processId")] = pydantic.Field(
30
35
  default=None
31
36
  )
@@ -45,6 +50,13 @@ class DocumentDetail(UniversalBaseModel):
45
50
 
46
51
  status: typing.Optional[ProcessingStatus] = None
47
52
  status_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="statusMessage")] = None
53
+ text_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="textUrl")] = pydantic.Field(
54
+ default=None
55
+ )
56
+ """
57
+ Extracted text URL, if using the extract agent
58
+ """
59
+
48
60
  xray_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="xrayUrl")] = pydantic.Field(
49
61
  default=None
50
62
  )
@@ -1,12 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_detail import DocumentDetail
4
+
5
+ import pydantic
6
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
8
  from ..core.serialization import FieldMetadata
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
- import pydantic
9
+ from .document_detail import DocumentDetail
10
10
 
11
11
 
12
12
  class DocumentListResponse(UniversalBaseModel):
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .ingest_local_document import IngestLocalDocument
6
+
7
+ DocumentLocalIngestRequest = typing.List[IngestLocalDocument]
@@ -1,12 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
4
+
5
5
  import pydantic
6
- from .document_detail import DocumentDetail
7
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+ from .document_detail import DocumentDetail
10
10
 
11
11
 
12
12
  class DocumentLookupResponse(UniversalBaseModel):
@@ -17,6 +17,11 @@ class DocumentLookupResponse(UniversalBaseModel):
17
17
 
18
18
  documents: typing.Optional[typing.List[DocumentDetail]] = None
19
19
  next_token: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextToken")] = None
20
+ remaining: typing.Optional[int] = pydantic.Field(default=None)
21
+ """
22
+ The number of results that have not been returned yet. Will be null if there are no remaining results.
23
+ """
24
+
20
25
  total: typing.Optional[int] = pydantic.Field(default=None)
21
26
  """
22
27
  The total number of results found
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_detail import DocumentDetail
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .document_detail import DocumentDetail
8
8
 
9
9
 
10
10
  class DocumentResponse(UniversalBaseModel):
@@ -3,5 +3,25 @@
3
3
  import typing
4
4
 
5
5
  DocumentType = typing.Union[
6
- typing.Literal["txt", "docx", "pptx", "xlsx", "pdf", "png", "jpg", "csv", "tsv", "json"], typing.Any
6
+ typing.Literal[
7
+ "bmp",
8
+ "csv",
9
+ "docx",
10
+ "gif",
11
+ "heif",
12
+ "hwp",
13
+ "ico",
14
+ "jpg",
15
+ "json",
16
+ "pdf",
17
+ "png",
18
+ "pptx",
19
+ "svg",
20
+ "tiff",
21
+ "tsv",
22
+ "txt",
23
+ "xlsx",
24
+ "webp",
25
+ ],
26
+ typing.Any,
7
27
  ]
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ import datetime as dt
4
4
  import typing
5
- from .bucket_detail import BucketDetail
5
+
6
6
  import pydantic
7
- import datetime as dt
8
7
  import typing_extensions
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
9
  from ..core.serialization import FieldMetadata
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
+ from .bucket_detail import BucketDetail
11
11
 
12
12
 
13
13
  class GroupDetail(UniversalBaseModel):
@@ -1,14 +1,28 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .group_detail import GroupDetail
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .group_detail import GroupDetail
8
8
 
9
9
 
10
10
  class GroupListResponse(UniversalBaseModel):
11
11
  groups: typing.Optional[typing.List[GroupDetail]] = None
12
+ count: typing.Optional[int] = pydantic.Field(default=None)
13
+ """
14
+ The number of groups returned in the current response
15
+ """
16
+
17
+ remaining: typing.Optional[int] = pydantic.Field(default=None)
18
+ """
19
+ The number of groups that have not been returned yet, will be null if there are no remaining groups
20
+ """
21
+
22
+ total: typing.Optional[int] = pydantic.Field(default=None)
23
+ """
24
+ The total number of groups found
25
+ """
12
26
 
13
27
  if IS_PYDANTIC_V2:
14
28
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .group_detail import GroupDetail
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .group_detail import GroupDetail
8
8
 
9
9
 
10
10
  class GroupResponse(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .health_response_health import HealthResponseHealth
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .health_response_health import HealthResponseHealth
8
8
 
9
9
 
10
10
  class HealthResponse(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .health_service import HealthService
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .health_service import HealthService
8
8
 
9
9
 
10
10
  class HealthResponseHealth(UniversalBaseModel):
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing_extensions
5
3
  import datetime as dt
6
- from ..core.serialization import FieldMetadata
4
+ import typing
5
+
7
6
  import pydantic
7
+ import typing_extensions
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
+ from ..core.serialization import FieldMetadata
8
10
  from .health_service_status import HealthServiceStatus
9
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
- import typing
11
11
 
12
12
 
13
13
  class HealthService(UniversalBaseModel):
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .ingest_local_document_metadata import IngestLocalDocumentMetadata
8
+
9
+
10
+ class IngestLocalDocument(UniversalBaseModel):
11
+ blob: str = pydantic.Field()
12
+ """
13
+ The binary file data being ingested.
14
+ """
15
+
16
+ metadata: IngestLocalDocumentMetadata
17
+
18
+ if IS_PYDANTIC_V2:
19
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
20
+ else:
21
+
22
+ class Config:
23
+ frozen = True
24
+ smart_union = True
25
+ extra = pydantic.Extra.allow
@@ -0,0 +1,51 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .document_type import DocumentType
10
+ from .process_level import ProcessLevel
11
+
12
+
13
+ class IngestLocalDocumentMetadata(UniversalBaseModel):
14
+ bucket_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="bucketId")] = pydantic.Field(
15
+ default=None
16
+ )
17
+ """
18
+ The bucketId of the bucket which this local file will be ingested into.
19
+ """
20
+
21
+ file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
22
+ default=None
23
+ )
24
+ """
25
+ The name of the file being ingested
26
+ """
27
+
28
+ file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
29
+ filter: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
30
+ """
31
+ A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.
32
+ """
33
+
34
+ process_level: typing_extensions.Annotated[typing.Optional[ProcessLevel], FieldMetadata(alias="processLevel")] = (
35
+ None
36
+ )
37
+ search_data: typing_extensions.Annotated[
38
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
39
+ ] = pydantic.Field(default=None)
40
+ """
41
+ Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
42
+ """
43
+
44
+ if IS_PYDANTIC_V2:
45
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
46
+ else:
47
+
48
+ class Config:
49
+ frozen = True
50
+ smart_union = True
51
+ extra = pydantic.Extra.allow
@@ -1,28 +1,37 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ import typing
4
+
5
+ import pydantic
4
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
8
  from ..core.serialization import FieldMetadata
6
- import pydantic
7
- import typing
8
9
  from .document_type import DocumentType
9
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
+ from .process_level import ProcessLevel
10
11
 
11
12
 
12
13
  class IngestRemoteDocument(UniversalBaseModel):
13
14
  bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
14
15
  """
15
- the bucketId of the bucket which this remote file will be ingested to.
16
+ The bucketId of the bucket which this remote file will be ingested into.
16
17
  """
17
18
 
18
19
  file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
19
20
  default=None
20
21
  )
21
22
  """
22
- The name of the file being ingested
23
+ The name of the file being ingested.
23
24
  """
24
25
 
25
26
  file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
27
+ filter: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
28
+ """
29
+ A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.
30
+ """
31
+
32
+ process_level: typing_extensions.Annotated[typing.Optional[ProcessLevel], FieldMetadata(alias="processLevel")] = (
33
+ None
34
+ )
26
35
  search_data: typing_extensions.Annotated[
27
36
  typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
28
37
  ] = pydantic.Field(default=None)
@@ -1,14 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .ingest_response_ingest import IngestResponseIngest
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .ingest_status import IngestStatus
8
8
 
9
9
 
10
10
  class IngestResponse(UniversalBaseModel):
11
- ingest: IngestResponseIngest
11
+ ingest: IngestStatus
12
12
 
13
13
  if IS_PYDANTIC_V2:
14
14
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,18 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ import typing
4
+
5
+ import pydantic
4
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
8
  from ..core.serialization import FieldMetadata
6
- import typing
7
- from .process_status_response_ingest_progress import ProcessStatusResponseIngestProgress
9
+ from .ingest_status_progress import IngestStatusProgress
8
10
  from .processing_status import ProcessingStatus
9
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
- import pydantic
11
11
 
12
12
 
13
- class ProcessStatusResponseIngest(UniversalBaseModel):
13
+ class IngestStatus(UniversalBaseModel):
14
+ id: typing.Optional[int] = None
14
15
  process_id: typing_extensions.Annotated[str, FieldMetadata(alias="processId")]
15
- progress: typing.Optional[ProcessStatusResponseIngestProgress] = None
16
+ progress: typing.Optional[IngestStatusProgress] = None
16
17
  status: ProcessingStatus
17
18
  status_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="statusMessage")] = None
18
19
 
@@ -1,17 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ import typing
4
+
5
+ import pydantic
4
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
8
  from ..core.serialization import FieldMetadata
6
9
  from .processing_status import ProcessingStatus
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
- import typing
9
- import pydantic
10
10
 
11
11
 
12
- class IngestResponseIngest(UniversalBaseModel):
12
+ class IngestStatusLight(UniversalBaseModel):
13
+ id: typing.Optional[int] = None
13
14
  process_id: typing_extensions.Annotated[str, FieldMetadata(alias="processId")]
14
15
  status: ProcessingStatus
16
+ status_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="statusMessage")] = None
15
17
 
16
18
  if IS_PYDANTIC_V2:
17
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .ingest_status_progress_cancelled import IngestStatusProgressCancelled
8
+ from .ingest_status_progress_complete import IngestStatusProgressComplete
9
+ from .ingest_status_progress_errors import IngestStatusProgressErrors
10
+ from .ingest_status_progress_processing import IngestStatusProgressProcessing
11
+
12
+
13
+ class IngestStatusProgress(UniversalBaseModel):
14
+ cancelled: typing.Optional[IngestStatusProgressCancelled] = None
15
+ complete: typing.Optional[IngestStatusProgressComplete] = None
16
+ errors: typing.Optional[IngestStatusProgressErrors] = None
17
+ processing: typing.Optional[IngestStatusProgressProcessing] = None
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_detail import DocumentDetail
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .document_detail import DocumentDetail
8
8
 
9
9
 
10
- class ProcessStatusResponseIngestProgressErrors(UniversalBaseModel):
10
+ class IngestStatusProgressCancelled(UniversalBaseModel):
11
11
  documents: typing.Optional[typing.List[DocumentDetail]] = None
12
12
  total: typing.Optional[int] = None
13
13
 
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_detail import DocumentDetail
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .document_detail import DocumentDetail
8
8
 
9
9
 
10
- class ProcessStatusResponseIngestProgressComplete(UniversalBaseModel):
10
+ class IngestStatusProgressComplete(UniversalBaseModel):
11
11
  documents: typing.Optional[typing.List[DocumentDetail]] = None
12
12
  total: typing.Optional[int] = None
13
13
 
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_detail import DocumentDetail
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .document_detail import DocumentDetail
8
8
 
9
9
 
10
- class ProcessStatusResponseIngestProgressCancelled(UniversalBaseModel):
10
+ class IngestStatusProgressErrors(UniversalBaseModel):
11
11
  documents: typing.Optional[typing.List[DocumentDetail]] = None
12
12
  total: typing.Optional[int] = None
13
13