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,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 ProcessStatusResponseIngestProgressProcessing(UniversalBaseModel):
10
+ class IngestStatusProgressProcessing(UniversalBaseModel):
11
11
  documents: typing.Optional[typing.List[DocumentDetail]] = None
12
12
  total: typing.Optional[int] = None
13
13
 
@@ -1,9 +1,9 @@
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 ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class MessageResponse(UniversalBaseModel):
@@ -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
3
  import typing
4
+
5
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
9
 
10
10
 
11
11
  class MeterDetail(UniversalBaseModel):
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ProcessLevel = typing.Union[typing.Literal["none", "full"], typing.Any]
@@ -1,14 +1,17 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .process_status_response_ingest import ProcessStatusResponseIngest
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_light import IngestStatusLight
8
8
 
9
9
 
10
- class ProcessStatusResponse(UniversalBaseModel):
11
- ingest: ProcessStatusResponseIngest
10
+ class ProcessesStatusResponse(UniversalBaseModel):
11
+ processes: typing.List[IngestStatusLight] = pydantic.Field()
12
+ """
13
+ Processes
14
+ """
12
15
 
13
16
  if IS_PYDANTIC_V2:
14
17
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -2,4 +2,6 @@
2
2
 
3
3
  import typing
4
4
 
5
- ProcessingStatus = typing.Union[typing.Literal["queued", "processing", "error", "complete", "cancelled"], typing.Any]
5
+ ProcessingStatus = typing.Union[
6
+ typing.Literal["queued", "processing", "error", "complete", "cancelled", "active", "inactive"], typing.Any
7
+ ]
@@ -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 .search_response_search import SearchResponseSearch
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 .search_response_search import SearchResponseSearch
8
8
 
9
9
 
10
10
  class SearchResponse(UniversalBaseModel):
@@ -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 .search_result_item import SearchResultItem
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 .search_result_item import SearchResultItem
10
10
 
11
11
 
12
12
  class SearchResponseSearch(UniversalBaseModel):
@@ -1,12 +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 .bounding_box_detail import BoundingBoxDetail
7
- from ..core.serialization import FieldMetadata
4
+
8
5
  import pydantic
9
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .bounding_box_detail import BoundingBoxDetail
10
+ from .search_result_item_pages_item import SearchResultItemPagesItem
10
11
 
11
12
 
12
13
  class SearchResultItem(UniversalBaseModel):
@@ -55,6 +56,7 @@ class SearchResultItem(UniversalBaseModel):
55
56
  page_images: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="pageImages")] = (
56
57
  None
57
58
  )
59
+ pages: typing.Optional[typing.List[SearchResultItemPagesItem]] = None
58
60
  score: typing.Optional[float] = pydantic.Field(default=None)
59
61
  """
60
62
  Confidence score in the search result
@@ -0,0 +1,41 @@
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
+
10
+
11
+ class SearchResultItemPagesItem(UniversalBaseModel):
12
+ height: typing.Optional[float] = pydantic.Field(default=None)
13
+ """
14
+ The height of the page image
15
+ """
16
+
17
+ image_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="imageUrl")] = pydantic.Field(
18
+ default=None
19
+ )
20
+ """
21
+ A jpg of the page the chunk appears on
22
+ """
23
+
24
+ number: typing.Optional[float] = pydantic.Field(default=None)
25
+ """
26
+ The page number
27
+ """
28
+
29
+ width: typing.Optional[float] = pydantic.Field(default=None)
30
+ """
31
+ The width of the page image
32
+ """
33
+
34
+ if IS_PYDANTIC_V2:
35
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
36
+ else:
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ extra = pydantic.Extra.allow
@@ -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 .subscription_detail_meters import SubscriptionDetailMeters
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 .subscription_detail_meters import SubscriptionDetailMeters
8
8
 
9
9
 
10
10
  class SubscriptionDetail(UniversalBaseModel):
@@ -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
- import typing_extensions
5
3
  import typing
6
- from .meter_detail import MeterDetail
7
- from ..core.serialization import FieldMetadata
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
9
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 .meter_detail import MeterDetail
10
10
 
11
11
 
12
12
  class SubscriptionDetailMeters(UniversalBaseModel):
@@ -1,17 +1,17 @@
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
- import pydantic
7
3
  import typing
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2
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
9
 
10
10
 
11
- class WebsiteCrawlRequestWebsitesItem(UniversalBaseModel):
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)
@@ -0,0 +1,24 @@
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
+
10
+
11
+ class WorkflowApplyRequest(UniversalBaseModel):
12
+ workflow_id: typing_extensions.Annotated[str, FieldMetadata(alias="workflowId")] = pydantic.Field()
13
+ """
14
+ The id of the workflow that is being applied.
15
+ """
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
@@ -0,0 +1,59 @@
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 .workflow_detail_chunk_strategy import WorkflowDetailChunkStrategy
10
+ from .workflow_detail_relationships import WorkflowDetailRelationships
11
+ from .workflow_steps import WorkflowSteps
12
+
13
+
14
+ class WorkflowDetail(UniversalBaseModel):
15
+ """
16
+ Workflow information
17
+ """
18
+
19
+ chunk_strategy: typing_extensions.Annotated[
20
+ typing.Optional[WorkflowDetailChunkStrategy], FieldMetadata(alias="chunkStrategy")
21
+ ] = None
22
+ document_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="documentId")] = pydantic.Field(
23
+ default=None
24
+ )
25
+ """
26
+ The documentId associated with the workflow
27
+ """
28
+
29
+ id: typing.Optional[int] = pydantic.Field(default=None)
30
+ """
31
+ The bucketId or groupId associated with the workflow
32
+ """
33
+
34
+ name: typing.Optional[str] = pydantic.Field(default=None)
35
+ """
36
+ The human-readable name of the workflow
37
+ """
38
+
39
+ steps: typing.Optional[WorkflowSteps] = None
40
+ relationships: typing.Optional[WorkflowDetailRelationships] = pydantic.Field(default=None)
41
+ """
42
+ Information describing what the workflow is associated with
43
+ """
44
+
45
+ workflow_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workflowId")] = pydantic.Field(
46
+ default=None
47
+ )
48
+ """
49
+ Unique system generated ID for the workflow
50
+ """
51
+
52
+ if IS_PYDANTIC_V2:
53
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
54
+ else:
55
+
56
+ class Config:
57
+ frozen = True
58
+ smart_union = True
59
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowDetailChunkStrategy = typing.Union[typing.Literal["element", "size"], typing.Any]
@@ -0,0 +1,36 @@
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
+
8
+
9
+ class WorkflowDetailRelationships(UniversalBaseModel):
10
+ """
11
+ Information describing what the workflow is associated with
12
+ """
13
+
14
+ account: typing.Optional[bool] = pydantic.Field(default=None)
15
+ """
16
+ A boolean indicating whether the workflow is associated with the account
17
+ """
18
+
19
+ documents: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
20
+ """
21
+ An array of documentIds associated with the workflow
22
+ """
23
+
24
+ ids: typing.Optional[typing.List[int]] = pydantic.Field(default=None)
25
+ """
26
+ An array of bucketIds or groupIds associated with the workflow
27
+ """
28
+
29
+ if IS_PYDANTIC_V2:
30
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
+ else:
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ extra = pydantic.Extra.allow
@@ -0,0 +1,58 @@
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 .workflow_engine_reasoning_effort import WorkflowEngineReasoningEffort
10
+ from .workflow_engine_service import WorkflowEngineService
11
+
12
+
13
+ class WorkflowEngine(UniversalBaseModel):
14
+ """
15
+ Configurations for the LLM an agent uses in a workflow
16
+ """
17
+
18
+ api_key: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="apiKey")] = pydantic.Field(
19
+ default=None
20
+ )
21
+ """
22
+ A token that is added to the header of a request as an authorization bearer token
23
+ """
24
+
25
+ base_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="baseURL")] = pydantic.Field(
26
+ default=None
27
+ )
28
+ """
29
+ The base URL that precedes '/chat/completion' for an OpenAI chat completion-compatible endpoint
30
+ """
31
+
32
+ engine_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="engineID")] = pydantic.Field(
33
+ default=None
34
+ )
35
+ """
36
+ The model name that will be included in the request
37
+ """
38
+
39
+ reasoning_effort: typing_extensions.Annotated[
40
+ typing.Optional[WorkflowEngineReasoningEffort], FieldMetadata(alias="reasoningEffort")
41
+ ] = pydantic.Field(default=None)
42
+ """
43
+ An enumerated value that conforms to OpenAI '/chat/completion' specifications
44
+ """
45
+
46
+ service: typing.Optional[WorkflowEngineService] = pydantic.Field(default=None)
47
+ """
48
+ An enumerated descriptor of the service type, impacts how the requests are configured
49
+ """
50
+
51
+ if IS_PYDANTIC_V2:
52
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
53
+ else:
54
+
55
+ class Config:
56
+ frozen = True
57
+ smart_union = True
58
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowEngineReasoningEffort = typing.Union[typing.Literal["minimal", "low", "medium", "high"], typing.Any]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowEngineService = typing.Union[
6
+ typing.Literal["openai", "openai-base64", "azure", "deep-infra", "hosted"], typing.Any
7
+ ]
@@ -0,0 +1,37 @@
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 .workflow_prompt_role import WorkflowPromptRole
8
+
9
+
10
+ class WorkflowPrompt(UniversalBaseModel):
11
+ """
12
+ Configurations for the prompt an agent uses in a workflow
13
+ """
14
+
15
+ abbreviated: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ A short version of the prompt that is included in historical chat transcripts as part of the prompt context
18
+ """
19
+
20
+ prompt: typing.Optional[str] = pydantic.Field(default=None)
21
+ """
22
+ The prompt that is sent to the LLM
23
+ """
24
+
25
+ role: typing.Optional[WorkflowPromptRole] = pydantic.Field(default=None)
26
+ """
27
+ An enumerated value that conforms to OpenAI '/chat/completion' specifications
28
+ """
29
+
30
+ if IS_PYDANTIC_V2:
31
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
32
+ else:
33
+
34
+ class Config:
35
+ frozen = True
36
+ smart_union = True
37
+ extra = pydantic.Extra.allow
@@ -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 .workflow_prompt import WorkflowPrompt
8
+
9
+
10
+ class WorkflowPromptGroup(UniversalBaseModel):
11
+ """
12
+ A grouping of system task and request prompts
13
+ """
14
+
15
+ request: typing.Optional[WorkflowPrompt] = None
16
+ task: typing.Optional[WorkflowPrompt] = None
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,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowPromptRole = typing.Union[typing.Literal["assistant", "developer", "system", "user"], typing.Any]
@@ -0,0 +1,31 @@
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 .workflow_request_chunk_strategy import WorkflowRequestChunkStrategy
10
+ from .workflow_steps import WorkflowSteps
11
+
12
+
13
+ class WorkflowRequest(UniversalBaseModel):
14
+ chunk_strategy: typing_extensions.Annotated[
15
+ typing.Optional[WorkflowRequestChunkStrategy], FieldMetadata(alias="chunkStrategy")
16
+ ] = None
17
+ name: typing.Optional[str] = pydantic.Field(default=None)
18
+ """
19
+ The name of the workflow being created.
20
+ """
21
+
22
+ steps: typing.Optional[WorkflowSteps] = None
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowRequestChunkStrategy = typing.Union[typing.Literal["element", "size"], typing.Any]
@@ -0,0 +1,20 @@
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 .workflow_detail import WorkflowDetail
8
+
9
+
10
+ class WorkflowResponse(UniversalBaseModel):
11
+ workflow: WorkflowDetail
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
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 .workflow_step_config import WorkflowStepConfig
10
+
11
+
12
+ class WorkflowStep(UniversalBaseModel):
13
+ """
14
+ Configurations for an agent, including LLM information and prompts
15
+ """
16
+
17
+ all_: typing_extensions.Annotated[typing.Optional[WorkflowStepConfig], FieldMetadata(alias="all")] = None
18
+ figure: typing.Optional[WorkflowStepConfig] = None
19
+ json_: typing_extensions.Annotated[typing.Optional[WorkflowStepConfig], FieldMetadata(alias="json")] = None
20
+ paragraph: typing.Optional[WorkflowStepConfig] = None
21
+ table: typing.Optional[WorkflowStepConfig] = None
22
+ table_figure: typing_extensions.Annotated[
23
+ typing.Optional[WorkflowStepConfig], FieldMetadata(alias="table-figure")
24
+ ] = None
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
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 .workflow_engine import WorkflowEngine
8
+ from .workflow_prompt_group import WorkflowPromptGroup
9
+ from .workflow_step_config_field import WorkflowStepConfigField
10
+
11
+
12
+ class WorkflowStepConfig(UniversalBaseModel):
13
+ """
14
+ Configurations for an agent, including LLM information and prompts
15
+ """
16
+
17
+ engine: typing.Optional[WorkflowEngine] = None
18
+ field: typing.Optional[WorkflowStepConfigField] = pydantic.Field(default=None)
19
+ """
20
+ The field where agent output will be saved
21
+ """
22
+
23
+ includes: typing.Optional[typing.Dict[str, bool]] = None
24
+ prompt: typing.Optional[WorkflowPromptGroup] = None
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ WorkflowStepConfigField = typing.Union[
6
+ typing.Literal["doc-sum", "doc-keys", "sect-sum", "sect-keys", "chunk-sum", "chunk-keys", "chunk-instruct", "text"],
7
+ typing.Any,
8
+ ]