vellum-ai 1.8.4__py3-none-any.whl → 1.8.5__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.
@@ -27,10 +27,10 @@ class BaseClientWrapper:
27
27
 
28
28
  def get_headers(self) -> typing.Dict[str, str]:
29
29
  headers: typing.Dict[str, str] = {
30
- "User-Agent": "vellum-ai/1.8.4",
30
+ "User-Agent": "vellum-ai/1.8.5",
31
31
  "X-Fern-Language": "Python",
32
32
  "X-Fern-SDK-Name": "vellum-ai",
33
- "X-Fern-SDK-Version": "1.8.4",
33
+ "X-Fern-SDK-Version": "1.8.5",
34
34
  **(self.get_custom_headers() or {}),
35
35
  }
36
36
  if self._api_version is not None:
@@ -399,6 +399,17 @@ class BaseDescriptor(Generic[_T]):
399
399
 
400
400
  return AddExpression(lhs=self, rhs=other)
401
401
 
402
+ @overload
403
+ def __add__(self, other: "BaseDescriptor[_O]") -> "AddExpression[_T, _O]": ...
404
+
405
+ @overload
406
+ def __add__(self, other: _O) -> "AddExpression[_T, _O]": ...
407
+
408
+ def __add__(self, other: "Union[BaseDescriptor[_O], _O]") -> "AddExpression[_T, _O]":
409
+ from vellum.workflows.expressions.add import AddExpression
410
+
411
+ return AddExpression(lhs=self, rhs=other)
412
+
402
413
  @overload
403
414
  def minus(self, other: "BaseDescriptor[_O]") -> "MinusExpression[_T, _O]": ...
404
415
 
@@ -125,6 +125,10 @@ class DummyNode(BaseNode[FixtureState]):
125
125
  (ConstantValueReference(b'{"foo": "bar"}').parse_json(), {"foo": "bar"}),
126
126
  (ConstantValueReference(bytearray(b'{"foo": "bar"}')).parse_json(), {"foo": "bar"}),
127
127
  (ConstantValueReference(b'{"key": "\xf0\x9f\x8c\x9f"}').parse_json(), {"key": "🌟"}),
128
+ # Test + operator
129
+ (FixtureState.alpha + FixtureState.beta, 3),
130
+ (FixtureState.gamma + FixtureState.delta, "helloel"),
131
+ (FixtureState.theta + FixtureState.theta, ["baz", "baz"]),
128
132
  ],
129
133
  ids=[
130
134
  "or",
@@ -184,6 +188,9 @@ class DummyNode(BaseNode[FixtureState]):
184
188
  "parse_json_bytes",
185
189
  "parse_json_bytearray",
186
190
  "parse_json_bytes_with_utf8_chars",
191
+ "add_integers",
192
+ "add_strings",
193
+ "add_lists",
187
194
  ],
188
195
  )
189
196
  def test_resolve_value__happy_path(descriptor, expected_value):
@@ -158,6 +158,8 @@ ParentContext = Annotated[
158
158
  WorkflowSandboxParentContext,
159
159
  APIRequestParentContext,
160
160
  ExternalParentContext,
161
+ WorkflowDeploymentScheduledTriggerContext,
162
+ WorkflowDeploymentIntegrationTriggerContext,
161
163
  UnknownParentContext,
162
164
  ],
163
165
  ParentContextDiscriminator(),
@@ -3,6 +3,7 @@ from typing import Any, ClassVar, Dict, Generic, Iterator, List, Optional, Set,
3
3
  from vellum import ChatMessage, PromptBlock, PromptOutput
4
4
  from vellum.client.types.prompt_parameters import PromptParameters
5
5
  from vellum.client.types.prompt_settings import PromptSettings
6
+ from vellum.client.types.string_chat_message_content import StringChatMessageContent
6
7
  from vellum.prompts.constants import DEFAULT_PROMPT_PARAMETERS
7
8
  from vellum.workflows.context import execution_context, get_parent_context
8
9
  from vellum.workflows.errors.types import WorkflowErrorCode
@@ -107,7 +108,20 @@ class ToolCallingNode(BaseNode[StateType], Generic[StateType]):
107
108
  continue
108
109
 
109
110
  if event.name == "workflow.execution.streaming":
110
- if event.output.name == "chat_history":
111
+ if event.output.name == "results":
112
+ if event.output.is_streaming:
113
+ if isinstance(event.output.delta, str):
114
+ text_message = ChatMessage(
115
+ text=event.output.delta,
116
+ role="ASSISTANT",
117
+ content=StringChatMessageContent(type="STRING", value=event.output.delta),
118
+ source=None,
119
+ )
120
+ yield BaseOutput(
121
+ name="chat_history",
122
+ delta=[text_message],
123
+ )
124
+ elif event.output.name == "chat_history":
111
125
  if event.output.is_fulfilled:
112
126
  fulfilled_output_names.add(event.output.name)
113
127
  yield event.output
@@ -46,27 +46,28 @@ def uuid4_from_hash(input_str: str) -> UUID:
46
46
  def get_trigger_id(trigger_class: "type[BaseTrigger]") -> UUID:
47
47
  """
48
48
  Generate a deterministic trigger ID from a trigger class using
49
- the class's __qualname__ to ensure stability across different import paths.
49
+ the class's module name and __qualname__ to ensure stability and uniqueness.
50
50
 
51
51
  Args:
52
52
  trigger_class: The trigger class to generate an ID for
53
53
 
54
54
  Returns:
55
- A deterministic UUID based on the trigger class qualname
55
+ A deterministic UUID based on the trigger class module and qualname
56
56
  """
57
- return uuid4_from_hash(trigger_class.__qualname__)
57
+ return uuid4_from_hash(f"{trigger_class.__module__}.{trigger_class.__qualname__}")
58
58
 
59
59
 
60
60
  def get_trigger_attribute_id(trigger_class: "type[BaseTrigger]", attribute_name: str) -> UUID:
61
61
  """
62
62
  Generate a deterministic trigger attribute ID from a trigger class and attribute name
63
- using the class's __qualname__ and attribute name to ensure stability.
63
+ using the class's module name, __qualname__, and attribute name to ensure stability and uniqueness.
64
64
 
65
65
  Args:
66
66
  trigger_class: The trigger class containing the attribute
67
67
  attribute_name: The name of the attribute
68
68
 
69
69
  Returns:
70
- A deterministic UUID based on the trigger class qualname and attribute name
70
+ A deterministic UUID based on the trigger class module, qualname, and attribute name
71
71
  """
72
- return uuid4_from_hash(f"{trigger_class.__qualname__}|{attribute_name}")
72
+ trigger_id = get_trigger_id(trigger_class)
73
+ return uuid4_from_hash(f"{trigger_id}|{attribute_name}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.9,<4.0
@@ -111,7 +111,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_ser
111
111
  vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py,sha256=exT7U-axwtYgFylagScflSQLJEND51qIAx2UATju6JM,6023
112
112
  vellum_ee/workflows/display/tests/workflow_serialization/test_final_output_node_map_reference_serialization.py,sha256=vl3pxUJlrYRA8zzFJ-gRm7fe-5fviLNSIsUC7imnMqk,3502
113
113
  vellum_ee/workflows/display/tests/workflow_serialization/test_list_vellum_document_serialization.py,sha256=ZRcDhOSVKFHvt_rBkNSL7j3VLeWKQbH-KRoJWrtWD2s,2193
114
- vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py,sha256=pbxmm03mCFvt4-YfxwVRxjMOvm36IdbwVOMwTSU30q0,3743
114
+ vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py,sha256=QjyxK94uPWaBmCmCWxQwuW0OopR06mVcsIjmsnr8UwE,3743
115
115
  vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_any_serialization.py,sha256=4WAmSEJZlDBLPhsD1f4GwY9ahB9F6qJKGnL6j7ZYlzQ,1740
116
116
  vellum_ee/workflows/display/tests/workflow_serialization/test_vellum_integration_trigger_serialization.py,sha256=eG7_D76ErR7IrCpWRG4gLKoKGV7VfBL1buezNJ_wkZc,9038
117
117
  vellum_ee/workflows/display/tests/workflow_serialization/test_web_search_node_serialization.py,sha256=vbDFBrWUPeeW7cxjNA6SXrsHlYcbOAhlQ4C45Vdnr1c,3428
@@ -121,7 +121,7 @@ vellum_ee/workflows/display/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
121
121
  vellum_ee/workflows/display/utils/auto_layout.py,sha256=f4GiLn_LazweupfqTpubcdtdfE_vrOcmZudSsnYIY9E,3906
122
122
  vellum_ee/workflows/display/utils/events.py,sha256=XcaQSfmk2s9ZNiU8__ZqH_zfp6KUVACczz9TBWVy7Jc,2208
123
123
  vellum_ee/workflows/display/utils/exceptions.py,sha256=E8Lvo7LY1BoZ54M_NR_opDjJsAAiCUfow1HgoHcTHmg,989
124
- vellum_ee/workflows/display/utils/expressions.py,sha256=q6jgr13gET3rsAtz9XAPqtWQ2RKq_ZMq2OwrtyPhlRg,21345
124
+ vellum_ee/workflows/display/utils/expressions.py,sha256=Phzemb0kFysV8uqAoLyGBfVRcP4mvnMcizNX2LZgPQ4,21356
125
125
  vellum_ee/workflows/display/utils/registry.py,sha256=1qXiBTdsnro6FeCX0FGBEK7CIf6wa--Jt50iZ_nEp_M,3460
126
126
  vellum_ee/workflows/display/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  vellum_ee/workflows/display/utils/tests/test_auto_layout.py,sha256=vfXI769418s9vda5Gb5NFBH747WMOwSgHRXeLCTLVm8,2356
@@ -164,7 +164,7 @@ vellum/client/README.md,sha256=flqu57ubZNTfpq60CdLtJC9gp4WEkyjb_n_eZ4OYf9w,6497
164
164
  vellum/client/__init__.py,sha256=-nugZzQKoUJsStXe6PnOD__8kbDLKKokceDgpGxQ_q0,74576
165
165
  vellum/client/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
166
166
  vellum/client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
167
- vellum/client/core/client_wrapper.py,sha256=zsaxJoGR-yEFSYk9Ri6PtjBQ1agr-Rs2J4qXd2-A8KE,2840
167
+ vellum/client/core/client_wrapper.py,sha256=TaM0xsyTfopC31l4utYPlm7CxH7dKJRjM80HmFHbX1s,2840
168
168
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
169
169
  vellum/client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
170
170
  vellum/client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -1816,9 +1816,9 @@ vellum/workflows/__init__.py,sha256=gd5AiZqVTcvqelhysG0jOWYfC6pJKRAVhS7qwf0bHU4,
1816
1816
  vellum/workflows/constants.py,sha256=ApFp3fm_DOuakvZV-c0ybieyVp-wELgHk-GTzDJoDCg,1429
1817
1817
  vellum/workflows/context.py,sha256=ViyIeMDhUv-MhnynLaXPlvlbYxRU45ySvYidCNSbFZU,2458
1818
1818
  vellum/workflows/descriptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1819
- vellum/workflows/descriptors/base.py,sha256=v3WG2d_pekYtVK3Y2FSdVhf_XwNUnvXgSWuhr0VQRJM,16666
1819
+ vellum/workflows/descriptors/base.py,sha256=GAAk11R8Vg2kysh_MV9pBVrvYRnRiWDvap2znLf48Kw,17053
1820
1820
  vellum/workflows/descriptors/exceptions.py,sha256=Rv2uMiaO2a2SADhJzl_VHhV6dqwAhZAzaJPoThP7SZc,653
1821
- vellum/workflows/descriptors/tests/test_utils.py,sha256=HJ5DoRz0sJvViGxyZ_FtytZjxN2J8xTkGtaVwCy6Q90,6928
1821
+ vellum/workflows/descriptors/tests/test_utils.py,sha256=Ymw8YKYeooiXcg64-tQ9_-PPJGzyGDWuG60RIG2tqPQ,7204
1822
1822
  vellum/workflows/descriptors/utils.py,sha256=Z7kuhwb_D_kfcwKIAr1xI_AqYH6WFoZBYuslKQWZBFU,4399
1823
1823
  vellum/workflows/edges/__init__.py,sha256=auViJbvYiR1gzgGlhMv1fPDMvgXGOwa5g-YZn97fvUo,107
1824
1824
  vellum/workflows/edges/edge.py,sha256=N0SnY3gKVuxImPAdCbPMPlHJIXbkQ3fwq_LbJRvVMFc,677
@@ -1839,7 +1839,7 @@ vellum/workflows/events/stream.py,sha256=xhXJTZirFi0xad5neAQNogrIQ4h47fpnKbVC3vC
1839
1839
  vellum/workflows/events/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1840
1840
  vellum/workflows/events/tests/test_basic_workflow.py,sha256=Pj6orHsXz37jWC5FARi0Sx2Gjf99Owri2Cvr6Chb79k,1765
1841
1841
  vellum/workflows/events/tests/test_event.py,sha256=5rzsQdXksVZIapFSdKQlQGsLPJY2esAwsh_JOtKH_rM,21566
1842
- vellum/workflows/events/types.py,sha256=FjZi4ta_Atb_BnT0yGUHfz-LHun6IWYU80HWolhBkXY,5279
1842
+ vellum/workflows/events/types.py,sha256=P5Xq0ObthcHBaJItQ9AFz8Afk_mebmdWE8DEOZROh7U,5383
1843
1843
  vellum/workflows/events/workflow.py,sha256=1BdrBdlDpTvsiHcm5KaFA7q6veauQaYlNVUMN8QG0gA,11495
1844
1844
  vellum/workflows/exceptions.py,sha256=l_ZklQQVvbsIdbmbn89aEeTL7x6x08m5kCwKXXPnTDc,2277
1845
1845
  vellum/workflows/executable.py,sha256=um-gLJMVYfGJwGJfZIPlCRHhHIYm6pn8PUEfeqrNx5k,218
@@ -2004,7 +2004,7 @@ vellum/workflows/nodes/displayable/tests/test_search_node_error_handling.py,sha2
2004
2004
  vellum/workflows/nodes/displayable/tests/test_search_node_wth_text_output.py,sha256=VepO5z1277c1y5N6LLIC31nnWD1aak2m5oPFplfJHHs,6935
2005
2005
  vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py,sha256=Bjv-wZyFgNaVZb9KEMMZd9lFoLzbPEPjEMpANizMZw4,2413
2006
2006
  vellum/workflows/nodes/displayable/tool_calling_node/__init__.py,sha256=3n0-ysmFKsr40CVxPthc0rfJgqVJeZuUEsCmYudLVRg,117
2007
- vellum/workflows/nodes/displayable/tool_calling_node/node.py,sha256=odjxzXi6l9kD_ncWih_462nUX61SKbxMnAYw0j2LwGo,9129
2007
+ vellum/workflows/nodes/displayable/tool_calling_node/node.py,sha256=p9O9x7-YPeSaPLUFevr-DzRFA5CzNPsDuJWArkD9hE0,9909
2008
2008
  vellum/workflows/nodes/displayable/tool_calling_node/state.py,sha256=CcBVb_YtwfSSka4ze678k6-qwmzMSfjfVP8_Y95feSo,302
2009
2009
  vellum/workflows/nodes/displayable/tool_calling_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2010
2010
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py,sha256=in1fbEz5x1tx3uKv9YXdvOncsHucNL8Ro6Go7lBuuOQ,8962
@@ -2091,7 +2091,7 @@ vellum/workflows/utils/tests/test_functions.py,sha256=J_WEyVX1yE3lUhoX8etgkbPuwQ
2091
2091
  vellum/workflows/utils/tests/test_names.py,sha256=DnRRnuORxQXx9ESegCzkxiWcHy2_bBi7lXgbFi3FZK8,757
2092
2092
  vellum/workflows/utils/tests/test_uuids.py,sha256=i77ABQ0M3S-aFLzDXHJq_yr5FPkJEWCMBn1HJ3DObrE,437
2093
2093
  vellum/workflows/utils/tests/test_vellum_variables.py,sha256=X7b-bbN3bFRx0WG31bowcaOgsXxEPYnh2sgpsqgKIsQ,2096
2094
- vellum/workflows/utils/uuids.py,sha256=xQ-Clad8Srl3QqCrs8_UEgto0OFe8zH7VtuIlCgMWHg,2412
2094
+ vellum/workflows/utils/uuids.py,sha256=rP3OHTgvyAiZjlMwYicxmX39JpH1FUYK8SWluh22wqg,2525
2095
2095
  vellum/workflows/utils/vellum_variables.py,sha256=X3lZn-EoWengRWBWRhTNW7hqbj7LkV-6NSMwCskWEbg,7203
2096
2096
  vellum/workflows/utils/zip.py,sha256=HVg_YZLmBOTXKaDV3Xhaf3V6sYnfqqZXQ8CpuafkbPY,1181
2097
2097
  vellum/workflows/vellum_client.py,sha256=3iDR7VV_NgLSm1iZQCKDvrmfEaX1bOJiU15QrxyHpv0,1237
@@ -2102,8 +2102,8 @@ vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
2102
2102
  vellum/workflows/workflows/tests/test_base_workflow.py,sha256=Boa-_m9ii2Qsa1RvVM-VYniF7zCpzGgEGy-OnPZkrHg,23941
2103
2103
  vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
2104
2104
  vellum/workflows/workflows/tests/test_event_filters.py,sha256=CPsgtn2F8QMuNMxN5MB6IwTY0y_8JWBCZsio75vxp6c,3638
2105
- vellum_ai-1.8.4.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
2106
- vellum_ai-1.8.4.dist-info/METADATA,sha256=2A_OzgYI-fjot2f0Dc4Y8R2gbHSYOXv0zNpGlzhV4wc,5547
2107
- vellum_ai-1.8.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
2108
- vellum_ai-1.8.4.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
2109
- vellum_ai-1.8.4.dist-info/RECORD,,
2105
+ vellum_ai-1.8.5.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
2106
+ vellum_ai-1.8.5.dist-info/METADATA,sha256=R9SUjnVuVt7u0ikizlEiD0BcHXfsTFqYW5V4BjpRO24,5547
2107
+ vellum_ai-1.8.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
2108
+ vellum_ai-1.8.5.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
2109
+ vellum_ai-1.8.5.dist-info/RECORD,,
@@ -24,7 +24,7 @@ def test_manual_trigger_serialization():
24
24
  assert isinstance(triggers, list)
25
25
 
26
26
  assert len(triggers) == 1
27
- assert triggers[0] == {"id": "b09c1902-3cca-4c79-b775-4c32e3e88466", "type": "MANUAL", "attributes": []}
27
+ assert triggers[0] == {"id": "b3c8ab56-001f-4157-bbc2-4a7fe5ebf8c6", "type": "MANUAL", "attributes": []}
28
28
 
29
29
 
30
30
  def test_manual_trigger_multiple_entrypoints():
@@ -54,7 +54,7 @@ def test_manual_trigger_multiple_entrypoints():
54
54
  assert isinstance(triggers, list)
55
55
 
56
56
  assert len(triggers) == 1
57
- assert triggers[0] == {"id": "b09c1902-3cca-4c79-b775-4c32e3e88466", "type": "MANUAL", "attributes": []}
57
+ assert triggers[0] == {"id": "b3c8ab56-001f-4157-bbc2-4a7fe5ebf8c6", "type": "MANUAL", "attributes": []}
58
58
 
59
59
 
60
60
  def test_unknown_trigger_type():
@@ -107,4 +107,4 @@ def test_manual_trigger_entrypoint_id_consistency():
107
107
  "to maintain trigger-entrypoint linkage"
108
108
  )
109
109
  # Also verify the expected UUID
110
- assert trigger_id == "b09c1902-3cca-4c79-b775-4c32e3e88466"
110
+ assert trigger_id == "b3c8ab56-001f-4157-bbc2-4a7fe5ebf8c6"
@@ -57,7 +57,7 @@ from vellum.workflows.references.workflow_input import WorkflowInputReference
57
57
  from vellum.workflows.types.core import JsonArray, JsonObject
58
58
  from vellum.workflows.types.generics import is_workflow_class
59
59
  from vellum.workflows.utils.functions import compile_function_definition
60
- from vellum.workflows.utils.uuids import uuid4_from_hash
60
+ from vellum.workflows.utils.uuids import get_trigger_id, uuid4_from_hash
61
61
  from vellum_ee.workflows.display.utils.exceptions import InvalidInputReferenceError, UnsupportedSerializationException
62
62
  from vellum_ee.workflows.server.virtual_file_loader import VirtualFileLoader
63
63
 
@@ -353,9 +353,9 @@ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContex
353
353
  }
354
354
 
355
355
  if isinstance(value, TriggerAttributeReference):
356
- # Generate trigger ID using the same hash formula as in base_workflow_display.py
356
+ # Generate trigger ID using get_trigger_id to ensure consistency with trigger definitions
357
357
  trigger_class = value.trigger_class
358
- trigger_id = uuid4_from_hash(trigger_class.__qualname__)
358
+ trigger_id = get_trigger_id(trigger_class)
359
359
 
360
360
  return {
361
361
  "type": "TRIGGER_ATTRIBUTE",