xpander-sdk 2.0.217__py3-none-any.whl → 2.0.219__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.
- xpander_sdk/models/orchestrations.py +35 -8
- {xpander_sdk-2.0.217.dist-info → xpander_sdk-2.0.219.dist-info}/METADATA +1 -1
- {xpander_sdk-2.0.217.dist-info → xpander_sdk-2.0.219.dist-info}/RECORD +6 -6
- {xpander_sdk-2.0.217.dist-info → xpander_sdk-2.0.219.dist-info}/WHEEL +0 -0
- {xpander_sdk-2.0.217.dist-info → xpander_sdk-2.0.219.dist-info}/licenses/LICENSE +0 -0
- {xpander_sdk-2.0.217.dist-info → xpander_sdk-2.0.219.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ including various node types, execution strategies, and control flow conditions.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Dict, List, Literal, Optional, Union
|
|
8
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
|
9
9
|
from uuid import uuid4
|
|
10
10
|
|
|
11
11
|
from pydantic import Field
|
|
@@ -52,11 +52,26 @@ class OrchestrationConditionType(str, Enum):
|
|
|
52
52
|
Regex: Condition based on regular expression matching.
|
|
53
53
|
Contains: Condition based on substring containment.
|
|
54
54
|
Else: Fallback condition that always matches (executed when no other conditions match).
|
|
55
|
+
Equal: Condition based on equality comparison (path == value).
|
|
56
|
+
NotEqual: Condition based on inequality comparison (path != value).
|
|
57
|
+
GreaterThan: Condition based on greater than comparison (path > value).
|
|
58
|
+
LessThan: Condition based on less than comparison (path < value).
|
|
59
|
+
GreaterThanOrEqual: Condition based on greater than or equal comparison (path >= value).
|
|
60
|
+
LessThanOrEqual: Condition based on less than or equal comparison (path <= value).
|
|
61
|
+
NotEmpty: Condition that checks if a path value is not empty/null.
|
|
55
62
|
"""
|
|
56
63
|
|
|
57
64
|
Regex = "regex"
|
|
58
65
|
Contains = "contains"
|
|
59
66
|
Else = "else"
|
|
67
|
+
# Classic comparison operators
|
|
68
|
+
Equal = "equal"
|
|
69
|
+
NotEqual = "not_equal"
|
|
70
|
+
GreaterThan = "gt"
|
|
71
|
+
LessThan = "lt"
|
|
72
|
+
GreaterThanOrEqual = "gte"
|
|
73
|
+
LessThanOrEqual = "lte"
|
|
74
|
+
NotEmpty = "not_empty"
|
|
60
75
|
|
|
61
76
|
class OrchestrationWaitNodeType(str, Enum):
|
|
62
77
|
"""Types of wait nodes in orchestration workflows.
|
|
@@ -73,15 +88,21 @@ class OrchestrationCondition(XPanderSharedModel):
|
|
|
73
88
|
"""Condition for controlling orchestration flow.
|
|
74
89
|
|
|
75
90
|
Attributes:
|
|
76
|
-
type: Type of condition (regex, contains, or
|
|
77
|
-
term: The pattern or string to match against.
|
|
91
|
+
type: Type of condition (regex, contains, else, or comparison operators).
|
|
92
|
+
term: The pattern or string to match against. Used for 'regex' and 'contains' types.
|
|
78
93
|
group_id: Optional group ID for group-based classifier routing.
|
|
79
94
|
When set, routing matches by group ID instead of term matching.
|
|
95
|
+
path: Path to extract value from input data (e.g., "input.client_id" or "client_id").
|
|
96
|
+
Used for comparison operators (equal, not_equal, gt, lt, gte, lte, not_empty).
|
|
97
|
+
value: Value to compare against. Used with comparison operators.
|
|
98
|
+
Not required for 'not_empty' type.
|
|
80
99
|
"""
|
|
81
100
|
|
|
82
101
|
type: OrchestrationConditionType
|
|
83
102
|
term: Optional[str] = None
|
|
84
103
|
group_id: Optional[str] = None
|
|
104
|
+
path: Optional[str] = None
|
|
105
|
+
value: Optional[Any] = None
|
|
85
106
|
|
|
86
107
|
class OrchestrationRetryStrategy(XPanderSharedModel):
|
|
87
108
|
"""Strategy for retrying failed orchestration nodes.
|
|
@@ -223,19 +244,25 @@ class OrchestrationClassifierNode(XPanderSharedModel):
|
|
|
223
244
|
class OrchestrationGuardrailNode(XPanderSharedModel):
|
|
224
245
|
"""Node that uses LLM to evaluate input and enforce guardrails.
|
|
225
246
|
|
|
226
|
-
This node
|
|
247
|
+
This node uses group-based classification similar to the Classifier node.
|
|
248
|
+
It requires exactly 2 groups with IDs "pass" and "fail":
|
|
249
|
+
- "pass" group: Criteria for when input should pass the guardrail
|
|
250
|
+
- "fail" group: Criteria for when input should fail the guardrail
|
|
251
|
+
|
|
252
|
+
Routing behavior:
|
|
253
|
+
- If "pass" matches: Routes to downstream nodes connected via "pass" condition
|
|
254
|
+
- If "fail" matches: Routes to downstream nodes connected via "fail" condition,
|
|
255
|
+
or falls back to end nodes (end-summarizer/end-classifier) if no fail route exists
|
|
227
256
|
|
|
228
257
|
Attributes:
|
|
229
|
-
|
|
258
|
+
groups: List of 2 ClassificationGroup objects with IDs "pass" and "fail".
|
|
230
259
|
examples: Example inputs/outputs to guide the LLM behavior.
|
|
231
260
|
settings: LLM configuration settings.
|
|
232
|
-
stop_on_false: Whether to stop execution if the guardrail check fails. Defaults to True.
|
|
233
261
|
"""
|
|
234
262
|
|
|
235
|
-
|
|
263
|
+
groups: List[ClassificationGroup]
|
|
236
264
|
examples: Optional[List[str]] = []
|
|
237
265
|
settings: OrchestrationClassifierNodeLLMSettings
|
|
238
|
-
stop_on_false: Optional[bool] = True
|
|
239
266
|
|
|
240
267
|
class OrchestrationSummarizerNode(XPanderSharedModel):
|
|
241
268
|
"""Node that processes large payloads and answers specific questions.
|
|
@@ -16,7 +16,7 @@ xpander_sdk/models/events.py,sha256=HnootQSUIIRM4BIdaTbuPUEJ55hLVtA7KDCSsnHeBKw,
|
|
|
16
16
|
xpander_sdk/models/frameworks.py,sha256=-7W_m5cvgS1qLp0gGAFP4noNWT82IT1ZqtQv5WuOC2k,2939
|
|
17
17
|
xpander_sdk/models/generic.py,sha256=yw5rBRdZ-6ucTI4AwtskenddepOooiFRM--9xx5jrL8,681
|
|
18
18
|
xpander_sdk/models/notifications.py,sha256=ryc0VDXoiuZDEh791LYzW73GC0qH1y2hYl8Fj5Xv0FU,4141
|
|
19
|
-
xpander_sdk/models/orchestrations.py,sha256=
|
|
19
|
+
xpander_sdk/models/orchestrations.py,sha256=WcYBfQacrXYKkj0e_D8a1crV8gz2bDgto6IuC6lPlyE,14651
|
|
20
20
|
xpander_sdk/models/shared.py,sha256=gW88kA_UslNinUjtQKpLVF0sHDZnckwLWexRapxPivU,3125
|
|
21
21
|
xpander_sdk/models/user.py,sha256=_FTG0JO6iTrbcvJp-BBJ6nuj281zhyQB5ldQkBCyYDU,749
|
|
22
22
|
xpander_sdk/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -90,8 +90,8 @@ xpander_sdk/utils/generic.py,sha256=XrRj2-L8c0YWpfPdDyXE-pVL-6lKF9VpyZzKHQ4wuCc,
|
|
|
90
90
|
xpander_sdk/utils/tools.py,sha256=lyFkq2yP7DxBkyXYVlnFRwDhQCvf0fZZMDm5fBycze4,1244
|
|
91
91
|
xpander_sdk/utils/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
92
|
xpander_sdk/utils/agents/compactization_agent.py,sha256=S_U1dSmDC7I0JUsp_THUYjfutEI5QMBaMPJEXGp0_Sw,14389
|
|
93
|
-
xpander_sdk-2.0.
|
|
94
|
-
xpander_sdk-2.0.
|
|
95
|
-
xpander_sdk-2.0.
|
|
96
|
-
xpander_sdk-2.0.
|
|
97
|
-
xpander_sdk-2.0.
|
|
93
|
+
xpander_sdk-2.0.219.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
94
|
+
xpander_sdk-2.0.219.dist-info/METADATA,sha256=1gDUCBW8-Ud35DixRLJFfczu9oTtldT_aiHrqkfO7O8,17952
|
|
95
|
+
xpander_sdk-2.0.219.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
96
|
+
xpander_sdk-2.0.219.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
|
|
97
|
+
xpander_sdk-2.0.219.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|