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
|
@@ -41,273 +41,144 @@ def test_serialize_workflow():
|
|
|
41
41
|
function_attributes = next(
|
|
42
42
|
attribute for attribute in tool_calling_node["attributes"] if attribute["name"] == "functions"
|
|
43
43
|
)
|
|
44
|
-
assert function_attributes ==
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
assert function_attributes["id"] == "102d8447-5232-4e96-8192-9b1ca0f02650"
|
|
45
|
+
assert function_attributes["name"] == "functions"
|
|
46
|
+
assert function_attributes["value"]["type"] == "CONSTANT_VALUE"
|
|
47
|
+
assert function_attributes["value"]["value"]["type"] == "JSON"
|
|
48
|
+
inline_workflow_tool = function_attributes["value"]["value"]["value"][0]
|
|
49
|
+
assert inline_workflow_tool["type"] == "INLINE_WORKFLOW"
|
|
50
|
+
assert inline_workflow_tool["name"] == "BasicInlineSubworkflowWorkflow"
|
|
51
|
+
assert (
|
|
52
|
+
inline_workflow_tool["description"] == "\n A workflow that gets the weather for a given city and date.\n "
|
|
53
|
+
)
|
|
54
|
+
assert inline_workflow_tool["exec_config"]["input_variables"] == [
|
|
55
|
+
{
|
|
56
|
+
"id": "fa73da37-34c3-47a9-be58-69cc6cdbfca5",
|
|
57
|
+
"key": "city",
|
|
58
|
+
"type": "STRING",
|
|
59
|
+
"default": None,
|
|
60
|
+
"required": True,
|
|
61
|
+
"extensions": {"color": None},
|
|
62
|
+
"schema": {"type": "string"},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "aba1e6e0-dfa7-4c15-a4e6-aec6feebfaca",
|
|
66
|
+
"key": "date",
|
|
67
|
+
"type": "STRING",
|
|
68
|
+
"default": None,
|
|
69
|
+
"required": True,
|
|
70
|
+
"extensions": {"color": None},
|
|
71
|
+
"schema": {"type": "string"},
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
assert inline_workflow_tool["exec_config"]["output_variables"] == [
|
|
75
|
+
{
|
|
76
|
+
"id": "99afb757-2782-465d-ab55-80ccf50552b9",
|
|
77
|
+
"key": "temperature",
|
|
78
|
+
"type": "NUMBER",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "7444a019-081a-4e10-a528-3249299159f7",
|
|
82
|
+
"key": "reasoning",
|
|
83
|
+
"type": "STRING",
|
|
84
|
+
},
|
|
85
|
+
]
|
|
86
|
+
assert inline_workflow_tool["exec_config"]["state_variables"] == []
|
|
87
|
+
inline_workflow_data = inline_workflow_tool["exec_config"]["workflow_raw_data"]
|
|
88
|
+
assert inline_workflow_data["display_data"] == {"viewport": {"x": 0.0, "y": 0.0, "zoom": 1.0}}
|
|
89
|
+
assert inline_workflow_data["definition"] == {
|
|
90
|
+
"name": "BasicInlineSubworkflowWorkflow",
|
|
91
|
+
"module": [
|
|
92
|
+
"tests",
|
|
93
|
+
"workflows",
|
|
94
|
+
"basic_tool_calling_node_inline_workflow",
|
|
95
|
+
"workflow",
|
|
96
|
+
],
|
|
97
|
+
}
|
|
98
|
+
assert inline_workflow_data["output_values"] == [
|
|
99
|
+
{
|
|
100
|
+
"output_variable_id": "99afb757-2782-465d-ab55-80ccf50552b9",
|
|
49
101
|
"value": {
|
|
50
|
-
"type": "
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"type": "INLINE_WORKFLOW",
|
|
54
|
-
"name": "BasicInlineSubworkflowWorkflow",
|
|
55
|
-
"description": "\n A workflow that gets the weather for a given city and date.\n ", # noqa: E501
|
|
56
|
-
"exec_config": {
|
|
57
|
-
"workflow_raw_data": {
|
|
58
|
-
"nodes": [
|
|
59
|
-
{
|
|
60
|
-
"id": "6358dcfe-b162-4e19-99ca-401d1ada9bdc",
|
|
61
|
-
"type": "ENTRYPOINT",
|
|
62
|
-
"inputs": [],
|
|
63
|
-
"data": {
|
|
64
|
-
"label": "Entrypoint Node",
|
|
65
|
-
"source_handle_id": "c344fdee-282b-40c9-8c97-6dd08830948c",
|
|
66
|
-
},
|
|
67
|
-
"display_data": {"position": {"x": 0.0, "y": -50.0}},
|
|
68
|
-
"base": None,
|
|
69
|
-
"definition": None,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
73
|
-
"label": "Start Node",
|
|
74
|
-
"type": "GENERIC",
|
|
75
|
-
"should_file_merge": True,
|
|
76
|
-
"display_data": {"position": {"x": 200.0, "y": -50.0}},
|
|
77
|
-
"base": {
|
|
78
|
-
"name": "BaseNode",
|
|
79
|
-
"module": ["vellum", "workflows", "nodes", "bases", "base"],
|
|
80
|
-
},
|
|
81
|
-
"definition": {
|
|
82
|
-
"name": "StartNode",
|
|
83
|
-
"module": [
|
|
84
|
-
"tests",
|
|
85
|
-
"workflows",
|
|
86
|
-
"basic_tool_calling_node_inline_workflow",
|
|
87
|
-
"workflow",
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
"trigger": {
|
|
91
|
-
"id": "8a7854a7-a595-44ce-8197-1f9cd2c78f10",
|
|
92
|
-
"merge_behavior": "AWAIT_ATTRIBUTES",
|
|
93
|
-
},
|
|
94
|
-
"ports": [
|
|
95
|
-
{
|
|
96
|
-
"id": "ee444f1a-b126-4480-8eb2-d22506640763",
|
|
97
|
-
"name": "default",
|
|
98
|
-
"type": "DEFAULT",
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"adornments": None,
|
|
102
|
-
"attributes": [
|
|
103
|
-
{
|
|
104
|
-
"id": "b5e2d415-4368-43c1-826c-ff6511bf6942",
|
|
105
|
-
"name": "city",
|
|
106
|
-
"value": {
|
|
107
|
-
"type": "WORKFLOW_INPUT",
|
|
108
|
-
"input_variable_id": "fa73da37-34c3-47a9-be58-69cc6cdbfca5",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"id": "5b3ed6d0-8cd6-41b6-ad55-d380b41f943b",
|
|
113
|
-
"name": "date",
|
|
114
|
-
"value": {
|
|
115
|
-
"type": "WORKFLOW_INPUT",
|
|
116
|
-
"input_variable_id": "aba1e6e0-dfa7-4c15-a4e6-aec6feebfaca",
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
"outputs": [
|
|
121
|
-
{
|
|
122
|
-
"id": "272eccdb-6903-4f32-8159-8bfb87c65c2e",
|
|
123
|
-
"name": "temperature",
|
|
124
|
-
"type": "NUMBER",
|
|
125
|
-
"value": None,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"id": "8616509d-fecb-4bbf-afdc-bd4c5de35ce7",
|
|
129
|
-
"name": "reasoning",
|
|
130
|
-
"type": "STRING",
|
|
131
|
-
"value": None,
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"id": "0779b232-82ab-4dbe-a340-6a85e6ab3368",
|
|
137
|
-
"type": "TERMINAL",
|
|
138
|
-
"data": {
|
|
139
|
-
"label": "Final Output",
|
|
140
|
-
"name": "temperature",
|
|
141
|
-
"target_handle_id": "9e077063-c394-4c7b-b0c6-e6686df67984",
|
|
142
|
-
"output_id": "99afb757-2782-465d-ab55-80ccf50552b9",
|
|
143
|
-
"output_type": "NUMBER",
|
|
144
|
-
"node_input_id": "7761c5e1-cc2e-43ab-bfd2-f66c3d47b3b9",
|
|
145
|
-
},
|
|
146
|
-
"inputs": [
|
|
147
|
-
{
|
|
148
|
-
"id": "7761c5e1-cc2e-43ab-bfd2-f66c3d47b3b9",
|
|
149
|
-
"key": "node_input",
|
|
150
|
-
"value": {
|
|
151
|
-
"rules": [
|
|
152
|
-
{
|
|
153
|
-
"type": "NODE_OUTPUT",
|
|
154
|
-
"data": {
|
|
155
|
-
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48", # noqa: E501
|
|
156
|
-
"output_id": "272eccdb-6903-4f32-8159-8bfb87c65c2e", # noqa: E501
|
|
157
|
-
},
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"combinator": "OR",
|
|
161
|
-
},
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
"display_data": {"position": {"x": 400.0, "y": -175.0}},
|
|
165
|
-
"base": {
|
|
166
|
-
"name": "FinalOutputNode",
|
|
167
|
-
"module": [
|
|
168
|
-
"vellum",
|
|
169
|
-
"workflows",
|
|
170
|
-
"nodes",
|
|
171
|
-
"displayable",
|
|
172
|
-
"final_output_node",
|
|
173
|
-
"node",
|
|
174
|
-
],
|
|
175
|
-
},
|
|
176
|
-
"definition": None,
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"id": "31b74695-3f1c-47cf-8be8-a4d86cc589e8",
|
|
180
|
-
"type": "TERMINAL",
|
|
181
|
-
"data": {
|
|
182
|
-
"label": "Final Output",
|
|
183
|
-
"name": "reasoning",
|
|
184
|
-
"target_handle_id": "8b525943-6c27-414b-a329-e29c0b217f72",
|
|
185
|
-
"output_id": "7444a019-081a-4e10-a528-3249299159f7",
|
|
186
|
-
"output_type": "STRING",
|
|
187
|
-
"node_input_id": "c1833b54-95b6-4365-8e57-51b09c8e2606",
|
|
188
|
-
},
|
|
189
|
-
"inputs": [
|
|
190
|
-
{
|
|
191
|
-
"id": "c1833b54-95b6-4365-8e57-51b09c8e2606",
|
|
192
|
-
"key": "node_input",
|
|
193
|
-
"value": {
|
|
194
|
-
"rules": [
|
|
195
|
-
{
|
|
196
|
-
"type": "NODE_OUTPUT",
|
|
197
|
-
"data": {
|
|
198
|
-
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48", # noqa: E501
|
|
199
|
-
"output_id": "8616509d-fecb-4bbf-afdc-bd4c5de35ce7", # noqa: E501
|
|
200
|
-
},
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
"combinator": "OR",
|
|
204
|
-
},
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"display_data": {"position": {"x": 400.0, "y": 75.0}},
|
|
208
|
-
"base": {
|
|
209
|
-
"name": "FinalOutputNode",
|
|
210
|
-
"module": [
|
|
211
|
-
"vellum",
|
|
212
|
-
"workflows",
|
|
213
|
-
"nodes",
|
|
214
|
-
"displayable",
|
|
215
|
-
"final_output_node",
|
|
216
|
-
"node",
|
|
217
|
-
],
|
|
218
|
-
},
|
|
219
|
-
"definition": None,
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
"edges": [
|
|
223
|
-
{
|
|
224
|
-
"id": "1c333b1c-a1b7-437e-9dfc-bdca8db2cff5",
|
|
225
|
-
"source_node_id": "6358dcfe-b162-4e19-99ca-401d1ada9bdc",
|
|
226
|
-
"source_handle_id": "c344fdee-282b-40c9-8c97-6dd08830948c",
|
|
227
|
-
"target_node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
228
|
-
"target_handle_id": "8a7854a7-a595-44ce-8197-1f9cd2c78f10",
|
|
229
|
-
"type": "DEFAULT",
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"id": "3c5d8990-48f5-42e1-893e-bc8308d2110a",
|
|
233
|
-
"source_node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
234
|
-
"source_handle_id": "ee444f1a-b126-4480-8eb2-d22506640763",
|
|
235
|
-
"target_node_id": "0779b232-82ab-4dbe-a340-6a85e6ab3368",
|
|
236
|
-
"target_handle_id": "9e077063-c394-4c7b-b0c6-e6686df67984",
|
|
237
|
-
"type": "DEFAULT",
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"id": "de0b8090-a26e-4e09-9173-9f7400a5be4c",
|
|
241
|
-
"source_node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
242
|
-
"source_handle_id": "ee444f1a-b126-4480-8eb2-d22506640763",
|
|
243
|
-
"target_node_id": "31b74695-3f1c-47cf-8be8-a4d86cc589e8",
|
|
244
|
-
"target_handle_id": "8b525943-6c27-414b-a329-e29c0b217f72",
|
|
245
|
-
"type": "DEFAULT",
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
|
-
"display_data": {"viewport": {"x": 0.0, "y": 0.0, "zoom": 1.0}},
|
|
249
|
-
"definition": {
|
|
250
|
-
"name": "BasicInlineSubworkflowWorkflow",
|
|
251
|
-
"module": [
|
|
252
|
-
"tests",
|
|
253
|
-
"workflows",
|
|
254
|
-
"basic_tool_calling_node_inline_workflow",
|
|
255
|
-
"workflow",
|
|
256
|
-
],
|
|
257
|
-
},
|
|
258
|
-
"output_values": [
|
|
259
|
-
{
|
|
260
|
-
"output_variable_id": "99afb757-2782-465d-ab55-80ccf50552b9",
|
|
261
|
-
"value": {
|
|
262
|
-
"type": "NODE_OUTPUT",
|
|
263
|
-
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
264
|
-
"node_output_id": "272eccdb-6903-4f32-8159-8bfb87c65c2e",
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"output_variable_id": "7444a019-081a-4e10-a528-3249299159f7",
|
|
269
|
-
"value": {
|
|
270
|
-
"type": "NODE_OUTPUT",
|
|
271
|
-
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
272
|
-
"node_output_id": "8616509d-fecb-4bbf-afdc-bd4c5de35ce7",
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
},
|
|
277
|
-
"input_variables": [
|
|
278
|
-
{
|
|
279
|
-
"id": "fa73da37-34c3-47a9-be58-69cc6cdbfca5",
|
|
280
|
-
"key": "city",
|
|
281
|
-
"type": "STRING",
|
|
282
|
-
"default": None,
|
|
283
|
-
"required": True,
|
|
284
|
-
"extensions": {"color": None},
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"id": "aba1e6e0-dfa7-4c15-a4e6-aec6feebfaca",
|
|
288
|
-
"key": "date",
|
|
289
|
-
"type": "STRING",
|
|
290
|
-
"default": None,
|
|
291
|
-
"required": True,
|
|
292
|
-
"extensions": {"color": None},
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
"state_variables": [],
|
|
296
|
-
"output_variables": [
|
|
297
|
-
{
|
|
298
|
-
"id": "99afb757-2782-465d-ab55-80ccf50552b9",
|
|
299
|
-
"key": "temperature",
|
|
300
|
-
"type": "NUMBER",
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"id": "7444a019-081a-4e10-a528-3249299159f7",
|
|
304
|
-
"key": "reasoning",
|
|
305
|
-
"type": "STRING",
|
|
306
|
-
},
|
|
307
|
-
],
|
|
308
|
-
},
|
|
309
|
-
}
|
|
310
|
-
],
|
|
102
|
+
"type": "NODE_OUTPUT",
|
|
103
|
+
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
104
|
+
"node_output_id": "272eccdb-6903-4f32-8159-8bfb87c65c2e",
|
|
311
105
|
},
|
|
312
106
|
},
|
|
107
|
+
{
|
|
108
|
+
"output_variable_id": "7444a019-081a-4e10-a528-3249299159f7",
|
|
109
|
+
"value": {
|
|
110
|
+
"type": "NODE_OUTPUT",
|
|
111
|
+
"node_id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
112
|
+
"node_output_id": "8616509d-fecb-4bbf-afdc-bd4c5de35ce7",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
]
|
|
116
|
+
inner_start_node = next(
|
|
117
|
+
node for node in inline_workflow_data["nodes"] if node["type"] == "GENERIC" and node["label"] == "Start Node"
|
|
118
|
+
)
|
|
119
|
+
assert inner_start_node == {
|
|
120
|
+
"id": "07a83d1a-7948-4a23-9f46-9a60382d3a48",
|
|
121
|
+
"label": "Start Node",
|
|
122
|
+
"type": "GENERIC",
|
|
123
|
+
"should_file_merge": True,
|
|
124
|
+
"display_data": {"position": {"x": 200.0, "y": -50.0}},
|
|
125
|
+
"base": {
|
|
126
|
+
"name": "BaseNode",
|
|
127
|
+
"module": ["vellum", "workflows", "nodes", "bases", "base"],
|
|
128
|
+
},
|
|
129
|
+
"definition": {
|
|
130
|
+
"name": "StartNode",
|
|
131
|
+
"module": [
|
|
132
|
+
"tests",
|
|
133
|
+
"workflows",
|
|
134
|
+
"basic_tool_calling_node_inline_workflow",
|
|
135
|
+
"workflow",
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
"trigger": {
|
|
139
|
+
"id": "8a7854a7-a595-44ce-8197-1f9cd2c78f10",
|
|
140
|
+
"merge_behavior": "AWAIT_ATTRIBUTES",
|
|
141
|
+
},
|
|
142
|
+
"ports": [
|
|
143
|
+
{
|
|
144
|
+
"id": "ee444f1a-b126-4480-8eb2-d22506640763",
|
|
145
|
+
"name": "default",
|
|
146
|
+
"type": "DEFAULT",
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"adornments": None,
|
|
150
|
+
"attributes": [
|
|
151
|
+
{
|
|
152
|
+
"id": "b5e2d415-4368-43c1-826c-ff6511bf6942",
|
|
153
|
+
"name": "city",
|
|
154
|
+
"value": {
|
|
155
|
+
"type": "WORKFLOW_INPUT",
|
|
156
|
+
"input_variable_id": "fa73da37-34c3-47a9-be58-69cc6cdbfca5",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "5b3ed6d0-8cd6-41b6-ad55-d380b41f943b",
|
|
161
|
+
"name": "date",
|
|
162
|
+
"value": {
|
|
163
|
+
"type": "WORKFLOW_INPUT",
|
|
164
|
+
"input_variable_id": "aba1e6e0-dfa7-4c15-a4e6-aec6feebfaca",
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
"outputs": [
|
|
169
|
+
{
|
|
170
|
+
"id": "272eccdb-6903-4f32-8159-8bfb87c65c2e",
|
|
171
|
+
"name": "temperature",
|
|
172
|
+
"type": "NUMBER",
|
|
173
|
+
"value": None,
|
|
174
|
+
"schema": {"type": "number"},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "8616509d-fecb-4bbf-afdc-bd4c5de35ce7",
|
|
178
|
+
"name": "reasoning",
|
|
179
|
+
"type": "STRING",
|
|
180
|
+
"value": None,
|
|
181
|
+
"schema": {"type": "string"},
|
|
182
|
+
},
|
|
183
|
+
],
|
|
313
184
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
|
|
2
|
+
|
|
3
|
+
from tests.workflows.basic_tool_calling_node_inline_workflow_tool_wrapper.workflow import (
|
|
4
|
+
BasicToolCallingNodeInlineWorkflowToolWrapperWorkflow,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_serialize_workflow__inline_workflow_with_tool_wrapper():
|
|
9
|
+
"""
|
|
10
|
+
Tests that an inline workflow with tool wrapper serializes correctly with definition containing inputs and examples.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
# GIVEN a workflow that uses an inline workflow with tool wrapper
|
|
14
|
+
workflow_class = BasicToolCallingNodeInlineWorkflowToolWrapperWorkflow
|
|
15
|
+
|
|
16
|
+
# WHEN we serialize it
|
|
17
|
+
workflow_display = get_workflow_display(workflow_class=workflow_class)
|
|
18
|
+
serialized_workflow: dict = workflow_display.serialize()
|
|
19
|
+
|
|
20
|
+
# THEN we should get a serialized representation of the Workflow
|
|
21
|
+
assert serialized_workflow.keys() == {
|
|
22
|
+
"workflow_raw_data",
|
|
23
|
+
"input_variables",
|
|
24
|
+
"state_variables",
|
|
25
|
+
"output_variables",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# AND its input variables should include both query and context
|
|
29
|
+
input_variables = serialized_workflow["input_variables"]
|
|
30
|
+
assert len(input_variables) == 2
|
|
31
|
+
input_keys = {var["key"] for var in input_variables}
|
|
32
|
+
assert input_keys == {"query", "context"}
|
|
33
|
+
|
|
34
|
+
# AND its output variables should be what we expect
|
|
35
|
+
output_variables = serialized_workflow["output_variables"]
|
|
36
|
+
assert len(output_variables) == 2
|
|
37
|
+
output_keys = {var["key"] for var in output_variables}
|
|
38
|
+
assert output_keys == {"text", "chat_history"}
|
|
39
|
+
|
|
40
|
+
# AND the inline workflow tool should have the definition attribute serialized
|
|
41
|
+
workflow_raw_data = serialized_workflow["workflow_raw_data"]
|
|
42
|
+
tool_calling_node = workflow_raw_data["nodes"][1]
|
|
43
|
+
function_attributes = next(
|
|
44
|
+
attribute for attribute in tool_calling_node["attributes"] if attribute["name"] == "functions"
|
|
45
|
+
)
|
|
46
|
+
assert function_attributes["value"]["type"] == "CONSTANT_VALUE"
|
|
47
|
+
assert function_attributes["value"]["value"]["type"] == "JSON"
|
|
48
|
+
inline_workflow_tool = function_attributes["value"]["value"]["value"][0]
|
|
49
|
+
|
|
50
|
+
# AND the inline workflow tool should have the correct type
|
|
51
|
+
assert inline_workflow_tool["type"] == "INLINE_WORKFLOW"
|
|
52
|
+
assert inline_workflow_tool["name"] == "BasicInlineSubworkflowWorkflow"
|
|
53
|
+
|
|
54
|
+
# AND the inline workflow tool should have a definition attribute (like code tool)
|
|
55
|
+
assert "definition" in inline_workflow_tool
|
|
56
|
+
definition = inline_workflow_tool["definition"]
|
|
57
|
+
|
|
58
|
+
# AND the definition should match the expected structure with inputs and examples
|
|
59
|
+
context_var = next(var for var in input_variables if var["key"] == "context")
|
|
60
|
+
context_input_variable_id = context_var["id"]
|
|
61
|
+
|
|
62
|
+
assert definition == {
|
|
63
|
+
"state": None,
|
|
64
|
+
"cache_config": None,
|
|
65
|
+
"name": "basic_inline_subworkflow_workflow",
|
|
66
|
+
"description": "\n A workflow that gets the weather for a given city and date with context.\n ",
|
|
67
|
+
"parameters": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"city": {"type": "string"},
|
|
71
|
+
"date": {"type": "string"},
|
|
72
|
+
},
|
|
73
|
+
"required": ["city", "date"],
|
|
74
|
+
"examples": [{"city": "San Francisco", "date": "2025-01-01"}],
|
|
75
|
+
},
|
|
76
|
+
"inputs": {
|
|
77
|
+
"context": {
|
|
78
|
+
"type": "WORKFLOW_INPUT",
|
|
79
|
+
"input_variable_id": context_input_variable_id,
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"forced": None,
|
|
83
|
+
"strict": None,
|
|
84
|
+
}
|
|
@@ -45,21 +45,60 @@ def test_serialize_workflow():
|
|
|
45
45
|
"id": "80ed138a-1127-4c77-ba27-a66a37c92717",
|
|
46
46
|
"name": "functions",
|
|
47
47
|
"value": {
|
|
48
|
-
"type": "
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
"type": "ARRAY_REFERENCE",
|
|
49
|
+
"items": [
|
|
50
|
+
{
|
|
51
|
+
"type": "DICTIONARY_REFERENCE",
|
|
52
|
+
"entries": [
|
|
53
|
+
{
|
|
54
|
+
"id": "85eb3714-5810-4935-9abe-a6112d4c406c",
|
|
55
|
+
"key": "type",
|
|
56
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "MCP_SERVER"}},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "c9cc0249-c8bd-4b67-9347-c0a210646bcc",
|
|
60
|
+
"key": "name",
|
|
61
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "github"}},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "b8f99ea6-ae33-4e62-b958-351e7e975bdc",
|
|
65
|
+
"key": "description",
|
|
66
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": ""}},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "07d62347-5a1b-4b91-90f7-1e313238f2b2",
|
|
70
|
+
"key": "url",
|
|
71
|
+
"value": {
|
|
72
|
+
"type": "CONSTANT_VALUE",
|
|
73
|
+
"value": {"type": "STRING", "value": "https://api.githubcopilot.com/mcp/"},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "b9ef2156-dd84-4a84-91ce-ce590fe2087b",
|
|
78
|
+
"key": "authorization_type",
|
|
79
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "BEARER_TOKEN"}},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "df799ea3-77bb-40a1-82a1-a5fe343ba68b",
|
|
83
|
+
"key": "bearer_token_value",
|
|
84
|
+
"value": {
|
|
85
|
+
"type": "ENVIRONMENT_VARIABLE",
|
|
86
|
+
"environment_variable": "GITHUB_PERSONAL_ACCESS_TOKEN",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "6e940707-ffe9-4cfb-813e-ddc3a9204ba4",
|
|
91
|
+
"key": "api_key_header_key",
|
|
92
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "JSON", "value": None}},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "2e3db081-7596-4057-b977-be69971d7f87",
|
|
96
|
+
"key": "api_key_header_value",
|
|
97
|
+
"value": {"type": "CONSTANT_VALUE", "value": {"type": "JSON", "value": None}},
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
"definition": {"name": "MCPServer", "module": ["vellum", "workflows", "types", "definition"]},
|
|
101
|
+
}
|
|
102
|
+
],
|
|
64
103
|
},
|
|
65
104
|
}
|
|
@@ -213,12 +213,26 @@ def test_serialize_workflow():
|
|
|
213
213
|
},
|
|
214
214
|
],
|
|
215
215
|
"outputs": [
|
|
216
|
-
{
|
|
216
|
+
{
|
|
217
|
+
"id": "a7ed5e04-2ddd-45f3-bb08-462068f17ad8",
|
|
218
|
+
"name": "json",
|
|
219
|
+
"type": "JSON",
|
|
220
|
+
"value": None,
|
|
221
|
+
"schema": {"type": "object", "additionalProperties": {}},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"id": "d0d0cd85-8546-4d90-bdc1-86c751ba04e5",
|
|
225
|
+
"name": "text",
|
|
226
|
+
"type": "STRING",
|
|
227
|
+
"value": None,
|
|
228
|
+
"schema": {"type": "string"},
|
|
229
|
+
},
|
|
217
230
|
{
|
|
218
231
|
"id": "33a737c2-d347-48d4-bf62-e36c06aebf0c",
|
|
219
232
|
"name": "chat_history",
|
|
220
233
|
"type": "CHAT_HISTORY",
|
|
221
234
|
"value": None,
|
|
235
|
+
"schema": {"type": "array", "items": {"$ref": "#/$defs/vellum.client.types.chat_message.ChatMessage"}},
|
|
222
236
|
},
|
|
223
237
|
],
|
|
224
238
|
}
|