vellum-ai 1.1.2__py3-none-any.whl → 1.1.4__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.
- vellum/__init__.py +18 -0
- vellum/client/README.md +77 -0
- vellum/client/__init__.py +149 -600
- vellum/client/core/__init__.py +2 -0
- vellum/client/core/api_error.py +13 -5
- vellum/client/core/client_wrapper.py +16 -4
- vellum/client/core/force_multipart.py +16 -0
- vellum/client/core/http_client.py +70 -24
- vellum/client/core/http_response.py +19 -11
- vellum/client/core/pydantic_utilities.py +71 -114
- vellum/client/core/serialization.py +6 -1
- vellum/client/errors/__init__.py +2 -0
- vellum/client/errors/bad_request_error.py +4 -3
- vellum/client/errors/forbidden_error.py +4 -3
- vellum/client/errors/internal_server_error.py +4 -3
- vellum/client/errors/not_found_error.py +4 -3
- vellum/client/raw_client.py +1041 -128
- vellum/client/reference.md +692 -19
- vellum/client/resources/__init__.py +2 -0
- vellum/client/resources/ad_hoc/__init__.py +2 -0
- vellum/client/resources/ad_hoc/client.py +37 -195
- vellum/client/resources/ad_hoc/raw_client.py +322 -31
- vellum/client/resources/container_images/__init__.py +2 -0
- vellum/client/resources/container_images/client.py +26 -49
- vellum/client/resources/container_images/raw_client.py +23 -24
- vellum/client/resources/deployments/__init__.py +2 -0
- vellum/client/resources/deployments/client.py +55 -102
- vellum/client/resources/deployments/raw_client.py +73 -66
- vellum/client/resources/deployments/types/__init__.py +2 -0
- vellum/client/resources/document_indexes/__init__.py +2 -0
- vellum/client/resources/document_indexes/client.py +43 -100
- vellum/client/resources/document_indexes/raw_client.py +42 -43
- vellum/client/resources/document_indexes/types/__init__.py +2 -0
- vellum/client/resources/documents/__init__.py +2 -0
- vellum/client/resources/documents/client.py +29 -52
- vellum/client/resources/documents/raw_client.py +51 -44
- vellum/client/resources/folder_entities/__init__.py +2 -0
- vellum/client/resources/folder_entities/client.py +16 -21
- vellum/client/resources/folder_entities/raw_client.py +15 -16
- vellum/client/resources/folder_entities/types/__init__.py +2 -0
- vellum/client/resources/metric_definitions/__init__.py +2 -0
- vellum/client/resources/metric_definitions/client.py +16 -27
- vellum/client/resources/metric_definitions/raw_client.py +17 -18
- vellum/client/resources/ml_models/__init__.py +2 -0
- vellum/client/resources/ml_models/client.py +7 -14
- vellum/client/resources/ml_models/raw_client.py +11 -12
- vellum/client/resources/organizations/__init__.py +2 -0
- vellum/client/resources/organizations/client.py +7 -12
- vellum/client/resources/organizations/raw_client.py +10 -11
- vellum/client/resources/prompts/__init__.py +2 -0
- vellum/client/resources/prompts/client.py +12 -19
- vellum/client/resources/prompts/raw_client.py +40 -33
- vellum/client/resources/sandboxes/__init__.py +2 -0
- vellum/client/resources/sandboxes/client.py +17 -34
- vellum/client/resources/sandboxes/raw_client.py +20 -21
- vellum/client/resources/test_suite_runs/__init__.py +2 -0
- vellum/client/resources/test_suite_runs/client.py +19 -34
- vellum/client/resources/test_suite_runs/raw_client.py +20 -21
- vellum/client/resources/test_suites/__init__.py +2 -0
- vellum/client/resources/test_suites/client.py +26 -100
- vellum/client/resources/test_suites/raw_client.py +172 -21
- vellum/client/resources/workflow_deployments/__init__.py +2 -0
- vellum/client/resources/workflow_deployments/client.py +61 -120
- vellum/client/resources/workflow_deployments/raw_client.py +48 -49
- vellum/client/resources/workflow_deployments/types/__init__.py +2 -0
- vellum/client/resources/workflow_executions/__init__.py +2 -0
- vellum/client/resources/workflow_executions/client.py +8 -13
- vellum/client/resources/workflow_executions/raw_client.py +11 -12
- vellum/client/resources/workflow_sandboxes/__init__.py +2 -0
- vellum/client/resources/workflow_sandboxes/client.py +14 -23
- vellum/client/resources/workflow_sandboxes/raw_client.py +16 -17
- vellum/client/resources/workflow_sandboxes/types/__init__.py +2 -0
- vellum/client/resources/workflows/__init__.py +2 -0
- vellum/client/resources/workflows/client.py +16 -16
- vellum/client/resources/workflows/raw_client.py +75 -57
- vellum/client/resources/workspace_secrets/__init__.py +2 -0
- vellum/client/resources/workspace_secrets/client.py +11 -28
- vellum/client/resources/workspace_secrets/raw_client.py +15 -16
- vellum/client/resources/workspaces/__init__.py +2 -0
- vellum/client/resources/workspaces/client.py +7 -12
- vellum/client/resources/workspaces/raw_client.py +10 -11
- vellum/client/types/__init__.py +18 -0
- vellum/client/types/ad_hoc_execute_prompt_event.py +3 -2
- vellum/client/types/ad_hoc_expand_meta.py +2 -2
- vellum/client/types/ad_hoc_fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/ad_hoc_rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/api_node_result.py +3 -3
- vellum/client/types/api_node_result_data.py +4 -4
- vellum/client/types/api_request_parent_context.py +11 -11
- vellum/client/types/array_chat_message_content.py +3 -3
- vellum/client/types/array_chat_message_content_item.py +7 -4
- vellum/client/types/array_chat_message_content_item_request.py +7 -4
- vellum/client/types/array_chat_message_content_request.py +3 -3
- vellum/client/types/array_input.py +12 -6
- vellum/client/types/array_vellum_value.py +4 -4
- vellum/client/types/array_vellum_value_request.py +4 -4
- vellum/client/types/audio_chat_message_content.py +3 -3
- vellum/client/types/audio_chat_message_content_request.py +3 -3
- vellum/client/types/audio_prompt_block.py +4 -4
- vellum/client/types/audio_vellum_value.py +3 -3
- vellum/client/types/audio_vellum_value_request.py +3 -3
- vellum/client/types/base_output.py +2 -2
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +2 -2
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +2 -2
- vellum/client/types/chat_history_input.py +3 -3
- vellum/client/types/chat_history_input_request.py +3 -3
- vellum/client/types/chat_history_vellum_value.py +3 -3
- vellum/client/types/chat_history_vellum_value_request.py +3 -3
- vellum/client/types/chat_message.py +4 -4
- vellum/client/types/chat_message_content.py +7 -4
- vellum/client/types/chat_message_content_request.py +7 -4
- vellum/client/types/chat_message_prompt_block.py +7 -7
- vellum/client/types/chat_message_request.py +4 -4
- vellum/client/types/code_execution_node_array_result.py +11 -5
- vellum/client/types/code_execution_node_chat_history_result.py +3 -3
- vellum/client/types/code_execution_node_error_result.py +3 -3
- vellum/client/types/code_execution_node_function_call_result.py +3 -3
- vellum/client/types/code_execution_node_json_result.py +2 -2
- vellum/client/types/code_execution_node_number_result.py +2 -2
- vellum/client/types/code_execution_node_result.py +10 -4
- vellum/client/types/code_execution_node_result_data.py +10 -4
- vellum/client/types/code_execution_node_result_output.py +6 -5
- vellum/client/types/code_execution_node_search_results_result.py +3 -3
- vellum/client/types/code_execution_node_string_result.py +2 -2
- vellum/client/types/code_execution_package.py +2 -2
- vellum/client/types/code_executor_input.py +7 -6
- vellum/client/types/code_executor_response.py +11 -5
- vellum/client/types/code_executor_secret_input.py +3 -3
- vellum/client/types/code_resource_definition.py +3 -3
- vellum/client/types/compile_prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/compile_prompt_meta.py +2 -2
- vellum/client/types/conditional_node_result.py +3 -3
- vellum/client/types/conditional_node_result_data.py +2 -2
- vellum/client/types/container_image_build_config.py +3 -3
- vellum/client/types/container_image_container_image_tag.py +2 -2
- vellum/client/types/container_image_read.py +5 -5
- vellum/client/types/create_test_suite_test_case_request.py +9 -3
- vellum/client/types/deployment_history_item.py +10 -4
- vellum/client/types/deployment_provider_payload_response.py +4 -4
- vellum/client/types/deployment_read.py +10 -4
- vellum/client/types/deployment_release_tag_deployment_history_item.py +2 -2
- vellum/client/types/deployment_release_tag_read.py +4 -4
- vellum/client/types/docker_service_token.py +2 -2
- vellum/client/types/document_chat_message_content.py +3 -3
- vellum/client/types/document_chat_message_content_request.py +3 -3
- vellum/client/types/document_document_to_document_index.py +3 -3
- vellum/client/types/document_index_chunking.py +1 -0
- vellum/client/types/document_index_chunking_request.py +1 -0
- vellum/client/types/document_index_indexing_config.py +4 -4
- vellum/client/types/document_index_indexing_config_request.py +4 -4
- vellum/client/types/document_index_read.py +4 -4
- vellum/client/types/document_prompt_block.py +4 -4
- vellum/client/types/document_read.py +4 -4
- vellum/client/types/document_vellum_value.py +3 -3
- vellum/client/types/document_vellum_value_request.py +3 -3
- vellum/client/types/enriched_normalized_completion.py +3 -3
- vellum/client/types/ephemeral_prompt_cache_config.py +3 -3
- vellum/client/types/error_input.py +3 -3
- vellum/client/types/error_vellum_value.py +3 -3
- vellum/client/types/error_vellum_value_request.py +3 -3
- vellum/client/types/execute_api_request_bearer_token.py +1 -0
- vellum/client/types/execute_api_request_headers_value.py +1 -0
- vellum/client/types/execute_api_response.py +5 -5
- vellum/client/types/execute_prompt_event.py +3 -2
- vellum/client/types/execute_prompt_response.py +1 -0
- vellum/client/types/execute_workflow_response.py +10 -4
- vellum/client/types/execute_workflow_workflow_result_event.py +1 -0
- vellum/client/types/execution_array_vellum_value.py +12 -6
- vellum/client/types/execution_chat_history_vellum_value.py +3 -3
- vellum/client/types/execution_error_vellum_value.py +3 -3
- vellum/client/types/execution_function_call_vellum_value.py +3 -3
- vellum/client/types/execution_json_vellum_value.py +3 -3
- vellum/client/types/execution_number_vellum_value.py +3 -3
- vellum/client/types/execution_search_results_vellum_value.py +3 -3
- vellum/client/types/execution_string_vellum_value.py +3 -3
- vellum/client/types/execution_thinking_vellum_value.py +3 -3
- vellum/client/types/execution_vellum_value.py +6 -5
- vellum/client/types/external_input_descriptor.py +3 -3
- vellum/client/types/external_parent_context.py +11 -11
- vellum/client/types/external_test_case_execution.py +10 -4
- vellum/client/types/external_test_case_execution_request.py +10 -4
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15.py +2 -2
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.py +2 -2
- vellum/client/types/folder_entity.py +4 -3
- vellum/client/types/folder_entity_dataset.py +3 -3
- vellum/client/types/folder_entity_dataset_data.py +3 -3
- vellum/client/types/folder_entity_document_index.py +3 -3
- vellum/client/types/folder_entity_document_index_data.py +4 -4
- vellum/client/types/folder_entity_folder.py +3 -3
- vellum/client/types/folder_entity_folder_data.py +2 -2
- vellum/client/types/folder_entity_prompt_sandbox.py +3 -3
- vellum/client/types/folder_entity_prompt_sandbox_data.py +3 -3
- vellum/client/types/folder_entity_test_suite.py +3 -3
- vellum/client/types/folder_entity_test_suite_data.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox_data.py +3 -3
- vellum/client/types/fulfilled_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_response.py +3 -3
- vellum/client/types/fulfilled_execute_workflow_workflow_result_event.py +11 -5
- vellum/client/types/fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/fulfilled_workflow_node_result_event.py +12 -6
- vellum/client/types/function_call.py +2 -2
- vellum/client/types/function_call_chat_message_content.py +3 -3
- vellum/client/types/function_call_chat_message_content_request.py +3 -3
- vellum/client/types/function_call_chat_message_content_value.py +2 -2
- vellum/client/types/function_call_chat_message_content_value_request.py +2 -2
- vellum/client/types/function_call_input.py +3 -3
- vellum/client/types/function_call_prompt_block.py +4 -4
- vellum/client/types/function_call_request.py +2 -2
- vellum/client/types/function_call_vellum_value.py +3 -3
- vellum/client/types/function_call_vellum_value_request.py +3 -3
- vellum/client/types/function_definition.py +4 -4
- vellum/client/types/generate_options_request.py +3 -3
- vellum/client/types/generate_request.py +2 -2
- vellum/client/types/generate_response.py +3 -3
- vellum/client/types/generate_result.py +3 -3
- vellum/client/types/generate_result_data.py +3 -3
- vellum/client/types/generate_result_error.py +3 -3
- vellum/client/types/generate_stream_response.py +3 -3
- vellum/client/types/generate_stream_result.py +4 -4
- vellum/client/types/generate_stream_result_data.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_config.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_config_request.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001_request.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004_request.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002_request.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer_request.py +3 -3
- vellum/client/types/image_chat_message_content.py +3 -3
- vellum/client/types/image_chat_message_content_request.py +3 -3
- vellum/client/types/image_prompt_block.py +4 -4
- vellum/client/types/image_vellum_value.py +3 -3
- vellum/client/types/image_vellum_value_request.py +3 -3
- vellum/client/types/indexing_config_vectorizer.py +7 -6
- vellum/client/types/indexing_config_vectorizer_request.py +7 -6
- vellum/client/types/initiated_ad_hoc_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/initiated_workflow_node_result_event.py +12 -6
- vellum/client/types/instructor_vectorizer_config.py +2 -2
- vellum/client/types/instructor_vectorizer_config_request.py +2 -2
- vellum/client/types/invoked_port.py +2 -2
- vellum/client/types/jinja_prompt_block.py +4 -4
- vellum/client/types/json_input.py +3 -3
- vellum/client/types/json_input_request.py +3 -3
- vellum/client/types/json_vellum_value.py +2 -2
- vellum/client/types/json_vellum_value_request.py +2 -2
- vellum/client/types/map_node_result.py +3 -3
- vellum/client/types/map_node_result_data.py +3 -3
- vellum/client/types/merge_node_result.py +3 -3
- vellum/client/types/merge_node_result_data.py +2 -2
- vellum/client/types/metadata_filter_config_request.py +12 -6
- vellum/client/types/metadata_filter_rule_request.py +5 -5
- vellum/client/types/metadata_filters_request.py +1 -0
- vellum/client/types/metric_definition_execution.py +10 -4
- vellum/client/types/metric_definition_history_item.py +10 -4
- vellum/client/types/metric_definition_input.py +3 -2
- vellum/client/types/metric_node_result.py +2 -2
- vellum/client/types/ml_model_read.py +6 -3
- vellum/client/types/ml_model_usage.py +2 -2
- vellum/client/types/ml_model_usage_wrapper.py +3 -3
- vellum/client/types/named_scenario_input_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_scenario_input_json_variable_value_request.py +2 -2
- vellum/client/types/named_scenario_input_request.py +3 -2
- vellum/client/types/named_scenario_input_string_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_array_variable_value.py +11 -5
- vellum/client/types/named_test_case_array_variable_value_request.py +11 -5
- vellum/client/types/named_test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/named_test_case_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_error_variable_value.py +3 -3
- vellum/client/types/named_test_case_error_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_json_variable_value.py +2 -2
- vellum/client/types/named_test_case_json_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_number_variable_value.py +2 -2
- vellum/client/types/named_test_case_number_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_search_results_variable_value.py +3 -3
- vellum/client/types/named_test_case_search_results_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_string_variable_value.py +2 -2
- vellum/client/types/named_test_case_string_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_variable_value.py +6 -5
- vellum/client/types/named_test_case_variable_value_request.py +6 -5
- vellum/client/types/node_execution_fulfilled_body.py +4 -4
- vellum/client/types/node_execution_fulfilled_event.py +22 -16
- vellum/client/types/node_execution_initiated_body.py +3 -3
- vellum/client/types/node_execution_initiated_event.py +22 -16
- vellum/client/types/node_execution_paused_body.py +3 -3
- vellum/client/types/node_execution_paused_event.py +22 -16
- vellum/client/types/node_execution_rejected_body.py +4 -4
- vellum/client/types/node_execution_rejected_event.py +22 -16
- vellum/client/types/node_execution_resumed_body.py +3 -3
- vellum/client/types/node_execution_resumed_event.py +22 -16
- vellum/client/types/node_execution_span.py +21 -13
- vellum/client/types/node_execution_span_attributes.py +2 -2
- vellum/client/types/node_execution_streaming_body.py +4 -4
- vellum/client/types/node_execution_streaming_event.py +22 -16
- vellum/client/types/node_input_compiled_array_value.py +11 -5
- vellum/client/types/node_input_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_input_compiled_error_value.py +3 -3
- vellum/client/types/node_input_compiled_function_call_value.py +3 -3
- vellum/client/types/node_input_compiled_json_value.py +2 -2
- vellum/client/types/node_input_compiled_number_value.py +2 -2
- vellum/client/types/node_input_compiled_search_results_value.py +3 -3
- vellum/client/types/node_input_compiled_secret_value.py +3 -3
- vellum/client/types/node_input_compiled_string_value.py +2 -2
- vellum/client/types/node_input_variable_compiled_value.py +6 -5
- vellum/client/types/node_output_compiled_array_value.py +12 -6
- vellum/client/types/node_output_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_output_compiled_error_value.py +3 -3
- vellum/client/types/node_output_compiled_function_call_value.py +3 -3
- vellum/client/types/node_output_compiled_json_value.py +3 -3
- vellum/client/types/node_output_compiled_number_value.py +3 -3
- vellum/client/types/node_output_compiled_search_results_value.py +3 -3
- vellum/client/types/node_output_compiled_string_value.py +3 -3
- vellum/client/types/node_output_compiled_thinking_value.py +3 -3
- vellum/client/types/node_output_compiled_value.py +6 -5
- vellum/client/types/node_parent_context.py +12 -12
- vellum/client/types/normalized_log_probs.py +3 -3
- vellum/client/types/normalized_token_log_probs.py +2 -2
- vellum/client/types/number_input.py +3 -3
- vellum/client/types/number_vellum_value.py +2 -2
- vellum/client/types/number_vellum_value_request.py +2 -2
- vellum/client/types/open_ai_vectorizer_config.py +3 -3
- vellum/client/types/open_ai_vectorizer_config_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002_request.py +3 -3
- vellum/client/types/organization_read.py +4 -4
- vellum/client/types/paginated_container_image_read_list.py +3 -3
- vellum/client/types/paginated_deployment_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_document_index_read_list.py +3 -3
- vellum/client/types/paginated_folder_entity_list.py +3 -3
- vellum/client/types/paginated_slim_deployment_read_list.py +10 -4
- vellum/client/types/paginated_slim_document_list.py +3 -3
- vellum/client/types/paginated_slim_workflow_deployment_list.py +10 -4
- vellum/client/types/paginated_test_suite_run_execution_list.py +10 -4
- vellum/client/types/paginated_test_suite_test_case_list.py +10 -4
- vellum/client/types/paginated_workflow_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_workflow_sandbox_example_list.py +3 -3
- vellum/client/types/parent_context.py +5 -5
- vellum/client/types/pdf_search_result_meta_source.py +2 -2
- vellum/client/types/pdf_search_result_meta_source_request.py +2 -2
- vellum/client/types/plain_text_prompt_block.py +4 -4
- vellum/client/types/price.py +3 -3
- vellum/client/types/prompt_block.py +9 -6
- vellum/client/types/prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/prompt_deployment_input_request.py +3 -2
- vellum/client/types/prompt_deployment_parent_context.py +11 -11
- vellum/client/types/prompt_deployment_release.py +6 -6
- vellum/client/types/prompt_deployment_release_prompt_deployment.py +2 -2
- vellum/client/types/prompt_deployment_release_prompt_version.py +4 -4
- vellum/client/types/prompt_exec_config.py +15 -9
- vellum/client/types/prompt_execution_meta.py +3 -3
- vellum/client/types/prompt_node_execution_meta.py +3 -3
- vellum/client/types/prompt_node_result.py +3 -3
- vellum/client/types/prompt_node_result_data.py +3 -3
- vellum/client/types/prompt_output.py +3 -2
- vellum/client/types/prompt_parameters.py +2 -2
- vellum/client/types/prompt_push_response.py +2 -2
- vellum/client/types/prompt_request_chat_history_input.py +3 -3
- vellum/client/types/prompt_request_input.py +3 -2
- vellum/client/types/prompt_request_json_input.py +3 -3
- vellum/client/types/prompt_request_string_input.py +3 -3
- vellum/client/types/prompt_settings.py +2 -2
- vellum/client/types/prompt_version_build_config_sandbox.py +2 -2
- vellum/client/types/raw_prompt_execution_overrides_request.py +2 -2
- vellum/client/types/reducto_chunker_config.py +2 -2
- vellum/client/types/reducto_chunker_config_request.py +2 -2
- vellum/client/types/reducto_chunking.py +3 -3
- vellum/client/types/reducto_chunking_request.py +3 -3
- vellum/client/types/rejected_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_response.py +3 -3
- vellum/client/types/rejected_execute_workflow_workflow_result_event.py +4 -4
- vellum/client/types/rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/rejected_workflow_node_result_event.py +12 -6
- vellum/client/types/release_created_by.py +2 -2
- vellum/client/types/release_environment.py +2 -2
- vellum/client/types/release_release_tag.py +3 -3
- vellum/client/types/release_review_reviewer.py +2 -2
- vellum/client/types/release_tag_release.py +2 -2
- vellum/client/types/replace_test_suite_test_case_request.py +9 -3
- vellum/client/types/rich_text_child_block.py +2 -1
- vellum/client/types/rich_text_prompt_block.py +4 -4
- vellum/client/types/sandbox_scenario.py +3 -3
- vellum/client/types/scenario_input.py +3 -2
- vellum/client/types/scenario_input_chat_history_variable_value.py +3 -3
- vellum/client/types/scenario_input_json_variable_value.py +2 -2
- vellum/client/types/scenario_input_string_variable_value.py +2 -2
- vellum/client/types/search_filters_request.py +11 -5
- vellum/client/types/search_node_result.py +3 -3
- vellum/client/types/search_node_result_data.py +3 -3
- vellum/client/types/search_request_options_request.py +13 -7
- vellum/client/types/search_response.py +3 -3
- vellum/client/types/search_result.py +3 -3
- vellum/client/types/search_result_document.py +2 -2
- vellum/client/types/search_result_document_request.py +2 -2
- vellum/client/types/search_result_merging_request.py +2 -2
- vellum/client/types/search_result_meta.py +3 -3
- vellum/client/types/search_result_meta_request.py +3 -3
- vellum/client/types/search_result_request.py +3 -3
- vellum/client/types/search_results_input.py +3 -3
- vellum/client/types/search_results_vellum_value.py +3 -3
- vellum/client/types/search_results_vellum_value_request.py +3 -3
- vellum/client/types/search_weights_request.py +2 -2
- vellum/client/types/sentence_chunker_config.py +2 -2
- vellum/client/types/sentence_chunker_config_request.py +2 -2
- vellum/client/types/sentence_chunking.py +3 -3
- vellum/client/types/sentence_chunking_request.py +3 -3
- vellum/client/types/slim_deployment_read.py +10 -4
- vellum/client/types/slim_document.py +5 -5
- vellum/client/types/slim_document_document_to_document_index.py +3 -3
- vellum/client/types/slim_release_review.py +4 -4
- vellum/client/types/slim_workflow_deployment.py +11 -5
- vellum/client/types/slim_workflow_execution_read.py +21 -15
- vellum/client/types/span_link.py +12 -12
- vellum/client/types/streaming_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/streaming_execute_prompt_event.py +3 -3
- vellum/client/types/streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/streaming_workflow_node_result_event.py +12 -6
- vellum/client/types/string_chat_message_content.py +2 -2
- vellum/client/types/string_chat_message_content_request.py +2 -2
- vellum/client/types/string_input.py +3 -3
- vellum/client/types/string_input_request.py +3 -3
- vellum/client/types/string_vellum_value.py +2 -2
- vellum/client/types/string_vellum_value_request.py +2 -2
- vellum/client/types/submit_completion_actual_request.py +3 -3
- vellum/client/types/submit_workflow_execution_actual_request.py +3 -2
- vellum/client/types/subworkflow_node_result.py +3 -3
- vellum/client/types/subworkflow_node_result_data.py +2 -2
- vellum/client/types/templating_node_array_result.py +11 -5
- vellum/client/types/templating_node_chat_history_result.py +3 -3
- vellum/client/types/templating_node_error_result.py +3 -3
- vellum/client/types/templating_node_function_call_result.py +3 -3
- vellum/client/types/templating_node_json_result.py +2 -2
- vellum/client/types/templating_node_number_result.py +2 -2
- vellum/client/types/templating_node_result.py +10 -4
- vellum/client/types/templating_node_result_data.py +10 -4
- vellum/client/types/templating_node_result_output.py +6 -5
- vellum/client/types/templating_node_search_results_result.py +3 -3
- vellum/client/types/templating_node_string_result.py +2 -2
- vellum/client/types/terminal_node_array_result.py +11 -5
- vellum/client/types/terminal_node_chat_history_result.py +2 -2
- vellum/client/types/terminal_node_error_result.py +2 -2
- vellum/client/types/terminal_node_function_call_result.py +2 -2
- vellum/client/types/terminal_node_json_result.py +2 -2
- vellum/client/types/terminal_node_number_result.py +2 -2
- vellum/client/types/terminal_node_result.py +10 -4
- vellum/client/types/terminal_node_result_data.py +10 -4
- vellum/client/types/terminal_node_result_output.py +6 -5
- vellum/client/types/terminal_node_search_results_result.py +2 -2
- vellum/client/types/terminal_node_string_result.py +2 -2
- vellum/client/types/test_case_array_variable_value.py +11 -5
- vellum/client/types/test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/test_case_error_variable_value.py +3 -3
- vellum/client/types/test_case_function_call_variable_value.py +3 -3
- vellum/client/types/test_case_json_variable_value.py +2 -2
- vellum/client/types/test_case_number_variable_value.py +2 -2
- vellum/client/types/test_case_search_results_variable_value.py +3 -3
- vellum/client/types/test_case_string_variable_value.py +2 -2
- vellum/client/types/test_case_variable_value.py +6 -5
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_exec_config.py +2 -1
- vellum/client/types/test_suite_run_exec_config_request.py +2 -1
- vellum/client/types/test_suite_run_execution.py +11 -5
- vellum/client/types/test_suite_run_execution_array_output.py +11 -5
- vellum/client/types/test_suite_run_execution_chat_history_output.py +3 -3
- vellum/client/types/test_suite_run_execution_error_output.py +3 -3
- vellum/client/types/test_suite_run_execution_function_call_output.py +3 -3
- vellum/client/types/test_suite_run_execution_json_output.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_definition.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_result.py +11 -5
- vellum/client/types/test_suite_run_execution_number_output.py +2 -2
- vellum/client/types/test_suite_run_execution_output.py +6 -5
- vellum/client/types/test_suite_run_execution_search_results_output.py +3 -3
- vellum/client/types/test_suite_run_execution_string_output.py +2 -2
- vellum/client/types/test_suite_run_external_exec_config.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_data.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_data_request.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_request.py +10 -4
- vellum/client/types/test_suite_run_metric_array_output.py +11 -5
- vellum/client/types/test_suite_run_metric_error_output.py +3 -3
- vellum/client/types/test_suite_run_metric_json_output.py +2 -2
- vellum/client/types/test_suite_run_metric_number_output.py +2 -2
- vellum/client/types/test_suite_run_metric_output.py +5 -4
- vellum/client/types/test_suite_run_metric_string_output.py +2 -2
- vellum/client/types/test_suite_run_progress.py +2 -2
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_read.py +12 -6
- vellum/client/types/test_suite_run_test_suite.py +2 -2
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_test_case.py +10 -4
- vellum/client/types/test_suite_test_case_bulk_operation_request.py +2 -1
- vellum/client/types/test_suite_test_case_bulk_result.py +2 -1
- vellum/client/types/test_suite_test_case_create_bulk_operation_request.py +10 -4
- vellum/client/types/test_suite_test_case_created_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_created_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_data_request.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_request.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_rejected_bulk_result.py +2 -2
- vellum/client/types/test_suite_test_case_replace_bulk_operation_request.py +10 -4
- vellum/client/types/test_suite_test_case_replaced_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_replaced_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_upsert_bulk_operation_request.py +10 -4
- vellum/client/types/thinking_vellum_value.py +3 -3
- vellum/client/types/thinking_vellum_value_request.py +3 -3
- vellum/client/types/token_overlapping_window_chunker_config.py +2 -2
- vellum/client/types/token_overlapping_window_chunker_config_request.py +2 -2
- vellum/client/types/token_overlapping_window_chunking.py +3 -3
- vellum/client/types/token_overlapping_window_chunking_request.py +3 -3
- vellum/client/types/upload_document_response.py +3 -3
- vellum/client/types/upsert_test_suite_test_case_request.py +9 -3
- vellum/client/types/variable_prompt_block.py +4 -4
- vellum/client/types/vellum_audio.py +3 -3
- vellum/client/types/vellum_audio_request.py +3 -3
- vellum/client/types/vellum_code_resource_definition.py +2 -2
- vellum/client/types/vellum_document.py +2 -2
- vellum/client/types/vellum_document_request.py +2 -2
- vellum/client/types/vellum_error.py +3 -3
- vellum/client/types/vellum_error_request.py +3 -3
- vellum/client/types/vellum_image.py +2 -2
- vellum/client/types/vellum_image_request.py +2 -2
- vellum/client/types/vellum_node_execution_event.py +4 -3
- vellum/client/types/vellum_sdk_error.py +3 -3
- vellum/client/types/vellum_secret.py +2 -2
- vellum/client/types/vellum_span.py +2 -1
- vellum/client/types/vellum_value.py +11 -8
- vellum/client/types/vellum_value_logical_condition_group_request.py +6 -6
- vellum/client/types/vellum_value_logical_condition_request.py +13 -7
- vellum/client/types/vellum_value_logical_expression_request.py +2 -1
- vellum/client/types/vellum_value_request.py +11 -8
- vellum/client/types/vellum_variable.py +13 -7
- vellum/client/types/vellum_variable_extensions.py +2 -2
- vellum/client/types/vellum_variable_type.py +2 -1
- vellum/client/types/vellum_video.py +24 -0
- vellum/client/types/vellum_video_request.py +24 -0
- vellum/client/types/vellum_workflow_execution_event.py +4 -3
- vellum/client/types/video_chat_message_content.py +25 -0
- vellum/client/types/video_chat_message_content_request.py +25 -0
- vellum/client/types/video_prompt_block.py +29 -0
- vellum/client/types/video_vellum_value.py +25 -0
- vellum/client/types/video_vellum_value_request.py +25 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +18 -12
- vellum/client/types/workflow_deployment_history_item.py +10 -4
- vellum/client/types/workflow_deployment_parent_context.py +11 -11
- vellum/client/types/workflow_deployment_read.py +11 -5
- vellum/client/types/workflow_deployment_release.py +13 -7
- vellum/client/types/workflow_deployment_release_workflow_deployment.py +2 -2
- vellum/client/types/workflow_deployment_release_workflow_version.py +10 -4
- vellum/client/types/workflow_error.py +1 -0
- vellum/client/types/workflow_event_error.py +3 -3
- vellum/client/types/workflow_event_execution_read.py +22 -16
- vellum/client/types/workflow_execution_actual.py +10 -4
- vellum/client/types/workflow_execution_actual_chat_history_request.py +2 -2
- vellum/client/types/workflow_execution_actual_json_request.py +2 -2
- vellum/client/types/workflow_execution_actual_string_request.py +2 -2
- vellum/client/types/workflow_execution_detail.py +22 -16
- vellum/client/types/workflow_execution_fulfilled_body.py +3 -3
- vellum/client/types/workflow_execution_fulfilled_event.py +22 -16
- vellum/client/types/workflow_execution_initiated_body.py +3 -3
- vellum/client/types/workflow_execution_initiated_event.py +22 -16
- vellum/client/types/workflow_execution_node_result_event.py +10 -4
- vellum/client/types/workflow_execution_paused_body.py +4 -4
- vellum/client/types/workflow_execution_paused_event.py +22 -16
- vellum/client/types/workflow_execution_rejected_body.py +4 -4
- vellum/client/types/workflow_execution_rejected_event.py +22 -16
- vellum/client/types/workflow_execution_resumed_body.py +3 -3
- vellum/client/types/workflow_execution_resumed_event.py +22 -16
- vellum/client/types/workflow_execution_snapshotted_body.py +3 -3
- vellum/client/types/workflow_execution_snapshotted_event.py +22 -16
- vellum/client/types/workflow_execution_span.py +20 -12
- vellum/client/types/workflow_execution_span_attributes.py +2 -2
- vellum/client/types/workflow_execution_streaming_body.py +4 -4
- vellum/client/types/workflow_execution_streaming_event.py +22 -16
- vellum/client/types/workflow_execution_usage_calculation_error.py +3 -3
- vellum/client/types/workflow_execution_usage_calculation_fulfilled_body.py +22 -0
- vellum/client/types/workflow_execution_usage_result.py +3 -3
- vellum/client/types/workflow_execution_view_online_eval_metric_result.py +10 -4
- vellum/client/types/workflow_execution_workflow_result_event.py +10 -4
- vellum/client/types/workflow_expand_meta_request.py +2 -2
- vellum/client/types/workflow_initialization_error.py +2 -2
- vellum/client/types/workflow_node_result_data.py +8 -7
- vellum/client/types/workflow_node_result_event.py +3 -2
- vellum/client/types/workflow_output.py +6 -5
- vellum/client/types/workflow_output_array.py +12 -6
- vellum/client/types/workflow_output_chat_history.py +3 -3
- vellum/client/types/workflow_output_error.py +3 -3
- vellum/client/types/workflow_output_function_call.py +3 -3
- vellum/client/types/workflow_output_image.py +3 -3
- vellum/client/types/workflow_output_json.py +3 -3
- vellum/client/types/workflow_output_number.py +3 -3
- vellum/client/types/workflow_output_search_results.py +3 -3
- vellum/client/types/workflow_output_string.py +3 -3
- vellum/client/types/workflow_parent_context.py +12 -12
- vellum/client/types/workflow_push_deployment_config_request.py +2 -2
- vellum/client/types/workflow_push_response.py +2 -2
- vellum/client/types/workflow_release_tag_read.py +4 -4
- vellum/client/types/workflow_release_tag_workflow_deployment_history_item.py +2 -2
- vellum/client/types/workflow_request_chat_history_input_request.py +3 -3
- vellum/client/types/workflow_request_input_request.py +3 -2
- vellum/client/types/workflow_request_json_input_request.py +3 -3
- vellum/client/types/workflow_request_number_input_request.py +3 -3
- vellum/client/types/workflow_request_string_input_request.py +3 -3
- vellum/client/types/workflow_result_event.py +13 -7
- vellum/client/types/workflow_result_event_output_data.py +7 -6
- vellum/client/types/workflow_result_event_output_data_array.py +12 -6
- vellum/client/types/workflow_result_event_output_data_chat_history.py +3 -3
- vellum/client/types/workflow_result_event_output_data_error.py +3 -3
- vellum/client/types/workflow_result_event_output_data_function_call.py +3 -3
- vellum/client/types/workflow_result_event_output_data_json.py +3 -3
- vellum/client/types/workflow_result_event_output_data_number.py +3 -3
- vellum/client/types/workflow_result_event_output_data_search_results.py +3 -3
- vellum/client/types/workflow_result_event_output_data_string.py +3 -3
- vellum/client/types/workflow_sandbox_example.py +2 -2
- vellum/client/types/workflow_sandbox_parent_context.py +11 -11
- vellum/client/types/workflow_stream_event.py +2 -1
- vellum/client/types/workspace_read.py +3 -3
- vellum/client/types/workspace_secret_read.py +3 -3
- vellum/core/force_multipart.py +3 -0
- vellum/prompts/blocks/compilation.py +22 -10
- vellum/types/vellum_video.py +3 -0
- vellum/types/vellum_video_request.py +3 -0
- vellum/types/video_chat_message_content.py +3 -0
- vellum/types/video_chat_message_content_request.py +3 -0
- vellum/types/video_prompt_block.py +3 -0
- vellum/types/video_vellum_value.py +3 -0
- vellum/types/video_vellum_value_request.py +3 -0
- vellum/types/workflow_execution_usage_calculation_fulfilled_body.py +3 -0
- vellum/workflows/events/node.py +25 -10
- vellum/workflows/events/tests/test_event.py +19 -19
- vellum/workflows/events/workflow.py +11 -0
- vellum/workflows/graph/graph.py +103 -1
- vellum/workflows/graph/tests/test_graph.py +99 -0
- vellum/workflows/nodes/bases/base.py +9 -1
- vellum/workflows/nodes/displayable/bases/utils.py +4 -2
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +19 -18
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +17 -7
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +7 -7
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +47 -80
- vellum/workflows/references/environment_variable.py +10 -0
- vellum/workflows/runner/runner.py +18 -2
- vellum/workflows/state/context.py +101 -12
- vellum/workflows/state/encoder.py +2 -4
- vellum/workflows/types/definition.py +11 -1
- vellum/workflows/types/tests/test_definition.py +19 -0
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/vellum_variables.py +9 -5
- vellum/workflows/workflows/base.py +12 -5
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/METADATA +2 -2
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/RECORD +693 -675
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +55 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +164 -47
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +15 -49
- vellum_ee/workflows/display/types.py +14 -1
- vellum_ee/workflows/display/utils/expressions.py +13 -4
- vellum_ee/workflows/display/workflows/base_workflow_display.py +6 -19
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/entry_points.txt +0 -0
@@ -42,7 +42,7 @@ class BaseCodeExecutionNodeDisplay(BaseNodeDisplay[_CodeExecutionNodeType], Gene
|
|
42
42
|
script_filepath=filepath,
|
43
43
|
)
|
44
44
|
if not file_code:
|
45
|
-
|
45
|
+
display_context.add_error(NodeValidationError(f"Filepath '{filepath}' does not exist", node.__name__))
|
46
46
|
code_value = file_code
|
47
47
|
else:
|
48
48
|
code_value = ""
|
@@ -197,7 +197,61 @@ def test_serialize_node__with_non_exist_code_input_path_with_dry_run():
|
|
197
197
|
"display_data": {"position": {"x": 0.0, "y": -50.0}},
|
198
198
|
"base": None,
|
199
199
|
"definition": None,
|
200
|
-
}
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"id": "ac90c0ce-f393-438c-a24f-e5e9a9286182",
|
203
|
+
"type": "CODE_EXECUTION",
|
204
|
+
"inputs": [
|
205
|
+
{
|
206
|
+
"id": "a0b9d6f6-ce59-4075-8db6-866781bc73ef",
|
207
|
+
"key": "code",
|
208
|
+
"value": {
|
209
|
+
"rules": [{"type": "CONSTANT_VALUE", "data": {"type": "JSON", "value": None}}],
|
210
|
+
"combinator": "OR",
|
211
|
+
},
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"id": "58598cc8-aa8a-4b4f-99fb-09f6815b6c01",
|
215
|
+
"key": "runtime",
|
216
|
+
"value": {
|
217
|
+
"rules": [
|
218
|
+
{"type": "CONSTANT_VALUE", "data": {"type": "STRING", "value": "PYTHON_3_11_6"}}
|
219
|
+
],
|
220
|
+
"combinator": "OR",
|
221
|
+
},
|
222
|
+
},
|
223
|
+
],
|
224
|
+
"data": {
|
225
|
+
"label": "My Node",
|
226
|
+
"error_output_id": None,
|
227
|
+
"source_handle_id": "7afa3858-f50c-4116-936a-a401e3b2c60f",
|
228
|
+
"target_handle_id": "3a39ea63-9f86-4891-a902-0216a7190720",
|
229
|
+
"code_input_id": "a0b9d6f6-ce59-4075-8db6-866781bc73ef",
|
230
|
+
"runtime_input_id": "58598cc8-aa8a-4b4f-99fb-09f6815b6c01",
|
231
|
+
"output_type": "STRING",
|
232
|
+
"packages": [],
|
233
|
+
"output_id": "00b2120e-b642-46e4-8276-5f3c69d8a6cb",
|
234
|
+
"log_output_id": "47e3eeca-4bf8-492e-b8ac-28c7d389c886",
|
235
|
+
},
|
236
|
+
"display_data": {"position": {"x": 200.0, "y": -50.0}},
|
237
|
+
"base": {
|
238
|
+
"name": "CodeExecutionNode",
|
239
|
+
"module": ["vellum", "workflows", "nodes", "displayable", "code_execution_node", "node"],
|
240
|
+
},
|
241
|
+
"definition": {
|
242
|
+
"name": "MyNode",
|
243
|
+
"module": [
|
244
|
+
"vellum_ee",
|
245
|
+
"workflows",
|
246
|
+
"display",
|
247
|
+
"nodes",
|
248
|
+
"vellum",
|
249
|
+
"tests",
|
250
|
+
"test_code_execution_node",
|
251
|
+
],
|
252
|
+
},
|
253
|
+
"ports": [{"id": "7afa3858-f50c-4116-936a-a401e3b2c60f", "name": "default", "type": "DEFAULT"}],
|
254
|
+
},
|
201
255
|
],
|
202
256
|
"edges": [
|
203
257
|
{
|
@@ -1,9 +1,13 @@
|
|
1
|
+
from vellum.client.types.prompt_parameters import PromptParameters
|
1
2
|
from vellum.workflows import BaseWorkflow
|
2
3
|
from vellum.workflows.inputs import BaseInputs
|
3
4
|
from vellum.workflows.nodes.displayable.inline_prompt_node.node import InlinePromptNode
|
4
5
|
from vellum.workflows.nodes.displayable.tool_calling_node.node import ToolCallingNode
|
6
|
+
from vellum.workflows.nodes.displayable.tool_calling_node.state import ToolCallingState
|
7
|
+
from vellum.workflows.nodes.displayable.tool_calling_node.utils import create_router_node, create_tool_prompt_node
|
5
8
|
from vellum.workflows.state.base import BaseState
|
6
9
|
from vellum.workflows.types.definition import AuthorizationType, EnvironmentVariableReference, MCPServer
|
10
|
+
from vellum_ee.workflows.display.nodes.get_node_display_class import get_node_display_class
|
7
11
|
from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
|
8
12
|
|
9
13
|
|
@@ -161,57 +165,170 @@ def test_serialize_node__tool_calling_node__mcp_server_api_key():
|
|
161
165
|
"id": "6c0f7d4f-3c8a-4201-b588-8398d3c97480",
|
162
166
|
"name": "functions",
|
163
167
|
"value": {
|
164
|
-
"type": "
|
165
|
-
"
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
168
|
+
"type": "CONSTANT_VALUE",
|
169
|
+
"value": {
|
170
|
+
"type": "JSON",
|
171
|
+
"value": [
|
172
|
+
{
|
173
|
+
"type": "MCP_SERVER",
|
174
|
+
"name": "my-mcp-server",
|
175
|
+
"url": "https://my-mcp-server.com",
|
176
|
+
"authorization_type": "API_KEY",
|
177
|
+
"bearer_token_value": None,
|
178
|
+
"api_key_header_key": "my-api-key-header-key",
|
179
|
+
"api_key_header_value": "my-api-key-header-value",
|
180
|
+
}
|
181
|
+
],
|
182
|
+
},
|
183
|
+
},
|
184
|
+
}
|
185
|
+
|
186
|
+
|
187
|
+
def test_serialize_tool_router_node():
|
188
|
+
"""
|
189
|
+
Test that the tool router node created by create_router_node serializes successfully.
|
190
|
+
"""
|
191
|
+
|
192
|
+
# GIVEN a simple function for tool calling
|
193
|
+
def my_function(arg1: str) -> str:
|
194
|
+
return f"Result: {arg1}"
|
195
|
+
|
196
|
+
tool_prompt_node = create_tool_prompt_node(
|
197
|
+
ml_model="gpt-4o-mini",
|
198
|
+
blocks=[],
|
199
|
+
functions=[my_function],
|
200
|
+
prompt_inputs=None,
|
201
|
+
parameters=PromptParameters(),
|
202
|
+
)
|
203
|
+
|
204
|
+
# WHEN we create a router node using create_router_node
|
205
|
+
router_node = create_router_node(
|
206
|
+
functions=[my_function],
|
207
|
+
tool_prompt_node=tool_prompt_node,
|
208
|
+
)
|
209
|
+
|
210
|
+
router_node_display_class = get_node_display_class(router_node)
|
211
|
+
router_node_display = router_node_display_class()
|
212
|
+
|
213
|
+
class Workflow(BaseWorkflow[BaseInputs, ToolCallingState]):
|
214
|
+
graph = tool_prompt_node >> router_node
|
215
|
+
|
216
|
+
workflow_display = get_workflow_display(workflow_class=Workflow)
|
217
|
+
display_context = workflow_display.display_context
|
218
|
+
|
219
|
+
# WHEN we serialize the router node
|
220
|
+
serialized_router_node = router_node_display.serialize(display_context)
|
221
|
+
|
222
|
+
# THEN the router node should serialize to the exact expected structure
|
223
|
+
assert serialized_router_node == {
|
224
|
+
"adornments": None,
|
225
|
+
"attributes": [
|
226
|
+
{
|
227
|
+
"id": "cd208919-c66b-451b-a739-bcf7d3451dea",
|
228
|
+
"name": "prompt_outputs",
|
229
|
+
"value": {
|
230
|
+
"node_id": "19e664fc-3b57-48d2-b47a-b143b475406a",
|
231
|
+
"node_output_id": "c2a5a7f7-a234-45dc-adee-bc6fc0bd28dd",
|
232
|
+
"type": "NODE_OUTPUT",
|
233
|
+
},
|
234
|
+
}
|
235
|
+
],
|
236
|
+
"base": {
|
237
|
+
"module": ["vellum", "workflows", "nodes", "displayable", "tool_calling_node", "utils"],
|
238
|
+
"name": "RouterNode",
|
239
|
+
},
|
240
|
+
"definition": {
|
241
|
+
"module": ["vellum", "workflows", "nodes", "displayable", "tool_calling_node", "utils"],
|
242
|
+
"name": "RouterNode",
|
243
|
+
},
|
244
|
+
"display_data": {"position": {"x": 0.0, "y": 0.0}},
|
245
|
+
"id": "690c66e1-1e18-4984-b695-84beb0157541",
|
246
|
+
"label": "RouterNode",
|
247
|
+
"outputs": [],
|
248
|
+
"ports": [
|
249
|
+
{
|
250
|
+
"expression": {
|
251
|
+
"lhs": {
|
252
|
+
"lhs": {
|
253
|
+
"lhs": {
|
254
|
+
"state_variable_id": "0dd7f5a1-1d73-4153-9191-ca828ace4920",
|
255
|
+
"type": "WORKFLOW_STATE",
|
185
256
|
},
|
257
|
+
"operator": "<",
|
258
|
+
"rhs": {
|
259
|
+
"lhs": {
|
260
|
+
"node_id": "19e664fc-3b57-48d2-b47a-b143b475406a",
|
261
|
+
"node_output_id": "c2a5a7f7-a234-45dc-adee-bc6fc0bd28dd",
|
262
|
+
"type": "NODE_OUTPUT",
|
263
|
+
},
|
264
|
+
"operator": "length",
|
265
|
+
"type": "UNARY_EXPRESSION",
|
266
|
+
},
|
267
|
+
"type": "BINARY_EXPRESSION",
|
186
268
|
},
|
187
|
-
|
188
|
-
|
189
|
-
"
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
269
|
+
"operator": "and",
|
270
|
+
"rhs": {
|
271
|
+
"lhs": {
|
272
|
+
"lhs": {
|
273
|
+
"lhs": {
|
274
|
+
"node_id": "19e664fc-3b57-48d2-b47a-b143b475406a",
|
275
|
+
"node_output_id": "c2a5a7f7-a234-45dc-adee-bc6fc0bd28dd",
|
276
|
+
"type": "NODE_OUTPUT",
|
277
|
+
},
|
278
|
+
"operator": "accessField",
|
279
|
+
"rhs": {
|
280
|
+
"state_variable_id": "0dd7f5a1-1d73-4153-9191-ca828ace4920",
|
281
|
+
"type": "WORKFLOW_STATE",
|
282
|
+
},
|
283
|
+
"type": "BINARY_EXPRESSION",
|
284
|
+
},
|
285
|
+
"operator": "accessField",
|
286
|
+
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "type"}},
|
287
|
+
"type": "BINARY_EXPRESSION",
|
203
288
|
},
|
289
|
+
"operator": "=",
|
290
|
+
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "FUNCTION_CALL"}},
|
291
|
+
"type": "BINARY_EXPRESSION",
|
204
292
|
},
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
293
|
+
"type": "BINARY_EXPRESSION",
|
294
|
+
},
|
295
|
+
"operator": "and",
|
296
|
+
"rhs": {
|
297
|
+
"lhs": {
|
298
|
+
"lhs": {
|
299
|
+
"lhs": {
|
300
|
+
"lhs": {
|
301
|
+
"node_id": "19e664fc-3b57-48d2-b47a-b143b475406a",
|
302
|
+
"node_output_id": "c2a5a7f7-a234-45dc-adee-bc6fc0bd28dd",
|
303
|
+
"type": "NODE_OUTPUT",
|
304
|
+
},
|
305
|
+
"operator": "accessField",
|
306
|
+
"rhs": {
|
307
|
+
"state_variable_id": "0dd7f5a1-1d73-4153-9191-ca828ace4920",
|
308
|
+
"type": "WORKFLOW_STATE",
|
309
|
+
},
|
310
|
+
"type": "BINARY_EXPRESSION",
|
311
|
+
},
|
312
|
+
"operator": "accessField",
|
313
|
+
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "value"}},
|
314
|
+
"type": "BINARY_EXPRESSION",
|
211
315
|
},
|
316
|
+
"operator": "accessField",
|
317
|
+
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "name"}},
|
318
|
+
"type": "BINARY_EXPRESSION",
|
212
319
|
},
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
320
|
+
"operator": "=",
|
321
|
+
"rhs": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "my_function"}},
|
322
|
+
"type": "BINARY_EXPRESSION",
|
323
|
+
},
|
324
|
+
"type": "BINARY_EXPRESSION",
|
325
|
+
},
|
326
|
+
"id": "afb4b09d-659b-459e-9a28-cf73ba6e0574",
|
327
|
+
"name": "my_function",
|
328
|
+
"type": "IF",
|
329
|
+
},
|
330
|
+
{"expression": None, "id": "4ecd916e-b5d0-407e-aab4-35551c76d02c", "name": "default", "type": "ELSE"},
|
331
|
+
],
|
332
|
+
"trigger": {"id": "73a96f44-c2dd-40cc-96f6-49b9f914b166", "merge_behavior": "AWAIT_ATTRIBUTES"},
|
333
|
+
"type": "GENERIC",
|
217
334
|
}
|
@@ -45,54 +45,20 @@ def test_serialize_workflow():
|
|
45
45
|
"id": "20adf593-c4f0-4c67-8e36-37eb66f28f66",
|
46
46
|
"name": "functions",
|
47
47
|
"value": {
|
48
|
-
"type": "
|
49
|
-
"
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
{
|
64
|
-
"id": "641decf3-79c5-4ef9-9fc8-06570d8a69af",
|
65
|
-
"key": "url",
|
66
|
-
"value": {
|
67
|
-
"type": "CONSTANT_VALUE",
|
68
|
-
"value": {"type": "STRING", "value": "https://api.githubcopilot.com/mcp/"},
|
69
|
-
},
|
70
|
-
},
|
71
|
-
{
|
72
|
-
"id": "801a74ca-7966-4ac3-b1b5-bebb71a7de07",
|
73
|
-
"key": "authorization_type",
|
74
|
-
"value": {"type": "CONSTANT_VALUE", "value": {"type": "STRING", "value": "BEARER_TOKEN"}},
|
75
|
-
},
|
76
|
-
{
|
77
|
-
"id": "fcd70e2f-0fb2-4011-a73b-90d5d7643be4",
|
78
|
-
"key": "bearer_token_value",
|
79
|
-
"value": {
|
80
|
-
"type": "ENVIRONMENT_VARIABLE",
|
81
|
-
"environment_variable": "GITHUB_PERSONAL_ACCESS_TOKEN",
|
82
|
-
},
|
83
|
-
},
|
84
|
-
{
|
85
|
-
"id": "b2fa2900-0e09-44ff-99db-c5399fd76d28",
|
86
|
-
"key": "api_key_header_key",
|
87
|
-
"value": {"type": "CONSTANT_VALUE", "value": {"type": "JSON", "value": None}},
|
88
|
-
},
|
89
|
-
{
|
90
|
-
"id": "6ab23414-5f1b-49c1-a0bc-891bbba9124c",
|
91
|
-
"key": "api_key_header_value",
|
92
|
-
"value": {"type": "CONSTANT_VALUE", "value": {"type": "JSON", "value": None}},
|
93
|
-
},
|
94
|
-
],
|
95
|
-
}
|
96
|
-
],
|
48
|
+
"type": "CONSTANT_VALUE",
|
49
|
+
"value": {
|
50
|
+
"type": "JSON",
|
51
|
+
"value": [
|
52
|
+
{
|
53
|
+
"type": "MCP_SERVER",
|
54
|
+
"name": "github",
|
55
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
56
|
+
"authorization_type": "BEARER_TOKEN",
|
57
|
+
"bearer_token_value": "GITHUB_PERSONAL_ACCESS_TOKEN",
|
58
|
+
"api_key_header_key": None,
|
59
|
+
"api_key_header_value": None,
|
60
|
+
}
|
61
|
+
],
|
62
|
+
},
|
97
63
|
},
|
98
64
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from dataclasses import dataclass, field
|
2
|
-
from typing import TYPE_CHECKING, Dict, Tuple, Type
|
2
|
+
from typing import TYPE_CHECKING, Dict, Iterator, List, Tuple, Type
|
3
3
|
|
4
4
|
from vellum.client import Vellum as VellumClient
|
5
5
|
from vellum.workflows.descriptors.base import BaseDescriptor
|
@@ -51,3 +51,16 @@ class WorkflowDisplayContext:
|
|
51
51
|
workflow_output_displays: WorkflowOutputDisplays = field(default_factory=dict)
|
52
52
|
edge_displays: EdgeDisplays = field(default_factory=dict)
|
53
53
|
port_displays: PortDisplays = field(default_factory=dict)
|
54
|
+
_errors: List[Exception] = field(default_factory=list)
|
55
|
+
_dry_run: bool = False
|
56
|
+
|
57
|
+
def add_error(self, error: Exception) -> None:
|
58
|
+
if self._dry_run:
|
59
|
+
self._errors.append(error)
|
60
|
+
return
|
61
|
+
|
62
|
+
raise error
|
63
|
+
|
64
|
+
@property
|
65
|
+
def errors(self) -> Iterator[Exception]:
|
66
|
+
return iter(self._errors)
|
@@ -266,10 +266,19 @@ def serialize_value(display_context: "WorkflowDisplayContext", value: Any) -> Js
|
|
266
266
|
}
|
267
267
|
|
268
268
|
if isinstance(value, EnvironmentVariableReference):
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
269
|
+
if value.serialize_as_constant:
|
270
|
+
return {
|
271
|
+
"type": "CONSTANT_VALUE",
|
272
|
+
"value": {
|
273
|
+
"type": "STRING",
|
274
|
+
"value": value.name,
|
275
|
+
},
|
276
|
+
}
|
277
|
+
else:
|
278
|
+
return {
|
279
|
+
"type": "ENVIRONMENT_VARIABLE",
|
280
|
+
"environment_variable": value.name,
|
281
|
+
}
|
273
282
|
|
274
283
|
if isinstance(value, ExecutionCountReference):
|
275
284
|
node_class_display = display_context.global_node_displays[value.node_class]
|
@@ -6,7 +6,7 @@ import inspect
|
|
6
6
|
import logging
|
7
7
|
import os
|
8
8
|
from uuid import UUID
|
9
|
-
from typing import Any, Dict, ForwardRef, Generic,
|
9
|
+
from typing import Any, Dict, ForwardRef, Generic, List, Optional, Tuple, Type, TypeVar, Union, cast, get_args
|
10
10
|
|
11
11
|
from vellum.client import Vellum as VellumClient
|
12
12
|
from vellum.client.core.pydantic_utilities import UniversalBaseModel
|
@@ -96,8 +96,6 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
96
96
|
# Used to explicitly specify display data for a workflow's ports.
|
97
97
|
port_displays: PortDisplays = {}
|
98
98
|
|
99
|
-
_errors: List[Exception]
|
100
|
-
|
101
99
|
_serialized_files: List[str]
|
102
100
|
|
103
101
|
_dry_run: bool
|
@@ -116,7 +114,6 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
116
114
|
if self._parent_display_context
|
117
115
|
else create_vellum_client()
|
118
116
|
)
|
119
|
-
self._errors = []
|
120
117
|
self._serialized_files = []
|
121
118
|
self._dry_run = dry_run
|
122
119
|
|
@@ -196,7 +193,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
196
193
|
try:
|
197
194
|
serialized_node = node_display.serialize(self.display_context)
|
198
195
|
except (NotImplementedError, NodeValidationError) as e:
|
199
|
-
self.add_error(e)
|
196
|
+
self.display_context.add_error(e)
|
200
197
|
continue
|
201
198
|
|
202
199
|
serialized_nodes[node_display.node_id] = serialized_node
|
@@ -315,7 +312,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
315
312
|
# If there are terminal nodes with no workflow output reference,
|
316
313
|
# raise a serialization error
|
317
314
|
if len(unreferenced_final_output_node_outputs) > 0:
|
318
|
-
self.add_error(
|
315
|
+
self.display_context.add_error(
|
319
316
|
ValueError("Unable to serialize terminal nodes that are not referenced by workflow outputs.")
|
320
317
|
)
|
321
318
|
|
@@ -375,7 +372,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
375
372
|
try:
|
376
373
|
self._apply_auto_layout(nodes_dict_list, edges)
|
377
374
|
except Exception as e:
|
378
|
-
self.add_error(e)
|
375
|
+
self.display_context.add_error(e)
|
379
376
|
|
380
377
|
return {
|
381
378
|
"workflow_raw_data": {
|
@@ -446,17 +443,6 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
446
443
|
"""Can be overridden as a class attribute to specify a custom workflow id."""
|
447
444
|
return self._workflow.__id__
|
448
445
|
|
449
|
-
def add_error(self, error: Exception) -> None:
|
450
|
-
if self._dry_run:
|
451
|
-
self._errors.append(error)
|
452
|
-
return
|
453
|
-
|
454
|
-
raise error
|
455
|
-
|
456
|
-
@property
|
457
|
-
def errors(self) -> Iterator[Exception]:
|
458
|
-
return iter(self._errors)
|
459
|
-
|
460
446
|
def _enrich_global_node_output_displays(
|
461
447
|
self,
|
462
448
|
node: Type[BaseNode],
|
@@ -606,6 +592,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
606
592
|
edge_displays=edge_displays,
|
607
593
|
port_displays=port_displays,
|
608
594
|
workflow_display_class=self.__class__,
|
595
|
+
_dry_run=self._dry_run,
|
609
596
|
)
|
610
597
|
|
611
598
|
def _generate_workflow_meta_display(self) -> WorkflowMetaDisplay:
|
@@ -896,7 +883,7 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
896
883
|
|
897
884
|
return WorkflowSerializationResult(
|
898
885
|
exec_config=exec_config,
|
899
|
-
errors=[str(error) for error in workflow_display.errors],
|
886
|
+
errors=[str(error) for error in workflow_display.display_context.errors],
|
900
887
|
)
|
901
888
|
|
902
889
|
def _gather_additional_module_files(self, module_path: str) -> Dict[str, str]:
|
File without changes
|
File without changes
|
File without changes
|