airia 0.1.14__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/async_client.py +2 -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/pipelines_config/async_pipelines_config.py +5 -67
- airia/client/pipelines_config/base_pipelines_config.py +1 -33
- airia/client/pipelines_config/sync_pipelines_config.py +5 -67
- airia/client/sync_client.py +2 -0
- airia/types/api/conversations/__init__.py +12 -2
- 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/pipelines_config/__init__.py +34 -2
- airia/types/api/pipelines_config/get_pipeline_config.py +454 -301
- airia/types/api/project/__init__.py +2 -2
- airia/types/api/store/__init__.py +17 -2
- airia/types/sse/sse_messages.py +309 -27
- {airia-0.1.14.dist-info → airia-0.1.15.dist-info}/METADATA +1 -1
- {airia-0.1.14.dist-info → airia-0.1.15.dist-info}/RECORD +23 -16
- {airia-0.1.14.dist-info → airia-0.1.15.dist-info}/WHEEL +0 -0
- {airia-0.1.14.dist-info → airia-0.1.15.dist-info}/licenses/LICENSE +0 -0
- {airia-0.1.14.dist-info → airia-0.1.15.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pydantic models for single deployment API responses.
|
|
3
|
+
|
|
4
|
+
This module defines the data structures returned by the get_deployment endpoint,
|
|
5
|
+
which retrieves a single deployment by ID.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from typing import List, Optional
|
|
9
|
+
from uuid import UUID
|
|
10
|
+
|
|
11
|
+
from pydantic import BaseModel, Field
|
|
12
|
+
|
|
13
|
+
from .get_deployments import AboutDeploymentMetadata, DataSource, UserPrompt
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class GetDeploymentResponse(BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Response model for retrieving a single deployment.
|
|
19
|
+
|
|
20
|
+
Represents a deployment DTO with complete information about the deployment,
|
|
21
|
+
including its configuration, associated resources, and metadata.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
id: Unique deployment identifier
|
|
25
|
+
pipeline_id: Unique identifier of the pipeline powering this deployment
|
|
26
|
+
pipeline_name: Name of the pipeline associated with this deployment
|
|
27
|
+
project_id: Unique identifier of the project containing this deployment
|
|
28
|
+
deployment_name: Human-readable name of the deployment
|
|
29
|
+
deployment_icon_url: Optional URL to the deployment's icon image
|
|
30
|
+
deployment_icon_id: Optional unique identifier for the deployment icon
|
|
31
|
+
description: Detailed description of what the deployment does
|
|
32
|
+
tags: List of tags for categorizing and filtering deployments
|
|
33
|
+
is_recommended: Whether this deployment is marked as recommended
|
|
34
|
+
user_prompts: List of user prompts associated with this deployment
|
|
35
|
+
deployment_prompt: Optional hardcoded prompt type for the deployment
|
|
36
|
+
user_ids: List of user IDs that have access to this deployment
|
|
37
|
+
group_ids: List of group IDs that have access to this deployment
|
|
38
|
+
conversation_type: Type of conversation this deployment supports
|
|
39
|
+
data_sources: List of data sources that the deployment can access
|
|
40
|
+
pipeline_user_id: ID of the user who created the underlying pipeline
|
|
41
|
+
about: Optional metadata for the About tab
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
id: UUID = Field(description="Gets the deployment ID.")
|
|
45
|
+
pipeline_id: UUID = Field(
|
|
46
|
+
alias="pipelineId",
|
|
47
|
+
description="Gets the pipeline ID associated with this deployment.",
|
|
48
|
+
)
|
|
49
|
+
pipeline_name: Optional[str] = Field(
|
|
50
|
+
None,
|
|
51
|
+
alias="pipelineName",
|
|
52
|
+
description="Gets the pipeline name associated with this deployment.",
|
|
53
|
+
)
|
|
54
|
+
project_id: UUID = Field(
|
|
55
|
+
alias="projectId",
|
|
56
|
+
description="Gets the project ID associated with this deployment.",
|
|
57
|
+
)
|
|
58
|
+
deployment_name: str = Field(
|
|
59
|
+
alias="deploymentName", description="Gets the deployment name."
|
|
60
|
+
)
|
|
61
|
+
deployment_icon_url: Optional[str] = Field(
|
|
62
|
+
None, alias="deploymentIconUrl", description="Gets the Deployment Icon URL."
|
|
63
|
+
)
|
|
64
|
+
deployment_icon_id: Optional[UUID] = Field(
|
|
65
|
+
None, alias="deploymentIconId", description="Gets the Deployment Icon Id."
|
|
66
|
+
)
|
|
67
|
+
description: str = Field(description="Gets the deployment description.")
|
|
68
|
+
tags: List[str] = Field(description="Gets the Tags.")
|
|
69
|
+
is_recommended: bool = Field(
|
|
70
|
+
alias="isRecommended",
|
|
71
|
+
description="Gets a value indicating whether the deployment is recommended.",
|
|
72
|
+
)
|
|
73
|
+
user_prompts: List[UserPrompt] = Field(
|
|
74
|
+
alias="userPrompts",
|
|
75
|
+
description="Gets the user prompts associated with this deployment.",
|
|
76
|
+
)
|
|
77
|
+
deployment_prompt: Optional[str] = Field(
|
|
78
|
+
None,
|
|
79
|
+
alias="deploymentPrompt",
|
|
80
|
+
description="Gets or sets the optional deployment prompt type.",
|
|
81
|
+
)
|
|
82
|
+
user_ids: Optional[List[UUID]] = Field(
|
|
83
|
+
alias="userIds",
|
|
84
|
+
description="Gets or sets the user IDs associated with this deployment.",
|
|
85
|
+
)
|
|
86
|
+
group_ids: Optional[List[UUID]] = Field(
|
|
87
|
+
alias="groupIds",
|
|
88
|
+
description="Gets or sets the group IDs associated with this deployment.",
|
|
89
|
+
)
|
|
90
|
+
conversation_type: str = Field(
|
|
91
|
+
alias="conversationType",
|
|
92
|
+
description="Gets or sets the conversation start type for this deployment.",
|
|
93
|
+
)
|
|
94
|
+
data_sources: List[DataSource] = Field(
|
|
95
|
+
alias="dataSources",
|
|
96
|
+
description="Gets the data sources associated with this deployment.",
|
|
97
|
+
)
|
|
98
|
+
pipeline_user_id: Optional[UUID] = Field(
|
|
99
|
+
None,
|
|
100
|
+
alias="pipelineUserId",
|
|
101
|
+
description="Gets the ID of the user who created deployed agent.",
|
|
102
|
+
)
|
|
103
|
+
about: Optional[AboutDeploymentMetadata] = Field(
|
|
104
|
+
None,
|
|
105
|
+
description="Gets the deployment metadata for the 'About' section.",
|
|
106
|
+
)
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pydantic models for deployment API responses.
|
|
3
|
+
|
|
4
|
+
This module defines the data structures returned by deployment-related endpoints,
|
|
5
|
+
including deployment listings with metadata, user prompts, and data sources.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from datetime import datetime
|
|
9
|
+
from typing import List, Optional
|
|
10
|
+
from uuid import UUID
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, Field
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Project(BaseModel):
|
|
16
|
+
"""
|
|
17
|
+
The base project model.
|
|
18
|
+
|
|
19
|
+
Represents basic project information within deployment contexts.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
id: Unique project identifier
|
|
23
|
+
name: Human-readable project name
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
id: UUID = Field(description="Gets or sets the project identifier.")
|
|
27
|
+
name: str = Field(description="Gets or sets the project name.")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DataSource(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
Condensed version of the datasource DTO.
|
|
33
|
+
|
|
34
|
+
Represents basic data source information associated with deployments.
|
|
35
|
+
|
|
36
|
+
Attributes:
|
|
37
|
+
id: Optional unique identifier for the data source
|
|
38
|
+
name: Optional human-readable name of the data source
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
id: Optional[UUID] = Field(
|
|
42
|
+
None, description="Gets or Sets the datasource identifier."
|
|
43
|
+
)
|
|
44
|
+
name: Optional[str] = Field(None, description="Gets or Sets the datasource name.")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class UserPrompt(BaseModel):
|
|
48
|
+
"""
|
|
49
|
+
Represents a user prompt entity in the system.
|
|
50
|
+
|
|
51
|
+
User prompts are reusable text templates that can be associated with deployments
|
|
52
|
+
to provide consistent interaction patterns.
|
|
53
|
+
|
|
54
|
+
Attributes:
|
|
55
|
+
user_prompt_id: Unique identifier for the user prompt
|
|
56
|
+
name: Human-readable name of the user prompt
|
|
57
|
+
message: The actual prompt message content
|
|
58
|
+
description: Detailed description of what the prompt does
|
|
59
|
+
updated_at: Timestamp of when the prompt was last modified
|
|
60
|
+
active_deployments: Number of active deployments using this prompt
|
|
61
|
+
project_id: Unique identifier of the project containing this prompt
|
|
62
|
+
project_name: Name of the project containing this prompt
|
|
63
|
+
project: Complete project information associated with this prompt
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
user_prompt_id: UUID = Field(
|
|
67
|
+
alias="userPromptId",
|
|
68
|
+
description="Gets or sets the unique identifier for the user prompt.",
|
|
69
|
+
)
|
|
70
|
+
name: str = Field(description="Gets or sets the name of the UserPrompt.")
|
|
71
|
+
message: str = Field(description="Gets or sets the UserPrompt Message.")
|
|
72
|
+
description: str = Field(description="Gets or sets the UserPrompt Description.")
|
|
73
|
+
updated_at: datetime = Field(
|
|
74
|
+
alias="updatedAt",
|
|
75
|
+
description="Gets or sets the last modified date of the UserPrompt.",
|
|
76
|
+
)
|
|
77
|
+
active_deployments: int = Field(
|
|
78
|
+
alias="activeDeployments",
|
|
79
|
+
description="Gets or sets the number of active deployments for the UserPrompt.",
|
|
80
|
+
)
|
|
81
|
+
project_id: UUID = Field(
|
|
82
|
+
alias="projectId",
|
|
83
|
+
description="Gets or sets the unique identifier of the project that the prompt belongs to.",
|
|
84
|
+
)
|
|
85
|
+
project_name: Optional[str] = Field(
|
|
86
|
+
None,
|
|
87
|
+
alias="projectName",
|
|
88
|
+
description="Gets or sets the name of the project that the prompt belongs to.",
|
|
89
|
+
)
|
|
90
|
+
project: Optional[Project] = Field(None, description="Gets or sets the project.")
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class AboutDeploymentMetadata(BaseModel):
|
|
94
|
+
"""
|
|
95
|
+
Represents metadata about a deployment for the About tab.
|
|
96
|
+
|
|
97
|
+
Contains additional information displayed in the deployment's About section,
|
|
98
|
+
including documentation and multimedia resources.
|
|
99
|
+
|
|
100
|
+
Attributes:
|
|
101
|
+
version: Version of the About Deployment metadata format
|
|
102
|
+
video_url: URL to an explanatory video for the deployment
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
version: int = Field(
|
|
106
|
+
description="Gets or sets the version of the About Deployment metadata."
|
|
107
|
+
)
|
|
108
|
+
video_url: str = Field(alias="videoUrl", description="Gets or sets the video url.")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class DeploymentItem(BaseModel):
|
|
112
|
+
"""
|
|
113
|
+
Represents a deployment DTO.
|
|
114
|
+
|
|
115
|
+
A deployment is a configured and published AI agent that can be used for conversations.
|
|
116
|
+
It contains all the necessary information including the underlying pipeline,
|
|
117
|
+
associated data sources, user prompts, and configuration settings.
|
|
118
|
+
|
|
119
|
+
Attributes:
|
|
120
|
+
deployment_id: Unique identifier for the deployment
|
|
121
|
+
pipeline_id: Unique identifier of the pipeline powering this deployment
|
|
122
|
+
deployment_name: Human-readable name of the deployment
|
|
123
|
+
deployment_icon_url: Optional URL to the deployment's icon image
|
|
124
|
+
description: Detailed description of what the deployment does
|
|
125
|
+
project_id: Unique identifier of the project containing this deployment
|
|
126
|
+
project_name: Name of the project containing this deployment
|
|
127
|
+
user_prompts: List of user prompts associated with this deployment
|
|
128
|
+
data_sources: List of data sources that the deployment can access
|
|
129
|
+
is_recommended: Whether this deployment is marked as recommended
|
|
130
|
+
tags: List of tags for categorizing and filtering deployments
|
|
131
|
+
is_pinned: Whether this deployment is pinned for the current user
|
|
132
|
+
deployment_type: Type of deployment (Chat, AddinChat, etc.)
|
|
133
|
+
conversation_type: Type of conversation this deployment supports
|
|
134
|
+
created_at: Timestamp when the deployment was created
|
|
135
|
+
pipeline_user_id: ID of the user who created the underlying pipeline
|
|
136
|
+
pipeline_name: Name of the underlying pipeline/agent
|
|
137
|
+
deployment_prompt: Optional hardcoded prompt type for the deployment
|
|
138
|
+
about_deployment_metadata: Optional metadata for the About tab
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
deployment_id: UUID = Field(
|
|
142
|
+
alias="deploymentId", description="Gets the deployment ID."
|
|
143
|
+
)
|
|
144
|
+
pipeline_id: UUID = Field(
|
|
145
|
+
alias="pipelineId",
|
|
146
|
+
description="Gets the pipeline ID associated with this deployment.",
|
|
147
|
+
)
|
|
148
|
+
deployment_name: str = Field(
|
|
149
|
+
alias="deploymentName", description="Gets the deployment name."
|
|
150
|
+
)
|
|
151
|
+
deployment_icon_url: Optional[str] = Field(
|
|
152
|
+
None, alias="deploymentIconUrl", description="Gets the Deployment Icon URL."
|
|
153
|
+
)
|
|
154
|
+
description: str = Field(description="Gets the deployment description.")
|
|
155
|
+
project_id: UUID = Field(
|
|
156
|
+
alias="projectId",
|
|
157
|
+
description="Gets the projectId associated with this deployment.",
|
|
158
|
+
)
|
|
159
|
+
project_name: Optional[str] = Field(
|
|
160
|
+
None,
|
|
161
|
+
alias="projectName",
|
|
162
|
+
description="Gets the project name associated with this deployment.",
|
|
163
|
+
)
|
|
164
|
+
user_prompts: List[UserPrompt] = Field(
|
|
165
|
+
alias="userPrompts",
|
|
166
|
+
description="Gets the user prompts associated with this deployment.",
|
|
167
|
+
)
|
|
168
|
+
data_sources: List[DataSource] = Field(
|
|
169
|
+
alias="dataSources",
|
|
170
|
+
description="Gets the data sources associated with this deployment.",
|
|
171
|
+
)
|
|
172
|
+
is_recommended: bool = Field(
|
|
173
|
+
alias="isRecommended",
|
|
174
|
+
description="Gets a value indicating whether the deployment is recommended.",
|
|
175
|
+
)
|
|
176
|
+
tags: List[str] = Field(description="Gets the Tags.")
|
|
177
|
+
is_pinned: bool = Field(
|
|
178
|
+
alias="isPinned",
|
|
179
|
+
description="Gets a value indicating whether the deployment is pinned for this user.",
|
|
180
|
+
)
|
|
181
|
+
deployment_type: str = Field(
|
|
182
|
+
alias="deploymentType", description="Gets the deployment type."
|
|
183
|
+
)
|
|
184
|
+
conversation_type: str = Field(
|
|
185
|
+
alias="conversationType",
|
|
186
|
+
description="Gets or sets the conversation start type for this deployment.",
|
|
187
|
+
)
|
|
188
|
+
created_at: Optional[datetime] = Field(
|
|
189
|
+
None, alias="createdAt", description="Gets when the deployment was created."
|
|
190
|
+
)
|
|
191
|
+
pipeline_user_id: Optional[UUID] = Field(
|
|
192
|
+
None,
|
|
193
|
+
alias="pipelineUserId",
|
|
194
|
+
description="Gets the ID of the user who created deployed agent.",
|
|
195
|
+
)
|
|
196
|
+
pipeline_name: Optional[str] = Field(
|
|
197
|
+
None, alias="pipelineName", description="Gets the name of the agent."
|
|
198
|
+
)
|
|
199
|
+
deployment_prompt: Optional[str] = Field(
|
|
200
|
+
None, alias="deploymentPrompt", description="Gets the deployment prompt."
|
|
201
|
+
)
|
|
202
|
+
about_deployment_metadata: Optional[AboutDeploymentMetadata] = Field(
|
|
203
|
+
None,
|
|
204
|
+
alias="aboutDeploymentMetadata",
|
|
205
|
+
description="Gets the metadata about the deployment, such as the video link.",
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class GetDeploymentsResponse(BaseModel):
|
|
210
|
+
"""
|
|
211
|
+
Paged results for deployment entities.
|
|
212
|
+
|
|
213
|
+
Contains a paginated list of deployments along with the total count,
|
|
214
|
+
allowing for efficient retrieval of large deployment collections.
|
|
215
|
+
|
|
216
|
+
Attributes:
|
|
217
|
+
items: List of deployment items in the current page
|
|
218
|
+
total_count: Total number of deployments matching the query
|
|
219
|
+
"""
|
|
220
|
+
|
|
221
|
+
items: List[DeploymentItem] = Field(description="Gets or sets a list of items.")
|
|
222
|
+
total_count: int = Field(
|
|
223
|
+
alias="totalCount", description="Gets or sets the total count of items."
|
|
224
|
+
)
|
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
"""Pipeline configuration API response types."""
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
]
|