vellum-ai 1.11.2__py3-none-any.whl → 1.13.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.
Potentially problematic release.
This version of vellum-ai might be problematic. Click here for more details.
- vellum/__init__.py +18 -0
- vellum/client/README.md +1 -1
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/core/force_multipart.py +4 -2
- vellum/client/core/http_response.py +1 -1
- vellum/client/core/pydantic_utilities.py +7 -4
- vellum/client/errors/too_many_requests_error.py +1 -2
- vellum/client/reference.md +677 -76
- vellum/client/resources/container_images/client.py +299 -0
- vellum/client/resources/container_images/raw_client.py +286 -0
- vellum/client/resources/documents/client.py +20 -10
- vellum/client/resources/documents/raw_client.py +20 -10
- vellum/client/resources/events/raw_client.py +4 -4
- vellum/client/resources/integration_auth_configs/client.py +2 -0
- vellum/client/resources/integration_auth_configs/raw_client.py +2 -0
- vellum/client/resources/integration_providers/client.py +28 -2
- vellum/client/resources/integration_providers/raw_client.py +24 -0
- vellum/client/resources/integrations/client.py +52 -4
- vellum/client/resources/integrations/raw_client.py +61 -0
- vellum/client/resources/workflow_deployments/client.py +156 -0
- vellum/client/resources/workflow_deployments/raw_client.py +334 -0
- vellum/client/resources/workflows/client.py +212 -8
- vellum/client/resources/workflows/raw_client.py +343 -6
- vellum/client/types/__init__.py +18 -0
- vellum/client/types/api_actor_type_enum.py +1 -1
- vellum/client/types/check_workflow_execution_status_error.py +21 -0
- vellum/client/types/check_workflow_execution_status_response.py +29 -0
- vellum/client/types/code_execution_package_request.py +21 -0
- vellum/client/types/composio_execute_tool_request.py +5 -0
- vellum/client/types/composio_tool_definition.py +1 -0
- vellum/client/types/container_image_build_config.py +1 -0
- vellum/client/types/container_image_container_image_tag.py +1 -0
- vellum/client/types/dataset_row_push_request.py +3 -0
- vellum/client/types/document_document_to_document_index.py +1 -0
- vellum/client/types/integration_name.py +24 -0
- vellum/client/types/node_execution_fulfilled_body.py +1 -0
- vellum/client/types/node_execution_log_body.py +24 -0
- vellum/client/types/node_execution_log_event.py +47 -0
- vellum/client/types/prompt_deployment_release_prompt_deployment.py +1 -0
- vellum/client/types/runner_config_request.py +24 -0
- vellum/client/types/severity_enum.py +5 -0
- vellum/client/types/slim_composio_tool_definition.py +1 -0
- vellum/client/types/slim_document_document_to_document_index.py +2 -0
- vellum/client/types/type_checker_enum.py +5 -0
- vellum/client/types/vellum_audio.py +5 -1
- vellum/client/types/vellum_audio_request.py +5 -1
- vellum/client/types/vellum_document.py +5 -1
- vellum/client/types/vellum_document_request.py +5 -1
- vellum/client/types/vellum_image.py +5 -1
- vellum/client/types/vellum_image_request.py +5 -1
- vellum/client/types/vellum_node_execution_event.py +2 -0
- vellum/client/types/vellum_variable.py +5 -0
- vellum/client/types/vellum_variable_extensions.py +1 -0
- vellum/client/types/vellum_variable_type.py +1 -0
- vellum/client/types/vellum_video.py +5 -1
- vellum/client/types/vellum_video_request.py +5 -1
- vellum/client/types/workflow_deployment_release_workflow_deployment.py +1 -0
- vellum/client/types/workflow_event.py +2 -0
- vellum/client/types/workflow_execution_fulfilled_body.py +1 -0
- vellum/client/types/workflow_result_event_output_data_array.py +1 -1
- vellum/client/types/workflow_result_event_output_data_chat_history.py +1 -1
- vellum/client/types/workflow_result_event_output_data_error.py +1 -1
- vellum/client/types/workflow_result_event_output_data_function_call.py +1 -1
- vellum/client/types/workflow_result_event_output_data_json.py +1 -1
- vellum/client/types/workflow_result_event_output_data_number.py +1 -1
- vellum/client/types/workflow_result_event_output_data_search_results.py +1 -1
- vellum/client/types/workflow_result_event_output_data_string.py +1 -1
- vellum/client/types/workflow_sandbox_execute_node_response.py +8 -0
- vellum/plugins/vellum_mypy.py +37 -2
- vellum/types/check_workflow_execution_status_error.py +3 -0
- vellum/types/check_workflow_execution_status_response.py +3 -0
- vellum/types/code_execution_package_request.py +3 -0
- vellum/types/node_execution_log_body.py +3 -0
- vellum/types/node_execution_log_event.py +3 -0
- vellum/types/runner_config_request.py +3 -0
- vellum/types/severity_enum.py +3 -0
- vellum/types/type_checker_enum.py +3 -0
- vellum/types/workflow_sandbox_execute_node_response.py +3 -0
- vellum/utils/files/mixin.py +26 -0
- vellum/utils/files/tests/test_mixin.py +62 -0
- vellum/utils/tests/test_vellum_client.py +95 -0
- vellum/utils/uuid.py +19 -2
- vellum/utils/vellum_client.py +10 -3
- vellum/workflows/__init__.py +7 -1
- vellum/workflows/descriptors/base.py +86 -0
- vellum/workflows/descriptors/tests/test_utils.py +9 -0
- vellum/workflows/errors/tests/__init__.py +0 -0
- vellum/workflows/errors/tests/test_types.py +52 -0
- vellum/workflows/errors/types.py +1 -0
- vellum/workflows/events/node.py +24 -0
- vellum/workflows/events/tests/test_event.py +123 -0
- vellum/workflows/events/types.py +2 -1
- vellum/workflows/events/workflow.py +28 -2
- vellum/workflows/expressions/add.py +3 -0
- vellum/workflows/expressions/tests/test_add.py +24 -0
- vellum/workflows/graph/graph.py +26 -5
- vellum/workflows/graph/tests/test_graph.py +228 -1
- vellum/workflows/inputs/base.py +22 -6
- vellum/workflows/inputs/dataset_row.py +121 -16
- vellum/workflows/inputs/tests/test_inputs.py +3 -3
- vellum/workflows/integrations/tests/test_vellum_integration_service.py +84 -0
- vellum/workflows/integrations/vellum_integration_service.py +12 -1
- vellum/workflows/loaders/base.py +2 -0
- vellum/workflows/nodes/bases/base.py +37 -16
- vellum/workflows/nodes/bases/tests/test_base_node.py +104 -1
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +1 -0
- vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py +1 -1
- vellum/workflows/nodes/core/map_node/node.py +7 -5
- vellum/workflows/nodes/core/map_node/tests/test_node.py +33 -0
- vellum/workflows/nodes/core/retry_node/node.py +1 -0
- vellum/workflows/nodes/core/try_node/node.py +1 -0
- vellum/workflows/nodes/displayable/api_node/node.py +3 -2
- vellum/workflows/nodes/displayable/api_node/tests/test_api_node.py +38 -0
- vellum/workflows/nodes/displayable/bases/api_node/node.py +1 -1
- vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +18 -1
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +109 -2
- vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py +13 -2
- vellum/workflows/nodes/displayable/code_execution_node/node.py +9 -15
- vellum/workflows/nodes/displayable/code_execution_node/tests/test_node.py +65 -24
- vellum/workflows/nodes/displayable/code_execution_node/utils.py +3 -0
- vellum/workflows/nodes/displayable/final_output_node/node.py +24 -69
- vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py +53 -3
- vellum/workflows/nodes/displayable/note_node/node.py +4 -1
- vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py +16 -5
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +47 -0
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +74 -34
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +204 -8
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +92 -71
- vellum/workflows/nodes/mocks.py +47 -213
- vellum/workflows/nodes/tests/test_mocks.py +0 -177
- vellum/workflows/nodes/utils.py +23 -8
- vellum/workflows/outputs/base.py +36 -3
- vellum/workflows/references/environment_variable.py +1 -11
- vellum/workflows/references/lazy.py +8 -0
- vellum/workflows/references/state_value.py +24 -1
- vellum/workflows/references/tests/test_lazy.py +58 -0
- vellum/workflows/references/trigger.py +8 -3
- vellum/workflows/references/workflow_input.py +8 -0
- vellum/workflows/resolvers/resolver.py +13 -3
- vellum/workflows/resolvers/tests/test_resolver.py +31 -0
- vellum/workflows/runner/runner.py +159 -14
- vellum/workflows/runner/tests/__init__.py +0 -0
- vellum/workflows/runner/tests/test_runner.py +170 -0
- vellum/workflows/sandbox.py +7 -8
- vellum/workflows/state/base.py +89 -30
- vellum/workflows/state/context.py +74 -3
- vellum/workflows/state/tests/test_state.py +269 -1
- vellum/workflows/tests/test_dataset_row.py +8 -7
- vellum/workflows/tests/test_sandbox.py +97 -8
- vellum/workflows/triggers/__init__.py +2 -1
- vellum/workflows/triggers/base.py +160 -28
- vellum/workflows/triggers/chat_message.py +141 -0
- vellum/workflows/triggers/integration.py +12 -0
- vellum/workflows/triggers/manual.py +3 -1
- vellum/workflows/triggers/schedule.py +3 -1
- vellum/workflows/triggers/tests/test_chat_message.py +257 -0
- vellum/workflows/types/core.py +18 -0
- vellum/workflows/types/definition.py +6 -13
- vellum/workflows/types/generics.py +12 -0
- vellum/workflows/types/tests/test_utils.py +12 -0
- vellum/workflows/types/utils.py +32 -2
- vellum/workflows/types/workflow_metadata.py +124 -0
- vellum/workflows/utils/functions.py +152 -16
- vellum/workflows/utils/pydantic_schema.py +19 -1
- vellum/workflows/utils/tests/test_functions.py +123 -8
- vellum/workflows/utils/tests/test_validate.py +79 -0
- vellum/workflows/utils/tests/test_vellum_variables.py +62 -2
- vellum/workflows/utils/uuids.py +90 -0
- vellum/workflows/utils/validate.py +108 -0
- vellum/workflows/utils/vellum_variables.py +96 -16
- vellum/workflows/workflows/base.py +177 -35
- vellum/workflows/workflows/tests/test_base_workflow.py +51 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/METADATA +6 -1
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/RECORD +274 -227
- vellum_cli/__init__.py +21 -0
- vellum_cli/config.py +16 -2
- vellum_cli/pull.py +2 -0
- vellum_cli/push.py +23 -10
- vellum_cli/tests/conftest.py +8 -13
- vellum_cli/tests/test_image_push.py +4 -11
- vellum_cli/tests/test_pull.py +83 -68
- vellum_cli/tests/test_push.py +251 -2
- vellum_ee/assets/node-definitions.json +225 -12
- vellum_ee/scripts/generate_node_definitions.py +15 -3
- vellum_ee/workflows/display/base.py +4 -3
- vellum_ee/workflows/display/nodes/base_node_display.py +44 -11
- vellum_ee/workflows/display/nodes/tests/test_base_node_display.py +93 -0
- vellum_ee/workflows/display/nodes/types.py +1 -0
- vellum_ee/workflows/display/nodes/vellum/__init__.py +0 -2
- vellum_ee/workflows/display/nodes/vellum/base_adornment_node.py +5 -2
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +10 -2
- vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +17 -14
- vellum_ee/workflows/display/nodes/vellum/map_node.py +2 -0
- vellum_ee/workflows/display/nodes/vellum/note_node.py +18 -3
- vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +37 -14
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +62 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_final_output_node.py +136 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_note_node.py +44 -7
- vellum_ee/workflows/display/nodes/vellum/tests/test_prompt_node.py +5 -13
- vellum_ee/workflows/display/nodes/vellum/tests/test_subworkflow_deployment_node.py +27 -17
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +145 -22
- vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +107 -2
- vellum_ee/workflows/display/nodes/vellum/utils.py +54 -12
- vellum_ee/workflows/display/tests/test_base_workflow_display.py +13 -16
- vellum_ee/workflows/display/tests/test_json_schema_validation.py +190 -0
- vellum_ee/workflows/display/tests/test_mocks.py +912 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py +14 -2
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +109 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py +3 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +187 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +34 -325
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +42 -393
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +13 -315
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py +2 -122
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +24 -115
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +4 -93
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +7 -80
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_prompt_node_serialization.py +9 -101
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +77 -308
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +62 -324
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +3 -82
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +4 -142
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +1 -61
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_set_state_node_serialization.py +4 -4
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +205 -134
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +34 -146
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +2 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +8 -6
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_serialization.py +137 -266
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_tool_wrapper_serialization.py +84 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +55 -16
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +15 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_tool_wrapper_serialization.py +71 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_vellum_integration_serialization.py +119 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +0 -2
- vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_dict_reference_serialization.py +22 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_trigger_serialization.py +412 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_code_tool_node_reference_error.py +106 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +9 -41
- vellum_ee/workflows/display/tests/workflow_serialization/test_duplicate_trigger_name_validation.py +208 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_final_output_node_not_referenced_by_workflow_outputs.py +45 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_infinite_loop_validation.py +66 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_int_input_serialization.py +40 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_serialization.py +8 -14
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_validation.py +173 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_with_entrypoint_node_id.py +16 -13
- vellum_ee/workflows/display/tests/workflow_serialization/test_list_vellum_document_serialization.py +5 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py +12 -2
- vellum_ee/workflows/display/tests/workflow_serialization/test_multi_trigger_same_node_serialization.py +111 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_no_triggers_no_entrypoint_validation.py +64 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_partial_workflow_meta_display_override.py +55 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_dataset_mocks_serialization.py +268 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_invalid_pdf_data_url.py +49 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_validation_errors.py +112 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_scheduled_trigger_serialization.py +25 -16
- vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_in_unused_graphs_serialization.py +53 -0
- vellum_ee/workflows/display/utils/exceptions.py +34 -0
- vellum_ee/workflows/display/utils/expressions.py +463 -52
- vellum_ee/workflows/display/utils/metadata.py +98 -33
- vellum_ee/workflows/display/utils/tests/test_metadata.py +31 -0
- vellum_ee/workflows/display/utils/triggers.py +153 -0
- vellum_ee/workflows/display/utils/vellum.py +59 -5
- vellum_ee/workflows/display/workflows/base_workflow_display.py +656 -254
- vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py +26 -0
- vellum_ee/workflows/display/workflows/tests/test_workflow_display.py +77 -29
- vellum_ee/workflows/server/namespaces.py +18 -0
- vellum_ee/workflows/tests/test_display_meta.py +2 -0
- vellum_ee/workflows/tests/test_serialize_module.py +174 -7
- vellum_ee/workflows/tests/test_server.py +0 -3
- vellum_ee/workflows/display/nodes/vellum/function_node.py +0 -14
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/LICENSE +0 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/WHEEL +0 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/entry_points.txt +0 -0
|
@@ -52,6 +52,7 @@ def test_serialize_workflow():
|
|
|
52
52
|
"required": True,
|
|
53
53
|
"default": None,
|
|
54
54
|
"extensions": {"color": None},
|
|
55
|
+
"schema": {"type": "string"},
|
|
55
56
|
},
|
|
56
57
|
],
|
|
57
58
|
input_variables,
|
|
@@ -95,27 +96,12 @@ def test_serialize_workflow():
|
|
|
95
96
|
|
|
96
97
|
# AND its raw data should be what we expect
|
|
97
98
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
98
|
-
assert len(workflow_raw_data["edges"]) == 11
|
|
99
|
-
assert len(workflow_raw_data["nodes"]) == 12
|
|
100
99
|
|
|
101
100
|
# AND each node should be serialized correctly
|
|
102
|
-
entrypoint_node = workflow_raw_data["nodes"][0]
|
|
103
|
-
assert entrypoint_node == {
|
|
104
|
-
"id": "089b3201-537a-4ed7-8d15-2524a00e8534",
|
|
105
|
-
"type": "ENTRYPOINT",
|
|
106
|
-
"base": None,
|
|
107
|
-
"definition": None,
|
|
108
|
-
"inputs": [],
|
|
109
|
-
"data": {
|
|
110
|
-
"label": "Entrypoint Node",
|
|
111
|
-
"source_handle_id": "c2f0871d-0d9d-417f-8b0e-c813ccf880ac",
|
|
112
|
-
},
|
|
113
|
-
"display_data": {
|
|
114
|
-
"position": {"x": 0.0, "y": -50.0},
|
|
115
|
-
},
|
|
116
|
-
}
|
|
117
101
|
|
|
118
|
-
conditional_node =
|
|
102
|
+
conditional_node = next(
|
|
103
|
+
n for n in workflow_raw_data["nodes"] if (n.get("base") or {}).get("name") == "ConditionalNode"
|
|
104
|
+
)
|
|
119
105
|
assert not DeepDiff(
|
|
120
106
|
{
|
|
121
107
|
"id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
@@ -517,300 +503,6 @@ def test_serialize_workflow():
|
|
|
517
503
|
passthrough_nodes = [node for node in workflow_raw_data["nodes"] if node["type"] == "GENERIC"]
|
|
518
504
|
assert len(passthrough_nodes) == 5
|
|
519
505
|
|
|
520
|
-
assert not DeepDiff(
|
|
521
|
-
[
|
|
522
|
-
{
|
|
523
|
-
"id": "9c22ee47-01da-4e4e-863d-b4a6874bed66",
|
|
524
|
-
"type": "TERMINAL",
|
|
525
|
-
"data": {
|
|
526
|
-
"label": "Final Output",
|
|
527
|
-
"name": "statement",
|
|
528
|
-
"target_handle_id": "f02a8971-e9a4-4716-bfb4-d08f5614b5d8",
|
|
529
|
-
"output_id": "cdbe2adf-9951-409a-b9a8-b8b349037f4f",
|
|
530
|
-
"output_type": "STRING",
|
|
531
|
-
"node_input_id": "2e742a40-cbee-4e19-9269-c62dc4a9204e",
|
|
532
|
-
},
|
|
533
|
-
"inputs": [
|
|
534
|
-
{
|
|
535
|
-
"id": "2e742a40-cbee-4e19-9269-c62dc4a9204e",
|
|
536
|
-
"key": "node_input",
|
|
537
|
-
"value": {
|
|
538
|
-
"rules": [
|
|
539
|
-
{
|
|
540
|
-
"type": "NODE_OUTPUT",
|
|
541
|
-
"data": {
|
|
542
|
-
"node_id": "c5dc093d-379e-4655-84ec-5c0f4527f39d",
|
|
543
|
-
"output_id": "fef1242f-f91e-4b07-96df-d37e052a76b3",
|
|
544
|
-
},
|
|
545
|
-
}
|
|
546
|
-
],
|
|
547
|
-
"combinator": "OR",
|
|
548
|
-
},
|
|
549
|
-
}
|
|
550
|
-
],
|
|
551
|
-
"display_data": {"position": {"x": 600.0, "y": -50.0}},
|
|
552
|
-
"base": {
|
|
553
|
-
"name": "FinalOutputNode",
|
|
554
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
555
|
-
},
|
|
556
|
-
"definition": None,
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"id": "47f0931c-41f6-4b84-bf39-0c486941f599",
|
|
560
|
-
"type": "TERMINAL",
|
|
561
|
-
"data": {
|
|
562
|
-
"label": "Final Output",
|
|
563
|
-
"name": "compliment",
|
|
564
|
-
"target_handle_id": "a4d57adc-58c1-40c6-810b-ee5fd923bfc5",
|
|
565
|
-
"output_id": "93f2cb75-6fa2-4e46-9488-c0bcd29153c0",
|
|
566
|
-
"output_type": "STRING",
|
|
567
|
-
"node_input_id": "9ba792e6-55e3-4a14-8768-e8ef6955c934",
|
|
568
|
-
},
|
|
569
|
-
"inputs": [
|
|
570
|
-
{
|
|
571
|
-
"id": "9ba792e6-55e3-4a14-8768-e8ef6955c934",
|
|
572
|
-
"key": "node_input",
|
|
573
|
-
"value": {
|
|
574
|
-
"rules": [
|
|
575
|
-
{
|
|
576
|
-
"type": "NODE_OUTPUT",
|
|
577
|
-
"data": {
|
|
578
|
-
"node_id": "b7663f0c-f86d-4924-b551-36279259bf65",
|
|
579
|
-
"output_id": "68e90c31-23f0-4fc9-8d3b-529c58ba9621",
|
|
580
|
-
},
|
|
581
|
-
}
|
|
582
|
-
],
|
|
583
|
-
"combinator": "OR",
|
|
584
|
-
},
|
|
585
|
-
}
|
|
586
|
-
],
|
|
587
|
-
"display_data": {"position": {"x": 600.0, "y": -550.0}},
|
|
588
|
-
"base": {
|
|
589
|
-
"name": "FinalOutputNode",
|
|
590
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
591
|
-
},
|
|
592
|
-
"definition": None,
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
"id": "e3d29229-f746-4125-819e-f847acbed307",
|
|
596
|
-
"type": "TERMINAL",
|
|
597
|
-
"data": {
|
|
598
|
-
"label": "Final Output",
|
|
599
|
-
"name": "complaint",
|
|
600
|
-
"target_handle_id": "c5dd9bf5-9e18-4dbc-8c20-2c0baf969ebe",
|
|
601
|
-
"output_id": "f936ae31-ba15-4864-8961-86231022a4d7",
|
|
602
|
-
"output_type": "STRING",
|
|
603
|
-
"node_input_id": "47f426a4-8770-4f30-a285-5d21849063a5",
|
|
604
|
-
},
|
|
605
|
-
"inputs": [
|
|
606
|
-
{
|
|
607
|
-
"id": "47f426a4-8770-4f30-a285-5d21849063a5",
|
|
608
|
-
"key": "node_input",
|
|
609
|
-
"value": {
|
|
610
|
-
"rules": [
|
|
611
|
-
{
|
|
612
|
-
"type": "NODE_OUTPUT",
|
|
613
|
-
"data": {
|
|
614
|
-
"node_id": "120dc445-3472-4e6e-bd2d-42991ac3a1b1",
|
|
615
|
-
"output_id": "82949306-1719-4538-8f4d-5f253ab5d93b",
|
|
616
|
-
},
|
|
617
|
-
}
|
|
618
|
-
],
|
|
619
|
-
"combinator": "OR",
|
|
620
|
-
},
|
|
621
|
-
}
|
|
622
|
-
],
|
|
623
|
-
"display_data": {"position": {"x": 600.0, "y": 200.0}},
|
|
624
|
-
"base": {
|
|
625
|
-
"name": "FinalOutputNode",
|
|
626
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
627
|
-
},
|
|
628
|
-
"definition": None,
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
"id": "6efa7b45-0580-406d-85aa-439117ba8021",
|
|
632
|
-
"type": "TERMINAL",
|
|
633
|
-
"data": {
|
|
634
|
-
"label": "Final Output",
|
|
635
|
-
"name": "fallthrough",
|
|
636
|
-
"target_handle_id": "2283cd2c-b077-4b5d-a96f-aa2cd6023eda",
|
|
637
|
-
"output_id": "62ad462f-f819-4940-99ab-b3f145507f57",
|
|
638
|
-
"output_type": "STRING",
|
|
639
|
-
"node_input_id": "d2d3e7cc-f6d6-4ac1-ad19-e6f52a75b38f",
|
|
640
|
-
},
|
|
641
|
-
"inputs": [
|
|
642
|
-
{
|
|
643
|
-
"id": "d2d3e7cc-f6d6-4ac1-ad19-e6f52a75b38f",
|
|
644
|
-
"key": "node_input",
|
|
645
|
-
"value": {
|
|
646
|
-
"rules": [
|
|
647
|
-
{
|
|
648
|
-
"type": "NODE_OUTPUT",
|
|
649
|
-
"data": {
|
|
650
|
-
"node_id": "0d91d9f5-6b10-44d2-90c7-4a4636bb4735",
|
|
651
|
-
"output_id": "571351c8-4caf-4071-995b-93e1fa66a653",
|
|
652
|
-
},
|
|
653
|
-
}
|
|
654
|
-
],
|
|
655
|
-
"combinator": "OR",
|
|
656
|
-
},
|
|
657
|
-
}
|
|
658
|
-
],
|
|
659
|
-
"display_data": {"position": {"x": 600.0, "y": -300.0}},
|
|
660
|
-
"base": {
|
|
661
|
-
"name": "FinalOutputNode",
|
|
662
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
663
|
-
},
|
|
664
|
-
"definition": None,
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
"id": "fa11b84b-1d76-4adc-ab28-cbbaa933c267",
|
|
668
|
-
"type": "TERMINAL",
|
|
669
|
-
"data": {
|
|
670
|
-
"label": "Final Output",
|
|
671
|
-
"name": "question",
|
|
672
|
-
"target_handle_id": "e1a6da28-02c5-40d7-8ac5-9fb07e2e3e1d",
|
|
673
|
-
"output_id": "c05f7d96-59a0-4d58-93d7-d451afd3f630",
|
|
674
|
-
"output_type": "STRING",
|
|
675
|
-
"node_input_id": "a13377c4-ae1c-4be4-b695-f9da590486ef",
|
|
676
|
-
},
|
|
677
|
-
"inputs": [
|
|
678
|
-
{
|
|
679
|
-
"id": "a13377c4-ae1c-4be4-b695-f9da590486ef",
|
|
680
|
-
"key": "node_input",
|
|
681
|
-
"value": {
|
|
682
|
-
"rules": [
|
|
683
|
-
{
|
|
684
|
-
"type": "NODE_OUTPUT",
|
|
685
|
-
"data": {
|
|
686
|
-
"node_id": "66980efc-ab25-46f3-af21-d66d994b3cdc",
|
|
687
|
-
"output_id": "d011aa88-36ca-48e5-94ee-cb053f8b21fd",
|
|
688
|
-
},
|
|
689
|
-
}
|
|
690
|
-
],
|
|
691
|
-
"combinator": "OR",
|
|
692
|
-
},
|
|
693
|
-
}
|
|
694
|
-
],
|
|
695
|
-
"display_data": {"position": {"x": 600.0, "y": 450.0}},
|
|
696
|
-
"base": {
|
|
697
|
-
"name": "FinalOutputNode",
|
|
698
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
699
|
-
},
|
|
700
|
-
"definition": None,
|
|
701
|
-
},
|
|
702
|
-
],
|
|
703
|
-
workflow_raw_data["nodes"][7:12],
|
|
704
|
-
ignore_order=True,
|
|
705
|
-
)
|
|
706
|
-
|
|
707
|
-
# AND each edge should be serialized correctly
|
|
708
|
-
serialized_edges = workflow_raw_data["edges"]
|
|
709
|
-
assert not DeepDiff(
|
|
710
|
-
[
|
|
711
|
-
{
|
|
712
|
-
"id": "8bc5a416-7e46-473e-b16a-ad5a54eb0d84",
|
|
713
|
-
"source_node_id": "089b3201-537a-4ed7-8d15-2524a00e8534",
|
|
714
|
-
"source_handle_id": "c2f0871d-0d9d-417f-8b0e-c813ccf880ac",
|
|
715
|
-
"target_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
716
|
-
"target_handle_id": "31e71b98-f5fe-4181-82d1-d16a820a15ca",
|
|
717
|
-
"type": "DEFAULT",
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
"id": "ee9d2e2d-f0ed-48ff-b4b9-536b347746c4",
|
|
721
|
-
"source_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
722
|
-
"source_handle_id": "92cbdaf9-496c-48ba-9eec-7d5a3b0d1593",
|
|
723
|
-
"target_node_id": "0d91d9f5-6b10-44d2-90c7-4a4636bb4735",
|
|
724
|
-
"target_handle_id": "fea48cec-0ddc-4575-ad51-125723b3a892",
|
|
725
|
-
"type": "DEFAULT",
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
"id": "4baf6b42-2247-4c75-aac7-9e680f6d1878",
|
|
729
|
-
"source_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
730
|
-
"source_handle_id": "d49e16ad-9493-4f58-b881-936b93ca2f7f",
|
|
731
|
-
"target_node_id": "b7663f0c-f86d-4924-b551-36279259bf65",
|
|
732
|
-
"target_handle_id": "d72034de-9e42-4227-ad2f-9909d28e667d",
|
|
733
|
-
"type": "DEFAULT",
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
"id": "49f5d207-a468-43af-a97d-96cc6caeba1e",
|
|
737
|
-
"source_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
738
|
-
"source_handle_id": "67fe1e1b-97c3-441c-aedb-887df848bc8a",
|
|
739
|
-
"target_node_id": "66980efc-ab25-46f3-af21-d66d994b3cdc",
|
|
740
|
-
"target_handle_id": "48096c18-7248-4335-938b-a9b5814293e2",
|
|
741
|
-
"type": "DEFAULT",
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
"id": "dde5efa3-86af-4846-8aae-736837ea9d89",
|
|
745
|
-
"source_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
746
|
-
"source_handle_id": "0b0024bf-b10a-45fd-995c-e226bbe78fcb",
|
|
747
|
-
"target_node_id": "c5dc093d-379e-4655-84ec-5c0f4527f39d",
|
|
748
|
-
"target_handle_id": "64f089ab-b0dc-4faf-8f87-a258d9a22df5",
|
|
749
|
-
"type": "DEFAULT",
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
"id": "3563a5a8-21cc-46f5-b4a8-8d2ffc131799",
|
|
753
|
-
"source_node_id": "23e4bbef-6127-49b1-8011-27b2508a60d8",
|
|
754
|
-
"source_handle_id": "0d084c4f-1c0b-4029-ab53-a69cc486be1b",
|
|
755
|
-
"target_node_id": "120dc445-3472-4e6e-bd2d-42991ac3a1b1",
|
|
756
|
-
"target_handle_id": "c0ea7386-dc76-4f9c-b29a-0e107f0a5211",
|
|
757
|
-
"type": "DEFAULT",
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
"id": "47758209-70cb-4f12-b71f-dc28df0f6d0b",
|
|
761
|
-
"source_node_id": "66980efc-ab25-46f3-af21-d66d994b3cdc",
|
|
762
|
-
"source_handle_id": "5760d2bd-7ea7-4a87-a036-0bc87d666963",
|
|
763
|
-
"target_node_id": "fa11b84b-1d76-4adc-ab28-cbbaa933c267",
|
|
764
|
-
"target_handle_id": "e1a6da28-02c5-40d7-8ac5-9fb07e2e3e1d",
|
|
765
|
-
"type": "DEFAULT",
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
"id": "af083f7d-226c-4341-bb6f-756f00846b42",
|
|
769
|
-
"source_node_id": "120dc445-3472-4e6e-bd2d-42991ac3a1b1",
|
|
770
|
-
"source_handle_id": "56f7ffff-3898-4eb2-b72a-935d034819e1",
|
|
771
|
-
"target_node_id": "e3d29229-f746-4125-819e-f847acbed307",
|
|
772
|
-
"target_handle_id": "c5dd9bf5-9e18-4dbc-8c20-2c0baf969ebe",
|
|
773
|
-
"type": "DEFAULT",
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
"id": "f08a49f8-8bfd-4c05-8f28-dfa536654af8",
|
|
777
|
-
"source_node_id": "b7663f0c-f86d-4924-b551-36279259bf65",
|
|
778
|
-
"source_handle_id": "092b3989-c0a5-4b9e-beba-dfdc3f916284",
|
|
779
|
-
"target_node_id": "47f0931c-41f6-4b84-bf39-0c486941f599",
|
|
780
|
-
"target_handle_id": "a4d57adc-58c1-40c6-810b-ee5fd923bfc5",
|
|
781
|
-
"type": "DEFAULT",
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"id": "8a554637-e382-4a66-9b77-4eadce45a25a",
|
|
785
|
-
"source_node_id": "c5dc093d-379e-4655-84ec-5c0f4527f39d",
|
|
786
|
-
"source_handle_id": "11c9eb73-6112-408b-b94f-46b3be1b9326",
|
|
787
|
-
"target_node_id": "9c22ee47-01da-4e4e-863d-b4a6874bed66",
|
|
788
|
-
"target_handle_id": "f02a8971-e9a4-4716-bfb4-d08f5614b5d8",
|
|
789
|
-
"type": "DEFAULT",
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
"id": "c45e03b4-dba6-4620-bc02-3847ad90086b",
|
|
793
|
-
"source_node_id": "0d91d9f5-6b10-44d2-90c7-4a4636bb4735",
|
|
794
|
-
"source_handle_id": "798215e2-0988-4bd2-9dbe-3b4a75a27d81",
|
|
795
|
-
"target_node_id": "6efa7b45-0580-406d-85aa-439117ba8021",
|
|
796
|
-
"target_handle_id": "2283cd2c-b077-4b5d-a96f-aa2cd6023eda",
|
|
797
|
-
"type": "DEFAULT",
|
|
798
|
-
},
|
|
799
|
-
],
|
|
800
|
-
serialized_edges,
|
|
801
|
-
ignore_order=True,
|
|
802
|
-
)
|
|
803
|
-
|
|
804
|
-
# AND the display data should be what we expect
|
|
805
|
-
display_data = workflow_raw_data["display_data"]
|
|
806
|
-
assert display_data == {
|
|
807
|
-
"viewport": {
|
|
808
|
-
"x": 0.0,
|
|
809
|
-
"y": 0.0,
|
|
810
|
-
"zoom": 1.0,
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
506
|
# AND the definition should be what we expect
|
|
815
507
|
definition = workflow_raw_data["definition"]
|
|
816
508
|
assert definition == {
|
|
@@ -877,7 +569,9 @@ def test_conditional_node_serialize_all_operators_with_lhs_and_rhs(descriptor, o
|
|
|
877
569
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
878
570
|
|
|
879
571
|
# AND the conditional node should be what we expect
|
|
880
|
-
conditional_node =
|
|
572
|
+
conditional_node = next(
|
|
573
|
+
n for n in workflow_raw_data["nodes"] if (n.get("base") or {}).get("name") == "ConditionalNode"
|
|
574
|
+
)
|
|
881
575
|
assert not DeepDiff(
|
|
882
576
|
{
|
|
883
577
|
"id": "9d1b29dc-b795-415f-8a56-bea2c77bbf1a",
|
|
@@ -1005,7 +699,9 @@ def test_conditional_node_serialize_all_operators_with_expression(descriptor, op
|
|
|
1005
699
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
1006
700
|
|
|
1007
701
|
# AND the conditional node should be what we expect
|
|
1008
|
-
conditional_node =
|
|
702
|
+
conditional_node = next(
|
|
703
|
+
n for n in workflow_raw_data["nodes"] if (n.get("base") or {}).get("name") == "ConditionalNode"
|
|
704
|
+
)
|
|
1009
705
|
assert not DeepDiff(
|
|
1010
706
|
{
|
|
1011
707
|
"id": "9d1b29dc-b795-415f-8a56-bea2c77bbf1a",
|
|
@@ -1119,7 +815,9 @@ def test_conditional_node_serialize_all_operators_with_value_and_start_and_end(d
|
|
|
1119
815
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
1120
816
|
|
|
1121
817
|
# AND the conditional node should be what we expect
|
|
1122
|
-
conditional_node =
|
|
818
|
+
conditional_node = next(
|
|
819
|
+
n for n in workflow_raw_data["nodes"] if (n.get("base") or {}).get("name") == "ConditionalNode"
|
|
820
|
+
)
|
|
1123
821
|
assert not DeepDiff(
|
|
1124
822
|
{
|
|
1125
823
|
"id": "9d1b29dc-b795-415f-8a56-bea2c77bbf1a",
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py
CHANGED
|
@@ -31,6 +31,7 @@ def test_serialize_workflow():
|
|
|
31
31
|
"default": {"type": "STRING", "value": "hello"},
|
|
32
32
|
"required": False,
|
|
33
33
|
"extensions": {"color": None},
|
|
34
|
+
"schema": {"type": "string"},
|
|
34
35
|
},
|
|
35
36
|
],
|
|
36
37
|
input_variables,
|
|
@@ -43,7 +44,7 @@ def test_serialize_workflow():
|
|
|
43
44
|
assert not DeepDiff(
|
|
44
45
|
[
|
|
45
46
|
{
|
|
46
|
-
"id": "
|
|
47
|
+
"id": "829a8335-d425-414e-9c0b-62e820156df5",
|
|
47
48
|
"key": "example",
|
|
48
49
|
"type": "NUMBER",
|
|
49
50
|
"default": {"type": "NUMBER", "value": 5.0},
|
|
@@ -77,8 +78,6 @@ def test_serialize_workflow():
|
|
|
77
78
|
|
|
78
79
|
# AND its raw data should be what we expect
|
|
79
80
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
80
|
-
assert len(workflow_raw_data["edges"]) == 3
|
|
81
|
-
assert len(workflow_raw_data["nodes"]) == 4
|
|
82
81
|
|
|
83
82
|
# AND each node should be serialized correctly
|
|
84
83
|
entrypoint_node = workflow_raw_data["nodes"][0]
|
|
@@ -97,125 +96,6 @@ def test_serialize_workflow():
|
|
|
97
96
|
},
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
final_output_node_state = next(
|
|
101
|
-
n for n in workflow_raw_data["nodes"] if n["type"] == "TERMINAL" and n["data"]["name"] == "example_state"
|
|
102
|
-
)
|
|
103
|
-
final_output_node_input = next(
|
|
104
|
-
n for n in workflow_raw_data["nodes"] if n["type"] == "TERMINAL" and n["data"]["name"] == "example_input"
|
|
105
|
-
)
|
|
106
|
-
assert not DeepDiff(
|
|
107
|
-
{
|
|
108
|
-
"id": "27fdaa45-b8ce-464d-be50-cf71cc56bc10",
|
|
109
|
-
"type": "TERMINAL",
|
|
110
|
-
"data": {
|
|
111
|
-
"label": "Final Output",
|
|
112
|
-
"name": "example_state",
|
|
113
|
-
"target_handle_id": "e7a09eb2-c9fb-4d57-b436-9cd9384c8960",
|
|
114
|
-
"output_id": "e3ae0fe3-7590-4eac-b808-45901d82f2ba",
|
|
115
|
-
"output_type": "NUMBER",
|
|
116
|
-
"node_input_id": "8de6a408-cf76-4d04-9845-f75211b611be",
|
|
117
|
-
},
|
|
118
|
-
"inputs": [
|
|
119
|
-
{
|
|
120
|
-
"id": "8de6a408-cf76-4d04-9845-f75211b611be",
|
|
121
|
-
"key": "node_input",
|
|
122
|
-
"value": {
|
|
123
|
-
"rules": [
|
|
124
|
-
{
|
|
125
|
-
"type": "NODE_OUTPUT",
|
|
126
|
-
"data": {
|
|
127
|
-
"node_id": "f9e52c4e-68b2-4ac0-b801-433fecc52d6b",
|
|
128
|
-
"output_id": "ab045894-45ce-40fc-b770-0d9f0146090f",
|
|
129
|
-
},
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"combinator": "OR",
|
|
133
|
-
},
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
"display_data": {"position": {"x": 400.0, "y": -175.0}},
|
|
137
|
-
"base": {
|
|
138
|
-
"name": "FinalOutputNode",
|
|
139
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
140
|
-
},
|
|
141
|
-
"definition": None,
|
|
142
|
-
},
|
|
143
|
-
final_output_node_state,
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
assert not DeepDiff(
|
|
147
|
-
{
|
|
148
|
-
"id": "ca8bb585-c9a8-4bf7-bf9d-534b600fe23b",
|
|
149
|
-
"type": "TERMINAL",
|
|
150
|
-
"data": {
|
|
151
|
-
"label": "Final Output",
|
|
152
|
-
"name": "example_input",
|
|
153
|
-
"target_handle_id": "8a4a7efd-0e18-43ed-ba32-803e22e3ba0a",
|
|
154
|
-
"output_id": "6e7eeaa5-9559-4ae3-8606-e52ead5805a5",
|
|
155
|
-
"output_type": "STRING",
|
|
156
|
-
"node_input_id": "796b4a0b-da10-403a-acc3-8ebd3ebd3667",
|
|
157
|
-
},
|
|
158
|
-
"inputs": [
|
|
159
|
-
{
|
|
160
|
-
"id": "796b4a0b-da10-403a-acc3-8ebd3ebd3667",
|
|
161
|
-
"key": "node_input",
|
|
162
|
-
"value": {
|
|
163
|
-
"rules": [
|
|
164
|
-
{
|
|
165
|
-
"type": "NODE_OUTPUT",
|
|
166
|
-
"data": {
|
|
167
|
-
"node_id": "f9e52c4e-68b2-4ac0-b801-433fecc52d6b",
|
|
168
|
-
"output_id": "3fdce851-f1ac-4d53-bb1b-74e1899edaff",
|
|
169
|
-
},
|
|
170
|
-
}
|
|
171
|
-
],
|
|
172
|
-
"combinator": "OR",
|
|
173
|
-
},
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"display_data": {"position": {"x": 400.0, "y": 75.0}},
|
|
177
|
-
"base": {
|
|
178
|
-
"name": "FinalOutputNode",
|
|
179
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
180
|
-
},
|
|
181
|
-
"definition": None,
|
|
182
|
-
},
|
|
183
|
-
final_output_node_input,
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
# AND each edge should be serialized correctly
|
|
187
|
-
serialized_edges = workflow_raw_data["edges"]
|
|
188
|
-
assert not DeepDiff(
|
|
189
|
-
[
|
|
190
|
-
{
|
|
191
|
-
"id": "9cd49d57-d99f-4648-813d-fe84f29a0e3b",
|
|
192
|
-
"source_node_id": "32684932-7c7c-4b1c-aed2-553de29bf3f7",
|
|
193
|
-
"source_handle_id": "e4136ee4-a51a-4ca3-9a3a-aa96f5de2347",
|
|
194
|
-
"target_node_id": "f9e52c4e-68b2-4ac0-b801-433fecc52d6b",
|
|
195
|
-
"target_handle_id": "b257ad5b-03f1-446e-be6a-b0bed6923fa9",
|
|
196
|
-
"type": "DEFAULT",
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"id": "b0a57a5f-a1e4-4dc9-85dd-946f08304738",
|
|
200
|
-
"source_node_id": "f9e52c4e-68b2-4ac0-b801-433fecc52d6b",
|
|
201
|
-
"source_handle_id": "e1282a29-dad1-4db4-ac4d-4c4a08b15d02",
|
|
202
|
-
"target_node_id": "ca8bb585-c9a8-4bf7-bf9d-534b600fe23b",
|
|
203
|
-
"target_handle_id": "8a4a7efd-0e18-43ed-ba32-803e22e3ba0a",
|
|
204
|
-
"type": "DEFAULT",
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"id": "e4366583-94a5-40b0-9b6f-1e965695b1fe",
|
|
208
|
-
"source_node_id": "f9e52c4e-68b2-4ac0-b801-433fecc52d6b",
|
|
209
|
-
"source_handle_id": "e1282a29-dad1-4db4-ac4d-4c4a08b15d02",
|
|
210
|
-
"target_node_id": "27fdaa45-b8ce-464d-be50-cf71cc56bc10",
|
|
211
|
-
"target_handle_id": "e7a09eb2-c9fb-4d57-b436-9cd9384c8960",
|
|
212
|
-
"type": "DEFAULT",
|
|
213
|
-
},
|
|
214
|
-
],
|
|
215
|
-
serialized_edges,
|
|
216
|
-
ignore_order=True,
|
|
217
|
-
)
|
|
218
|
-
|
|
219
99
|
# AND the display data should be what we expect
|
|
220
100
|
display_data = workflow_raw_data["display_data"]
|
|
221
101
|
assert display_data == {
|