vellum-ai 1.0.9__py3-none-any.whl → 1.0.11__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.
Files changed (34) hide show
  1. vellum/client/core/client_wrapper.py +2 -2
  2. vellum/workflows/descriptors/base.py +31 -1
  3. vellum/workflows/descriptors/utils.py +19 -1
  4. vellum/workflows/emitters/__init__.py +2 -0
  5. vellum/workflows/emitters/base.py +17 -0
  6. vellum/workflows/emitters/vellum_emitter.py +138 -0
  7. vellum/workflows/expressions/accessor.py +23 -15
  8. vellum/workflows/expressions/add.py +41 -0
  9. vellum/workflows/expressions/length.py +35 -0
  10. vellum/workflows/expressions/minus.py +41 -0
  11. vellum/workflows/expressions/tests/test_add.py +72 -0
  12. vellum/workflows/expressions/tests/test_length.py +38 -0
  13. vellum/workflows/expressions/tests/test_minus.py +72 -0
  14. vellum/workflows/integrations/composio_service.py +10 -2
  15. vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +1 -1
  16. vellum/workflows/nodes/displayable/inline_prompt_node/node.py +2 -2
  17. vellum/workflows/nodes/displayable/tool_calling_node/node.py +24 -20
  18. vellum/workflows/nodes/displayable/tool_calling_node/state.py +2 -0
  19. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py +92 -0
  20. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +25 -10
  21. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +7 -5
  22. vellum/workflows/nodes/displayable/tool_calling_node/utils.py +141 -86
  23. vellum/workflows/types/core.py +3 -5
  24. vellum/workflows/types/definition.py +2 -6
  25. vellum/workflows/types/tests/test_definition.py +5 -2
  26. {vellum_ai-1.0.9.dist-info → vellum_ai-1.0.11.dist-info}/METADATA +1 -1
  27. {vellum_ai-1.0.9.dist-info → vellum_ai-1.0.11.dist-info}/RECORD +34 -27
  28. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +1 -4
  29. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_serialization.py +0 -5
  30. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +0 -5
  31. vellum_ee/workflows/display/utils/expressions.py +12 -0
  32. {vellum_ai-1.0.9.dist-info → vellum_ai-1.0.11.dist-info}/LICENSE +0 -0
  33. {vellum_ai-1.0.9.dist-info → vellum_ai-1.0.11.dist-info}/WHEEL +0 -0
  34. {vellum_ai-1.0.9.dist-info → vellum_ai-1.0.11.dist-info}/entry_points.txt +0 -0
@@ -6,6 +6,7 @@ from pydantic import BaseModel
6
6
  from vellum.client.types.logical_operator import LogicalOperator
7
7
  from vellum.workflows.descriptors.base import BaseDescriptor
8
8
  from vellum.workflows.expressions.accessor import AccessorExpression
9
+ from vellum.workflows.expressions.add import AddExpression
9
10
  from vellum.workflows.expressions.and_ import AndExpression
10
11
  from vellum.workflows.expressions.begins_with import BeginsWithExpression
11
12
  from vellum.workflows.expressions.between import BetweenExpression
@@ -26,8 +27,10 @@ from vellum.workflows.expressions.is_not_null import IsNotNullExpression
26
27
  from vellum.workflows.expressions.is_not_undefined import IsNotUndefinedExpression
27
28
  from vellum.workflows.expressions.is_null import IsNullExpression
28
29
  from vellum.workflows.expressions.is_undefined import IsUndefinedExpression
30
+ from vellum.workflows.expressions.length import LengthExpression
29
31
  from vellum.workflows.expressions.less_than import LessThanExpression
30
32
  from vellum.workflows.expressions.less_than_or_equal_to import LessThanOrEqualToExpression
33
+ from vellum.workflows.expressions.minus import MinusExpression
31
34
  from vellum.workflows.expressions.not_between import NotBetweenExpression
32
35
  from vellum.workflows.expressions.not_in import NotInExpression
33
36
  from vellum.workflows.expressions.or_ import OrExpression
@@ -96,6 +99,12 @@ def convert_descriptor_to_operator(descriptor: BaseDescriptor) -> LogicalOperato
96
99
  return "coalesce"
97
100
  elif isinstance(descriptor, ParseJsonExpression):
98
101
  return "parseJson"
102
+ elif isinstance(descriptor, LengthExpression):
103
+ return "length"
104
+ elif isinstance(descriptor, AddExpression):
105
+ return "+"
106
+ elif isinstance(descriptor, MinusExpression):
107
+ return "-"
99
108
  else:
100
109
  raise ValueError(f"Unsupported descriptor type: {descriptor}")
101
110
 
@@ -133,6 +142,7 @@ def _serialize_condition(display_context: "WorkflowDisplayContext", condition: B
133
142
  IsNotNilExpression,
134
143
  IsUndefinedExpression,
135
144
  IsNotUndefinedExpression,
145
+ LengthExpression,
136
146
  ParseJsonExpression,
137
147
  ),
138
148
  ):
@@ -157,6 +167,7 @@ def _serialize_condition(display_context: "WorkflowDisplayContext", condition: B
157
167
  elif isinstance(
158
168
  condition,
159
169
  (
170
+ AddExpression,
160
171
  AndExpression,
161
172
  BeginsWithExpression,
162
173
  CoalesceExpression,
@@ -172,6 +183,7 @@ def _serialize_condition(display_context: "WorkflowDisplayContext", condition: B
172
183
  InExpression,
173
184
  LessThanExpression,
174
185
  LessThanOrEqualToExpression,
186
+ MinusExpression,
175
187
  NotInExpression,
176
188
  OrExpression,
177
189
  ),