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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
import contextlib
|
|
4
|
+
import json
|
|
3
5
|
import typing
|
|
4
6
|
from json.decoder import JSONDecodeError
|
|
5
7
|
|
|
@@ -9,13 +11,19 @@ from ...core.http_response import AsyncHttpResponse, HttpResponse
|
|
|
9
11
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
10
12
|
from ...core.pydantic_utilities import parse_obj_as
|
|
11
13
|
from ...core.request_options import RequestOptions
|
|
14
|
+
from ...errors.bad_request_error import BadRequestError
|
|
15
|
+
from ...errors.internal_server_error import InternalServerError
|
|
16
|
+
from ...errors.misdirected_request_error import MisdirectedRequestError
|
|
17
|
+
from ...errors.not_found_error import NotFoundError
|
|
12
18
|
from ...types.paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
|
13
19
|
from ...types.paginated_workflow_deployment_release_list import PaginatedWorkflowDeploymentReleaseList
|
|
14
20
|
from ...types.paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
|
|
21
|
+
from ...types.update_active_workspace_response import UpdateActiveWorkspaceResponse
|
|
15
22
|
from ...types.workflow_deployment_event_executions_response import WorkflowDeploymentEventExecutionsResponse
|
|
16
23
|
from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
|
17
24
|
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
|
18
25
|
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
|
26
|
+
from ...types.workflow_event import WorkflowEvent
|
|
19
27
|
from ...types.workflow_event_execution_read import WorkflowEventExecutionRead
|
|
20
28
|
from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
|
|
21
29
|
from .types.list_workflow_release_tags_request_source import ListWorkflowReleaseTagsRequestSource
|
|
@@ -130,6 +138,136 @@ class RawWorkflowDeploymentsClient:
|
|
|
130
138
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
131
139
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
132
140
|
|
|
141
|
+
@contextlib.contextmanager
|
|
142
|
+
def execute_stream(
|
|
143
|
+
self,
|
|
144
|
+
id: str,
|
|
145
|
+
*,
|
|
146
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
147
|
+
trigger: typing.Optional[str] = OMIT,
|
|
148
|
+
release_tag: typing.Optional[str] = OMIT,
|
|
149
|
+
external_id: typing.Optional[str] = OMIT,
|
|
150
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
151
|
+
previous_execution_id: typing.Optional[str] = OMIT,
|
|
152
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
153
|
+
) -> typing.Iterator[HttpResponse[typing.Iterator[WorkflowEvent]]]:
|
|
154
|
+
"""
|
|
155
|
+
Executes a deployed Workflow and streams back its results.
|
|
156
|
+
|
|
157
|
+
Parameters
|
|
158
|
+
----------
|
|
159
|
+
id : str
|
|
160
|
+
Either the Workflow Deployment's ID or its unique name
|
|
161
|
+
|
|
162
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
163
|
+
A mapping from input name to value.
|
|
164
|
+
|
|
165
|
+
trigger : typing.Optional[str]
|
|
166
|
+
The name or ID of a workflow trigger to use for this execution. If not specified, then a default manual trigger will be chosen.
|
|
167
|
+
|
|
168
|
+
release_tag : typing.Optional[str]
|
|
169
|
+
Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment
|
|
170
|
+
|
|
171
|
+
external_id : typing.Optional[str]
|
|
172
|
+
Optionally include a unique identifier for tracking purposes. Must be unique within a given Workspace.
|
|
173
|
+
|
|
174
|
+
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
175
|
+
Arbitrary JSON metadata associated with this request. Can be used to capture additional monitoring data such as user id, session id, etc. for future analysis.
|
|
176
|
+
|
|
177
|
+
previous_execution_id : typing.Optional[str]
|
|
178
|
+
The ID of a previous workflow execution to reference for context.
|
|
179
|
+
|
|
180
|
+
request_options : typing.Optional[RequestOptions]
|
|
181
|
+
Request-specific configuration.
|
|
182
|
+
|
|
183
|
+
Yields
|
|
184
|
+
------
|
|
185
|
+
typing.Iterator[HttpResponse[typing.Iterator[WorkflowEvent]]]
|
|
186
|
+
|
|
187
|
+
"""
|
|
188
|
+
with self._client_wrapper.httpx_client.stream(
|
|
189
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execute-stream",
|
|
190
|
+
base_url=self._client_wrapper.get_environment().predict,
|
|
191
|
+
method="POST",
|
|
192
|
+
json={
|
|
193
|
+
"inputs": inputs,
|
|
194
|
+
"trigger": trigger,
|
|
195
|
+
"release_tag": release_tag,
|
|
196
|
+
"external_id": external_id,
|
|
197
|
+
"metadata": metadata,
|
|
198
|
+
"previous_execution_id": previous_execution_id,
|
|
199
|
+
},
|
|
200
|
+
headers={
|
|
201
|
+
"content-type": "application/json",
|
|
202
|
+
},
|
|
203
|
+
request_options=request_options,
|
|
204
|
+
omit=OMIT,
|
|
205
|
+
) as _response:
|
|
206
|
+
|
|
207
|
+
def _stream() -> HttpResponse[typing.Iterator[WorkflowEvent]]:
|
|
208
|
+
try:
|
|
209
|
+
if 200 <= _response.status_code < 300:
|
|
210
|
+
|
|
211
|
+
def _iter():
|
|
212
|
+
for _text in _response.iter_lines():
|
|
213
|
+
try:
|
|
214
|
+
if len(_text) == 0:
|
|
215
|
+
continue
|
|
216
|
+
yield typing.cast(
|
|
217
|
+
WorkflowEvent,
|
|
218
|
+
parse_obj_as(
|
|
219
|
+
type_=WorkflowEvent, # type: ignore
|
|
220
|
+
object_=json.loads(_text),
|
|
221
|
+
),
|
|
222
|
+
)
|
|
223
|
+
except Exception:
|
|
224
|
+
pass
|
|
225
|
+
return
|
|
226
|
+
|
|
227
|
+
return HttpResponse(response=_response, data=_iter())
|
|
228
|
+
_response.read()
|
|
229
|
+
if _response.status_code == 400:
|
|
230
|
+
raise BadRequestError(
|
|
231
|
+
headers=dict(_response.headers),
|
|
232
|
+
body=typing.cast(
|
|
233
|
+
typing.Optional[typing.Any],
|
|
234
|
+
parse_obj_as(
|
|
235
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
236
|
+
object_=_response.json(),
|
|
237
|
+
),
|
|
238
|
+
),
|
|
239
|
+
)
|
|
240
|
+
if _response.status_code == 404:
|
|
241
|
+
raise NotFoundError(
|
|
242
|
+
headers=dict(_response.headers),
|
|
243
|
+
body=typing.cast(
|
|
244
|
+
typing.Optional[typing.Any],
|
|
245
|
+
parse_obj_as(
|
|
246
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
247
|
+
object_=_response.json(),
|
|
248
|
+
),
|
|
249
|
+
),
|
|
250
|
+
)
|
|
251
|
+
if _response.status_code == 500:
|
|
252
|
+
raise InternalServerError(
|
|
253
|
+
headers=dict(_response.headers),
|
|
254
|
+
body=typing.cast(
|
|
255
|
+
typing.Optional[typing.Any],
|
|
256
|
+
parse_obj_as(
|
|
257
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
258
|
+
object_=_response.json(),
|
|
259
|
+
),
|
|
260
|
+
),
|
|
261
|
+
)
|
|
262
|
+
_response_json = _response.json()
|
|
263
|
+
except JSONDecodeError:
|
|
264
|
+
raise ApiError(
|
|
265
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
|
266
|
+
)
|
|
267
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
268
|
+
|
|
269
|
+
yield _stream()
|
|
270
|
+
|
|
133
271
|
def list_workflow_deployment_event_executions(
|
|
134
272
|
self,
|
|
135
273
|
id: str,
|
|
@@ -224,6 +362,39 @@ class RawWorkflowDeploymentsClient:
|
|
|
224
362
|
),
|
|
225
363
|
)
|
|
226
364
|
return HttpResponse(response=_response, data=_data)
|
|
365
|
+
if _response.status_code == 400:
|
|
366
|
+
raise BadRequestError(
|
|
367
|
+
headers=dict(_response.headers),
|
|
368
|
+
body=typing.cast(
|
|
369
|
+
typing.Optional[typing.Any],
|
|
370
|
+
parse_obj_as(
|
|
371
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
372
|
+
object_=_response.json(),
|
|
373
|
+
),
|
|
374
|
+
),
|
|
375
|
+
)
|
|
376
|
+
if _response.status_code == 404:
|
|
377
|
+
raise NotFoundError(
|
|
378
|
+
headers=dict(_response.headers),
|
|
379
|
+
body=typing.cast(
|
|
380
|
+
typing.Optional[typing.Any],
|
|
381
|
+
parse_obj_as(
|
|
382
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
383
|
+
object_=_response.json(),
|
|
384
|
+
),
|
|
385
|
+
),
|
|
386
|
+
)
|
|
387
|
+
if _response.status_code == 421:
|
|
388
|
+
raise MisdirectedRequestError(
|
|
389
|
+
headers=dict(_response.headers),
|
|
390
|
+
body=typing.cast(
|
|
391
|
+
UpdateActiveWorkspaceResponse,
|
|
392
|
+
parse_obj_as(
|
|
393
|
+
type_=UpdateActiveWorkspaceResponse, # type: ignore
|
|
394
|
+
object_=_response.json(),
|
|
395
|
+
),
|
|
396
|
+
),
|
|
397
|
+
)
|
|
227
398
|
_response_json = _response.json()
|
|
228
399
|
except JSONDecodeError:
|
|
229
400
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
@@ -647,6 +818,136 @@ class AsyncRawWorkflowDeploymentsClient:
|
|
|
647
818
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
648
819
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
649
820
|
|
|
821
|
+
@contextlib.asynccontextmanager
|
|
822
|
+
async def execute_stream(
|
|
823
|
+
self,
|
|
824
|
+
id: str,
|
|
825
|
+
*,
|
|
826
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
827
|
+
trigger: typing.Optional[str] = OMIT,
|
|
828
|
+
release_tag: typing.Optional[str] = OMIT,
|
|
829
|
+
external_id: typing.Optional[str] = OMIT,
|
|
830
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
831
|
+
previous_execution_id: typing.Optional[str] = OMIT,
|
|
832
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
833
|
+
) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[WorkflowEvent]]]:
|
|
834
|
+
"""
|
|
835
|
+
Executes a deployed Workflow and streams back its results.
|
|
836
|
+
|
|
837
|
+
Parameters
|
|
838
|
+
----------
|
|
839
|
+
id : str
|
|
840
|
+
Either the Workflow Deployment's ID or its unique name
|
|
841
|
+
|
|
842
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
843
|
+
A mapping from input name to value.
|
|
844
|
+
|
|
845
|
+
trigger : typing.Optional[str]
|
|
846
|
+
The name or ID of a workflow trigger to use for this execution. If not specified, then a default manual trigger will be chosen.
|
|
847
|
+
|
|
848
|
+
release_tag : typing.Optional[str]
|
|
849
|
+
Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment
|
|
850
|
+
|
|
851
|
+
external_id : typing.Optional[str]
|
|
852
|
+
Optionally include a unique identifier for tracking purposes. Must be unique within a given Workspace.
|
|
853
|
+
|
|
854
|
+
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
855
|
+
Arbitrary JSON metadata associated with this request. Can be used to capture additional monitoring data such as user id, session id, etc. for future analysis.
|
|
856
|
+
|
|
857
|
+
previous_execution_id : typing.Optional[str]
|
|
858
|
+
The ID of a previous workflow execution to reference for context.
|
|
859
|
+
|
|
860
|
+
request_options : typing.Optional[RequestOptions]
|
|
861
|
+
Request-specific configuration.
|
|
862
|
+
|
|
863
|
+
Yields
|
|
864
|
+
------
|
|
865
|
+
typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[WorkflowEvent]]]
|
|
866
|
+
|
|
867
|
+
"""
|
|
868
|
+
async with self._client_wrapper.httpx_client.stream(
|
|
869
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execute-stream",
|
|
870
|
+
base_url=self._client_wrapper.get_environment().predict,
|
|
871
|
+
method="POST",
|
|
872
|
+
json={
|
|
873
|
+
"inputs": inputs,
|
|
874
|
+
"trigger": trigger,
|
|
875
|
+
"release_tag": release_tag,
|
|
876
|
+
"external_id": external_id,
|
|
877
|
+
"metadata": metadata,
|
|
878
|
+
"previous_execution_id": previous_execution_id,
|
|
879
|
+
},
|
|
880
|
+
headers={
|
|
881
|
+
"content-type": "application/json",
|
|
882
|
+
},
|
|
883
|
+
request_options=request_options,
|
|
884
|
+
omit=OMIT,
|
|
885
|
+
) as _response:
|
|
886
|
+
|
|
887
|
+
async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[WorkflowEvent]]:
|
|
888
|
+
try:
|
|
889
|
+
if 200 <= _response.status_code < 300:
|
|
890
|
+
|
|
891
|
+
async def _iter():
|
|
892
|
+
async for _text in _response.aiter_lines():
|
|
893
|
+
try:
|
|
894
|
+
if len(_text) == 0:
|
|
895
|
+
continue
|
|
896
|
+
yield typing.cast(
|
|
897
|
+
WorkflowEvent,
|
|
898
|
+
parse_obj_as(
|
|
899
|
+
type_=WorkflowEvent, # type: ignore
|
|
900
|
+
object_=json.loads(_text),
|
|
901
|
+
),
|
|
902
|
+
)
|
|
903
|
+
except Exception:
|
|
904
|
+
pass
|
|
905
|
+
return
|
|
906
|
+
|
|
907
|
+
return AsyncHttpResponse(response=_response, data=_iter())
|
|
908
|
+
await _response.aread()
|
|
909
|
+
if _response.status_code == 400:
|
|
910
|
+
raise BadRequestError(
|
|
911
|
+
headers=dict(_response.headers),
|
|
912
|
+
body=typing.cast(
|
|
913
|
+
typing.Optional[typing.Any],
|
|
914
|
+
parse_obj_as(
|
|
915
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
916
|
+
object_=_response.json(),
|
|
917
|
+
),
|
|
918
|
+
),
|
|
919
|
+
)
|
|
920
|
+
if _response.status_code == 404:
|
|
921
|
+
raise NotFoundError(
|
|
922
|
+
headers=dict(_response.headers),
|
|
923
|
+
body=typing.cast(
|
|
924
|
+
typing.Optional[typing.Any],
|
|
925
|
+
parse_obj_as(
|
|
926
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
927
|
+
object_=_response.json(),
|
|
928
|
+
),
|
|
929
|
+
),
|
|
930
|
+
)
|
|
931
|
+
if _response.status_code == 500:
|
|
932
|
+
raise InternalServerError(
|
|
933
|
+
headers=dict(_response.headers),
|
|
934
|
+
body=typing.cast(
|
|
935
|
+
typing.Optional[typing.Any],
|
|
936
|
+
parse_obj_as(
|
|
937
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
938
|
+
object_=_response.json(),
|
|
939
|
+
),
|
|
940
|
+
),
|
|
941
|
+
)
|
|
942
|
+
_response_json = _response.json()
|
|
943
|
+
except JSONDecodeError:
|
|
944
|
+
raise ApiError(
|
|
945
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
|
946
|
+
)
|
|
947
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
948
|
+
|
|
949
|
+
yield await _stream()
|
|
950
|
+
|
|
650
951
|
async def list_workflow_deployment_event_executions(
|
|
651
952
|
self,
|
|
652
953
|
id: str,
|
|
@@ -741,6 +1042,39 @@ class AsyncRawWorkflowDeploymentsClient:
|
|
|
741
1042
|
),
|
|
742
1043
|
)
|
|
743
1044
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1045
|
+
if _response.status_code == 400:
|
|
1046
|
+
raise BadRequestError(
|
|
1047
|
+
headers=dict(_response.headers),
|
|
1048
|
+
body=typing.cast(
|
|
1049
|
+
typing.Optional[typing.Any],
|
|
1050
|
+
parse_obj_as(
|
|
1051
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1052
|
+
object_=_response.json(),
|
|
1053
|
+
),
|
|
1054
|
+
),
|
|
1055
|
+
)
|
|
1056
|
+
if _response.status_code == 404:
|
|
1057
|
+
raise NotFoundError(
|
|
1058
|
+
headers=dict(_response.headers),
|
|
1059
|
+
body=typing.cast(
|
|
1060
|
+
typing.Optional[typing.Any],
|
|
1061
|
+
parse_obj_as(
|
|
1062
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1063
|
+
object_=_response.json(),
|
|
1064
|
+
),
|
|
1065
|
+
),
|
|
1066
|
+
)
|
|
1067
|
+
if _response.status_code == 421:
|
|
1068
|
+
raise MisdirectedRequestError(
|
|
1069
|
+
headers=dict(_response.headers),
|
|
1070
|
+
body=typing.cast(
|
|
1071
|
+
UpdateActiveWorkspaceResponse,
|
|
1072
|
+
parse_obj_as(
|
|
1073
|
+
type_=UpdateActiveWorkspaceResponse, # type: ignore
|
|
1074
|
+
object_=_response.json(),
|
|
1075
|
+
),
|
|
1076
|
+
),
|
|
1077
|
+
)
|
|
744
1078
|
_response_json = _response.json()
|
|
745
1079
|
except JSONDecodeError:
|
|
746
1080
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
@@ -5,11 +5,15 @@ import typing
|
|
|
5
5
|
from ... import core
|
|
6
6
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
7
|
from ...core.request_options import RequestOptions
|
|
8
|
+
from ...types.check_workflow_execution_status_response import CheckWorkflowExecutionStatusResponse
|
|
8
9
|
from ...types.dataset_row_push_request import DatasetRowPushRequest
|
|
10
|
+
from ...types.runner_config_request import RunnerConfigRequest
|
|
11
|
+
from ...types.type_checker_enum import TypeCheckerEnum
|
|
9
12
|
from ...types.workflow_push_deployment_config_request import WorkflowPushDeploymentConfigRequest
|
|
10
13
|
from ...types.workflow_push_exec_config import WorkflowPushExecConfig
|
|
11
14
|
from ...types.workflow_push_response import WorkflowPushResponse
|
|
12
15
|
from ...types.workflow_resolved_state import WorkflowResolvedState
|
|
16
|
+
from ...types.workflow_sandbox_execute_node_response import WorkflowSandboxExecuteNodeResponse
|
|
13
17
|
from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient
|
|
14
18
|
|
|
15
19
|
# this is used as the default value for optional parameters
|
|
@@ -127,10 +131,87 @@ class WorkflowsClient:
|
|
|
127
131
|
_response = self._raw_client.retrieve_state(span_id, request_options=request_options)
|
|
128
132
|
return _response.data
|
|
129
133
|
|
|
134
|
+
def execute_node(
|
|
135
|
+
self,
|
|
136
|
+
*,
|
|
137
|
+
files: typing.Dict[str, str],
|
|
138
|
+
node: str,
|
|
139
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
140
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
141
|
+
) -> WorkflowSandboxExecuteNodeResponse:
|
|
142
|
+
"""
|
|
143
|
+
Parameters
|
|
144
|
+
----------
|
|
145
|
+
files : typing.Dict[str, str]
|
|
146
|
+
|
|
147
|
+
node : str
|
|
148
|
+
|
|
149
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
150
|
+
|
|
151
|
+
request_options : typing.Optional[RequestOptions]
|
|
152
|
+
Request-specific configuration.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
WorkflowSandboxExecuteNodeResponse
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
Examples
|
|
160
|
+
--------
|
|
161
|
+
from vellum import Vellum
|
|
162
|
+
|
|
163
|
+
client = Vellum(
|
|
164
|
+
api_version="YOUR_API_VERSION",
|
|
165
|
+
api_key="YOUR_API_KEY",
|
|
166
|
+
)
|
|
167
|
+
client.workflows.execute_node(
|
|
168
|
+
files={"files": "files"},
|
|
169
|
+
node="x",
|
|
170
|
+
)
|
|
171
|
+
"""
|
|
172
|
+
_response = self._raw_client.execute_node(
|
|
173
|
+
files=files, node=node, inputs=inputs, request_options=request_options
|
|
174
|
+
)
|
|
175
|
+
return _response.data
|
|
176
|
+
|
|
177
|
+
def workflow_execution_status(
|
|
178
|
+
self, execution_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
179
|
+
) -> CheckWorkflowExecutionStatusResponse:
|
|
180
|
+
"""
|
|
181
|
+
Checks if a workflow execution is currently executing (not fulfilled, not rejected, and has no end time).
|
|
182
|
+
Uses the ClickHouse Prime summary materialized view.
|
|
183
|
+
|
|
184
|
+
Parameters
|
|
185
|
+
----------
|
|
186
|
+
execution_id : str
|
|
187
|
+
|
|
188
|
+
request_options : typing.Optional[RequestOptions]
|
|
189
|
+
Request-specific configuration.
|
|
190
|
+
|
|
191
|
+
Returns
|
|
192
|
+
-------
|
|
193
|
+
CheckWorkflowExecutionStatusResponse
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
Examples
|
|
197
|
+
--------
|
|
198
|
+
from vellum import Vellum
|
|
199
|
+
|
|
200
|
+
client = Vellum(
|
|
201
|
+
api_version="YOUR_API_VERSION",
|
|
202
|
+
api_key="YOUR_API_KEY",
|
|
203
|
+
)
|
|
204
|
+
client.workflows.workflow_execution_status(
|
|
205
|
+
execution_id="execution_id",
|
|
206
|
+
)
|
|
207
|
+
"""
|
|
208
|
+
_response = self._raw_client.workflow_execution_status(execution_id, request_options=request_options)
|
|
209
|
+
return _response.data
|
|
210
|
+
|
|
130
211
|
def push(
|
|
131
212
|
self,
|
|
132
213
|
*,
|
|
133
|
-
exec_config: WorkflowPushExecConfig,
|
|
214
|
+
exec_config: typing.Optional[WorkflowPushExecConfig] = OMIT,
|
|
134
215
|
workflow_sandbox_id: typing.Optional[str] = OMIT,
|
|
135
216
|
deployment_config: typing.Optional[WorkflowPushDeploymentConfigRequest] = OMIT,
|
|
136
217
|
artifact: typing.Optional[core.File] = OMIT,
|
|
@@ -142,8 +223,8 @@ class WorkflowsClient:
|
|
|
142
223
|
"""
|
|
143
224
|
Parameters
|
|
144
225
|
----------
|
|
145
|
-
exec_config : WorkflowPushExecConfig
|
|
146
|
-
The execution configuration of the workflow.
|
|
226
|
+
exec_config : typing.Optional[WorkflowPushExecConfig]
|
|
227
|
+
The execution configuration of the workflow. If not provided, it will be derived from the artifact.
|
|
147
228
|
|
|
148
229
|
workflow_sandbox_id : typing.Optional[str]
|
|
149
230
|
|
|
@@ -184,6 +265,8 @@ class WorkflowsClient:
|
|
|
184
265
|
*,
|
|
185
266
|
files: typing.Dict[str, typing.Optional[typing.Any]],
|
|
186
267
|
module: typing.Optional[str] = OMIT,
|
|
268
|
+
runner_config: typing.Optional[RunnerConfigRequest] = OMIT,
|
|
269
|
+
type_checker: typing.Optional[TypeCheckerEnum] = OMIT,
|
|
187
270
|
request_options: typing.Optional[RequestOptions] = None,
|
|
188
271
|
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
189
272
|
"""
|
|
@@ -195,6 +278,15 @@ class WorkflowsClient:
|
|
|
195
278
|
|
|
196
279
|
module : typing.Optional[str]
|
|
197
280
|
|
|
281
|
+
runner_config : typing.Optional[RunnerConfigRequest]
|
|
282
|
+
|
|
283
|
+
type_checker : typing.Optional[TypeCheckerEnum]
|
|
284
|
+
Optional type checker to run during serialization. Supported values: mypy, zuban, default.
|
|
285
|
+
|
|
286
|
+
* `mypy` - Mypy
|
|
287
|
+
* `zuban` - Zuban
|
|
288
|
+
* `default` - Default
|
|
289
|
+
|
|
198
290
|
request_options : typing.Optional[RequestOptions]
|
|
199
291
|
Request-specific configuration.
|
|
200
292
|
|
|
@@ -216,7 +308,11 @@ class WorkflowsClient:
|
|
|
216
308
|
)
|
|
217
309
|
"""
|
|
218
310
|
_response = self._raw_client.serialize_workflow_files(
|
|
219
|
-
files=files,
|
|
311
|
+
files=files,
|
|
312
|
+
module=module,
|
|
313
|
+
runner_config=runner_config,
|
|
314
|
+
type_checker=type_checker,
|
|
315
|
+
request_options=request_options,
|
|
220
316
|
)
|
|
221
317
|
return _response.data
|
|
222
318
|
|
|
@@ -337,10 +433,103 @@ class AsyncWorkflowsClient:
|
|
|
337
433
|
_response = await self._raw_client.retrieve_state(span_id, request_options=request_options)
|
|
338
434
|
return _response.data
|
|
339
435
|
|
|
436
|
+
async def execute_node(
|
|
437
|
+
self,
|
|
438
|
+
*,
|
|
439
|
+
files: typing.Dict[str, str],
|
|
440
|
+
node: str,
|
|
441
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
442
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
443
|
+
) -> WorkflowSandboxExecuteNodeResponse:
|
|
444
|
+
"""
|
|
445
|
+
Parameters
|
|
446
|
+
----------
|
|
447
|
+
files : typing.Dict[str, str]
|
|
448
|
+
|
|
449
|
+
node : str
|
|
450
|
+
|
|
451
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
452
|
+
|
|
453
|
+
request_options : typing.Optional[RequestOptions]
|
|
454
|
+
Request-specific configuration.
|
|
455
|
+
|
|
456
|
+
Returns
|
|
457
|
+
-------
|
|
458
|
+
WorkflowSandboxExecuteNodeResponse
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
Examples
|
|
462
|
+
--------
|
|
463
|
+
import asyncio
|
|
464
|
+
|
|
465
|
+
from vellum import AsyncVellum
|
|
466
|
+
|
|
467
|
+
client = AsyncVellum(
|
|
468
|
+
api_version="YOUR_API_VERSION",
|
|
469
|
+
api_key="YOUR_API_KEY",
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
async def main() -> None:
|
|
474
|
+
await client.workflows.execute_node(
|
|
475
|
+
files={"files": "files"},
|
|
476
|
+
node="x",
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
asyncio.run(main())
|
|
481
|
+
"""
|
|
482
|
+
_response = await self._raw_client.execute_node(
|
|
483
|
+
files=files, node=node, inputs=inputs, request_options=request_options
|
|
484
|
+
)
|
|
485
|
+
return _response.data
|
|
486
|
+
|
|
487
|
+
async def workflow_execution_status(
|
|
488
|
+
self, execution_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
489
|
+
) -> CheckWorkflowExecutionStatusResponse:
|
|
490
|
+
"""
|
|
491
|
+
Checks if a workflow execution is currently executing (not fulfilled, not rejected, and has no end time).
|
|
492
|
+
Uses the ClickHouse Prime summary materialized view.
|
|
493
|
+
|
|
494
|
+
Parameters
|
|
495
|
+
----------
|
|
496
|
+
execution_id : str
|
|
497
|
+
|
|
498
|
+
request_options : typing.Optional[RequestOptions]
|
|
499
|
+
Request-specific configuration.
|
|
500
|
+
|
|
501
|
+
Returns
|
|
502
|
+
-------
|
|
503
|
+
CheckWorkflowExecutionStatusResponse
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
Examples
|
|
507
|
+
--------
|
|
508
|
+
import asyncio
|
|
509
|
+
|
|
510
|
+
from vellum import AsyncVellum
|
|
511
|
+
|
|
512
|
+
client = AsyncVellum(
|
|
513
|
+
api_version="YOUR_API_VERSION",
|
|
514
|
+
api_key="YOUR_API_KEY",
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
async def main() -> None:
|
|
519
|
+
await client.workflows.workflow_execution_status(
|
|
520
|
+
execution_id="execution_id",
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
asyncio.run(main())
|
|
525
|
+
"""
|
|
526
|
+
_response = await self._raw_client.workflow_execution_status(execution_id, request_options=request_options)
|
|
527
|
+
return _response.data
|
|
528
|
+
|
|
340
529
|
async def push(
|
|
341
530
|
self,
|
|
342
531
|
*,
|
|
343
|
-
exec_config: WorkflowPushExecConfig,
|
|
532
|
+
exec_config: typing.Optional[WorkflowPushExecConfig] = OMIT,
|
|
344
533
|
workflow_sandbox_id: typing.Optional[str] = OMIT,
|
|
345
534
|
deployment_config: typing.Optional[WorkflowPushDeploymentConfigRequest] = OMIT,
|
|
346
535
|
artifact: typing.Optional[core.File] = OMIT,
|
|
@@ -352,8 +541,8 @@ class AsyncWorkflowsClient:
|
|
|
352
541
|
"""
|
|
353
542
|
Parameters
|
|
354
543
|
----------
|
|
355
|
-
exec_config : WorkflowPushExecConfig
|
|
356
|
-
The execution configuration of the workflow.
|
|
544
|
+
exec_config : typing.Optional[WorkflowPushExecConfig]
|
|
545
|
+
The execution configuration of the workflow. If not provided, it will be derived from the artifact.
|
|
357
546
|
|
|
358
547
|
workflow_sandbox_id : typing.Optional[str]
|
|
359
548
|
|
|
@@ -394,6 +583,8 @@ class AsyncWorkflowsClient:
|
|
|
394
583
|
*,
|
|
395
584
|
files: typing.Dict[str, typing.Optional[typing.Any]],
|
|
396
585
|
module: typing.Optional[str] = OMIT,
|
|
586
|
+
runner_config: typing.Optional[RunnerConfigRequest] = OMIT,
|
|
587
|
+
type_checker: typing.Optional[TypeCheckerEnum] = OMIT,
|
|
397
588
|
request_options: typing.Optional[RequestOptions] = None,
|
|
398
589
|
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
399
590
|
"""
|
|
@@ -405,6 +596,15 @@ class AsyncWorkflowsClient:
|
|
|
405
596
|
|
|
406
597
|
module : typing.Optional[str]
|
|
407
598
|
|
|
599
|
+
runner_config : typing.Optional[RunnerConfigRequest]
|
|
600
|
+
|
|
601
|
+
type_checker : typing.Optional[TypeCheckerEnum]
|
|
602
|
+
Optional type checker to run during serialization. Supported values: mypy, zuban, default.
|
|
603
|
+
|
|
604
|
+
* `mypy` - Mypy
|
|
605
|
+
* `zuban` - Zuban
|
|
606
|
+
* `default` - Default
|
|
607
|
+
|
|
408
608
|
request_options : typing.Optional[RequestOptions]
|
|
409
609
|
Request-specific configuration.
|
|
410
610
|
|
|
@@ -434,6 +634,10 @@ class AsyncWorkflowsClient:
|
|
|
434
634
|
asyncio.run(main())
|
|
435
635
|
"""
|
|
436
636
|
_response = await self._raw_client.serialize_workflow_files(
|
|
437
|
-
files=files,
|
|
637
|
+
files=files,
|
|
638
|
+
module=module,
|
|
639
|
+
runner_config=runner_config,
|
|
640
|
+
type_checker=type_checker,
|
|
641
|
+
request_options=request_options,
|
|
438
642
|
)
|
|
439
643
|
return _response.data
|