groundx 2.5.9__py3-none-any.whl → 2.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of groundx might be problematic. Click here for more details.
- groundx/__init__.py +44 -1
- groundx/client.py +3 -0
- groundx/core/client_wrapper.py +2 -2
- groundx/extract/agents/agent.py +5 -5
- groundx/types/__init__.py +40 -0
- groundx/types/workflow_apply_request.py +24 -0
- groundx/types/workflow_detail.py +55 -0
- groundx/types/workflow_detail_relationships.py +36 -0
- groundx/types/workflow_engine.py +58 -0
- groundx/types/workflow_engine_reasoning_effort.py +5 -0
- groundx/types/workflow_engine_service.py +7 -0
- groundx/types/workflow_prompt.py +39 -0
- groundx/types/workflow_prompt_group.py +25 -0
- groundx/types/workflow_prompt_role.py +5 -0
- groundx/types/workflow_response.py +20 -0
- groundx/types/workflow_step.py +26 -0
- groundx/types/workflow_steps.py +50 -0
- groundx/types/workflow_steps_chunk_instruct.py +24 -0
- groundx/types/workflow_steps_chunk_summary.py +26 -0
- groundx/types/workflow_steps_doc_keys.py +22 -0
- groundx/types/workflow_steps_doc_summary.py +23 -0
- groundx/types/workflow_steps_search_query.py +22 -0
- groundx/types/workflow_steps_sect_instruct.py +20 -0
- groundx/types/workflow_steps_sect_summary.py +23 -0
- groundx/types/workflows_response.py +20 -0
- groundx/workflow/__init__.py +7 -0
- groundx/workflow/client.py +743 -0
- groundx/workflow/raw_client.py +834 -0
- groundx/workflow/types/__init__.py +7 -0
- groundx/workflow/types/workflow_get_request_id.py +5 -0
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/METADATA +1 -1
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/RECORD +34 -9
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/LICENSE +0 -0
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/WHEEL +0 -0
groundx/__init__.py
CHANGED
|
@@ -50,13 +50,34 @@ from .types import (
|
|
|
50
50
|
SubscriptionDetail,
|
|
51
51
|
SubscriptionDetailMeters,
|
|
52
52
|
WebsiteSource,
|
|
53
|
+
WorkflowApplyRequest,
|
|
54
|
+
WorkflowDetail,
|
|
55
|
+
WorkflowDetailRelationships,
|
|
56
|
+
WorkflowEngine,
|
|
57
|
+
WorkflowEngineReasoningEffort,
|
|
58
|
+
WorkflowEngineService,
|
|
59
|
+
WorkflowPrompt,
|
|
60
|
+
WorkflowPromptGroup,
|
|
61
|
+
WorkflowPromptRole,
|
|
62
|
+
WorkflowResponse,
|
|
63
|
+
WorkflowStep,
|
|
64
|
+
WorkflowSteps,
|
|
65
|
+
WorkflowStepsChunkInstruct,
|
|
66
|
+
WorkflowStepsChunkSummary,
|
|
67
|
+
WorkflowStepsDocKeys,
|
|
68
|
+
WorkflowStepsDocSummary,
|
|
69
|
+
WorkflowStepsSearchQuery,
|
|
70
|
+
WorkflowStepsSectInstruct,
|
|
71
|
+
WorkflowStepsSectSummary,
|
|
72
|
+
WorkflowsResponse,
|
|
53
73
|
)
|
|
54
74
|
from .errors import BadRequestError, UnauthorizedError
|
|
55
|
-
from . import buckets, customer, documents, groups, health, search
|
|
75
|
+
from . import buckets, customer, documents, groups, health, search, workflow
|
|
56
76
|
from .environment import GroundXEnvironment
|
|
57
77
|
from .ingest import AsyncGroundX, GroundX
|
|
58
78
|
from .search import SearchContentRequestId
|
|
59
79
|
from .version import __version__
|
|
80
|
+
from .workflow import WorkflowGetRequestId
|
|
60
81
|
|
|
61
82
|
__all__ = [
|
|
62
83
|
"AsyncGroundX",
|
|
@@ -112,6 +133,27 @@ __all__ = [
|
|
|
112
133
|
"SubscriptionDetailMeters",
|
|
113
134
|
"UnauthorizedError",
|
|
114
135
|
"WebsiteSource",
|
|
136
|
+
"WorkflowApplyRequest",
|
|
137
|
+
"WorkflowDetail",
|
|
138
|
+
"WorkflowDetailRelationships",
|
|
139
|
+
"WorkflowEngine",
|
|
140
|
+
"WorkflowEngineReasoningEffort",
|
|
141
|
+
"WorkflowEngineService",
|
|
142
|
+
"WorkflowGetRequestId",
|
|
143
|
+
"WorkflowPrompt",
|
|
144
|
+
"WorkflowPromptGroup",
|
|
145
|
+
"WorkflowPromptRole",
|
|
146
|
+
"WorkflowResponse",
|
|
147
|
+
"WorkflowStep",
|
|
148
|
+
"WorkflowSteps",
|
|
149
|
+
"WorkflowStepsChunkInstruct",
|
|
150
|
+
"WorkflowStepsChunkSummary",
|
|
151
|
+
"WorkflowStepsDocKeys",
|
|
152
|
+
"WorkflowStepsDocSummary",
|
|
153
|
+
"WorkflowStepsSearchQuery",
|
|
154
|
+
"WorkflowStepsSectInstruct",
|
|
155
|
+
"WorkflowStepsSectSummary",
|
|
156
|
+
"WorkflowsResponse",
|
|
115
157
|
"__version__",
|
|
116
158
|
"buckets",
|
|
117
159
|
"customer",
|
|
@@ -119,4 +161,5 @@ __all__ = [
|
|
|
119
161
|
"groups",
|
|
120
162
|
"health",
|
|
121
163
|
"search",
|
|
164
|
+
"workflow",
|
|
122
165
|
]
|
groundx/client.py
CHANGED
|
@@ -11,6 +11,7 @@ from .environment import GroundXEnvironment
|
|
|
11
11
|
from .groups.client import AsyncGroupsClient, GroupsClient
|
|
12
12
|
from .health.client import AsyncHealthClient, HealthClient
|
|
13
13
|
from .search.client import AsyncSearchClient, SearchClient
|
|
14
|
+
from .workflow.client import AsyncWorkflowClient, WorkflowClient
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class GroundXBase:
|
|
@@ -77,6 +78,7 @@ class GroundXBase:
|
|
|
77
78
|
self.search = SearchClient(client_wrapper=self._client_wrapper)
|
|
78
79
|
self.buckets = BucketsClient(client_wrapper=self._client_wrapper)
|
|
79
80
|
self.groups = GroupsClient(client_wrapper=self._client_wrapper)
|
|
81
|
+
self.workflow = WorkflowClient(client_wrapper=self._client_wrapper)
|
|
80
82
|
self.customer = CustomerClient(client_wrapper=self._client_wrapper)
|
|
81
83
|
self.health = HealthClient(client_wrapper=self._client_wrapper)
|
|
82
84
|
|
|
@@ -145,6 +147,7 @@ class AsyncGroundXBase:
|
|
|
145
147
|
self.search = AsyncSearchClient(client_wrapper=self._client_wrapper)
|
|
146
148
|
self.buckets = AsyncBucketsClient(client_wrapper=self._client_wrapper)
|
|
147
149
|
self.groups = AsyncGroupsClient(client_wrapper=self._client_wrapper)
|
|
150
|
+
self.workflow = AsyncWorkflowClient(client_wrapper=self._client_wrapper)
|
|
148
151
|
self.customer = AsyncCustomerClient(client_wrapper=self._client_wrapper)
|
|
149
152
|
self.health = AsyncHealthClient(client_wrapper=self._client_wrapper)
|
|
150
153
|
|
groundx/core/client_wrapper.py
CHANGED
|
@@ -14,10 +14,10 @@ class BaseClientWrapper:
|
|
|
14
14
|
|
|
15
15
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
|
17
|
-
"User-Agent": "groundx/2.
|
|
17
|
+
"User-Agent": "groundx/2.6.0",
|
|
18
18
|
"X-Fern-Language": "Python",
|
|
19
19
|
"X-Fern-SDK-Name": "groundx",
|
|
20
|
-
"X-Fern-SDK-Version": "2.
|
|
20
|
+
"X-Fern-SDK-Version": "2.6.0",
|
|
21
21
|
}
|
|
22
22
|
headers["X-API-Key"] = self.api_key
|
|
23
23
|
return headers
|
groundx/extract/agents/agent.py
CHANGED
|
@@ -84,7 +84,7 @@ class AgentCode(CodeAgent):
|
|
|
84
84
|
def __init__(
|
|
85
85
|
self,
|
|
86
86
|
settings: AgentSettings,
|
|
87
|
-
|
|
87
|
+
log: Logger,
|
|
88
88
|
name: typing.Optional[str] = None,
|
|
89
89
|
description: typing.Optional[str] = None,
|
|
90
90
|
tools: typing.Optional[typing.List[Tool]] = None,
|
|
@@ -114,7 +114,7 @@ class AgentCode(CodeAgent):
|
|
|
114
114
|
|
|
115
115
|
self.python_executor.static_tools.update({"open": open}) # type: ignore
|
|
116
116
|
|
|
117
|
-
self.
|
|
117
|
+
self.log = log
|
|
118
118
|
|
|
119
119
|
def process(
|
|
120
120
|
self,
|
|
@@ -137,7 +137,7 @@ class AgentCode(CodeAgent):
|
|
|
137
137
|
f"agent process result is not of expected type(s) {expected_types!r}: [{e}]\n\n{res}"
|
|
138
138
|
)
|
|
139
139
|
|
|
140
|
-
self.
|
|
140
|
+
self.log.debug_msg(
|
|
141
141
|
f"agent process result is not of expected type(s) {expected_types!r}: [{e}], attempting again [{attempt+1}]\n\n{res}"
|
|
142
142
|
)
|
|
143
143
|
|
|
@@ -148,7 +148,7 @@ class AgentTool(ToolCallingAgent):
|
|
|
148
148
|
def __init__(
|
|
149
149
|
self,
|
|
150
150
|
settings: AgentSettings,
|
|
151
|
-
|
|
151
|
+
log: Logger,
|
|
152
152
|
name: typing.Optional[str] = None,
|
|
153
153
|
description: typing.Optional[str] = None,
|
|
154
154
|
tools: typing.Optional[typing.List[Tool]] = None,
|
|
@@ -172,7 +172,7 @@ class AgentTool(ToolCallingAgent):
|
|
|
172
172
|
verbosity_level=verbosity,
|
|
173
173
|
)
|
|
174
174
|
|
|
175
|
-
self.
|
|
175
|
+
self.log = log
|
|
176
176
|
|
|
177
177
|
def process(
|
|
178
178
|
self,
|
groundx/types/__init__.py
CHANGED
|
@@ -49,6 +49,26 @@ from .sort_order import SortOrder
|
|
|
49
49
|
from .subscription_detail import SubscriptionDetail
|
|
50
50
|
from .subscription_detail_meters import SubscriptionDetailMeters
|
|
51
51
|
from .website_source import WebsiteSource
|
|
52
|
+
from .workflow_apply_request import WorkflowApplyRequest
|
|
53
|
+
from .workflow_detail import WorkflowDetail
|
|
54
|
+
from .workflow_detail_relationships import WorkflowDetailRelationships
|
|
55
|
+
from .workflow_engine import WorkflowEngine
|
|
56
|
+
from .workflow_engine_reasoning_effort import WorkflowEngineReasoningEffort
|
|
57
|
+
from .workflow_engine_service import WorkflowEngineService
|
|
58
|
+
from .workflow_prompt import WorkflowPrompt
|
|
59
|
+
from .workflow_prompt_group import WorkflowPromptGroup
|
|
60
|
+
from .workflow_prompt_role import WorkflowPromptRole
|
|
61
|
+
from .workflow_response import WorkflowResponse
|
|
62
|
+
from .workflow_step import WorkflowStep
|
|
63
|
+
from .workflow_steps import WorkflowSteps
|
|
64
|
+
from .workflow_steps_chunk_instruct import WorkflowStepsChunkInstruct
|
|
65
|
+
from .workflow_steps_chunk_summary import WorkflowStepsChunkSummary
|
|
66
|
+
from .workflow_steps_doc_keys import WorkflowStepsDocKeys
|
|
67
|
+
from .workflow_steps_doc_summary import WorkflowStepsDocSummary
|
|
68
|
+
from .workflow_steps_search_query import WorkflowStepsSearchQuery
|
|
69
|
+
from .workflow_steps_sect_instruct import WorkflowStepsSectInstruct
|
|
70
|
+
from .workflow_steps_sect_summary import WorkflowStepsSectSummary
|
|
71
|
+
from .workflows_response import WorkflowsResponse
|
|
52
72
|
|
|
53
73
|
__all__ = [
|
|
54
74
|
"BoundingBoxDetail",
|
|
@@ -98,4 +118,24 @@ __all__ = [
|
|
|
98
118
|
"SubscriptionDetail",
|
|
99
119
|
"SubscriptionDetailMeters",
|
|
100
120
|
"WebsiteSource",
|
|
121
|
+
"WorkflowApplyRequest",
|
|
122
|
+
"WorkflowDetail",
|
|
123
|
+
"WorkflowDetailRelationships",
|
|
124
|
+
"WorkflowEngine",
|
|
125
|
+
"WorkflowEngineReasoningEffort",
|
|
126
|
+
"WorkflowEngineService",
|
|
127
|
+
"WorkflowPrompt",
|
|
128
|
+
"WorkflowPromptGroup",
|
|
129
|
+
"WorkflowPromptRole",
|
|
130
|
+
"WorkflowResponse",
|
|
131
|
+
"WorkflowStep",
|
|
132
|
+
"WorkflowSteps",
|
|
133
|
+
"WorkflowStepsChunkInstruct",
|
|
134
|
+
"WorkflowStepsChunkSummary",
|
|
135
|
+
"WorkflowStepsDocKeys",
|
|
136
|
+
"WorkflowStepsDocSummary",
|
|
137
|
+
"WorkflowStepsSearchQuery",
|
|
138
|
+
"WorkflowStepsSectInstruct",
|
|
139
|
+
"WorkflowStepsSectSummary",
|
|
140
|
+
"WorkflowsResponse",
|
|
101
141
|
]
|
|
@@ -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,55 @@
|
|
|
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_relationships import WorkflowDetailRelationships
|
|
10
|
+
from .workflow_steps import WorkflowSteps
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WorkflowDetail(UniversalBaseModel):
|
|
14
|
+
"""
|
|
15
|
+
Workflow information
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
document_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="documentId")] = pydantic.Field(
|
|
19
|
+
default=None
|
|
20
|
+
)
|
|
21
|
+
"""
|
|
22
|
+
The documentId associated with the workflow
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
id: typing.Optional[int] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
The bucketId or groupId associated with the workflow
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The human-readable name of the workflow
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
steps: typing.Optional[WorkflowSteps] = None
|
|
36
|
+
relationships: typing.Optional[WorkflowDetailRelationships] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
Information describing what the workflow is associated with
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
workflow_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workflowId")] = pydantic.Field(
|
|
42
|
+
default=None
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
Unique system generated ID for the workflow
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
if IS_PYDANTIC_V2:
|
|
49
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
50
|
+
else:
|
|
51
|
+
|
|
52
|
+
class Config:
|
|
53
|
+
frozen = True
|
|
54
|
+
smart_union = True
|
|
55
|
+
extra = pydantic.Extra.allow
|
|
@@ -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,39 @@
|
|
|
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_prompt_role import WorkflowPromptRole
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowPrompt(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Configurations for the prompt an agent uses in a workflow
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
abbreviated: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
A short version of the prompt that is included in historical chat transcripts as part of the prompt context
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
long_: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="long")] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
The prompt that is sent to the LLM
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
role: typing.Optional[WorkflowPromptRole] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
An enumerated value that conforms to OpenAI '/chat/completion' specifications
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
if IS_PYDANTIC_V2:
|
|
33
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
34
|
+
else:
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
frozen = True
|
|
38
|
+
smart_union = True
|
|
39
|
+
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,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,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 .workflow_engine import WorkflowEngine
|
|
8
|
+
from .workflow_prompt_group import WorkflowPromptGroup
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class WorkflowStep(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Configurations for an agent, including LLM information and prompts
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
engine: typing.Optional[WorkflowEngine] = None
|
|
17
|
+
prompt: typing.Optional[WorkflowPromptGroup] = 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
|
|
@@ -0,0 +1,50 @@
|
|
|
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_steps_chunk_instruct import WorkflowStepsChunkInstruct
|
|
10
|
+
from .workflow_steps_chunk_summary import WorkflowStepsChunkSummary
|
|
11
|
+
from .workflow_steps_doc_keys import WorkflowStepsDocKeys
|
|
12
|
+
from .workflow_steps_doc_summary import WorkflowStepsDocSummary
|
|
13
|
+
from .workflow_steps_search_query import WorkflowStepsSearchQuery
|
|
14
|
+
from .workflow_steps_sect_instruct import WorkflowStepsSectInstruct
|
|
15
|
+
from .workflow_steps_sect_summary import WorkflowStepsSectSummary
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class WorkflowSteps(UniversalBaseModel):
|
|
19
|
+
"""
|
|
20
|
+
A collection of workflow steps
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
chunk_instruct: typing_extensions.Annotated[
|
|
24
|
+
typing.Optional[WorkflowStepsChunkInstruct], FieldMetadata(alias="chunk-instruct")
|
|
25
|
+
] = None
|
|
26
|
+
chunk_summary: typing_extensions.Annotated[
|
|
27
|
+
typing.Optional[WorkflowStepsChunkSummary], FieldMetadata(alias="chunk-summary")
|
|
28
|
+
] = None
|
|
29
|
+
doc_keys: typing_extensions.Annotated[typing.Optional[WorkflowStepsDocKeys], FieldMetadata(alias="doc-keys")] = None
|
|
30
|
+
doc_summary: typing_extensions.Annotated[
|
|
31
|
+
typing.Optional[WorkflowStepsDocSummary], FieldMetadata(alias="doc-summary")
|
|
32
|
+
] = None
|
|
33
|
+
search_query: typing_extensions.Annotated[
|
|
34
|
+
typing.Optional[WorkflowStepsSearchQuery], FieldMetadata(alias="search-query")
|
|
35
|
+
] = None
|
|
36
|
+
sect_instruct: typing_extensions.Annotated[
|
|
37
|
+
typing.Optional[WorkflowStepsSectInstruct], FieldMetadata(alias="sect-instruct")
|
|
38
|
+
] = None
|
|
39
|
+
sect_summary: typing_extensions.Annotated[
|
|
40
|
+
typing.Optional[WorkflowStepsSectSummary], FieldMetadata(alias="sect-summary")
|
|
41
|
+
] = None
|
|
42
|
+
|
|
43
|
+
if IS_PYDANTIC_V2:
|
|
44
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
45
|
+
else:
|
|
46
|
+
|
|
47
|
+
class Config:
|
|
48
|
+
frozen = True
|
|
49
|
+
smart_union = True
|
|
50
|
+
extra = pydantic.Extra.allow
|
|
@@ -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
|
+
from .workflow_step import WorkflowStep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowStepsChunkInstruct(UniversalBaseModel):
|
|
13
|
+
figure: typing.Optional[WorkflowStep] = None
|
|
14
|
+
json_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="json")] = None
|
|
15
|
+
table_figure: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="table-figure")] = None
|
|
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,26 @@
|
|
|
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 import WorkflowStep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowStepsChunkSummary(UniversalBaseModel):
|
|
13
|
+
all_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="all")] = None
|
|
14
|
+
figure: typing.Optional[WorkflowStep] = None
|
|
15
|
+
json_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="json")] = None
|
|
16
|
+
table: typing.Optional[WorkflowStep] = None
|
|
17
|
+
table_figure: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="table-figure")] = 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
|
|
@@ -0,0 +1,22 @@
|
|
|
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 import WorkflowStep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowStepsDocKeys(UniversalBaseModel):
|
|
13
|
+
all_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="all")] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
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 import WorkflowStep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowStepsDocSummary(UniversalBaseModel):
|
|
13
|
+
all_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="all")] = None
|
|
14
|
+
json_: typing_extensions.Annotated[typing.Optional[WorkflowStep], FieldMetadata(alias="json")] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|