vellum-ai 0.12.2__py3-none-any.whl → 0.12.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.
@@ -1,10 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..environment import VellumEnvironment
4
3
  import typing
4
+
5
5
  import httpx
6
- from .http_client import HttpClient
7
- from .http_client import AsyncHttpClient
6
+
7
+ from ..environment import VellumEnvironment
8
+ from .http_client import AsyncHttpClient, HttpClient
8
9
 
9
10
 
10
11
  class BaseClientWrapper:
@@ -17,7 +18,7 @@ class BaseClientWrapper:
17
18
  headers: typing.Dict[str, str] = {
18
19
  "X-Fern-Language": "Python",
19
20
  "X-Fern-SDK-Name": "vellum-ai",
20
- "X-Fern-SDK-Version": "0.12.2",
21
+ "X-Fern-SDK-Version": "0.12.4",
21
22
  }
22
23
  headers["X_API_KEY"] = self.api_key
23
24
  return headers
@@ -13,7 +13,7 @@ class PromptRequestJsonInput(UniversalBaseModel):
13
13
  """
14
14
 
15
15
  type: typing.Literal["JSON"] = "JSON"
16
- value: typing.Dict[str, typing.Optional[typing.Any]]
16
+ value: typing.Optional[typing.Any] = None
17
17
 
18
18
  if IS_PYDANTIC_V2:
19
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -172,41 +172,39 @@ class VellumMypyPlugin(Plugin):
172
172
 
173
173
  def _dynamic_output_node_class_hook(self, ctx: ClassDefContext, attribute_name: str) -> None:
174
174
  """
175
- We use this hook to properly annotate the Outputs class for Templating Node using the resolved type
176
- of the TemplatingNode's class _OutputType generic.
175
+ We use this hook to properly annotate the Outputs class for Templating Node and
176
+ Code Execution Node using the resolved type
177
+ of the TemplatingNode's and CodeExecutionNode's class _OutputType generic.
177
178
  """
178
-
179
- templating_node_info = ctx.cls.info
180
- templating_node_bases = ctx.cls.info.bases
181
- if not templating_node_bases:
179
+ node_info = ctx.cls.info
180
+ node_bases = ctx.cls.info.bases
181
+ if not node_bases:
182
182
  return
183
- if not isinstance(templating_node_bases[0], Instance):
183
+ if not isinstance(node_bases[0], Instance):
184
184
  return
185
185
 
186
- base_templating_args = templating_node_bases[0].args
187
- base_templating_node = templating_node_bases[0].type
188
- if not _is_subclass(base_templating_node, "vellum.workflows.nodes.core.templating_node.node.TemplatingNode"):
189
- return
186
+ base_args = node_bases[0].args
187
+ base_node = node_bases[0].type
190
188
 
191
- if len(base_templating_args) != 2:
189
+ if len(base_args) != 2:
192
190
  return
193
191
 
194
- base_templating_node_resolved_type = base_templating_args[1]
195
- if isinstance(base_templating_node_resolved_type, AnyType):
196
- base_templating_node_resolved_type = ctx.api.named_type("builtins.str")
192
+ base_node_resolved_type = base_args[1]
193
+ if isinstance(base_node_resolved_type, AnyType):
194
+ base_node_resolved_type = ctx.api.named_type("builtins.str")
197
195
 
198
- base_templating_node_outputs = base_templating_node.names.get("Outputs")
199
- if not base_templating_node_outputs:
196
+ base_node_outputs = base_node.names.get("Outputs")
197
+ if not base_node_outputs:
200
198
  return
201
199
 
202
- current_templating_node_outputs = templating_node_info.names.get("Outputs")
203
- if not current_templating_node_outputs:
204
- templating_node_info.names["Outputs"] = base_templating_node_outputs.copy()
205
- new_outputs_sym = templating_node_info.names["Outputs"].node
200
+ current_node_outputs = node_info.names.get("Outputs")
201
+ if not current_node_outputs:
202
+ node_info.names["Outputs"] = base_node_outputs.copy()
203
+ new_outputs_sym = node_info.names["Outputs"].node
206
204
  if isinstance(new_outputs_sym, TypeInfo):
207
205
  result_sym = new_outputs_sym.names[attribute_name].node
208
206
  if isinstance(result_sym, Var):
209
- result_sym.type = base_templating_node_resolved_type
207
+ result_sym.type = base_node_resolved_type
210
208
 
211
209
  def _base_node_class_hook(self, ctx: ClassDefContext) -> None:
212
210
  """
@@ -233,7 +231,6 @@ class VellumMypyPlugin(Plugin):
233
231
  type_ = sym.node.type
234
232
  if not type_:
235
233
  continue
236
-
237
234
  sym.node.type = self._get_resolvable_type(
238
235
  lambda fullname, types: ctx.api.named_type(fullname, types), type_
239
236
  )
@@ -17,7 +17,9 @@ if TYPE_CHECKING:
17
17
  from vellum.workflows.expressions.greater_than_or_equal_to import GreaterThanOrEqualToExpression
18
18
  from vellum.workflows.expressions.in_ import InExpression
19
19
  from vellum.workflows.expressions.is_blank import IsBlankExpression
20
+ from vellum.workflows.expressions.is_nil import IsNilExpression
20
21
  from vellum.workflows.expressions.is_not_blank import IsNotBlankExpression
22
+ from vellum.workflows.expressions.is_not_nil import IsNotNilExpression
21
23
  from vellum.workflows.expressions.is_not_null import IsNotNullExpression
22
24
  from vellum.workflows.expressions.is_not_undefined import IsNotUndefinedExpression
23
25
  from vellum.workflows.expressions.is_null import IsNullExpression
@@ -268,6 +270,16 @@ class BaseDescriptor(Generic[_T]):
268
270
 
269
271
  return IsNotNullExpression(expression=self)
270
272
 
273
+ def is_nil(self) -> "IsNilExpression":
274
+ from vellum.workflows.expressions.is_nil import IsNilExpression
275
+
276
+ return IsNilExpression(expression=self)
277
+
278
+ def is_not_nil(self) -> "IsNotNilExpression":
279
+ from vellum.workflows.expressions.is_not_nil import IsNotNilExpression
280
+
281
+ return IsNotNilExpression(expression=self)
282
+
271
283
  def is_undefined(self) -> "IsUndefinedExpression":
272
284
  from vellum.workflows.expressions.is_undefined import IsUndefinedExpression
273
285
 
@@ -1,6 +1,7 @@
1
1
  import pytest
2
2
 
3
3
  from vellum.workflows.descriptors.utils import resolve_value
4
+ from vellum.workflows.nodes.bases.base import BaseNode
4
5
  from vellum.workflows.state.base import BaseState
5
6
 
6
7
 
@@ -16,6 +17,13 @@ class FixtureState(BaseState):
16
17
  "foo": "bar",
17
18
  }
18
19
 
20
+ eta = None
21
+
22
+
23
+ class DummyNode(BaseNode[FixtureState]):
24
+ class Outputs(BaseNode.Outputs):
25
+ empty: str
26
+
19
27
 
20
28
  @pytest.mark.parametrize(
21
29
  ["descriptor", "expected_value"],
@@ -36,7 +44,23 @@ class FixtureState(BaseState):
36
44
  (FixtureState.gamma.does_not_begin_with(FixtureState.delta), True),
37
45
  (FixtureState.gamma.does_not_end_with(FixtureState.delta), True),
38
46
  (FixtureState.alpha.is_null(), False),
47
+ (FixtureState.eta.is_null(), True),
48
+ (DummyNode.Outputs.empty.is_null(), False),
39
49
  (FixtureState.alpha.is_not_null(), True),
50
+ (FixtureState.eta.is_not_null(), False),
51
+ (DummyNode.Outputs.empty.is_not_null(), True),
52
+ (FixtureState.alpha.is_nil(), False),
53
+ (FixtureState.eta.is_nil(), True),
54
+ (DummyNode.Outputs.empty.is_nil(), True),
55
+ (FixtureState.alpha.is_not_nil(), True),
56
+ (FixtureState.eta.is_not_nil(), False),
57
+ (DummyNode.Outputs.empty.is_not_nil(), False),
58
+ (FixtureState.alpha.is_undefined(), False),
59
+ (FixtureState.eta.is_undefined(), False),
60
+ (DummyNode.Outputs.empty.is_undefined(), True),
61
+ (FixtureState.alpha.is_not_undefined(), True),
62
+ (FixtureState.eta.is_not_undefined(), True),
63
+ (DummyNode.Outputs.empty.is_not_undefined(), False),
40
64
  (FixtureState.delta.in_(FixtureState.gamma), True),
41
65
  (FixtureState.delta.not_in(FixtureState.gamma), False),
42
66
  (FixtureState.alpha.between(FixtureState.beta, FixtureState.epsilon), False),
@@ -66,8 +90,24 @@ class FixtureState(BaseState):
66
90
  "does_not_contain",
67
91
  "does_not_begin_with",
68
92
  "does_not_end_with",
69
- "is_null",
70
- "is_not_null",
93
+ "is_null_on_value",
94
+ "is_null_on_null",
95
+ "is_null_on_undefined",
96
+ "is_not_null_on_value",
97
+ "is_not_null_on_null",
98
+ "is_not_null_on_undefined",
99
+ "is_nil_on_value",
100
+ "is_nil_on_null",
101
+ "is_nil_on_undefined",
102
+ "is_not_nil_on_value",
103
+ "is_not_nil_on_null",
104
+ "is_not_nil_on_undefined",
105
+ "is_undefined_on_value",
106
+ "is_undefined_on_null",
107
+ "is_undefined_on_undefined",
108
+ "is_not_undefined_on_value",
109
+ "is_not_undefined_on_null",
110
+ "is_not_undefined_on_undefined",
71
111
  "in_",
72
112
  "not_in",
73
113
  "between",
@@ -0,0 +1,22 @@
1
+ from typing import Generic, TypeVar, Union
2
+
3
+ from vellum.workflows.constants import UNDEF
4
+ from vellum.workflows.descriptors.base import BaseDescriptor
5
+ from vellum.workflows.descriptors.utils import resolve_value
6
+ from vellum.workflows.state.base import BaseState
7
+
8
+ _T = TypeVar("_T")
9
+
10
+
11
+ class IsNilExpression(BaseDescriptor[bool], Generic[_T]):
12
+ def __init__(
13
+ self,
14
+ *,
15
+ expression: Union[BaseDescriptor[_T], _T],
16
+ ) -> None:
17
+ super().__init__(name=f"{expression} is null or undefined", types=(bool,))
18
+ self._expression = expression
19
+
20
+ def resolve(self, state: "BaseState") -> bool:
21
+ expression = resolve_value(self._expression, state)
22
+ return expression is None or expression is UNDEF
@@ -0,0 +1,22 @@
1
+ from typing import Generic, TypeVar, Union
2
+
3
+ from vellum.workflows.constants import UNDEF
4
+ from vellum.workflows.descriptors.base import BaseDescriptor
5
+ from vellum.workflows.descriptors.utils import resolve_value
6
+ from vellum.workflows.state.base import BaseState
7
+
8
+ _T = TypeVar("_T")
9
+
10
+
11
+ class IsNotNilExpression(BaseDescriptor[bool], Generic[_T]):
12
+ def __init__(
13
+ self,
14
+ *,
15
+ expression: Union[BaseDescriptor[_T], _T],
16
+ ) -> None:
17
+ super().__init__(name=f"{expression} is not null and not undefined", types=(bool,))
18
+ self._expression = expression
19
+
20
+ def resolve(self, state: "BaseState") -> bool:
21
+ expression = resolve_value(self._expression, state)
22
+ return expression is not None and expression is not UNDEF
@@ -13,7 +13,7 @@ class IsNotNullExpression(BaseDescriptor[bool], Generic[_T]):
13
13
  *,
14
14
  expression: Union[BaseDescriptor[_T], _T],
15
15
  ) -> None:
16
- super().__init__(name=f"{expression} is not None", types=(bool,))
16
+ super().__init__(name=f"{expression} is not null", types=(bool,))
17
17
  self._expression = expression
18
18
 
19
19
  def resolve(self, state: "BaseState") -> bool:
@@ -13,7 +13,7 @@ class IsNullExpression(BaseDescriptor[bool], Generic[_T]):
13
13
  *,
14
14
  expression: Union[BaseDescriptor[_T], _T],
15
15
  ) -> None:
16
- super().__init__(name=f"{expression} is None", types=(bool,))
16
+ super().__init__(name=f"{expression} is null", types=(bool,))
17
17
  self._expression = expression
18
18
 
19
19
  def resolve(self, state: "BaseState") -> bool:
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from uuid import uuid4
2
3
  from typing import ClassVar, Generic, Iterator, List, Optional, Tuple, cast
3
4
 
@@ -18,6 +19,7 @@ from vellum.client import RequestOptions
18
19
  from vellum.workflows.constants import OMIT
19
20
  from vellum.workflows.context import get_parent_context
20
21
  from vellum.workflows.errors import WorkflowErrorCode
22
+ from vellum.workflows.events.types import default_serializer
21
23
  from vellum.workflows.exceptions import NodeException
22
24
  from vellum.workflows.nodes.displayable.bases.base_prompt_node import BasePromptNode
23
25
  from vellum.workflows.nodes.displayable.bases.inline_prompt_node.constants import DEFAULT_PROMPT_PARAMETERS
@@ -108,19 +110,30 @@ class BaseInlinePromptNode(BasePromptNode, Generic[StateType]):
108
110
  value=cast(List[ChatMessage], input_value),
109
111
  )
110
112
  )
111
- elif isinstance(input_value, dict):
112
- # Note: We may want to fail early here if we know that input_value is not
113
- # JSON serializable.
113
+ else:
114
+ try:
115
+ input_value = default_serializer(input_value)
116
+ except json.JSONDecodeError as e:
117
+ raise NodeException(
118
+ message=f"Failed to serialize input '{input_name}' of type '{input_value.__class__}': {e}",
119
+ code=WorkflowErrorCode.INVALID_INPUTS,
120
+ )
121
+
122
+ input_variables.append(
123
+ VellumVariable(
124
+ # TODO: Determine whether or not we actually need an id here and if we do,
125
+ # figure out how to maintain stable id references.
126
+ # https://app.shortcut.com/vellum/story/4080
127
+ id=str(uuid4()),
128
+ key=input_name,
129
+ type="JSON",
130
+ )
131
+ )
114
132
  input_values.append(
115
133
  PromptRequestJsonInput(
116
134
  key=input_name,
117
135
  value=input_value,
118
136
  )
119
137
  )
120
- else:
121
- raise NodeException(
122
- message=f"Unrecognized input type for input '{input_name}': {input_value.__class__}",
123
- code=WorkflowErrorCode.INVALID_INPUTS,
124
- )
125
138
 
126
139
  return input_variables, input_values
@@ -0,0 +1,64 @@
1
+ from dataclasses import dataclass
2
+ from uuid import uuid4
3
+ from typing import Any, Iterator, List
4
+
5
+ from vellum.client.core.pydantic_utilities import UniversalBaseModel
6
+ from vellum.client.types.execute_prompt_event import ExecutePromptEvent
7
+ from vellum.client.types.fulfilled_execute_prompt_event import FulfilledExecutePromptEvent
8
+ from vellum.client.types.initiated_execute_prompt_event import InitiatedExecutePromptEvent
9
+ from vellum.client.types.prompt_output import PromptOutput
10
+ from vellum.client.types.prompt_request_json_input import PromptRequestJsonInput
11
+ from vellum.client.types.string_vellum_value import StringVellumValue
12
+ from vellum.workflows.nodes.displayable.inline_prompt_node.node import InlinePromptNode
13
+
14
+
15
+ def test_inline_prompt_node__json_inputs(vellum_adhoc_prompt_client):
16
+ # GIVEN a prompt node with various inputs
17
+ @dataclass
18
+ class MyDataClass:
19
+ hello: str
20
+
21
+ class MyPydantic(UniversalBaseModel):
22
+ example: str
23
+
24
+ class MyNode(InlinePromptNode):
25
+ ml_model = "gpt-4o"
26
+ blocks = []
27
+ prompt_inputs = {
28
+ "a_dict": {"foo": "bar"},
29
+ "a_list": [1, 2, 3],
30
+ "a_dataclass": MyDataClass(hello="world"),
31
+ "a_pydantic": MyPydantic(example="example"),
32
+ }
33
+
34
+ # AND a known response from invoking an inline prompt
35
+ expected_outputs: List[PromptOutput] = [
36
+ StringVellumValue(value="Test"),
37
+ ]
38
+
39
+ def generate_prompt_events(*args: Any, **kwargs: Any) -> Iterator[ExecutePromptEvent]:
40
+ execution_id = str(uuid4())
41
+ events: List[ExecutePromptEvent] = [
42
+ InitiatedExecutePromptEvent(execution_id=execution_id),
43
+ FulfilledExecutePromptEvent(
44
+ execution_id=execution_id,
45
+ outputs=expected_outputs,
46
+ ),
47
+ ]
48
+ yield from events
49
+
50
+ vellum_adhoc_prompt_client.adhoc_execute_prompt_stream.side_effect = generate_prompt_events
51
+
52
+ # WHEN the node is run
53
+ list(MyNode().run())
54
+
55
+ # THEN the prompt is executed with the correct inputs
56
+ mock_api = vellum_adhoc_prompt_client.adhoc_execute_prompt_stream
57
+ assert mock_api.call_count == 1
58
+ assert mock_api.call_args.kwargs["input_values"] == [
59
+ PromptRequestJsonInput(key="a_dict", type="JSON", value={"foo": "bar"}),
60
+ PromptRequestJsonInput(key="a_list", type="JSON", value=[1, 2, 3]),
61
+ PromptRequestJsonInput(key="a_dataclass", type="JSON", value={"hello": "world"}),
62
+ PromptRequestJsonInput(key="a_pydantic", type="JSON", value={"example": "example"}),
63
+ ]
64
+ assert len(mock_api.call_args.kwargs["input_variables"]) == 4
@@ -1,5 +1,6 @@
1
1
  from enum import Enum
2
2
  from typing import ( # type: ignore[attr-defined]
3
+ Any,
3
4
  Dict,
4
5
  List,
5
6
  Union,
@@ -8,22 +9,6 @@ from typing import ( # type: ignore[attr-defined]
8
9
  _UnionGenericAlias,
9
10
  )
10
11
 
11
- from vellum import (
12
- ChatMessage,
13
- FunctionCall,
14
- FunctionCallRequest,
15
- SearchResult,
16
- SearchResultRequest,
17
- VellumAudio,
18
- VellumAudioRequest,
19
- VellumError,
20
- VellumErrorRequest,
21
- VellumImage,
22
- VellumImageRequest,
23
- VellumValue,
24
- VellumValueRequest,
25
- )
26
-
27
12
  JsonArray = List["Json"]
28
13
  JsonObject = Dict[str, "Json"]
29
14
  Json = Union[None, bool, int, float, str, JsonArray, JsonObject]
@@ -42,42 +27,7 @@ class VellumSecret:
42
27
  self.name = name
43
28
 
44
29
 
45
- VellumValuePrimitive = Union[
46
- # String inputs
47
- str,
48
- # Chat history inputs
49
- List[ChatMessage],
50
- List[ChatMessage],
51
- # Search results inputs
52
- List[SearchResultRequest],
53
- List[SearchResult],
54
- # JSON inputs
55
- Json,
56
- # Number inputs
57
- float,
58
- # Function Call Inputs
59
- FunctionCall,
60
- FunctionCallRequest,
61
- # Error Inputs
62
- VellumError,
63
- VellumErrorRequest,
64
- # Array Inputs
65
- List[VellumValueRequest],
66
- List[VellumValue],
67
- # Image Inputs
68
- VellumImage,
69
- VellumImageRequest,
70
- # Audio Inputs
71
- VellumAudio,
72
- VellumAudioRequest,
73
- # Vellum Secrets
74
- VellumSecret,
75
- ]
76
-
77
- EntityInputsInterface = Dict[
78
- str,
79
- VellumValuePrimitive,
80
- ]
30
+ EntityInputsInterface = Dict[str, Any]
81
31
 
82
32
 
83
33
  class MergeBehavior(Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.12.2
3
+ Version: 0.12.4
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.9,<4.0
@@ -29,7 +29,7 @@ vellum_ee/workflows/display/nodes/utils.py,sha256=sloya5TpXsnot1HURc9L51INwflRqU
29
29
  vellum_ee/workflows/display/nodes/vellum/__init__.py,sha256=nmPLj8vkbVCS46XQqmHq8Xj8Mr36wCK_vWf26A9KIkw,1505
30
30
  vellum_ee/workflows/display/nodes/vellum/api_node.py,sha256=4SSQGecKWHuoGy5YIGJeOZVHGKwTs_8Y-gf3GvsHb0M,8506
31
31
  vellum_ee/workflows/display/nodes/vellum/code_execution_node.py,sha256=_sdLmmOa1ZqZQZXzw0GMoUpgnV1sdOfc_19LJCBS_Xc,4288
32
- vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=9JjtXTpyC14X5e1ntue2BcDif-jJA-wyDBd3hE6_gv4,13282
32
+ vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=TP7ItMeEXbVbkGr5Qwjv8vl9V0Fi9QBE04d3kdJH4JE,13666
33
33
  vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=ygTjSjYDI4DtkxADWub5rhBnRWItMKWF6fezBrgpOKA,1979
34
34
  vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=t5iJQVoRT5g-v2IiUb4kFYdvUVKch0zn27016pzDZoo,2761
35
35
  vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=3TJvHX_Uuf_gr94VkYc_zmNH8I5p71ChIeoAbJZ3ddY,2158
@@ -65,7 +65,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_ser
65
65
  vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py,sha256=BGCgJ3WWiYK5fWJp_Yz-aWQPli5sIKOhLTVYfG9Tpq8,9177
66
66
  vellum_ee/workflows/display/types.py,sha256=FSPg3TO8iNE2gnl1vn-nsMfit2V6yeBXW0Igh089A9w,2011
67
67
  vellum_ee/workflows/display/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- vellum_ee/workflows/display/utils/vellum.py,sha256=IlkKrfAAi4BV_HFnsdMFxNJC2-TrPM9ubVHv8ikmbSA,5110
68
+ vellum_ee/workflows/display/utils/vellum.py,sha256=-cz3xB-_-r1O9TBdLQPBvlpptg9CrZVNQ50QimmJFnA,5032
69
69
  vellum_ee/workflows/display/vellum.py,sha256=OSv0ZS50h1zJbunJ9TH7VEWFw-exXdK_ZsdzPxP9ROs,8814
70
70
  vellum_ee/workflows/display/workflows/__init__.py,sha256=kapXsC67VJcgSuiBMa86FdePG5A9kMB5Pi4Uy1O2ob4,207
71
71
  vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=ydAbFMzcY2LURINZbXYm9BAXZdIa3-7rQ86Kupo7qcA,12804
@@ -76,7 +76,7 @@ vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
76
76
  vellum/client/__init__.py,sha256=o4m7iRZWEV8rP3GkdaztHAjNmjxjWERlarviFoHzuKI,110927
77
77
  vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
78
78
  vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
79
- vellum/client/core/client_wrapper.py,sha256=3AlZG0Q4dIs1dgMiXCS_tnLozbk0PAelt6J52g8Tm3k,1890
79
+ vellum/client/core/client_wrapper.py,sha256=Txk5jgvpOyeOcWKUtrs-1p5HZ-zPxTysTZVwMYsX3-A,1868
80
80
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
81
81
  vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
82
82
  vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
@@ -407,7 +407,7 @@ vellum/client/types/prompt_output.py,sha256=NpDGJNIYIivzQJnBeoJLpJlCk7gqBESLwv5Q
407
407
  vellum/client/types/prompt_parameters.py,sha256=Vkwh4zI9gX1DuGQxrWiUUa1TshTfnPlS7_yRrziD5qg,1046
408
408
  vellum/client/types/prompt_request_chat_history_input.py,sha256=DB2io5piMSyA89f5lnIVYO4MLZoNALNSufx8Y-oOwOE,790
409
409
  vellum/client/types/prompt_request_input.py,sha256=brEdYhYm74Ac8XjK9wF0rKOLgnqd_Cg19yMS7VfB4qQ,400
410
- vellum/client/types/prompt_request_json_input.py,sha256=6qLOPsNtDTIz43qJdZSgLwO9SWLe_plSJDH11xWGS6A,750
410
+ vellum/client/types/prompt_request_json_input.py,sha256=vLhwvCWL_yjVfDzT4921xK4Ql92OkvG-ruvOC_uppFI,739
411
411
  vellum/client/types/prompt_request_string_input.py,sha256=8GSFhtN3HeYssbDRY7B5SCh5Qrp67340D9c3oINpCmw,714
412
412
  vellum/client/types/prompt_settings.py,sha256=lSQeNofj9EzOncr81hGRE2ZBhgRCqDYMT5e3a66PuqA,586
413
413
  vellum/client/types/raw_prompt_execution_overrides_request.py,sha256=x4Chkm_NxXySOEyA6s6J_mhhiM91KCcQbu6pQETB8RI,927
@@ -659,7 +659,7 @@ vellum/evaluations/utils/uuid.py,sha256=Ch6wWRgwICxLxJCTl5iE3EdRlZj2zADR-zUMUtjc
659
659
  vellum/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
660
660
  vellum/plugins/pydantic.py,sha256=EbI0pJMhUS9rLPSkzmAELfnCHrWCJzOrU06T8ommwdw,2334
661
661
  vellum/plugins/utils.py,sha256=U9ZY9KdE3RRvbcG01hXxu9CvfJD6Fo7nJDgcHjQn0FI,606
662
- vellum/plugins/vellum_mypy.py,sha256=3gzkf7d-B477mINh541fef_F33tixBWamhEb9e-9vLI,25152
662
+ vellum/plugins/vellum_mypy.py,sha256=VC15EzjTsXOb9uF1bky4rcxePP-0epMVmCsLB2z4Dh8,24816
663
663
  vellum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
664
664
  vellum/resources/__init__.py,sha256=sQWK7g_Z4EM7pa7fy6vy3d_DMdTJ4wVcozBn3Lx4Qpo,141
665
665
  vellum/resources/ad_hoc/__init__.py,sha256=UD01D9nS_M7sRKmMbEg4Tv9SlfFj3cWahVxwUEaSLAY,148
@@ -1203,8 +1203,8 @@ vellum/workflows/__init__.py,sha256=CssPsbNvN6rDhoLuqpEv7MMKGa51vE6dvAh6U31Pcio,
1203
1203
  vellum/workflows/constants.py,sha256=Z0W4YlqfSlSgWC11PrVUPs6ZOBeIaQ78E_90J1hohiw,789
1204
1204
  vellum/workflows/context.py,sha256=R8qdsFbD_0p7B6PWnyvSrZ_aOgMtGw-_uk0P0UAmwLA,1230
1205
1205
  vellum/workflows/descriptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1206
- vellum/workflows/descriptors/base.py,sha256=yLfr5qW5o7B2tLVvxEGeh-f6qiAQ735-9xrKOZ3HMc4,13830
1207
- vellum/workflows/descriptors/tests/test_utils.py,sha256=Ct8ZRdK3TghVzuqv3a4pWk6p04szt5KOaizzk9LhY5Y,2849
1206
+ vellum/workflows/descriptors/base.py,sha256=BhYd5O9_3fjS_Vet9Q2_kyUJCySHGVM_HWaOBtctkNA,14320
1207
+ vellum/workflows/descriptors/tests/test_utils.py,sha256=bjWNlmyCmtpDZmIzwYmS1Yh7kulmMO6LgNJFYVFCg4o,4377
1208
1208
  vellum/workflows/descriptors/utils.py,sha256=lO_dbr5g3PXpHPtVBkdguAK4-1qayZ7RXjl3BgAhrMM,3795
1209
1209
  vellum/workflows/edges/__init__.py,sha256=wSkmAnz9xyi4vZwtDbKxwlplt2skD7n3NsxkvR_pUus,50
1210
1210
  vellum/workflows/edges/edge.py,sha256=N0SnY3gKVuxImPAdCbPMPlHJIXbkQ3fwq_LbJRvVMFc,677
@@ -1238,10 +1238,12 @@ vellum/workflows/expressions/greater_than.py,sha256=nMi6iAo0vi2hM3JeKfQSCy7DnXbd
1238
1238
  vellum/workflows/expressions/greater_than_or_equal_to.py,sha256=xUDjfsOrJdoWm9K7OafGDGsuyvYS3xbMjyV4umvA50Q,1164
1239
1239
  vellum/workflows/expressions/in_.py,sha256=tdDTvePdG4WyRkwmSaA4hsUdFJNiIMlrEG6oRrUskjI,1028
1240
1240
  vellum/workflows/expressions/is_blank.py,sha256=u8mGreoZb5t_q2mhhmpD7ytAfFCFUAW9APsDapqUsDY,809
1241
+ vellum/workflows/expressions/is_nil.py,sha256=dtgY9Czm3slk45weARspwtfhQmVh0BIUsPOECrATLrA,740
1241
1242
  vellum/workflows/expressions/is_not_blank.py,sha256=npXK9KSUm0nWeT6WJ5LLKB3owgBXHr7SpH8j4W0WapI,816
1242
- vellum/workflows/expressions/is_not_null.py,sha256=_vIwikSUnk6F3NVukV3-9FwoX38qUpTyvaY2oIBwURg,671
1243
+ vellum/workflows/expressions/is_not_nil.py,sha256=M5Qhtp_H07PORjFN2WapwA1Njp_KaANmLWbfckSSscM,761
1244
+ vellum/workflows/expressions/is_not_null.py,sha256=EoHXFgZScKP_BM2a5Z7YFQN6l7RMEtzs5x5nlvaSST8,671
1243
1245
  vellum/workflows/expressions/is_not_undefined.py,sha256=8NGwA0wZP_aHRy5qJOtaNhRCJyXKekwBNJalSk6Rdmo,727
1244
- vellum/workflows/expressions/is_null.py,sha256=5hj3WcFTxGS9ULcPP5BNJu683l0f5gq85Gvj2Nz6Utg,660
1246
+ vellum/workflows/expressions/is_null.py,sha256=C75ALGlG_sTGcxI46tm9HtgPVfJ7DwTIyKzX8qtEiDU,660
1245
1247
  vellum/workflows/expressions/is_undefined.py,sha256=c9Oc1fdp911fQQ8WMG2L-TeUSqz1wF8cOTuLutJKbe8,716
1246
1248
  vellum/workflows/expressions/less_than.py,sha256=DTWjbhaegnsCWnFSLNldTQr94Dqg3rqWOgMWI7IVsII,1149
1247
1249
  vellum/workflows/expressions/less_than_or_equal_to.py,sha256=IxP1VeXAzXrccdIWT2hm6Fj3Sr-7rPW-DKOHl6MrHjo,1161
@@ -1295,7 +1297,7 @@ vellum/workflows/nodes/displayable/bases/base_prompt_node/__init__.py,sha256=Org
1295
1297
  vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py,sha256=EvylK1rGKpd4iiooEW9O5A9Q8DMTtBwETe_GtQT8M-E,2139
1296
1298
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/__init__.py,sha256=Hl35IAoepRpE-j4cALaXVJIYTYOF3qszyVbxTj4kS1s,82
1297
1299
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/constants.py,sha256=fnjiRWLoRlC4Puo5oQcpZD5Hd-EesxsAo9l5tGAkpZQ,270
1298
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=mtnqcfpY5UYKCUm8HVL42juf5Q8MoJRg94V6CyEgZpQ,5398
1300
+ vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=H1AVDnitwIkwya12oV68Qj2tyb786pfRHHz5qxtubD4,5935
1299
1301
  vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=zdpNJoawB5PedsCCfgOGDDoWuif0jNtlV-K9sFL6cNQ,4968
1300
1302
  vellum/workflows/nodes/displayable/bases/search_node.py,sha256=pqiui8G6l_9FLE1HH4rCdFC73Bl7_AIBAmQQMjqe190,3570
1301
1303
  vellum/workflows/nodes/displayable/code_execution_node/__init__.py,sha256=0FLWMMktpzSnmBMizQglBpcPrP80fzVsoJwJgf822Cg,76
@@ -1313,6 +1315,8 @@ vellum/workflows/nodes/displayable/guardrail_node/__init__.py,sha256=Ab5eXmOoBhy
1313
1315
  vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=7Ep7Ff7FtFry3Jwxhg_npF_-jT2P6TGKp5MRNnCZ8Tc,3923
1314
1316
  vellum/workflows/nodes/displayable/inline_prompt_node/__init__.py,sha256=gSUOoEZLlrx35-tQhSAd3An8WDwBqyiQh-sIebLU9wU,74
1315
1317
  vellum/workflows/nodes/displayable/inline_prompt_node/node.py,sha256=dTnP1yH1P0NqMw3noxt9XwaDCpX8ZOhuvVYNAn_DdCQ,2119
1318
+ vellum/workflows/nodes/displayable/inline_prompt_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1319
+ vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py,sha256=189Oo66QDYJS8vCcyLe9ErJBGpWZVmPePFHta8wzdeM,2615
1316
1320
  vellum/workflows/nodes/displayable/merge_node/__init__.py,sha256=J8IC08dSH7P76wKlNuxe1sn7toNGtSQdFirUbtPDEs0,60
1317
1321
  vellum/workflows/nodes/displayable/merge_node/node.py,sha256=ZyPvcTgfPOneOm5Dc2kUOoPkwNJqwRPZSj232akXynA,324
1318
1322
  vellum/workflows/nodes/displayable/note_node/__init__.py,sha256=KWA3P4fyYJ-fOTky8qNGlcOotQ-HeHJ9AjZt6mRQmCE,58
@@ -1357,7 +1361,7 @@ vellum/workflows/state/store.py,sha256=VYGBQgN1bpd1as5eGiouV_7scg8QsRs4_1aqZAGIs
1357
1361
  vellum/workflows/state/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1358
1362
  vellum/workflows/state/tests/test_state.py,sha256=BQjcdREIK1MPuGhivRUgpynVJLftjEpH9RG3cRKxQEY,3310
1359
1363
  vellum/workflows/types/__init__.py,sha256=KxUTMBGzuRCfiMqzzsykOeVvrrkaZmTTo1a7SLu8gRM,68
1360
- vellum/workflows/types/core.py,sha256=oFTlYFAgb51la3GrHFreMPQqQc_YHrHfEvkQD8FE_bQ,1846
1364
+ vellum/workflows/types/core.py,sha256=D2NcSBwGgWj_mtXZqe3KnEQcb5qd5HzqAwnxwmlCfCw,899
1361
1365
  vellum/workflows/types/generics.py,sha256=ZkfoRhWs042i5IjA99v2wIhmh1u-Wieo3LzosgGWJVk,600
1362
1366
  vellum/workflows/types/stack.py,sha256=RDSGLkcV612ge8UuAH9TZiEGXxJt0Av2-H5rfzrTVVI,1014
1363
1367
  vellum/workflows/types/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -1377,8 +1381,8 @@ vellum/workflows/vellum_client.py,sha256=ODrq_TSl-drX2aezXegf7pizpWDVJuTXH-j6528
1377
1381
  vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
1378
1382
  vellum/workflows/workflows/base.py,sha256=zpspOEdO5Ye_0ZvN-Wkzv9iQSiF1sD201ba8lhbnPbs,17086
1379
1383
  vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnadGsrSZGa7t7LpJA,2008
1380
- vellum_ai-0.12.2.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1381
- vellum_ai-0.12.2.dist-info/METADATA,sha256=alKUy1QGixY3flPix2H1o-GW9kh_xrF5CKtOm5EhJ6I,5128
1382
- vellum_ai-0.12.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1383
- vellum_ai-0.12.2.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1384
- vellum_ai-0.12.2.dist-info/RECORD,,
1384
+ vellum_ai-0.12.4.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1385
+ vellum_ai-0.12.4.dist-info/METADATA,sha256=NGdP3b6at6hPyXJWKWlyXKb0dSLEnYSUy3yIy1pVJIc,5128
1386
+ vellum_ai-0.12.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1387
+ vellum_ai-0.12.4.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1388
+ vellum_ai-0.12.4.dist-info/RECORD,,
@@ -16,8 +16,12 @@ from vellum.workflows.expressions.equals import EqualsExpression
16
16
  from vellum.workflows.expressions.greater_than import GreaterThanExpression
17
17
  from vellum.workflows.expressions.greater_than_or_equal_to import GreaterThanOrEqualToExpression
18
18
  from vellum.workflows.expressions.in_ import InExpression
19
+ from vellum.workflows.expressions.is_nil import IsNilExpression
20
+ from vellum.workflows.expressions.is_not_nil import IsNotNilExpression
19
21
  from vellum.workflows.expressions.is_not_null import IsNotNullExpression
22
+ from vellum.workflows.expressions.is_not_undefined import IsNotUndefinedExpression
20
23
  from vellum.workflows.expressions.is_null import IsNullExpression
24
+ from vellum.workflows.expressions.is_undefined import IsUndefinedExpression
21
25
  from vellum.workflows.expressions.less_than import LessThanExpression
22
26
  from vellum.workflows.expressions.less_than_or_equal_to import LessThanOrEqualToExpression
23
27
  from vellum.workflows.expressions.not_between import NotBetweenExpression
@@ -242,9 +246,9 @@ but the defined conditions have length {len(condition_ids)}"""
242
246
  return "doesNotBeginWith"
243
247
  elif isinstance(descriptor, DoesNotEndWithExpression):
244
248
  return "doesNotEndWith"
245
- elif isinstance(descriptor, IsNullExpression):
249
+ elif isinstance(descriptor, (IsNullExpression, IsNilExpression, IsUndefinedExpression)):
246
250
  return "null"
247
- elif isinstance(descriptor, IsNotNullExpression):
251
+ elif isinstance(descriptor, (IsNotNullExpression, IsNotNilExpression, IsNotUndefinedExpression)):
248
252
  return "notNull"
249
253
  elif isinstance(descriptor, InExpression):
250
254
  return "in"
@@ -9,7 +9,6 @@ from vellum.workflows.references import OutputReference, WorkflowInputReference
9
9
  from vellum.workflows.references.execution_count import ExecutionCountReference
10
10
  from vellum.workflows.references.node import NodeReference
11
11
  from vellum.workflows.references.vellum_secret import VellumSecretReference
12
- from vellum.workflows.types.core import VellumValuePrimitive
13
12
  from vellum.workflows.utils.vellum_variables import primitive_type_to_vellum_variable_type
14
13
  from vellum.workflows.vellum_client import create_vellum_client
15
14
  from vellum_ee.workflows.display.types import WorkflowDisplayContext
@@ -93,7 +92,7 @@ def create_node_input_value_pointer_rule(
93
92
  raise ValueError(f"Unsupported descriptor type: {value.__class__.__name__}")
94
93
 
95
94
 
96
- def primitive_to_vellum_value(value: VellumValuePrimitive) -> VellumValue:
95
+ def primitive_to_vellum_value(value: Any) -> VellumValue:
97
96
  """Converts a python primitive to a VellumVariableValue"""
98
97
 
99
98
  if isinstance(value, str):