airia 0.1.13__py3-none-any.whl → 0.1.15__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.
- airia/client/_request_handler/__init__.py +4 -0
- airia/client/_request_handler/async_request_handler.py +272 -0
- airia/client/_request_handler/base_request_handler.py +108 -0
- airia/client/_request_handler/sync_request_handler.py +255 -0
- airia/client/async_client.py +27 -678
- airia/client/base_client.py +2 -368
- airia/client/conversations/__init__.py +4 -0
- airia/client/conversations/async_conversations.py +187 -0
- airia/client/conversations/base_conversations.py +135 -0
- airia/client/conversations/sync_conversations.py +182 -0
- airia/client/deployments/__init__.py +11 -0
- airia/client/deployments/async_deployments.py +112 -0
- airia/client/deployments/base_deployments.py +95 -0
- airia/client/deployments/sync_deployments.py +112 -0
- airia/client/pipeline_execution/__init__.py +4 -0
- airia/client/pipeline_execution/async_pipeline_execution.py +178 -0
- airia/client/pipeline_execution/base_pipeline_execution.py +96 -0
- airia/client/pipeline_execution/sync_pipeline_execution.py +178 -0
- airia/client/pipelines_config/__init__.py +4 -0
- airia/client/pipelines_config/async_pipelines_config.py +65 -0
- airia/client/pipelines_config/base_pipelines_config.py +44 -0
- airia/client/pipelines_config/sync_pipelines_config.py +65 -0
- airia/client/project/__init__.py +4 -0
- airia/client/project/async_project.py +122 -0
- airia/client/project/base_project.py +74 -0
- airia/client/project/sync_project.py +120 -0
- airia/client/store/__init__.py +4 -0
- airia/client/store/async_store.py +377 -0
- airia/client/store/base_store.py +243 -0
- airia/client/store/sync_store.py +352 -0
- airia/client/sync_client.py +27 -656
- airia/constants.py +1 -1
- airia/exceptions.py +8 -8
- airia/logs.py +9 -9
- airia/types/_request_data.py +11 -4
- airia/types/api/__init__.py +0 -27
- airia/types/api/conversations/__init__.py +13 -0
- airia/types/api/{conversations.py → conversations/_conversations.py} +49 -12
- airia/types/api/deployments/__init__.py +26 -0
- airia/types/api/deployments/get_deployment.py +106 -0
- airia/types/api/deployments/get_deployments.py +224 -0
- airia/types/api/pipeline_execution/__init__.py +13 -0
- airia/types/api/{pipeline_execution.py → pipeline_execution/_pipeline_execution.py} +30 -13
- airia/types/api/pipelines_config/__init__.py +35 -0
- airia/types/api/pipelines_config/get_pipeline_config.py +554 -0
- airia/types/api/project/__init__.py +3 -0
- airia/types/api/{get_projects.py → project/get_projects.py} +16 -4
- airia/types/api/store/__init__.py +19 -0
- airia/types/api/store/get_file.py +145 -0
- airia/types/api/store/get_files.py +21 -0
- airia/types/sse/__init__.py +1 -0
- airia/types/sse/sse_messages.py +364 -48
- airia/utils/sse_parser.py +5 -4
- {airia-0.1.13.dist-info → airia-0.1.15.dist-info}/METADATA +4 -2
- airia-0.1.15.dist-info/RECORD +62 -0
- airia/types/api/get_pipeline_config.py +0 -214
- airia-0.1.13.dist-info/RECORD +0 -24
- {airia-0.1.13.dist-info → airia-0.1.15.dist-info}/WHEEL +0 -0
- {airia-0.1.13.dist-info → airia-0.1.15.dist-info}/licenses/LICENSE +0 -0
- {airia-0.1.13.dist-info → airia-0.1.15.dist-info}/top_level.txt +0 -0
|
@@ -4,56 +4,73 @@ Pydantic models for pipeline execution API responses.
|
|
|
4
4
|
This module defines the response models returned by pipeline execution endpoints,
|
|
5
5
|
including both synchronous and streaming response types.
|
|
6
6
|
"""
|
|
7
|
+
|
|
7
8
|
from typing import Any, AsyncIterator, Dict, Iterator
|
|
8
9
|
|
|
9
10
|
from pydantic import BaseModel, ConfigDict, Field
|
|
10
11
|
|
|
11
|
-
from
|
|
12
|
+
from ...sse import SSEMessage
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class PipelineExecutionResponse(BaseModel):
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
"""Response model for standard pipeline execution requests.
|
|
17
|
+
|
|
18
18
|
This model represents the response when executing a pipeline in normal mode
|
|
19
19
|
(not debug mode and not streaming).
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
result: The execution result as a string
|
|
23
|
+
report: Always None for standard executions
|
|
24
|
+
is_backup_pipeline: Whether a backup pipeline was used for execution
|
|
20
25
|
"""
|
|
26
|
+
|
|
21
27
|
result: str
|
|
22
28
|
report: None
|
|
23
29
|
is_backup_pipeline: bool = Field(alias="isBackupPipeline")
|
|
24
30
|
|
|
25
31
|
|
|
26
32
|
class PipelineExecutionDebugResponse(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
"""Response model for pipeline execution requests in debug mode.
|
|
34
|
+
|
|
30
35
|
This model includes additional debugging information in the report field
|
|
31
36
|
that provides insights into the pipeline's execution process.
|
|
37
|
+
|
|
38
|
+
Attributes:
|
|
39
|
+
result: The execution result as a string
|
|
40
|
+
report: Dictionary containing debugging information and execution details
|
|
41
|
+
is_backup_pipeline: Whether a backup pipeline was used for execution
|
|
32
42
|
"""
|
|
43
|
+
|
|
33
44
|
result: str
|
|
34
45
|
report: Dict[str, Any]
|
|
35
46
|
is_backup_pipeline: bool = Field(alias="isBackupPipeline")
|
|
36
47
|
|
|
37
48
|
|
|
38
49
|
class PipelineExecutionStreamedResponse(BaseModel):
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
"""Response model for streaming pipeline execution requests (synchronous client).
|
|
51
|
+
|
|
42
52
|
This model contains an iterator that yields SSEMessage objects as they
|
|
43
53
|
are received from the streaming response.
|
|
54
|
+
|
|
55
|
+
Attributes:
|
|
56
|
+
stream: Iterator that yields SSEMessage objects from the streaming response
|
|
44
57
|
"""
|
|
58
|
+
|
|
45
59
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
46
60
|
|
|
47
61
|
stream: Iterator[SSEMessage]
|
|
48
62
|
|
|
49
63
|
|
|
50
64
|
class PipelineExecutionAsyncStreamedResponse(BaseModel):
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
|
|
65
|
+
"""Response model for streaming pipeline execution requests (asynchronous client).
|
|
66
|
+
|
|
54
67
|
This model contains an async iterator that yields SSEMessage objects as they
|
|
55
68
|
are received from the streaming response.
|
|
69
|
+
|
|
70
|
+
Attributes:
|
|
71
|
+
stream: Async iterator that yields SSEMessage objects from the streaming response
|
|
56
72
|
"""
|
|
73
|
+
|
|
57
74
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
58
75
|
|
|
59
76
|
stream: AsyncIterator[SSEMessage]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Pipeline configuration API response types."""
|
|
2
|
+
|
|
3
|
+
from .get_pipeline_config import (
|
|
4
|
+
AboutDeploymentMetadata,
|
|
5
|
+
AgentDetailsEntry,
|
|
6
|
+
AgentTrigger,
|
|
7
|
+
Deployment,
|
|
8
|
+
DeploymentAssignment,
|
|
9
|
+
DeploymentUserPrompt,
|
|
10
|
+
Pipeline,
|
|
11
|
+
PipelineConfigResponse,
|
|
12
|
+
PipelineExecutionStats,
|
|
13
|
+
PipelineStep,
|
|
14
|
+
PipelineStepDependency,
|
|
15
|
+
PipelineStepHandle,
|
|
16
|
+
PipelineStepPosition,
|
|
17
|
+
PipelineVersion,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"AboutDeploymentMetadata",
|
|
22
|
+
"AgentDetailsEntry",
|
|
23
|
+
"AgentTrigger",
|
|
24
|
+
"Deployment",
|
|
25
|
+
"DeploymentAssignment",
|
|
26
|
+
"DeploymentUserPrompt",
|
|
27
|
+
"Pipeline",
|
|
28
|
+
"PipelineConfigResponse",
|
|
29
|
+
"PipelineExecutionStats",
|
|
30
|
+
"PipelineStep",
|
|
31
|
+
"PipelineStepDependency",
|
|
32
|
+
"PipelineStepHandle",
|
|
33
|
+
"PipelineStepPosition",
|
|
34
|
+
"PipelineVersion",
|
|
35
|
+
]
|
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
"""Types for the get_pipeline_config API response.
|
|
2
|
+
|
|
3
|
+
This module defines comprehensive data structures for pipeline configuration
|
|
4
|
+
responses, including pipeline definitions, versions, steps, deployments, and
|
|
5
|
+
all associated metadata required for pipeline management and execution.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from datetime import datetime
|
|
11
|
+
from typing import Any, Dict, List, Optional
|
|
12
|
+
|
|
13
|
+
from pydantic import BaseModel, Field
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PipelineStepPosition(BaseModel):
|
|
17
|
+
"""Represents the graphical position of a pipeline step within a visual representation of a pipeline.
|
|
18
|
+
|
|
19
|
+
Used for positioning pipeline steps in the visual pipeline editor interface.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
x: The X-coordinate of the pipeline step in a 2D space
|
|
23
|
+
y: The Y-coordinate of the pipeline step in a 2D space
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
x: float = Field(description="The X-coordinate of the pipeline step in a 2D space")
|
|
27
|
+
y: float = Field(description="The Y-coordinate of the pipeline step in a 2D space")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class PipelineStepHandle(BaseModel):
|
|
31
|
+
"""Represents a handle for a pipeline step.
|
|
32
|
+
|
|
33
|
+
Handles are connection points on pipeline steps that allow data flow between
|
|
34
|
+
steps. They can be either source handles (output) or target handles (input).
|
|
35
|
+
|
|
36
|
+
Attributes:
|
|
37
|
+
pipeline_step_id: The PipelineStepId this handle belongs to
|
|
38
|
+
uuid: The UUID of the handle
|
|
39
|
+
type: The type of the handle (source or target)
|
|
40
|
+
label: The label of the handle for display purposes
|
|
41
|
+
tooltip: The tooltip text shown when hovering over the handle
|
|
42
|
+
x: The X-coordinate of the handle within the pipeline step
|
|
43
|
+
y: The Y-coordinate of the handle within the pipeline step
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
pipeline_step_id: str = Field(
|
|
47
|
+
alias="pipelineStepId", description="The PipelineStepId this handle belongs to"
|
|
48
|
+
)
|
|
49
|
+
uuid: str = Field(description="The UUID of the handle")
|
|
50
|
+
type: str = Field(description="The type of the handle (source or target)")
|
|
51
|
+
label: Optional[str] = Field(default=None, description="The label of the handle")
|
|
52
|
+
tooltip: Optional[str] = Field(
|
|
53
|
+
default=None, description="The tooltip of the handle"
|
|
54
|
+
)
|
|
55
|
+
x: Optional[float] = Field(
|
|
56
|
+
default=None, description="The X-coordinate of the pipeline step in a 2D space"
|
|
57
|
+
)
|
|
58
|
+
y: Optional[float] = Field(
|
|
59
|
+
default=None, description="The Y-coordinate of the pipeline step in a 2D space"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class PipelineStepDependency(BaseModel):
|
|
64
|
+
"""Represents a dependency between pipeline steps.
|
|
65
|
+
|
|
66
|
+
Dependencies define the flow of data between pipeline steps by connecting
|
|
67
|
+
output handles of parent steps to input handles of child steps.
|
|
68
|
+
|
|
69
|
+
Attributes:
|
|
70
|
+
pipeline_step_id: The PipelineStepId this dependency belongs to
|
|
71
|
+
parent_id: The UUID of the parent pipeline step that provides input
|
|
72
|
+
parent_handle_id: The UUID of the parent handle (source output)
|
|
73
|
+
handle_id: The UUID of this handle (target input)
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
pipeline_step_id: str = Field(
|
|
77
|
+
alias="pipelineStepId", description="The PipelineStepId this handle belongs to"
|
|
78
|
+
)
|
|
79
|
+
parent_id: str = Field(
|
|
80
|
+
alias="parentId", description="The UUID of the parent pipeline step"
|
|
81
|
+
)
|
|
82
|
+
parent_handle_id: str = Field(
|
|
83
|
+
alias="parentHandleId", description="The UUID of the parent handle (source)"
|
|
84
|
+
)
|
|
85
|
+
handle_id: str = Field(
|
|
86
|
+
alias="handleId", description="The UUID of this handle (target)"
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class PipelineStep(BaseModel):
|
|
91
|
+
"""Represents a step within a pipeline.
|
|
92
|
+
|
|
93
|
+
Pipeline steps are individual processing units that perform specific tasks
|
|
94
|
+
within a pipeline workflow. Each step has a type, position, and connection
|
|
95
|
+
points for data flow.
|
|
96
|
+
|
|
97
|
+
Attributes:
|
|
98
|
+
position: The graphical position of this step within the pipeline editor
|
|
99
|
+
position_id: The identifier of the position for layout management
|
|
100
|
+
handles: The connection points (handles) of this step for data flow
|
|
101
|
+
dependencies_object: The input dependencies of this step from other steps
|
|
102
|
+
step_type: The type of processing this step performs
|
|
103
|
+
pipeline_version_id: The Pipeline Version Id this step belongs to
|
|
104
|
+
step_title: The human-readable title/name of the step
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
position: Optional[PipelineStepPosition] = Field(
|
|
108
|
+
default=None, description="The position of this step within the pipeline"
|
|
109
|
+
)
|
|
110
|
+
position_id: Optional[str] = Field(
|
|
111
|
+
alias="positionId", default=None, description="The identifier of the position"
|
|
112
|
+
)
|
|
113
|
+
handles: Optional[List[PipelineStepHandle]] = Field(
|
|
114
|
+
default=None, description="The handles of this step within the pipeline"
|
|
115
|
+
)
|
|
116
|
+
dependencies_object: Optional[List[PipelineStepDependency]] = Field(
|
|
117
|
+
alias="dependenciesObject",
|
|
118
|
+
default=None,
|
|
119
|
+
description="The dependencies of this step within the pipeline",
|
|
120
|
+
)
|
|
121
|
+
step_type: str = Field(alias="stepType", description="The type of this step")
|
|
122
|
+
pipeline_version_id: str = Field(
|
|
123
|
+
alias="pipelineVersionId", description="The Pipeline Version Id"
|
|
124
|
+
)
|
|
125
|
+
step_title: str = Field(alias="stepTitle", description="The Step Title")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class PipelineVersion(BaseModel):
|
|
129
|
+
"""Represents a specific version of a pipeline.
|
|
130
|
+
|
|
131
|
+
Pipeline versions allow for iteration and deployment management of pipelines.
|
|
132
|
+
Each version contains a complete definition of the pipeline structure and steps.
|
|
133
|
+
|
|
134
|
+
Attributes:
|
|
135
|
+
pipeline_id: The identifier of the parent pipeline this version belongs to
|
|
136
|
+
major_version: The major version number for significant changes
|
|
137
|
+
minor_version: The minor version number for incremental changes
|
|
138
|
+
version_number: The complete version number in string format (e.g., "1.2")
|
|
139
|
+
is_draft_version: Whether this is a draft version or a released production version
|
|
140
|
+
is_latest: Whether this version is the latest/current version of the pipeline
|
|
141
|
+
steps: The list of processing steps that make up this pipeline version
|
|
142
|
+
alignment: The UI alignment setting for pipeline visualization
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
pipeline_id: str = Field(
|
|
146
|
+
alias="pipelineId", description="The identifier of the parent pipeline"
|
|
147
|
+
)
|
|
148
|
+
major_version: int = Field(
|
|
149
|
+
alias="majorVersion", description="The major version number"
|
|
150
|
+
)
|
|
151
|
+
minor_version: int = Field(
|
|
152
|
+
alias="minorVersion", description="The minor version number"
|
|
153
|
+
)
|
|
154
|
+
version_number: str = Field(
|
|
155
|
+
alias="versionNumber", description="The version number in string format"
|
|
156
|
+
)
|
|
157
|
+
is_draft_version: bool = Field(
|
|
158
|
+
alias="isDraftVersion",
|
|
159
|
+
description="Whether the version is a draft or a major production version",
|
|
160
|
+
)
|
|
161
|
+
is_latest: bool = Field(
|
|
162
|
+
alias="isLatest",
|
|
163
|
+
description="Whether this version is the latest version of the pipeline",
|
|
164
|
+
)
|
|
165
|
+
steps: Optional[List[PipelineStep]] = Field(
|
|
166
|
+
default=None, description="The list of steps that make up the pipeline"
|
|
167
|
+
)
|
|
168
|
+
alignment: str = Field(description="The alignment of the pipeline in UI")
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class PipelineExecutionStats(BaseModel):
|
|
172
|
+
"""Represents the execution statistics for a pipeline.
|
|
173
|
+
|
|
174
|
+
Tracks the historical performance and reliability metrics of pipeline executions
|
|
175
|
+
to provide insights into pipeline health and success rates.
|
|
176
|
+
|
|
177
|
+
Attributes:
|
|
178
|
+
success_count: The total number of successful executions
|
|
179
|
+
failure_count: The total number of failed executions
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
success_count: int = Field(
|
|
183
|
+
alias="successCount", description="The total number of successful executions"
|
|
184
|
+
)
|
|
185
|
+
failure_count: int = Field(
|
|
186
|
+
alias="failureCount", description="The total number of failed executions"
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class AgentDetailsEntry(BaseModel):
|
|
191
|
+
"""Represents a single agent details entry.
|
|
192
|
+
|
|
193
|
+
Agent details entries define configurable parameters and metadata for
|
|
194
|
+
agent behavior, including input types, default values, and available options.
|
|
195
|
+
|
|
196
|
+
Attributes:
|
|
197
|
+
type: The input type (e.g., text, select, multiselect, number)
|
|
198
|
+
name: The parameter name for this configuration entry
|
|
199
|
+
value: The current value of this parameter
|
|
200
|
+
options: Available options for select or multiselect input types
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
type: str = Field(description="The input type")
|
|
204
|
+
name: str = Field(description="The input name")
|
|
205
|
+
value: Any = Field(description="The input value")
|
|
206
|
+
options: Optional[List[str]] = Field(
|
|
207
|
+
default=None, description="The options for select or multiselect"
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class AboutDeploymentMetadata(BaseModel):
|
|
212
|
+
"""Represents metadata about a deployment for the About tab.
|
|
213
|
+
|
|
214
|
+
Contains versioned metadata that appears in the About section of a deployment,
|
|
215
|
+
including educational and descriptive content.
|
|
216
|
+
|
|
217
|
+
Attributes:
|
|
218
|
+
version: The version of the About Deployment metadata schema
|
|
219
|
+
video_url: The URL of the instructional or demonstration video
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
version: int = Field(description="The version of the About Deployment metadata")
|
|
223
|
+
video_url: str = Field(alias="videoUrl", description="The video url")
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class DeploymentAssignment(BaseModel):
|
|
227
|
+
"""Represents a deployment assignment.
|
|
228
|
+
|
|
229
|
+
Deployment assignments link deployments to specific entities (users, groups, etc.)
|
|
230
|
+
to control access and visibility of deployed pipelines.
|
|
231
|
+
|
|
232
|
+
Attributes:
|
|
233
|
+
deployment_id: The ID of the deployment being assigned
|
|
234
|
+
id: The unique identifier of this assignment
|
|
235
|
+
entity_id: The ID of the entity (user, group) receiving the assignment
|
|
236
|
+
entity_type: The type of entity being assigned (user, group, etc.)
|
|
237
|
+
created_at: Timestamp when the assignment was created
|
|
238
|
+
updated_at: Timestamp when the assignment was last modified
|
|
239
|
+
user_id: The ID of the user who created this assignment
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
deployment_id: str = Field(alias="deploymentId", description="The deployment ID")
|
|
243
|
+
id: str = Field(description="The ID")
|
|
244
|
+
entity_id: str = Field(alias="entityId", description="The entity ID")
|
|
245
|
+
entity_type: str = Field(alias="entityType", description="The entity type")
|
|
246
|
+
created_at: Optional[datetime] = Field(
|
|
247
|
+
alias="createdAt", default=None, description="The created at timestamp"
|
|
248
|
+
)
|
|
249
|
+
updated_at: Optional[datetime] = Field(
|
|
250
|
+
alias="updatedAt", default=None, description="The updated at timestamp"
|
|
251
|
+
)
|
|
252
|
+
user_id: Optional[str] = Field(
|
|
253
|
+
alias="userId", default=None, description="The user ID"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class DeploymentUserPrompt(BaseModel):
|
|
258
|
+
"""A join entity that represents a user prompt associated with a deployment.
|
|
259
|
+
|
|
260
|
+
Links deployments with predefined user prompts to provide template
|
|
261
|
+
interactions and guided user experiences.
|
|
262
|
+
|
|
263
|
+
Attributes:
|
|
264
|
+
deployment_id: The ID of the deployment this prompt is associated with
|
|
265
|
+
user_prompt_id: The ID of the user prompt template
|
|
266
|
+
"""
|
|
267
|
+
|
|
268
|
+
deployment_id: str = Field(alias="deploymentId", description="The deployment ID")
|
|
269
|
+
user_prompt_id: str = Field(alias="userPromptId", description="The user prompt ID")
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class Deployment(BaseModel):
|
|
273
|
+
"""Represents a deployment.
|
|
274
|
+
|
|
275
|
+
Deployments make pipelines available to end users with specific configurations,
|
|
276
|
+
branding, and access controls. They define how users interact with pipelines
|
|
277
|
+
in production environments.
|
|
278
|
+
|
|
279
|
+
Attributes:
|
|
280
|
+
pipeline_id: The ID of the pipeline being deployed
|
|
281
|
+
name: The human-readable name of the deployment
|
|
282
|
+
description: A detailed description of the deployment's purpose and functionality
|
|
283
|
+
deployment_user_prompts: List of predefined prompts available to users
|
|
284
|
+
deployment_prompt: Optional system prompt that configures the deployment behavior
|
|
285
|
+
project_id: The ID of the project containing this deployment
|
|
286
|
+
is_recommended: Whether this deployment is featured/recommended to users
|
|
287
|
+
tags: Categorization tags for discovery and organization
|
|
288
|
+
conversation_type: The type of conversation interface (chat, form, etc.)
|
|
289
|
+
about: Optional metadata for the About/help section
|
|
290
|
+
assignments: Optional list of user/group assignments for access control
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
pipeline_id: str = Field(
|
|
294
|
+
alias="pipelineId",
|
|
295
|
+
description="The pipeline ID associated with this deployment",
|
|
296
|
+
)
|
|
297
|
+
name: str = Field(description="The Deployment Name")
|
|
298
|
+
description: str = Field(description="A description of the deployment")
|
|
299
|
+
deployment_user_prompts: Optional[List[DeploymentUserPrompt]] = Field(
|
|
300
|
+
alias="deploymentUserPrompts",
|
|
301
|
+
default=None,
|
|
302
|
+
description="The DeploymentUserPrompts",
|
|
303
|
+
)
|
|
304
|
+
deployment_prompt: Optional[str] = Field(
|
|
305
|
+
alias="deploymentPrompt", default=None, description="The DeploymentPrompt"
|
|
306
|
+
)
|
|
307
|
+
project_id: str = Field(alias="projectId", description="The Project Id")
|
|
308
|
+
is_recommended: bool = Field(
|
|
309
|
+
alias="isRecommended",
|
|
310
|
+
description="Whether this is a recommended/featured deployment",
|
|
311
|
+
)
|
|
312
|
+
tags: List[str] = Field(description="The Tags")
|
|
313
|
+
conversation_type: str = Field(
|
|
314
|
+
alias="conversationType", description="The Conversation Start Type"
|
|
315
|
+
)
|
|
316
|
+
about: Optional[AboutDeploymentMetadata] = Field(
|
|
317
|
+
default=None, description="Metadata about the deployment"
|
|
318
|
+
)
|
|
319
|
+
assignments: Optional[List[DeploymentAssignment]] = Field(
|
|
320
|
+
default=None, description="The Assignments"
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
class AgentTrigger(BaseModel):
|
|
325
|
+
"""Represents a trigger used to start a pipeline execution.
|
|
326
|
+
|
|
327
|
+
Agent triggers enable automatic pipeline execution based on external events,
|
|
328
|
+
particularly email-based triggers for document processing and workflow automation.
|
|
329
|
+
|
|
330
|
+
Attributes:
|
|
331
|
+
email_id: The email address that can trigger this agent
|
|
332
|
+
allowed_type: The type of content allowed to trigger execution
|
|
333
|
+
allowed_values: The specific values that are permitted for triggering
|
|
334
|
+
pipeline_id: The ID of the pipeline to execute when triggered
|
|
335
|
+
data_source_id: Optional ID of the data source for input data
|
|
336
|
+
store_connector_id: Optional ID of the storage connector for file handling
|
|
337
|
+
email_action: The action to perform when the email trigger activates
|
|
338
|
+
forward_to: Optional email address to forward results to after execution
|
|
339
|
+
"""
|
|
340
|
+
|
|
341
|
+
email_id: str = Field(
|
|
342
|
+
alias="emailId", description="The email id corresponding to the Agent"
|
|
343
|
+
)
|
|
344
|
+
allowed_type: str = Field(
|
|
345
|
+
alias="allowedType", description="The allowed type for the agent trigger"
|
|
346
|
+
)
|
|
347
|
+
allowed_values: str = Field(
|
|
348
|
+
alias="allowedValues", description="The allowed values for the agent trigger"
|
|
349
|
+
)
|
|
350
|
+
pipeline_id: str = Field(
|
|
351
|
+
alias="pipelineId", description="The Pipeline Version identifier"
|
|
352
|
+
)
|
|
353
|
+
data_source_id: Optional[str] = Field(
|
|
354
|
+
alias="dataSourceId", default=None, description="The Data Source identifier"
|
|
355
|
+
)
|
|
356
|
+
store_connector_id: Optional[str] = Field(
|
|
357
|
+
alias="storeConnectorId",
|
|
358
|
+
default=None,
|
|
359
|
+
description="The datastore connector identifier",
|
|
360
|
+
)
|
|
361
|
+
email_action: str = Field(
|
|
362
|
+
alias="emailAction", description="The email action to be performed"
|
|
363
|
+
)
|
|
364
|
+
forward_to: Optional[str] = Field(
|
|
365
|
+
alias="forwardTo",
|
|
366
|
+
default=None,
|
|
367
|
+
description="The recipient to forward to",
|
|
368
|
+
max_length=4000,
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class Pipeline(BaseModel):
|
|
373
|
+
"""Represents a processing pipeline.
|
|
374
|
+
|
|
375
|
+
Pipelines are the core workflow definition in the Airia platform, containing
|
|
376
|
+
a series of connected steps that process data and execute AI tasks. Each pipeline
|
|
377
|
+
can have multiple versions and can be deployed for end-user access.
|
|
378
|
+
|
|
379
|
+
Attributes:
|
|
380
|
+
id: The unique identifier of the pipeline
|
|
381
|
+
tenant_id: The tenant ID this pipeline belongs to
|
|
382
|
+
project_id: The project ID this pipeline belongs to
|
|
383
|
+
created_at: Timestamp when the pipeline was created
|
|
384
|
+
updated_at: Timestamp when the pipeline was last modified
|
|
385
|
+
user_id: The ID of the user who created this pipeline
|
|
386
|
+
active_version_id: The ID of the currently active version for execution
|
|
387
|
+
name: The human-readable name of the pipeline
|
|
388
|
+
execution_name: The name used when executing the pipeline programmatically
|
|
389
|
+
description: A detailed description of the pipeline's purpose and functionality
|
|
390
|
+
video_link: Optional URL to a video demonstration or tutorial
|
|
391
|
+
agent_icon_id: The ID of the icon used to represent this pipeline
|
|
392
|
+
versions: All available versions of this pipeline
|
|
393
|
+
execution_stats: Historical execution performance statistics
|
|
394
|
+
industry: The primary industry or domain this pipeline serves
|
|
395
|
+
sub_industries: Additional industry classifications and tags
|
|
396
|
+
agent_details: Configurable parameters and metadata for agent behavior
|
|
397
|
+
agent_details_tags: Tags for categorizing agent capabilities
|
|
398
|
+
active_version: The complete active version object (if loaded)
|
|
399
|
+
backup_pipeline_id: ID of a fallback pipeline in case of failure
|
|
400
|
+
deployment: The deployment configuration for end-user access
|
|
401
|
+
library_agent_id: ID of the library agent this pipeline is based on
|
|
402
|
+
library_imported_hash: Hash of the imported library agent for version tracking
|
|
403
|
+
library_imported_version: Version of the imported library agent
|
|
404
|
+
is_deleted: Whether this pipeline is marked for deletion
|
|
405
|
+
agent_trigger: Optional trigger configuration for automatic execution
|
|
406
|
+
api_key_id: ID of the API key used for external service authentication
|
|
407
|
+
is_seeded: Whether this pipeline comes from the platform's seed data
|
|
408
|
+
behaviours: List of capabilities and behaviors this agent can perform
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
id: str = Field(description="The unique identifier of the pipeline")
|
|
412
|
+
tenant_id: Optional[str] = Field(
|
|
413
|
+
alias="tenantId", default=None, description="The Tenant Id"
|
|
414
|
+
)
|
|
415
|
+
project_id: Optional[str] = Field(
|
|
416
|
+
alias="projectId", default=None, description="The project Id"
|
|
417
|
+
)
|
|
418
|
+
created_at: Optional[datetime] = Field(
|
|
419
|
+
alias="createdAt", default=None, description="The created at timestamp"
|
|
420
|
+
)
|
|
421
|
+
updated_at: Optional[datetime] = Field(
|
|
422
|
+
alias="updatedAt", default=None, description="The updated at timestamp"
|
|
423
|
+
)
|
|
424
|
+
user_id: Optional[str] = Field(
|
|
425
|
+
alias="userId", default=None, description="The user ID"
|
|
426
|
+
)
|
|
427
|
+
active_version_id: Optional[str] = Field(
|
|
428
|
+
alias="activeVersionId",
|
|
429
|
+
default=None,
|
|
430
|
+
description="The unique identifier of pipeline's active version",
|
|
431
|
+
)
|
|
432
|
+
name: Optional[str] = Field(default=None, description="The name of the pipeline")
|
|
433
|
+
execution_name: Optional[str] = Field(
|
|
434
|
+
alias="executionName",
|
|
435
|
+
default=None,
|
|
436
|
+
description="The execution name of the pipeline",
|
|
437
|
+
)
|
|
438
|
+
description: Optional[str] = Field(
|
|
439
|
+
default=None,
|
|
440
|
+
description="The optional description of the pipeline",
|
|
441
|
+
max_length=2000,
|
|
442
|
+
)
|
|
443
|
+
video_link: Optional[str] = Field(
|
|
444
|
+
alias="videoLink", default=None, description="The video link of the pipeline"
|
|
445
|
+
)
|
|
446
|
+
agent_icon_id: Optional[str] = Field(
|
|
447
|
+
alias="agentIconId", default=None, description="The Agent Icon Id"
|
|
448
|
+
)
|
|
449
|
+
versions: Optional[List[PipelineVersion]] = Field(
|
|
450
|
+
default=None, description="The versions of this pipeline"
|
|
451
|
+
)
|
|
452
|
+
execution_stats: Optional[PipelineExecutionStats] = Field(
|
|
453
|
+
alias="executionStats", default=None, description="The execution statistics"
|
|
454
|
+
)
|
|
455
|
+
industry: Optional[str] = Field(
|
|
456
|
+
default=None, description="The main industry of the pipeline"
|
|
457
|
+
)
|
|
458
|
+
sub_industries: Optional[List[str]] = Field(
|
|
459
|
+
alias="subIndustries", default=None, description="The agent sub-industries tags"
|
|
460
|
+
)
|
|
461
|
+
agent_details: Optional[Dict[str, List[AgentDetailsEntry]]] = Field(
|
|
462
|
+
alias="agentDetails", default=None, description="The agent details properties"
|
|
463
|
+
)
|
|
464
|
+
agent_details_tags: Optional[List[str]] = Field(
|
|
465
|
+
alias="agentDetailsTags", default=None, description="The agent details tags"
|
|
466
|
+
)
|
|
467
|
+
active_version: Optional[PipelineVersion] = Field(
|
|
468
|
+
alias="activeVersion",
|
|
469
|
+
default=None,
|
|
470
|
+
description="The active version of this pipeline",
|
|
471
|
+
)
|
|
472
|
+
backup_pipeline_id: Optional[str] = Field(
|
|
473
|
+
alias="backupPipelineId",
|
|
474
|
+
default=None,
|
|
475
|
+
description="The unique identifier of the backup pipeline",
|
|
476
|
+
)
|
|
477
|
+
deployment: Optional[Deployment] = Field(
|
|
478
|
+
default=None, description="The associated Deployment for this pipeline"
|
|
479
|
+
)
|
|
480
|
+
library_agent_id: Optional[str] = Field(
|
|
481
|
+
alias="libraryAgentId",
|
|
482
|
+
default=None,
|
|
483
|
+
description="The library agent id associated with the pipeline",
|
|
484
|
+
)
|
|
485
|
+
library_imported_hash: Optional[str] = Field(
|
|
486
|
+
alias="libraryImportedHash", default=None, description="The library agent hash"
|
|
487
|
+
)
|
|
488
|
+
library_imported_version: Optional[str] = Field(
|
|
489
|
+
alias="libraryImportedVersion",
|
|
490
|
+
default=None,
|
|
491
|
+
description="The library imported version",
|
|
492
|
+
)
|
|
493
|
+
is_deleted: Optional[bool] = Field(
|
|
494
|
+
alias="isDeleted",
|
|
495
|
+
default=None,
|
|
496
|
+
description="Whether this entity is marked for deletion",
|
|
497
|
+
)
|
|
498
|
+
agent_trigger: Optional[AgentTrigger] = Field(
|
|
499
|
+
alias="agentTrigger",
|
|
500
|
+
default=None,
|
|
501
|
+
description="The Agent trigger associated with the pipeline",
|
|
502
|
+
)
|
|
503
|
+
api_key_id: Optional[str] = Field(
|
|
504
|
+
alias="apiKeyId", default=None, description="The Api Key navigation property"
|
|
505
|
+
)
|
|
506
|
+
is_seeded: Optional[bool] = Field(
|
|
507
|
+
alias="isSeeded", default=None, description="Whether the pipeline is seeded"
|
|
508
|
+
)
|
|
509
|
+
behaviours: Optional[List[str]] = Field(
|
|
510
|
+
default=None, description="The behaviours that the agent can perform"
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
class PipelineConfigResponse(Pipeline):
|
|
515
|
+
"""Represents a complete pipeline configuration response.
|
|
516
|
+
|
|
517
|
+
Extends the base Pipeline model with additional deployment and access control
|
|
518
|
+
information. This is the primary response model for pipeline configuration
|
|
519
|
+
endpoints that need full context including deployment details and user permissions.
|
|
520
|
+
|
|
521
|
+
Attributes:
|
|
522
|
+
deployment_id: The ID of the associated deployment (if deployed)
|
|
523
|
+
deployment_name: The name of the associated deployment
|
|
524
|
+
deployment_description: The description of the associated deployment
|
|
525
|
+
user_keys: Dictionary mapping user roles to user IDs for access control
|
|
526
|
+
group_keys: Dictionary mapping group roles to group IDs for access control
|
|
527
|
+
agent_icon: Base64 encoded agent icon image data
|
|
528
|
+
external: Whether this is an external agent imported via Agent-to-Agent (A2A)
|
|
529
|
+
"""
|
|
530
|
+
|
|
531
|
+
deployment_id: Optional[str] = Field(
|
|
532
|
+
alias="deploymentId", default=None, description="The Deployment Id"
|
|
533
|
+
)
|
|
534
|
+
deployment_name: Optional[str] = Field(
|
|
535
|
+
alias="deploymentName", default=None, description="The Deployment Name"
|
|
536
|
+
)
|
|
537
|
+
deployment_description: Optional[str] = Field(
|
|
538
|
+
alias="deploymentDescription",
|
|
539
|
+
default=None,
|
|
540
|
+
description="The Deployment Description",
|
|
541
|
+
)
|
|
542
|
+
user_keys: Optional[Dict[str, str]] = Field(
|
|
543
|
+
alias="userKeys", default=None, description="The User Ids"
|
|
544
|
+
)
|
|
545
|
+
group_keys: Optional[Dict[str, str]] = Field(
|
|
546
|
+
alias="groupKeys", default=None, description="The Group Ids"
|
|
547
|
+
)
|
|
548
|
+
agent_icon: Optional[str] = Field(
|
|
549
|
+
alias="agentIcon", default=None, description="The Agent icon"
|
|
550
|
+
)
|
|
551
|
+
external: Optional[bool] = Field(
|
|
552
|
+
default=None,
|
|
553
|
+
description="Whether the agent is an external agent imported using A2A",
|
|
554
|
+
)
|