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
|
@@ -12,6 +12,7 @@ from ...core.request_options import RequestOptions
|
|
|
12
12
|
from ...errors.bad_request_error import BadRequestError
|
|
13
13
|
from ...errors.forbidden_error import ForbiddenError
|
|
14
14
|
from ...errors.not_found_error import NotFoundError
|
|
15
|
+
from ...errors.too_many_requests_error import TooManyRequestsError
|
|
15
16
|
from ...types.components_schemas_composio_execute_tool_response import ComponentsSchemasComposioExecuteToolResponse
|
|
16
17
|
from ...types.components_schemas_composio_tool_definition import ComponentsSchemasComposioToolDefinition
|
|
17
18
|
from ...types.integration_read import IntegrationRead
|
|
@@ -31,6 +32,7 @@ class RawIntegrationsClient:
|
|
|
31
32
|
integration_provider: str,
|
|
32
33
|
tool_name: str,
|
|
33
34
|
*,
|
|
35
|
+
toolkit_version: typing.Optional[str] = None,
|
|
34
36
|
request_options: typing.Optional[RequestOptions] = None,
|
|
35
37
|
) -> HttpResponse[ComponentsSchemasComposioToolDefinition]:
|
|
36
38
|
"""
|
|
@@ -45,6 +47,9 @@ class RawIntegrationsClient:
|
|
|
45
47
|
tool_name : str
|
|
46
48
|
The tool's unique name, as specified by the integration provider
|
|
47
49
|
|
|
50
|
+
toolkit_version : typing.Optional[str]
|
|
51
|
+
The version of the toolkit to use. Pass 'latest' to get the latest version, or a specific version string to pin it. If not provided, uses the provider's default.
|
|
52
|
+
|
|
48
53
|
request_options : typing.Optional[RequestOptions]
|
|
49
54
|
Request-specific configuration.
|
|
50
55
|
|
|
@@ -57,6 +62,9 @@ class RawIntegrationsClient:
|
|
|
57
62
|
f"integrations/v1/providers/{jsonable_encoder(integration_provider)}/integrations/{jsonable_encoder(integration_name)}/tools/{jsonable_encoder(tool_name)}",
|
|
58
63
|
base_url=self._client_wrapper.get_environment().default,
|
|
59
64
|
method="GET",
|
|
65
|
+
params={
|
|
66
|
+
"toolkit_version": toolkit_version,
|
|
67
|
+
},
|
|
60
68
|
request_options=request_options,
|
|
61
69
|
)
|
|
62
70
|
try:
|
|
@@ -92,6 +100,9 @@ class RawIntegrationsClient:
|
|
|
92
100
|
tool_name: str,
|
|
93
101
|
*,
|
|
94
102
|
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
|
103
|
+
toolkit_version: typing.Optional[str] = OMIT,
|
|
104
|
+
integration: typing.Optional[str] = OMIT,
|
|
105
|
+
tool: typing.Optional[str] = OMIT,
|
|
95
106
|
request_options: typing.Optional[RequestOptions] = None,
|
|
96
107
|
) -> HttpResponse[ComponentsSchemasComposioExecuteToolResponse]:
|
|
97
108
|
"""
|
|
@@ -108,6 +119,12 @@ class RawIntegrationsClient:
|
|
|
108
119
|
|
|
109
120
|
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
|
110
121
|
|
|
122
|
+
toolkit_version : typing.Optional[str]
|
|
123
|
+
|
|
124
|
+
integration : typing.Optional[str]
|
|
125
|
+
|
|
126
|
+
tool : typing.Optional[str]
|
|
127
|
+
|
|
111
128
|
request_options : typing.Optional[RequestOptions]
|
|
112
129
|
Request-specific configuration.
|
|
113
130
|
|
|
@@ -122,6 +139,9 @@ class RawIntegrationsClient:
|
|
|
122
139
|
method="POST",
|
|
123
140
|
json={
|
|
124
141
|
"arguments": arguments,
|
|
142
|
+
"toolkit_version": toolkit_version,
|
|
143
|
+
"integration": integration,
|
|
144
|
+
"tool": tool,
|
|
125
145
|
"provider": "COMPOSIO",
|
|
126
146
|
},
|
|
127
147
|
headers={
|
|
@@ -173,6 +193,17 @@ class RawIntegrationsClient:
|
|
|
173
193
|
),
|
|
174
194
|
),
|
|
175
195
|
)
|
|
196
|
+
if _response.status_code == 429:
|
|
197
|
+
raise TooManyRequestsError(
|
|
198
|
+
headers=dict(_response.headers),
|
|
199
|
+
body=typing.cast(
|
|
200
|
+
typing.Optional[typing.Any],
|
|
201
|
+
parse_obj_as(
|
|
202
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
203
|
+
object_=_response.json(),
|
|
204
|
+
),
|
|
205
|
+
),
|
|
206
|
+
)
|
|
176
207
|
_response_json = _response.json()
|
|
177
208
|
except JSONDecodeError:
|
|
178
209
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
@@ -299,6 +330,7 @@ class AsyncRawIntegrationsClient:
|
|
|
299
330
|
integration_provider: str,
|
|
300
331
|
tool_name: str,
|
|
301
332
|
*,
|
|
333
|
+
toolkit_version: typing.Optional[str] = None,
|
|
302
334
|
request_options: typing.Optional[RequestOptions] = None,
|
|
303
335
|
) -> AsyncHttpResponse[ComponentsSchemasComposioToolDefinition]:
|
|
304
336
|
"""
|
|
@@ -313,6 +345,9 @@ class AsyncRawIntegrationsClient:
|
|
|
313
345
|
tool_name : str
|
|
314
346
|
The tool's unique name, as specified by the integration provider
|
|
315
347
|
|
|
348
|
+
toolkit_version : typing.Optional[str]
|
|
349
|
+
The version of the toolkit to use. Pass 'latest' to get the latest version, or a specific version string to pin it. If not provided, uses the provider's default.
|
|
350
|
+
|
|
316
351
|
request_options : typing.Optional[RequestOptions]
|
|
317
352
|
Request-specific configuration.
|
|
318
353
|
|
|
@@ -325,6 +360,9 @@ class AsyncRawIntegrationsClient:
|
|
|
325
360
|
f"integrations/v1/providers/{jsonable_encoder(integration_provider)}/integrations/{jsonable_encoder(integration_name)}/tools/{jsonable_encoder(tool_name)}",
|
|
326
361
|
base_url=self._client_wrapper.get_environment().default,
|
|
327
362
|
method="GET",
|
|
363
|
+
params={
|
|
364
|
+
"toolkit_version": toolkit_version,
|
|
365
|
+
},
|
|
328
366
|
request_options=request_options,
|
|
329
367
|
)
|
|
330
368
|
try:
|
|
@@ -360,6 +398,9 @@ class AsyncRawIntegrationsClient:
|
|
|
360
398
|
tool_name: str,
|
|
361
399
|
*,
|
|
362
400
|
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
|
401
|
+
toolkit_version: typing.Optional[str] = OMIT,
|
|
402
|
+
integration: typing.Optional[str] = OMIT,
|
|
403
|
+
tool: typing.Optional[str] = OMIT,
|
|
363
404
|
request_options: typing.Optional[RequestOptions] = None,
|
|
364
405
|
) -> AsyncHttpResponse[ComponentsSchemasComposioExecuteToolResponse]:
|
|
365
406
|
"""
|
|
@@ -376,6 +417,12 @@ class AsyncRawIntegrationsClient:
|
|
|
376
417
|
|
|
377
418
|
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
|
378
419
|
|
|
420
|
+
toolkit_version : typing.Optional[str]
|
|
421
|
+
|
|
422
|
+
integration : typing.Optional[str]
|
|
423
|
+
|
|
424
|
+
tool : typing.Optional[str]
|
|
425
|
+
|
|
379
426
|
request_options : typing.Optional[RequestOptions]
|
|
380
427
|
Request-specific configuration.
|
|
381
428
|
|
|
@@ -390,6 +437,9 @@ class AsyncRawIntegrationsClient:
|
|
|
390
437
|
method="POST",
|
|
391
438
|
json={
|
|
392
439
|
"arguments": arguments,
|
|
440
|
+
"toolkit_version": toolkit_version,
|
|
441
|
+
"integration": integration,
|
|
442
|
+
"tool": tool,
|
|
393
443
|
"provider": "COMPOSIO",
|
|
394
444
|
},
|
|
395
445
|
headers={
|
|
@@ -441,6 +491,17 @@ class AsyncRawIntegrationsClient:
|
|
|
441
491
|
),
|
|
442
492
|
),
|
|
443
493
|
)
|
|
494
|
+
if _response.status_code == 429:
|
|
495
|
+
raise TooManyRequestsError(
|
|
496
|
+
headers=dict(_response.headers),
|
|
497
|
+
body=typing.cast(
|
|
498
|
+
typing.Optional[typing.Any],
|
|
499
|
+
parse_obj_as(
|
|
500
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
501
|
+
object_=_response.json(),
|
|
502
|
+
),
|
|
503
|
+
),
|
|
504
|
+
)
|
|
444
505
|
_response_json = _response.json()
|
|
445
506
|
except JSONDecodeError:
|
|
446
507
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
@@ -11,6 +11,7 @@ from ...types.workflow_deployment_event_executions_response import WorkflowDeplo
|
|
|
11
11
|
from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
|
12
12
|
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
|
13
13
|
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
|
14
|
+
from ...types.workflow_event import WorkflowEvent
|
|
14
15
|
from ...types.workflow_event_execution_read import WorkflowEventExecutionRead
|
|
15
16
|
from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
|
|
16
17
|
from .raw_client import AsyncRawWorkflowDeploymentsClient, RawWorkflowDeploymentsClient
|
|
@@ -121,6 +122,79 @@ class WorkflowDeploymentsClient:
|
|
|
121
122
|
_response = self._raw_client.retrieve(id, request_options=request_options)
|
|
122
123
|
return _response.data
|
|
123
124
|
|
|
125
|
+
def execute_stream(
|
|
126
|
+
self,
|
|
127
|
+
id: str,
|
|
128
|
+
*,
|
|
129
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
130
|
+
trigger: typing.Optional[str] = OMIT,
|
|
131
|
+
release_tag: typing.Optional[str] = OMIT,
|
|
132
|
+
external_id: typing.Optional[str] = OMIT,
|
|
133
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
134
|
+
previous_execution_id: typing.Optional[str] = OMIT,
|
|
135
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
136
|
+
) -> typing.Iterator[WorkflowEvent]:
|
|
137
|
+
"""
|
|
138
|
+
Executes a deployed Workflow and streams back its results.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
id : str
|
|
143
|
+
Either the Workflow Deployment's ID or its unique name
|
|
144
|
+
|
|
145
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
146
|
+
A mapping from input name to value.
|
|
147
|
+
|
|
148
|
+
trigger : typing.Optional[str]
|
|
149
|
+
The name or ID of a workflow trigger to use for this execution. If not specified, then a default manual trigger will be chosen.
|
|
150
|
+
|
|
151
|
+
release_tag : typing.Optional[str]
|
|
152
|
+
Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment
|
|
153
|
+
|
|
154
|
+
external_id : typing.Optional[str]
|
|
155
|
+
Optionally include a unique identifier for tracking purposes. Must be unique within a given Workspace.
|
|
156
|
+
|
|
157
|
+
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
158
|
+
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.
|
|
159
|
+
|
|
160
|
+
previous_execution_id : typing.Optional[str]
|
|
161
|
+
The ID of a previous workflow execution to reference for context.
|
|
162
|
+
|
|
163
|
+
request_options : typing.Optional[RequestOptions]
|
|
164
|
+
Request-specific configuration.
|
|
165
|
+
|
|
166
|
+
Yields
|
|
167
|
+
------
|
|
168
|
+
typing.Iterator[WorkflowEvent]
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
Examples
|
|
172
|
+
--------
|
|
173
|
+
from vellum import Vellum
|
|
174
|
+
|
|
175
|
+
client = Vellum(
|
|
176
|
+
api_version="YOUR_API_VERSION",
|
|
177
|
+
api_key="YOUR_API_KEY",
|
|
178
|
+
)
|
|
179
|
+
response = client.workflow_deployments.execute_stream(
|
|
180
|
+
id="my-workflow",
|
|
181
|
+
inputs={"question": "What is the capital of France?"},
|
|
182
|
+
)
|
|
183
|
+
for chunk in response:
|
|
184
|
+
yield chunk
|
|
185
|
+
"""
|
|
186
|
+
with self._raw_client.execute_stream(
|
|
187
|
+
id,
|
|
188
|
+
inputs=inputs,
|
|
189
|
+
trigger=trigger,
|
|
190
|
+
release_tag=release_tag,
|
|
191
|
+
external_id=external_id,
|
|
192
|
+
metadata=metadata,
|
|
193
|
+
previous_execution_id=previous_execution_id,
|
|
194
|
+
request_options=request_options,
|
|
195
|
+
) as r:
|
|
196
|
+
yield from r.data
|
|
197
|
+
|
|
124
198
|
def list_workflow_deployment_event_executions(
|
|
125
199
|
self,
|
|
126
200
|
id: str,
|
|
@@ -594,6 +668,88 @@ class AsyncWorkflowDeploymentsClient:
|
|
|
594
668
|
_response = await self._raw_client.retrieve(id, request_options=request_options)
|
|
595
669
|
return _response.data
|
|
596
670
|
|
|
671
|
+
async def execute_stream(
|
|
672
|
+
self,
|
|
673
|
+
id: str,
|
|
674
|
+
*,
|
|
675
|
+
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
676
|
+
trigger: typing.Optional[str] = OMIT,
|
|
677
|
+
release_tag: typing.Optional[str] = OMIT,
|
|
678
|
+
external_id: typing.Optional[str] = OMIT,
|
|
679
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
680
|
+
previous_execution_id: typing.Optional[str] = OMIT,
|
|
681
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
682
|
+
) -> typing.AsyncIterator[WorkflowEvent]:
|
|
683
|
+
"""
|
|
684
|
+
Executes a deployed Workflow and streams back its results.
|
|
685
|
+
|
|
686
|
+
Parameters
|
|
687
|
+
----------
|
|
688
|
+
id : str
|
|
689
|
+
Either the Workflow Deployment's ID or its unique name
|
|
690
|
+
|
|
691
|
+
inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
692
|
+
A mapping from input name to value.
|
|
693
|
+
|
|
694
|
+
trigger : typing.Optional[str]
|
|
695
|
+
The name or ID of a workflow trigger to use for this execution. If not specified, then a default manual trigger will be chosen.
|
|
696
|
+
|
|
697
|
+
release_tag : typing.Optional[str]
|
|
698
|
+
Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment
|
|
699
|
+
|
|
700
|
+
external_id : typing.Optional[str]
|
|
701
|
+
Optionally include a unique identifier for tracking purposes. Must be unique within a given Workspace.
|
|
702
|
+
|
|
703
|
+
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
704
|
+
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.
|
|
705
|
+
|
|
706
|
+
previous_execution_id : typing.Optional[str]
|
|
707
|
+
The ID of a previous workflow execution to reference for context.
|
|
708
|
+
|
|
709
|
+
request_options : typing.Optional[RequestOptions]
|
|
710
|
+
Request-specific configuration.
|
|
711
|
+
|
|
712
|
+
Yields
|
|
713
|
+
------
|
|
714
|
+
typing.AsyncIterator[WorkflowEvent]
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
Examples
|
|
718
|
+
--------
|
|
719
|
+
import asyncio
|
|
720
|
+
|
|
721
|
+
from vellum import AsyncVellum
|
|
722
|
+
|
|
723
|
+
client = AsyncVellum(
|
|
724
|
+
api_version="YOUR_API_VERSION",
|
|
725
|
+
api_key="YOUR_API_KEY",
|
|
726
|
+
)
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
async def main() -> None:
|
|
730
|
+
response = await client.workflow_deployments.execute_stream(
|
|
731
|
+
id="my-workflow",
|
|
732
|
+
inputs={"question": "What is the capital of France?"},
|
|
733
|
+
)
|
|
734
|
+
async for chunk in response:
|
|
735
|
+
yield chunk
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
asyncio.run(main())
|
|
739
|
+
"""
|
|
740
|
+
async with self._raw_client.execute_stream(
|
|
741
|
+
id,
|
|
742
|
+
inputs=inputs,
|
|
743
|
+
trigger=trigger,
|
|
744
|
+
release_tag=release_tag,
|
|
745
|
+
external_id=external_id,
|
|
746
|
+
metadata=metadata,
|
|
747
|
+
previous_execution_id=previous_execution_id,
|
|
748
|
+
request_options=request_options,
|
|
749
|
+
) as r:
|
|
750
|
+
async for _chunk in r.data:
|
|
751
|
+
yield _chunk
|
|
752
|
+
|
|
597
753
|
async def list_workflow_deployment_event_executions(
|
|
598
754
|
self,
|
|
599
755
|
id: str,
|