vellum-ai 0.14.49__py3-none-any.whl → 0.14.51__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 (35) hide show
  1. vellum/__init__.py +6 -2
  2. vellum/client/core/client_wrapper.py +1 -1
  3. vellum/client/types/__init__.py +6 -2
  4. vellum/client/types/deployment_read.py +1 -1
  5. vellum/client/types/slim_workflow_execution_read.py +2 -2
  6. vellum/client/types/workflow_event_execution_read.py +2 -2
  7. vellum/client/types/{workflow_execution_usage_calculation_fulfilled_body.py → workflow_execution_usage_calculation_error.py} +5 -6
  8. vellum/client/types/workflow_execution_usage_calculation_error_code_enum.py +7 -0
  9. vellum/client/types/workflow_execution_usage_result.py +24 -0
  10. vellum/types/{workflow_execution_usage_calculation_fulfilled_body.py → workflow_execution_usage_calculation_error.py} +1 -1
  11. vellum/types/workflow_execution_usage_calculation_error_code_enum.py +3 -0
  12. vellum/types/workflow_execution_usage_result.py +3 -0
  13. vellum/workflows/nodes/core/map_node/node.py +74 -87
  14. vellum/workflows/nodes/core/map_node/tests/test_node.py +49 -0
  15. vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +1 -2
  16. vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/test_inline_prompt_node.py +3 -3
  17. vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py +1 -1
  18. vellum/workflows/nodes/experimental/__init__.py +3 -0
  19. vellum/workflows/nodes/experimental/tool_calling_node/tests/test_tool_calling_node.py +53 -0
  20. vellum/workflows/nodes/experimental/tool_calling_node/utils.py +12 -5
  21. vellum/workflows/state/encoder.py +4 -0
  22. vellum/workflows/workflows/base.py +8 -0
  23. {vellum_ai-0.14.49.dist-info → vellum_ai-0.14.51.dist-info}/METADATA +1 -1
  24. {vellum_ai-0.14.49.dist-info → vellum_ai-0.14.51.dist-info}/RECORD +35 -29
  25. vellum_ee/workflows/display/nodes/base_node_display.py +31 -2
  26. vellum_ee/workflows/display/nodes/get_node_display_class.py +1 -24
  27. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +29 -12
  28. vellum_ee/workflows/display/nodes/vellum/tests/test_prompt_node.py +33 -1
  29. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +177 -0
  30. vellum_ee/workflows/display/utils/expressions.py +1 -1
  31. vellum_ee/workflows/display/workflows/base_workflow_display.py +3 -24
  32. vellum_ee/workflows/display/workflows/tests/test_workflow_display.py +3 -3
  33. {vellum_ai-0.14.49.dist-info → vellum_ai-0.14.51.dist-info}/LICENSE +0 -0
  34. {vellum_ai-0.14.49.dist-info → vellum_ai-0.14.51.dist-info}/WHEEL +0 -0
  35. {vellum_ai-0.14.49.dist-info → vellum_ai-0.14.51.dist-info}/entry_points.txt +0 -0
@@ -153,20 +153,8 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
153
153
  "definition": None,
154
154
  }
155
155
 
156
- # Add all the nodes in the workflow
157
- for node in self._workflow.get_nodes():
158
- node_display = self.display_context.node_displays[node]
159
-
160
- try:
161
- serialized_node = node_display.serialize(self.display_context)
162
- except NotImplementedError as e:
163
- self.add_error(e)
164
- continue
165
-
166
- serialized_nodes[node_display.node_id] = serialized_node
167
-
168
- # Add all unused nodes in the workflow
169
- for node in self._workflow.get_unused_nodes():
156
+ # Add all the nodes in the workflows
157
+ for node in self._workflow.get_all_nodes():
170
158
  node_display = self.display_context.node_displays[node]
171
159
 
172
160
  try:
@@ -417,16 +405,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
417
405
 
418
406
  port_displays: PortDisplays = {}
419
407
 
420
- for node in self._workflow.get_nodes():
421
- self._enrich_node_displays(
422
- node=node,
423
- node_displays=node_displays,
424
- global_node_displays=global_node_displays,
425
- global_node_output_displays=global_node_output_displays,
426
- port_displays=port_displays,
427
- )
428
-
429
- for node in self._workflow.get_unused_nodes():
408
+ for node in self._workflow.get_all_nodes():
430
409
  self._enrich_node_displays(
431
410
  node=node,
432
411
  node_displays=node_displays,
@@ -466,7 +466,7 @@ def test_serialize_workflow__array_values():
466
466
  assert "value" in array_output
467
467
  assert array_output["value"] == {
468
468
  "type": "CONSTANT_VALUE",
469
- "value": {"type": "JSON", "items": ["item1", "item2", "item3"]},
469
+ "value": {"type": "JSON", "value": ["item1", "item2", "item3"]},
470
470
  }
471
471
 
472
472
  nested_array_outputs = [val for val in outputs if isinstance(val, dict) and val["name"] == "nested_array_value"]
@@ -477,7 +477,7 @@ def test_serialize_workflow__array_values():
477
477
  assert "value" in nested_array_output
478
478
  assert nested_array_output["value"] == {
479
479
  "type": "CONSTANT_VALUE",
480
- "value": {"type": "JSON", "items": [["item1", "item2", "item3"], ["item4", "item5", "item6"]]},
480
+ "value": {"type": "JSON", "value": [["item1", "item2", "item3"], ["item4", "item5", "item6"]]},
481
481
  }
482
482
 
483
483
  mixed_array_outputs = [val for val in outputs if isinstance(val, dict) and val["name"] == "mixed_array_value"]
@@ -488,7 +488,7 @@ def test_serialize_workflow__array_values():
488
488
  assert "value" in mixed_array_output
489
489
  assert mixed_array_output["value"] == {
490
490
  "type": "CONSTANT_VALUE",
491
- "value": {"type": "JSON", "items": [["item1"], "item2", "item3"]},
491
+ "value": {"type": "JSON", "value": [["item1"], "item2", "item3"]},
492
492
  }
493
493
 
494
494