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
|
@@ -50,6 +50,7 @@ def test_serialize_workflow(vellum_client):
|
|
|
50
50
|
"required": True,
|
|
51
51
|
"default": None,
|
|
52
52
|
"extensions": {"color": None},
|
|
53
|
+
"schema": {"type": "string"},
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
"id": "aa3ca842-250c-4a3f-853f-23928c28d0f8",
|
|
@@ -58,6 +59,7 @@ def test_serialize_workflow(vellum_client):
|
|
|
58
59
|
"required": True,
|
|
59
60
|
"default": None,
|
|
60
61
|
"extensions": {"color": None},
|
|
62
|
+
"schema": {"type": "string"},
|
|
61
63
|
},
|
|
62
64
|
],
|
|
63
65
|
input_variables,
|
|
@@ -77,8 +79,6 @@ def test_serialize_workflow(vellum_client):
|
|
|
77
79
|
|
|
78
80
|
# AND its raw data should be what we expect
|
|
79
81
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
80
|
-
assert len(workflow_raw_data["edges"]) == 2
|
|
81
|
-
assert len(workflow_raw_data["nodes"]) == 3
|
|
82
82
|
|
|
83
83
|
# AND each node should be serialized correctly
|
|
84
84
|
entrypoint_node = workflow_raw_data["nodes"][0]
|
|
@@ -162,77 +162,6 @@ def test_serialize_workflow(vellum_client):
|
|
|
162
162
|
],
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
final_output_node = workflow_raw_data["nodes"][2]
|
|
166
|
-
assert final_output_node == {
|
|
167
|
-
"id": "64ff72c7-8ffc-4e1f-b7a7-e7cd0697f576",
|
|
168
|
-
"type": "TERMINAL",
|
|
169
|
-
"base": {
|
|
170
|
-
"module": [
|
|
171
|
-
"vellum",
|
|
172
|
-
"workflows",
|
|
173
|
-
"nodes",
|
|
174
|
-
"displayable",
|
|
175
|
-
"final_output_node",
|
|
176
|
-
"node",
|
|
177
|
-
],
|
|
178
|
-
"name": "FinalOutputNode",
|
|
179
|
-
},
|
|
180
|
-
"definition": None,
|
|
181
|
-
"inputs": [
|
|
182
|
-
{
|
|
183
|
-
"id": "78aeb65b-3491-4d2a-8c47-401d4cb3d560",
|
|
184
|
-
"key": "node_input",
|
|
185
|
-
"value": {
|
|
186
|
-
"combinator": "OR",
|
|
187
|
-
"rules": [
|
|
188
|
-
{
|
|
189
|
-
"data": {
|
|
190
|
-
"node_id": "a114abf2-cb76-49b5-8001-6c8df56d39ff",
|
|
191
|
-
"output_id": "f07b3521-4ba1-4a3c-8629-3a269406f519",
|
|
192
|
-
},
|
|
193
|
-
"type": "NODE_OUTPUT",
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
},
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"data": {
|
|
200
|
-
"label": "Final Output",
|
|
201
|
-
"name": "text",
|
|
202
|
-
"node_input_id": "78aeb65b-3491-4d2a-8c47-401d4cb3d560",
|
|
203
|
-
"output_id": "a609ab19-db1b-4cd0-bdb0-aee5ed31dc28",
|
|
204
|
-
"output_type": "STRING",
|
|
205
|
-
"target_handle_id": "dced939a-9122-4290-8482-7daa9525dad6",
|
|
206
|
-
},
|
|
207
|
-
"display_data": {
|
|
208
|
-
"position": {
|
|
209
|
-
"x": 400.0,
|
|
210
|
-
"y": -50.0,
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
# AND each edge should be serialized correctly
|
|
216
|
-
serialized_edges = workflow_raw_data["edges"]
|
|
217
|
-
assert serialized_edges == [
|
|
218
|
-
{
|
|
219
|
-
"id": "89a6042d-2bfd-4512-9f75-bf11db3c493c",
|
|
220
|
-
"source_handle_id": "7065a943-1cab-4afd-9690-e678c5b74a2f",
|
|
221
|
-
"source_node_id": "d680afbd-de64-4cf6-aa50-912686c48c64",
|
|
222
|
-
"target_handle_id": "1407e51f-cb29-4a86-beeb-cc1870dc5525",
|
|
223
|
-
"target_node_id": "a114abf2-cb76-49b5-8001-6c8df56d39ff",
|
|
224
|
-
"type": "DEFAULT",
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"id": "c2cbf6ef-8582-45c8-a643-fc6ae8fe482f",
|
|
228
|
-
"source_handle_id": "6699f465-dc6c-4fa7-8038-7ff49419b953",
|
|
229
|
-
"source_node_id": "a114abf2-cb76-49b5-8001-6c8df56d39ff",
|
|
230
|
-
"target_handle_id": "dced939a-9122-4290-8482-7daa9525dad6",
|
|
231
|
-
"target_node_id": "64ff72c7-8ffc-4e1f-b7a7-e7cd0697f576",
|
|
232
|
-
"type": "DEFAULT",
|
|
233
|
-
},
|
|
234
|
-
]
|
|
235
|
-
|
|
236
165
|
# AND the display data should be what we expect
|
|
237
166
|
display_data = workflow_raw_data["display_data"]
|
|
238
167
|
assert display_data == {
|
|
@@ -294,6 +223,7 @@ def test_serialize_workflow_with_prompt_and_templating(vellum_client):
|
|
|
294
223
|
"default": None,
|
|
295
224
|
"required": True,
|
|
296
225
|
"extensions": {"color": None},
|
|
226
|
+
"schema": {"type": "string"},
|
|
297
227
|
},
|
|
298
228
|
{
|
|
299
229
|
"id": "066124c4-42bd-4764-aa75-6f230dbbed4a",
|
|
@@ -302,6 +232,7 @@ def test_serialize_workflow_with_prompt_and_templating(vellum_client):
|
|
|
302
232
|
"default": None,
|
|
303
233
|
"required": True,
|
|
304
234
|
"extensions": {"color": None},
|
|
235
|
+
"schema": {"type": "string"},
|
|
305
236
|
},
|
|
306
237
|
],
|
|
307
238
|
input_variables,
|
|
@@ -315,8 +246,6 @@ def test_serialize_workflow_with_prompt_and_templating(vellum_client):
|
|
|
315
246
|
|
|
316
247
|
# AND its raw data should be what we expect
|
|
317
248
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
318
|
-
assert len(workflow_raw_data["edges"]) == 3
|
|
319
|
-
assert len(workflow_raw_data["nodes"]) == 4
|
|
320
249
|
|
|
321
250
|
# AND each node should be serialized correctly
|
|
322
251
|
entrypoint_node = workflow_raw_data["nodes"][0]
|
|
@@ -494,73 +423,6 @@ def test_serialize_workflow_with_prompt_and_templating(vellum_client):
|
|
|
494
423
|
"ports": [{"id": "bfe059fb-987f-47dd-bfbb-c71fdf1e4971", "name": "default", "type": "DEFAULT"}],
|
|
495
424
|
}
|
|
496
425
|
|
|
497
|
-
final_output_node = workflow_raw_data["nodes"][3]
|
|
498
|
-
assert final_output_node == {
|
|
499
|
-
"id": "53de824d-a41d-4294-b511-c969932b05af",
|
|
500
|
-
"type": "TERMINAL",
|
|
501
|
-
"data": {
|
|
502
|
-
"label": "Final Output",
|
|
503
|
-
"name": "text",
|
|
504
|
-
"target_handle_id": "fee3d395-38c3-485f-ab61-1a0fdf71c4ce",
|
|
505
|
-
"output_id": "a7e4b449-5879-4d0c-8f00-d5d4985eb65c",
|
|
506
|
-
"output_type": "STRING",
|
|
507
|
-
"node_input_id": "cf380f81-c5ee-4bc9-8e26-ecf1307733a9",
|
|
508
|
-
},
|
|
509
|
-
"inputs": [
|
|
510
|
-
{
|
|
511
|
-
"id": "cf380f81-c5ee-4bc9-8e26-ecf1307733a9",
|
|
512
|
-
"key": "node_input",
|
|
513
|
-
"value": {
|
|
514
|
-
"rules": [
|
|
515
|
-
{
|
|
516
|
-
"type": "NODE_OUTPUT",
|
|
517
|
-
"data": {
|
|
518
|
-
"node_id": "ac2de275-729f-4fba-9701-97beba80df34",
|
|
519
|
-
"output_id": "c8ad13db-d601-4c24-bef7-0196baa8079c",
|
|
520
|
-
},
|
|
521
|
-
}
|
|
522
|
-
],
|
|
523
|
-
"combinator": "OR",
|
|
524
|
-
},
|
|
525
|
-
}
|
|
526
|
-
],
|
|
527
|
-
"display_data": {"position": {"x": 600.0, "y": -50.0}},
|
|
528
|
-
"base": {
|
|
529
|
-
"name": "FinalOutputNode",
|
|
530
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
531
|
-
},
|
|
532
|
-
"definition": None,
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
# AND each edge should be serialized correctly
|
|
536
|
-
serialized_edges = workflow_raw_data["edges"]
|
|
537
|
-
assert serialized_edges == [
|
|
538
|
-
{
|
|
539
|
-
"id": "33e0220a-969a-4d38-86ac-0fe596ab2d88",
|
|
540
|
-
"source_node_id": "32c7f398-277c-456b-9279-aa1f867fb637",
|
|
541
|
-
"source_handle_id": "cc0f4028-1039-4063-971d-7dacbb01b379",
|
|
542
|
-
"target_node_id": "0d1460e4-f207-4a69-bcea-7a3c7b325c02",
|
|
543
|
-
"target_handle_id": "f8017ad7-14f2-4e6f-8456-a081db5ed7cd",
|
|
544
|
-
"type": "DEFAULT",
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"id": "8eb009df-4daf-4ff6-8dc2-ff71a2829e2b",
|
|
548
|
-
"source_node_id": "0d1460e4-f207-4a69-bcea-7a3c7b325c02",
|
|
549
|
-
"source_handle_id": "7e29137d-af96-402c-8108-9a00e087d18e",
|
|
550
|
-
"target_node_id": "ac2de275-729f-4fba-9701-97beba80df34",
|
|
551
|
-
"target_handle_id": "fbd5aa14-b615-42c9-a85a-23eb1a6b5436",
|
|
552
|
-
"type": "DEFAULT",
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"id": "1f720900-e5e1-49b7-9910-6ede79f6afd2",
|
|
556
|
-
"source_node_id": "ac2de275-729f-4fba-9701-97beba80df34",
|
|
557
|
-
"source_handle_id": "bfe059fb-987f-47dd-bfbb-c71fdf1e4971",
|
|
558
|
-
"target_node_id": "53de824d-a41d-4294-b511-c969932b05af",
|
|
559
|
-
"target_handle_id": "fee3d395-38c3-485f-ab61-1a0fdf71c4ce",
|
|
560
|
-
"type": "DEFAULT",
|
|
561
|
-
},
|
|
562
|
-
]
|
|
563
|
-
|
|
564
426
|
# AND the display data should be what we expect
|
|
565
427
|
display_data = workflow_raw_data["display_data"]
|
|
566
428
|
assert display_data == {
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py
CHANGED
|
@@ -30,6 +30,7 @@ def test_serialize_workflow():
|
|
|
30
30
|
"default": None,
|
|
31
31
|
"required": True,
|
|
32
32
|
"extensions": {"color": None},
|
|
33
|
+
"schema": {"type": "string"},
|
|
33
34
|
}
|
|
34
35
|
]
|
|
35
36
|
|
|
@@ -40,8 +41,6 @@ def test_serialize_workflow():
|
|
|
40
41
|
|
|
41
42
|
# AND its raw data is what we expect
|
|
42
43
|
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
43
|
-
assert len(workflow_raw_data["nodes"]) == 3
|
|
44
|
-
assert len(workflow_raw_data["edges"]) == 2
|
|
45
44
|
|
|
46
45
|
# AND each node should be serialized correctly
|
|
47
46
|
entrypoint_node = workflow_raw_data["nodes"][0]
|
|
@@ -245,65 +244,6 @@ def test_serialize_workflow():
|
|
|
245
244
|
"ports": [{"id": "928c79f2-bc07-43ee-9420-380a3bd36fb8", "name": "default", "type": "DEFAULT"}],
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
final_output_node = workflow_raw_data["nodes"][2]
|
|
249
|
-
assert final_output_node == {
|
|
250
|
-
"id": "4e466510-6756-403f-a182-56e5a2b85d94",
|
|
251
|
-
"type": "TERMINAL",
|
|
252
|
-
"data": {
|
|
253
|
-
"label": "Final Output",
|
|
254
|
-
"name": "text",
|
|
255
|
-
"target_handle_id": "cd8c736f-1b77-493d-b857-d8feb5c03b15",
|
|
256
|
-
"output_id": "27424f7d-9767-4059-bdcf-c2be8b798fd7",
|
|
257
|
-
"output_type": "STRING",
|
|
258
|
-
"node_input_id": "39c7f674-a794-4525-8a04-f22a40ed0914",
|
|
259
|
-
},
|
|
260
|
-
"inputs": [
|
|
261
|
-
{
|
|
262
|
-
"id": "39c7f674-a794-4525-8a04-f22a40ed0914",
|
|
263
|
-
"key": "node_input",
|
|
264
|
-
"value": {
|
|
265
|
-
"rules": [
|
|
266
|
-
{
|
|
267
|
-
"type": "NODE_OUTPUT",
|
|
268
|
-
"data": {
|
|
269
|
-
"node_id": "89c8bee0-8015-4d73-9112-e436ab086567",
|
|
270
|
-
"output_id": "9bab7f1b-3a4b-46bf-8b30-e3016ac38f51",
|
|
271
|
-
},
|
|
272
|
-
}
|
|
273
|
-
],
|
|
274
|
-
"combinator": "OR",
|
|
275
|
-
},
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"display_data": {"position": {"x": 400.0, "y": -50.0}},
|
|
279
|
-
"base": {
|
|
280
|
-
"name": "FinalOutputNode",
|
|
281
|
-
"module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
|
|
282
|
-
},
|
|
283
|
-
"definition": None,
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
# AND each edge should be serialized correctly
|
|
287
|
-
serialized_edges = workflow_raw_data["edges"]
|
|
288
|
-
assert serialized_edges == [
|
|
289
|
-
{
|
|
290
|
-
"id": "16500e66-1e19-4ee3-a197-baf9c2926ae4",
|
|
291
|
-
"source_node_id": "06671b25-5c6b-4675-8c74-6c396a608728",
|
|
292
|
-
"source_handle_id": "df80b4aa-2ba1-49a2-8375-fb1f78eee31f",
|
|
293
|
-
"target_node_id": "89c8bee0-8015-4d73-9112-e436ab086567",
|
|
294
|
-
"target_handle_id": "85db938d-9a85-4f08-8bbf-b795db2c40d5",
|
|
295
|
-
"type": "DEFAULT",
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"id": "cb918deb-f546-47b5-8b6b-db0d22a29fd1",
|
|
299
|
-
"source_node_id": "89c8bee0-8015-4d73-9112-e436ab086567",
|
|
300
|
-
"source_handle_id": "928c79f2-bc07-43ee-9420-380a3bd36fb8",
|
|
301
|
-
"target_node_id": "4e466510-6756-403f-a182-56e5a2b85d94",
|
|
302
|
-
"target_handle_id": "cd8c736f-1b77-493d-b857-d8feb5c03b15",
|
|
303
|
-
"type": "DEFAULT",
|
|
304
|
-
},
|
|
305
|
-
]
|
|
306
|
-
|
|
307
247
|
# AND the display data is what we expect
|
|
308
248
|
display_data = workflow_raw_data["display_data"]
|
|
309
249
|
assert display_data == {"viewport": {"x": 0.0, "y": 0.0, "zoom": 1.0}}
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_set_state_node_serialization.py
CHANGED
|
@@ -22,7 +22,7 @@ def test_serialize_workflow():
|
|
|
22
22
|
state_variables = serialized_workflow["state_variables"]
|
|
23
23
|
assert state_variables == [
|
|
24
24
|
{
|
|
25
|
-
"id": "
|
|
25
|
+
"id": "948a902d-248d-4b00-8bf4-cdd202302f20",
|
|
26
26
|
"key": "chat_history",
|
|
27
27
|
"type": "CHAT_HISTORY",
|
|
28
28
|
"default": {"type": "CHAT_HISTORY", "value": []},
|
|
@@ -30,7 +30,7 @@ def test_serialize_workflow():
|
|
|
30
30
|
"extensions": {"color": None},
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
"id": "
|
|
33
|
+
"id": "396a06f5-21da-4769-831a-d4fd613029ae",
|
|
34
34
|
"key": "counter",
|
|
35
35
|
"type": "NUMBER",
|
|
36
36
|
"default": {"type": "NUMBER", "value": 0.0},
|
|
@@ -62,7 +62,7 @@ def test_serialize_workflow():
|
|
|
62
62
|
"key": "chat_history",
|
|
63
63
|
"value": {
|
|
64
64
|
"type": "BINARY_EXPRESSION",
|
|
65
|
-
"lhs": {"type": "WORKFLOW_STATE", "state_variable_id": "
|
|
65
|
+
"lhs": {"type": "WORKFLOW_STATE", "state_variable_id": "948a902d-248d-4b00-8bf4-cdd202302f20"},
|
|
66
66
|
"operator": "concat",
|
|
67
67
|
"rhs": {
|
|
68
68
|
"type": "NODE_OUTPUT",
|
|
@@ -76,7 +76,7 @@ def test_serialize_workflow():
|
|
|
76
76
|
"key": "counter",
|
|
77
77
|
"value": {
|
|
78
78
|
"type": "BINARY_EXPRESSION",
|
|
79
|
-
"lhs": {"type": "WORKFLOW_STATE", "state_variable_id": "
|
|
79
|
+
"lhs": {"type": "WORKFLOW_STATE", "state_variable_id": "396a06f5-21da-4769-831a-d4fd613029ae"},
|
|
80
80
|
"operator": "+",
|
|
81
81
|
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "NUMBER", "value": 1.0}},
|
|
82
82
|
},
|