vellum-ai 0.10.3__py3-none-any.whl → 0.10.4__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.
- vellum/client/core/client_wrapper.py +1 -1
- vellum/workflows/events/tests/test_event.py +30 -0
- vellum/workflows/events/types.py +57 -3
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +1 -0
- vellum/workflows/nodes/core/map_node/node.py +1 -1
- vellum/workflows/nodes/core/retry_node/node.py +1 -0
- vellum/workflows/nodes/core/try_node/node.py +1 -0
- vellum/workflows/nodes/core/try_node/tests/test_node.py +24 -0
- vellum/workflows/state/tests/test_state.py +2 -0
- {vellum_ai-0.10.3.dist-info → vellum_ai-0.10.4.dist-info}/METADATA +1 -1
- {vellum_ai-0.10.3.dist-info → vellum_ai-0.10.4.dist-info}/RECORD +16 -16
- vellum_ee/workflows/display/nodes/vellum/search_node.py +5 -9
- vellum_ee/workflows/display/nodes/vellum/templating_node.py +3 -4
- {vellum_ai-0.10.3.dist-info → vellum_ai-0.10.4.dist-info}/LICENSE +0 -0
- {vellum_ai-0.10.3.dist-info → vellum_ai-0.10.4.dist-info}/WHEEL +0 -0
- {vellum_ai-0.10.3.dist-info → vellum_ai-0.10.4.dist-info}/entry_points.txt +0 -0
@@ -17,7 +17,7 @@ class BaseClientWrapper:
|
|
17
17
|
headers: typing.Dict[str, str] = {
|
18
18
|
"X-Fern-Language": "Python",
|
19
19
|
"X-Fern-SDK-Name": "vellum-ai",
|
20
|
-
"X-Fern-SDK-Version": "0.10.
|
20
|
+
"X-Fern-SDK-Version": "0.10.4",
|
21
21
|
}
|
22
22
|
headers["X_API_KEY"] = self.api_key
|
23
23
|
return headers
|
@@ -7,6 +7,7 @@ from deepdiff import DeepDiff
|
|
7
7
|
|
8
8
|
from vellum.workflows.errors.types import VellumError, VellumErrorCode
|
9
9
|
from vellum.workflows.events.node import NodeExecutionInitiatedBody, NodeExecutionInitiatedEvent
|
10
|
+
from vellum.workflows.events.types import NodeParentContext, WorkflowParentContext
|
10
11
|
from vellum.workflows.events.workflow import (
|
11
12
|
WorkflowExecutionFulfilledBody,
|
12
13
|
WorkflowExecutionFulfilledEvent,
|
@@ -73,6 +74,7 @@ module_root = name_parts[: name_parts.index("events")]
|
|
73
74
|
"foo": "bar",
|
74
75
|
},
|
75
76
|
},
|
77
|
+
"parent": None,
|
76
78
|
},
|
77
79
|
),
|
78
80
|
(
|
@@ -87,6 +89,14 @@ module_root = name_parts[: name_parts.index("events")]
|
|
87
89
|
MockNode.node_foo: "bar",
|
88
90
|
},
|
89
91
|
),
|
92
|
+
parent=NodeParentContext(
|
93
|
+
node_definition=MockNode,
|
94
|
+
span_id=UUID("123e4567-e89b-12d3-a456-426614174000"),
|
95
|
+
parent=WorkflowParentContext(
|
96
|
+
workflow_definition=MockWorkflow,
|
97
|
+
span_id=UUID("123e4567-e89b-12d3-a456-426614174000")
|
98
|
+
)
|
99
|
+
)
|
90
100
|
),
|
91
101
|
{
|
92
102
|
"id": "123e4567-e89b-12d3-a456-426614174000",
|
@@ -104,6 +114,23 @@ module_root = name_parts[: name_parts.index("events")]
|
|
104
114
|
"node_foo": "bar",
|
105
115
|
},
|
106
116
|
},
|
117
|
+
"parent": {
|
118
|
+
"node_definition": {
|
119
|
+
"name": "MockNode",
|
120
|
+
"module": module_root + ["events", "tests", "test_event"],
|
121
|
+
},
|
122
|
+
"parent": {
|
123
|
+
"workflow_definition": {
|
124
|
+
"name": "MockWorkflow",
|
125
|
+
"module": module_root + ["events", "tests", "test_event"],
|
126
|
+
},
|
127
|
+
"type": "WORKFLOW",
|
128
|
+
"parent": None,
|
129
|
+
"span_id": "123e4567-e89b-12d3-a456-426614174000"
|
130
|
+
},
|
131
|
+
"type": "WORKFLOW_NODE",
|
132
|
+
"span_id": "123e4567-e89b-12d3-a456-426614174000"
|
133
|
+
},
|
107
134
|
},
|
108
135
|
),
|
109
136
|
(
|
@@ -137,6 +164,7 @@ module_root = name_parts[: name_parts.index("events")]
|
|
137
164
|
"value": "foo",
|
138
165
|
},
|
139
166
|
},
|
167
|
+
"parent": None
|
140
168
|
},
|
141
169
|
),
|
142
170
|
(
|
@@ -168,6 +196,7 @@ module_root = name_parts[: name_parts.index("events")]
|
|
168
196
|
"example": "foo",
|
169
197
|
},
|
170
198
|
},
|
199
|
+
"parent": None,
|
171
200
|
},
|
172
201
|
),
|
173
202
|
(
|
@@ -201,6 +230,7 @@ module_root = name_parts[: name_parts.index("events")]
|
|
201
230
|
"code": "USER_DEFINED_ERROR",
|
202
231
|
},
|
203
232
|
},
|
233
|
+
"parent": None,
|
204
234
|
},
|
205
235
|
),
|
206
236
|
],
|
vellum/workflows/events/types.py
CHANGED
@@ -2,15 +2,18 @@ from datetime import datetime
|
|
2
2
|
from enum import Enum
|
3
3
|
import json
|
4
4
|
from uuid import UUID, uuid4
|
5
|
-
from typing import Any, Dict, Literal
|
5
|
+
from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Type, Union
|
6
6
|
|
7
|
-
from pydantic import Field
|
7
|
+
from pydantic import Field, field_serializer
|
8
8
|
|
9
9
|
from vellum.core.pydantic_utilities import UniversalBaseModel
|
10
|
-
|
11
10
|
from vellum.workflows.state.encoder import DefaultStateEncoder
|
12
11
|
from vellum.workflows.types.utils import datetime_now
|
13
12
|
|
13
|
+
if TYPE_CHECKING:
|
14
|
+
from vellum.workflows.nodes.bases.base import BaseNode
|
15
|
+
from vellum.workflows.workflows.base import BaseWorkflow
|
16
|
+
|
14
17
|
|
15
18
|
class WorkflowEventType(Enum):
|
16
19
|
NODE = "NODE"
|
@@ -44,9 +47,60 @@ def default_serializer(obj: Any) -> Any:
|
|
44
47
|
)
|
45
48
|
|
46
49
|
|
50
|
+
class BaseParentContext(UniversalBaseModel):
|
51
|
+
span_id: UUID
|
52
|
+
parent: Optional['ParentContext'] = None
|
53
|
+
|
54
|
+
|
55
|
+
class BaseDeploymentParentContext(BaseParentContext):
|
56
|
+
deployment_id: UUID
|
57
|
+
deployment_name: str
|
58
|
+
deployment_history_item_id: UUID
|
59
|
+
release_tag_id: UUID
|
60
|
+
release_tag_name: str
|
61
|
+
external_id: Optional[str]
|
62
|
+
|
63
|
+
|
64
|
+
class WorkflowDeploymentParentContext(BaseDeploymentParentContext):
|
65
|
+
type: Literal["WORKFLOW_RELEASE_TAG"] = "WORKFLOW_RELEASE_TAG"
|
66
|
+
workflow_version_id: UUID
|
67
|
+
|
68
|
+
|
69
|
+
class PromptDeploymentParentContext(BaseDeploymentParentContext):
|
70
|
+
type: Literal["PROMPT_RELEASE_TAG"] = "PROMPT_RELEASE_TAG"
|
71
|
+
prompt_version_id: UUID
|
72
|
+
|
73
|
+
|
74
|
+
class NodeParentContext(BaseParentContext):
|
75
|
+
type: Literal["WORKFLOW_NODE"] = "WORKFLOW_NODE"
|
76
|
+
node_definition: Type['BaseNode']
|
77
|
+
|
78
|
+
@field_serializer("node_definition")
|
79
|
+
def serialize_node_definition(self, definition: Type, _info: Any) -> Dict[str, Any]:
|
80
|
+
return serialize_type_encoder(definition)
|
81
|
+
|
82
|
+
|
83
|
+
class WorkflowParentContext(BaseParentContext):
|
84
|
+
type: Literal["WORKFLOW"] = "WORKFLOW"
|
85
|
+
workflow_definition: Type['BaseWorkflow']
|
86
|
+
|
87
|
+
@field_serializer("workflow_definition")
|
88
|
+
def serialize_workflow_definition(self, definition: Type, _info: Any) -> Dict[str, Any]:
|
89
|
+
return serialize_type_encoder(definition)
|
90
|
+
|
91
|
+
|
92
|
+
ParentContext = Union[
|
93
|
+
NodeParentContext,
|
94
|
+
WorkflowParentContext,
|
95
|
+
PromptDeploymentParentContext,
|
96
|
+
WorkflowDeploymentParentContext,
|
97
|
+
]
|
98
|
+
|
99
|
+
|
47
100
|
class BaseEvent(UniversalBaseModel):
|
48
101
|
id: UUID = Field(default_factory=uuid4)
|
49
102
|
timestamp: datetime = Field(default_factory=default_datetime_factory)
|
50
103
|
api_version: Literal["2024-10-25"] = "2024-10-25"
|
51
104
|
trace_id: UUID
|
52
105
|
span_id: UUID
|
106
|
+
parent: Optional['ParentContext'] = None
|
@@ -25,6 +25,7 @@ class InlineSubworkflowNode(BaseSubworkflowNode[StateType], Generic[StateType, W
|
|
25
25
|
def run(self) -> Iterator[BaseOutput]:
|
26
26
|
subworkflow = self.subworkflow(
|
27
27
|
parent_state=self.state,
|
28
|
+
context=self._context,
|
28
29
|
)
|
29
30
|
subworkflow_stream = subworkflow.stream(
|
30
31
|
inputs=self._compile_subworkflow_inputs(),
|
@@ -89,7 +89,7 @@ class MapNode(BaseNode, Generic[StateType, MapNodeItemType]):
|
|
89
89
|
return self.Outputs(**mapped_items)
|
90
90
|
|
91
91
|
def _run_subworkflow(self, *, item: MapNodeItemType, index: int) -> None:
|
92
|
-
subworkflow = self.subworkflow(parent_state=self.state)
|
92
|
+
subworkflow = self.subworkflow(parent_state=self.state, context=self._context)
|
93
93
|
events = subworkflow.stream(inputs=self.SubworkflowInputs(index=index, item=item, all_items=self.items))
|
94
94
|
|
95
95
|
for event in events:
|
@@ -43,6 +43,7 @@ class RetryNode(BaseNode[StateType], Generic[StateType], metaclass=_RetryNodeMet
|
|
43
43
|
attempt_number = index + 1
|
44
44
|
subworkflow = self.subworkflow(
|
45
45
|
parent_state=self.state,
|
46
|
+
context=self._context,
|
46
47
|
)
|
47
48
|
terminal_event = subworkflow.run(
|
48
49
|
inputs=self.SubworkflowInputs(attempt_number=attempt_number),
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import pytest
|
2
2
|
|
3
|
+
from vellum.client import Vellum
|
3
4
|
from vellum.workflows.errors.types import VellumError, VellumErrorCode
|
4
5
|
from vellum.workflows.exceptions import NodeException
|
5
6
|
from vellum.workflows.inputs.base import BaseInputs
|
@@ -7,6 +8,7 @@ from vellum.workflows.nodes.bases import BaseNode
|
|
7
8
|
from vellum.workflows.nodes.core.try_node.node import TryNode
|
8
9
|
from vellum.workflows.outputs import BaseOutputs
|
9
10
|
from vellum.workflows.state.base import BaseState, StateMeta
|
11
|
+
from vellum.workflows.state.context import WorkflowContext
|
10
12
|
|
11
13
|
|
12
14
|
def test_try_node__on_error_code__successfully_caught():
|
@@ -80,3 +82,25 @@ def test_try_node__use_parent_inputs_and_state():
|
|
80
82
|
|
81
83
|
# THEN the data is used successfully
|
82
84
|
assert outputs == {"value": "foo bar"}
|
85
|
+
|
86
|
+
|
87
|
+
def test_try_node__use_parent_execution_context():
|
88
|
+
# GIVEN a try node that uses node context to use the vellum client
|
89
|
+
@TryNode.wrap()
|
90
|
+
class TestNode(BaseNode):
|
91
|
+
class Outputs(BaseOutputs):
|
92
|
+
key: str
|
93
|
+
|
94
|
+
def run(self) -> Outputs:
|
95
|
+
return self.Outputs(key=self._context.vellum_client.ad_hoc._client_wrapper.api_key)
|
96
|
+
|
97
|
+
# WHEN the node is run with a custom vellum client
|
98
|
+
node = TestNode(
|
99
|
+
context=WorkflowContext(
|
100
|
+
_vellum_client=Vellum(api_key="test-key"),
|
101
|
+
)
|
102
|
+
)
|
103
|
+
outputs = node.run()
|
104
|
+
|
105
|
+
# THEN the inner node had access to the key
|
106
|
+
assert outputs == {"key": "test-key"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import pytest
|
1
2
|
from collections import defaultdict
|
2
3
|
from copy import deepcopy
|
3
4
|
import json
|
@@ -76,6 +77,7 @@ def test_state_deepcopy():
|
|
76
77
|
assert deepcopied_state.meta.node_outputs == state.meta.node_outputs
|
77
78
|
|
78
79
|
|
80
|
+
@pytest.mark.skip(reason="https://app.shortcut.com/vellum/story/5654")
|
79
81
|
def test_state_deepcopy__with_node_output_updates():
|
80
82
|
# GIVEN an initial state instance
|
81
83
|
state = MockState(foo="bar")
|
@@ -31,9 +31,9 @@ vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py,sha256=FwyEh
|
|
31
31
|
vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=38_0gZbtWgpBO6EAEnwR8Enz3vP23Ga72StZ__ECqIc,4646
|
32
32
|
vellum_ee/workflows/display/nodes/vellum/merge_node.py,sha256=7YmVRNSI6RkK1rvg0b0zDeW2nnBIKir0ERzqqtT08I4,2218
|
33
33
|
vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py,sha256=busFtdD7Cs6yeHsCeyVEReHkLlt062vP_mG4GAynsNk,3116
|
34
|
-
vellum_ee/workflows/display/nodes/vellum/search_node.py,sha256=
|
34
|
+
vellum_ee/workflows/display/nodes/vellum/search_node.py,sha256=B2WX8C5cx3kYqd3ClyesY0fyeFwfEgb7-iC_gIWgNp4,8440
|
35
35
|
vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py,sha256=SOGhvY0nUa02aDm5hrMSEAg0qdMxrI4GSB5_bpuTS0o,2671
|
36
|
-
vellum_ee/workflows/display/nodes/vellum/templating_node.py,sha256=
|
36
|
+
vellum_ee/workflows/display/nodes/vellum/templating_node.py,sha256=79EYw_C7jef5wbPFtT5F2cjuF9EvUimwEEcL0dX-M9Q,3029
|
37
37
|
vellum_ee/workflows/display/nodes/vellum/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py,sha256=LmjC0yhXWOIDPnHmQpoMpzLr_VE2_ZpsJhWGSAqaHHY,3809
|
39
39
|
vellum_ee/workflows/display/nodes/vellum/try_node.py,sha256=5JDFT8rpm4rKjoOvrjrvjyaK-sFVW0_xAZPB4_En-hA,1680
|
@@ -68,7 +68,7 @@ vellum/client/README.md,sha256=8cKUE1kSuhz-U87n3-clA7o9_zlP0Avr4qKbvRbdT2k,5984
|
|
68
68
|
vellum/client/__init__.py,sha256=Fu-wzw_MiTtqAQOFhcFcrLKAPkEfUhf6K4ZuFspfKUw,115305
|
69
69
|
vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
70
70
|
vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
71
|
-
vellum/client/core/client_wrapper.py,sha256=
|
71
|
+
vellum/client/core/client_wrapper.py,sha256=k5EK8N1d-FKFlgsJNJtwPgk4x8KEICMhKgvOXBMOF_0,1890
|
72
72
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
73
73
|
vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
|
74
74
|
vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
|
@@ -1188,8 +1188,8 @@ vellum/workflows/errors/types.py,sha256=YQy6na_iBkqxl9GHKOcin44m8DMRG5KP9oLV1Lpa
|
|
1188
1188
|
vellum/workflows/events/__init__.py,sha256=vLwQuykMmbv0izdUvsamouRQKbmKX_r9Poo77jd404w,821
|
1189
1189
|
vellum/workflows/events/node.py,sha256=w5A2MCWD8J-qvdmxBRP4r_c_qz6SK4YLjlsoswrYHc0,3697
|
1190
1190
|
vellum/workflows/events/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1191
|
-
vellum/workflows/events/tests/test_event.py,sha256=
|
1192
|
-
vellum/workflows/events/types.py,sha256=
|
1191
|
+
vellum/workflows/events/tests/test_event.py,sha256=UdBfjJFGUh1b0T3x-3IuN1Rg97Be5MViXaMY5tjnTL8,9614
|
1192
|
+
vellum/workflows/events/types.py,sha256=2MDqlhBMwFWKso423IGH9ZdsPnmBWGGOIBceW568pnk,2865
|
1193
1193
|
vellum/workflows/events/utils.py,sha256=OwtE8dHOCX01jvLyoS1l18tYQ4ob0YJcUhUorKWLJh0,232
|
1194
1194
|
vellum/workflows/events/workflow.py,sha256=kPjZTh5hzCsSrVKLkXQNwzxhnUp3X4GkFA5veGatGlQ,4353
|
1195
1195
|
vellum/workflows/exceptions.py,sha256=Dc7mxstsaMDRmS91QEOiZCbZ1ZIRacnm0l5lQmC6WkA,401
|
@@ -1238,13 +1238,13 @@ vellum/workflows/nodes/core/__init__.py,sha256=5zDMCmyt1v0HTJzlUBwq3U9L825yZGZhT
|
|
1238
1238
|
vellum/workflows/nodes/core/error_node/__init__.py,sha256=g7RRnlHhqu4qByfLjBwCunmgGA8dI5gNsjS3h6TwlSI,60
|
1239
1239
|
vellum/workflows/nodes/core/error_node/node.py,sha256=hqBPHoLnhNrK9ITIaEzpnk47XYDbG6cmObz7oe78Ceg,944
|
1240
1240
|
vellum/workflows/nodes/core/inline_subworkflow_node/__init__.py,sha256=nKNEH1QTl-1PcvmYoqSWEl0-t6gAur8GLTXHzklRQfM,84
|
1241
|
-
vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=
|
1241
|
+
vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=RrThrYAmZDg0IUKRU5tcJRueg3OPZjPvBTpRskt7hPI,3001
|
1242
1242
|
vellum/workflows/nodes/core/map_node/__init__.py,sha256=MXpZYmGfhsMJHqqlpd64WiJRtbAtAMQz-_3fCU_cLV0,56
|
1243
|
-
vellum/workflows/nodes/core/map_node/node.py,sha256=
|
1243
|
+
vellum/workflows/nodes/core/map_node/node.py,sha256=aPhV3niv_jWSwrZ2CwiRg0CDOM-09Fa6QqOPYNJMgRc,6206
|
1244
1244
|
vellum/workflows/nodes/core/map_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1245
1245
|
vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=RHSZs7t6mW3UWvRrXnHZqaXVdRT2ZquOK_YHJ-gzXsU,1871
|
1246
1246
|
vellum/workflows/nodes/core/retry_node/__init__.py,sha256=lN2bIy5a3Uzhs_FYCrooADyYU6ZGShtvLKFWpelwPvo,60
|
1247
|
-
vellum/workflows/nodes/core/retry_node/node.py,sha256=
|
1247
|
+
vellum/workflows/nodes/core/retry_node/node.py,sha256=ZDMk6h17Fzq5lP66iXrgtyuBo2RKsIxWJqMa0x3FG1k,4213
|
1248
1248
|
vellum/workflows/nodes/core/retry_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1249
1249
|
vellum/workflows/nodes/core/retry_node/tests/test_node.py,sha256=zANiu9-d-uIOP9tiSEFiXiVLRt_BJ76Dh6Obgk2BUsA,3120
|
1250
1250
|
vellum/workflows/nodes/core/templating_node/__init__.py,sha256=GmyuYo81_A1_Bz6id69ozVFS6FKiuDsZTiA3I6MaL2U,70
|
@@ -1254,9 +1254,9 @@ vellum/workflows/nodes/core/templating_node/node.py,sha256=Ed1XMtz_Mzq9Dv08wcsIv
|
|
1254
1254
|
vellum/workflows/nodes/core/templating_node/render.py,sha256=OpJp0NAH6qcEL6K9lxR0qjpFb75TYNttJR5iCos8tmg,1792
|
1255
1255
|
vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py,sha256=L6F3Gw9doguj1TSKmAns-mzXvoRuRivaCFe3mhjo13E,551
|
1256
1256
|
vellum/workflows/nodes/core/try_node/__init__.py,sha256=JVD4DrldTIqFQQFrubs9KtWCCc0YCAc7Fzol5ZWIWeM,56
|
1257
|
-
vellum/workflows/nodes/core/try_node/node.py,sha256=
|
1257
|
+
vellum/workflows/nodes/core/try_node/node.py,sha256=ZFySh3S7slWN20rlvukqgmN2TVsG58Lz_p5jdNK_96Q,4162
|
1258
1258
|
vellum/workflows/nodes/core/try_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1259
|
-
vellum/workflows/nodes/core/try_node/tests/test_node.py,sha256=
|
1259
|
+
vellum/workflows/nodes/core/try_node/tests/test_node.py,sha256=Hjf4485svKEtNOnMBfnMP01GKihMRvN9Nkev2TFbHLE,3447
|
1260
1260
|
vellum/workflows/nodes/displayable/__init__.py,sha256=SReuiXngYFlTshz2dWW6JPuLDIM6zT2Pk1YRxiQANIw,975
|
1261
1261
|
vellum/workflows/nodes/displayable/api_node/__init__.py,sha256=MoxdQSnidIj1Nf_d-hTxlOxcZXaZnsWFDbE-PkTK24o,56
|
1262
1262
|
vellum/workflows/nodes/displayable/api_node/node.py,sha256=-m93_KqwaWxbtbNQDWnLZZ-TSHCwd4ir2V542zovaZU,2043
|
@@ -1326,7 +1326,7 @@ vellum/workflows/state/context.py,sha256=tpJoOgmx7bmeNrQeOtavOfqTwBbtJCNDqjJ6ssh
|
|
1326
1326
|
vellum/workflows/state/encoder.py,sha256=jYwC_47gHyMuPRvshWBNJ1SxVXQ1SBCfxvq7iuHjV_g,1688
|
1327
1327
|
vellum/workflows/state/store.py,sha256=VYGBQgN1bpd1as5eGiouV_7scg8QsRs4_1aqZAGIsRQ,793
|
1328
1328
|
vellum/workflows/state/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1329
|
-
vellum/workflows/state/tests/test_state.py,sha256=
|
1329
|
+
vellum/workflows/state/tests/test_state.py,sha256=BQjcdREIK1MPuGhivRUgpynVJLftjEpH9RG3cRKxQEY,3310
|
1330
1330
|
vellum/workflows/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1331
1331
|
vellum/workflows/types/core.py,sha256=llsHFE3XKnVEk_pYoK0s9WUdeninSU5Kmoi7dU4GX0c,1804
|
1332
1332
|
vellum/workflows/types/generics.py,sha256=ZkfoRhWs042i5IjA99v2wIhmh1u-Wieo3LzosgGWJVk,600
|
@@ -1343,8 +1343,8 @@ vellum/workflows/utils/vellum_variables.py,sha256=JA7hhbJ_9m7KEYFaCv5R6FqYeTRWDp
|
|
1343
1343
|
vellum/workflows/vellum_client.py,sha256=ODrq_TSl-drX2aezXegf7pizpWDVJuTXH-j6528t75s,683
|
1344
1344
|
vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
|
1345
1345
|
vellum/workflows/workflows/base.py,sha256=NbQ3jR9veKdfK5S9qPkiJvy16l19YyQxzops_Y09wMw,12872
|
1346
|
-
vellum_ai-0.10.
|
1347
|
-
vellum_ai-0.10.
|
1348
|
-
vellum_ai-0.10.
|
1349
|
-
vellum_ai-0.10.
|
1350
|
-
vellum_ai-0.10.
|
1346
|
+
vellum_ai-0.10.4.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
1347
|
+
vellum_ai-0.10.4.dist-info/METADATA,sha256=02ud_MZb29bNWRkoShUsfJ1lKb37VJ1qNIxure9-TwE,5011
|
1348
|
+
vellum_ai-0.10.4.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
1349
|
+
vellum_ai-0.10.4.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
|
1350
|
+
vellum_ai-0.10.4.dist-info/RECORD,,
|
@@ -7,16 +7,15 @@ from vellum import (
|
|
7
7
|
VellumValueLogicalConditionGroupRequest,
|
8
8
|
VellumValueLogicalConditionRequest,
|
9
9
|
)
|
10
|
-
|
10
|
+
from vellum.workflows.nodes.displayable.search_node import SearchNode
|
11
|
+
from vellum.workflows.references import OutputReference
|
12
|
+
from vellum.workflows.types.core import JsonArray, JsonObject
|
11
13
|
from vellum_ee.workflows.display.nodes.base_node_vellum_display import BaseNodeVellumDisplay
|
12
14
|
from vellum_ee.workflows.display.nodes.utils import raise_if_descriptor
|
13
15
|
from vellum_ee.workflows.display.nodes.vellum.utils import create_node_input
|
14
16
|
from vellum_ee.workflows.display.types import WorkflowDisplayContext
|
15
17
|
from vellum_ee.workflows.display.utils.uuids import uuid4_from_hash
|
16
18
|
from vellum_ee.workflows.display.vellum import NodeInput
|
17
|
-
from vellum.workflows.nodes.displayable.search_node import SearchNode
|
18
|
-
from vellum.workflows.references import OutputReference
|
19
|
-
from vellum.workflows.types.core import JsonArray, JsonObject
|
20
19
|
|
21
20
|
_SearchNodeType = TypeVar("_SearchNodeType", bound=SearchNode)
|
22
21
|
|
@@ -76,10 +75,7 @@ class BaseSearchNodeDisplay(BaseNodeVellumDisplay[_SearchNodeType], Generic[_Sea
|
|
76
75
|
options = raise_if_descriptor(node.options)
|
77
76
|
filters = options.filters if options else None
|
78
77
|
|
79
|
-
if filters
|
80
|
-
# TODO: Add support for serializing external ID filters
|
81
|
-
# https://app.shortcut.com/vellum/story/5563/add-support-for-serializing-external-id-in-text-search-nodes
|
82
|
-
raise NotImplementedError("Serializing External ID filters is not yet supported")
|
78
|
+
external_id_filters = filters.external_ids if filters else None
|
83
79
|
|
84
80
|
raw_metadata_filters = filters.metadata if filters else None
|
85
81
|
metadata_filters = None
|
@@ -108,7 +104,7 @@ class BaseSearchNodeDisplay(BaseNodeVellumDisplay[_SearchNodeType], Generic[_Sea
|
|
108
104
|
"result_merging_enabled",
|
109
105
|
("True" if result_merging_enabled else "False"),
|
110
106
|
),
|
111
|
-
("external_id_filters",
|
107
|
+
("external_id_filters", external_id_filters),
|
112
108
|
("metadata_filters", metadata_filters),
|
113
109
|
]
|
114
110
|
|
@@ -1,19 +1,18 @@
|
|
1
1
|
from uuid import UUID
|
2
2
|
from typing import Any, ClassVar, Dict, Generic, Optional, TypeVar
|
3
3
|
|
4
|
+
from vellum.workflows.nodes.core.templating_node import TemplatingNode
|
5
|
+
from vellum.workflows.types.core import JsonObject
|
6
|
+
from vellum.workflows.utils.vellum_variables import primitive_type_to_vellum_variable_type
|
4
7
|
from vellum_ee.workflows.display.nodes.base_node_vellum_display import BaseNodeVellumDisplay
|
5
8
|
from vellum_ee.workflows.display.nodes.utils import raise_if_descriptor
|
6
9
|
from vellum_ee.workflows.display.nodes.vellum.utils import create_node_input
|
7
10
|
from vellum_ee.workflows.display.types import WorkflowDisplayContext
|
8
|
-
from vellum.workflows.nodes.core.templating_node import TemplatingNode
|
9
|
-
from vellum.workflows.types.core import JsonObject
|
10
|
-
from vellum.workflows.utils.vellum_variables import primitive_type_to_vellum_variable_type
|
11
11
|
|
12
12
|
_TemplatingNodeType = TypeVar("_TemplatingNodeType", bound=TemplatingNode)
|
13
13
|
|
14
14
|
|
15
15
|
class BaseTemplatingNodeDisplay(BaseNodeVellumDisplay[_TemplatingNodeType], Generic[_TemplatingNodeType]):
|
16
|
-
output_id: ClassVar[Optional[UUID]] = None
|
17
16
|
template_input_id: ClassVar[Optional[UUID]] = None
|
18
17
|
input_ids_by_name: ClassVar[Dict[str, UUID]] = {}
|
19
18
|
|
File without changes
|
File without changes
|
File without changes
|