vellum-ai 0.3.23__py3-none-any.whl → 0.5.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +37 -60
- vellum/client.py +139 -137
- vellum/core/__init__.py +2 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/core/jsonable_encoder.py +5 -9
- vellum/core/pydantic_utilities.py +12 -0
- vellum/errors/__init__.py +1 -2
- vellum/lib/__init__.py +5 -0
- vellum/lib/test_suites/__init__.py +5 -0
- vellum/lib/test_suites/constants.py +2 -0
- vellum/lib/test_suites/exceptions.py +2 -0
- vellum/lib/test_suites/resources.py +331 -0
- vellum/lib/utils/__init__.py +0 -0
- vellum/lib/utils/env.py +13 -0
- vellum/lib/utils/exceptions.py +2 -0
- vellum/lib/utils/paginator.py +29 -0
- vellum/resources/__init__.py +0 -4
- vellum/resources/deployments/client.py +27 -31
- vellum/resources/deployments/types/deployments_list_request_status.py +1 -13
- vellum/resources/document_indexes/client.py +35 -39
- vellum/resources/document_indexes/types/document_indexes_list_request_status.py +1 -13
- vellum/resources/documents/client.py +131 -35
- vellum/resources/folder_entities/client.py +4 -4
- vellum/resources/sandboxes/client.py +18 -46
- vellum/resources/test_suite_runs/client.py +19 -23
- vellum/resources/test_suites/client.py +17 -21
- vellum/resources/workflow_deployments/client.py +13 -17
- vellum/resources/workflow_deployments/types/workflow_deployments_list_request_status.py +1 -13
- vellum/types/__init__.py +37 -55
- vellum/types/api_node_result.py +3 -7
- vellum/types/api_node_result_data.py +4 -8
- vellum/types/array_chat_message_content.py +3 -7
- vellum/types/array_chat_message_content_request.py +3 -7
- vellum/types/chat_history_input_request.py +4 -8
- vellum/types/chat_history_variable_value.py +3 -7
- vellum/types/chat_message.py +4 -8
- vellum/types/chat_message_request.py +4 -8
- vellum/types/chat_message_role.py +1 -32
- vellum/types/code_execution_node_array_result.py +3 -7
- vellum/types/code_execution_node_chat_history_result.py +3 -7
- vellum/types/code_execution_node_error_result.py +3 -7
- vellum/types/code_execution_node_function_call_result.py +3 -7
- vellum/types/code_execution_node_json_result.py +3 -7
- vellum/types/code_execution_node_number_result.py +3 -7
- vellum/types/code_execution_node_result.py +3 -7
- vellum/types/code_execution_node_result_data.py +3 -7
- vellum/types/code_execution_node_search_results_result.py +3 -7
- vellum/types/code_execution_node_string_result.py +3 -7
- vellum/types/conditional_node_result.py +3 -7
- vellum/types/conditional_node_result_data.py +3 -7
- vellum/types/deployment_provider_payload_response.py +3 -7
- vellum/types/deployment_read.py +8 -12
- vellum/types/document_document_to_document_index.py +6 -10
- vellum/types/document_index_read.py +8 -12
- vellum/types/document_read.py +8 -12
- vellum/types/enriched_normalized_completion.py +9 -13
- vellum/types/entity_status.py +1 -18
- vellum/types/environment_enum.py +1 -27
- vellum/types/error_variable_value.py +3 -7
- vellum/types/execute_prompt_api_error_response.py +4 -8
- vellum/types/execute_workflow_error_response.py +4 -8
- vellum/types/execute_workflow_response.py +3 -7
- vellum/types/execute_workflow_stream_error_response.py +4 -8
- vellum/types/execution_array_vellum_value.py +4 -8
- vellum/types/execution_chat_history_vellum_value.py +4 -8
- vellum/types/execution_error_vellum_value.py +4 -8
- vellum/types/execution_function_call_vellum_value.py +4 -8
- vellum/types/execution_json_vellum_value.py +4 -8
- vellum/types/execution_number_vellum_value.py +4 -8
- vellum/types/execution_search_results_vellum_value.py +4 -8
- vellum/types/execution_string_vellum_value.py +4 -8
- vellum/types/external_test_case_execution.py +4 -8
- vellum/types/external_test_case_execution_request.py +4 -8
- vellum/types/finish_reason_enum.py +1 -27
- vellum/types/fulfilled_execute_prompt_event.py +3 -7
- vellum/types/fulfilled_execute_prompt_response.py +5 -9
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +3 -7
- vellum/types/fulfilled_function_call.py +3 -7
- vellum/types/{registered_prompt_input_variable_request.py → fulfilled_function_call_request.py} +10 -9
- vellum/types/fulfilled_prompt_execution_meta.py +3 -7
- vellum/types/fulfilled_workflow_node_result_event.py +3 -7
- vellum/types/function_call_chat_message_content.py +3 -7
- vellum/types/function_call_chat_message_content_request.py +3 -7
- vellum/types/function_call_chat_message_content_value.py +3 -7
- vellum/types/function_call_chat_message_content_value_request.py +3 -7
- vellum/types/function_call_variable_value.py +3 -7
- vellum/types/generate_error_response.py +4 -8
- vellum/types/generate_options_request.py +4 -8
- vellum/types/generate_request.py +6 -10
- vellum/types/generate_result.py +5 -9
- vellum/types/generate_result_data.py +4 -8
- vellum/types/generate_result_error.py +4 -8
- vellum/types/generate_stream_response.py +3 -7
- vellum/types/generate_stream_result.py +3 -7
- vellum/types/generate_stream_result_data.py +3 -7
- vellum/types/image_chat_message_content.py +3 -7
- vellum/types/image_chat_message_content_request.py +3 -7
- vellum/types/image_variable_value.py +3 -7
- vellum/types/indexing_state_enum.py +3 -37
- vellum/types/initiated_execute_prompt_event.py +3 -7
- vellum/types/initiated_prompt_execution_meta.py +3 -7
- vellum/types/initiated_workflow_node_result_event.py +3 -7
- vellum/types/json_input_request.py +4 -8
- vellum/types/json_variable_value.py +3 -7
- vellum/types/logical_operator.py +23 -173
- vellum/types/logprobs_enum.py +1 -18
- vellum/types/metadata_filter_config_request.py +3 -7
- vellum/types/metadata_filter_rule_combinator.py +1 -18
- vellum/types/metadata_filter_rule_request.py +3 -7
- vellum/types/ml_model_usage.py +3 -7
- vellum/types/named_scenario_input_chat_history_variable_value_request.py +31 -0
- vellum/types/named_scenario_input_request.py +31 -0
- vellum/types/{registered_prompt_sandbox_snapshot.py → named_scenario_input_string_variable_value_request.py} +7 -9
- vellum/types/named_test_case_chat_history_variable_value.py +3 -7
- vellum/types/named_test_case_chat_history_variable_value_request.py +3 -7
- vellum/types/named_test_case_error_variable_value.py +3 -7
- vellum/types/named_test_case_error_variable_value_request.py +3 -7
- vellum/types/{register_prompt_prompt.py → named_test_case_function_call_variable_value.py} +7 -13
- vellum/types/named_test_case_function_call_variable_value_request.py +31 -0
- vellum/types/named_test_case_json_variable_value.py +3 -7
- vellum/types/named_test_case_json_variable_value_request.py +3 -7
- vellum/types/named_test_case_number_variable_value.py +3 -7
- vellum/types/named_test_case_number_variable_value_request.py +3 -7
- vellum/types/named_test_case_search_results_variable_value.py +3 -7
- vellum/types/named_test_case_search_results_variable_value_request.py +3 -7
- vellum/types/named_test_case_string_variable_value.py +3 -7
- vellum/types/named_test_case_string_variable_value_request.py +3 -7
- vellum/types/named_test_case_variable_value.py +12 -0
- vellum/types/named_test_case_variable_value_request.py +12 -0
- vellum/types/node_input_compiled_array_value.py +3 -7
- vellum/types/node_input_compiled_chat_history_value.py +3 -7
- vellum/types/node_input_compiled_error_value.py +3 -7
- vellum/types/node_input_compiled_function_call.py +3 -7
- vellum/types/node_input_compiled_json_value.py +3 -7
- vellum/types/node_input_compiled_number_value.py +3 -7
- vellum/types/node_input_compiled_search_results_value.py +3 -7
- vellum/types/node_input_compiled_string_value.py +3 -7
- vellum/types/node_output_compiled_array_value.py +3 -7
- vellum/types/node_output_compiled_chat_history_value.py +3 -7
- vellum/types/node_output_compiled_error_value.py +3 -7
- vellum/types/node_output_compiled_function_value.py +3 -7
- vellum/types/node_output_compiled_json_value.py +3 -7
- vellum/types/node_output_compiled_number_value.py +3 -7
- vellum/types/node_output_compiled_search_results_value.py +3 -7
- vellum/types/node_output_compiled_string_value.py +3 -7
- vellum/types/normalized_log_probs.py +3 -7
- vellum/types/normalized_token_log_probs.py +3 -7
- vellum/types/number_variable_value.py +3 -7
- vellum/types/paginated_document_index_read_list.py +3 -7
- vellum/types/paginated_slim_deployment_read_list.py +3 -7
- vellum/types/paginated_slim_document_list.py +3 -7
- vellum/types/paginated_slim_workflow_deployment_list.py +3 -7
- vellum/types/paginated_test_suite_run_execution_list.py +3 -7
- vellum/types/paginated_test_suite_test_case_list.py +3 -7
- vellum/types/processing_failure_reason_enum.py +1 -20
- vellum/types/processing_state_enum.py +1 -32
- vellum/types/prompt_deployment_expand_meta_request_request.py +9 -13
- vellum/types/prompt_execution_meta.py +3 -7
- vellum/types/prompt_node_result.py +3 -7
- vellum/types/prompt_node_result_data.py +3 -7
- vellum/types/raw_prompt_execution_overrides_request.py +5 -9
- vellum/types/rejected_execute_prompt_event.py +3 -7
- vellum/types/rejected_execute_prompt_response.py +5 -9
- vellum/types/rejected_execute_workflow_workflow_result_event.py +3 -7
- vellum/types/rejected_function_call.py +3 -7
- vellum/types/rejected_prompt_execution_meta.py +3 -7
- vellum/types/rejected_workflow_node_result_event.py +3 -7
- vellum/types/sandbox_scenario.py +5 -9
- vellum/types/scenario_input.py +18 -21
- vellum/types/{registered_prompt_sandbox.py → scenario_input_chat_history_variable_value.py} +7 -13
- vellum/types/{register_prompt_error_response.py → scenario_input_string_variable_value.py} +7 -9
- vellum/types/search_error_response.py +4 -8
- vellum/types/search_filters_request.py +5 -9
- vellum/types/search_node_result.py +3 -7
- vellum/types/search_node_result_data.py +4 -8
- vellum/types/search_request_options_request.py +7 -11
- vellum/types/search_response.py +4 -8
- vellum/types/search_result.py +6 -10
- vellum/types/search_result_document.py +7 -11
- vellum/types/search_result_document_request.py +6 -10
- vellum/types/search_result_merging_request.py +4 -8
- vellum/types/search_result_request.py +6 -10
- vellum/types/search_results_variable_value.py +3 -7
- vellum/types/search_weights_request.py +5 -9
- vellum/types/slim_deployment_read.py +7 -11
- vellum/types/slim_document.py +12 -16
- vellum/types/slim_workflow_deployment.py +9 -13
- vellum/types/streaming_execute_prompt_event.py +4 -8
- vellum/types/streaming_prompt_execution_meta.py +3 -7
- vellum/types/streaming_workflow_node_result_event.py +3 -7
- vellum/types/string_chat_message_content.py +3 -7
- vellum/types/string_chat_message_content_request.py +3 -7
- vellum/types/string_input_request.py +4 -8
- vellum/types/string_variable_value.py +3 -7
- vellum/types/submit_completion_actual_request.py +8 -12
- vellum/types/submit_completion_actuals_error_response.py +3 -7
- vellum/types/subworkflow_node_result.py +3 -7
- vellum/types/templating_node_array_result.py +3 -7
- vellum/types/templating_node_chat_history_result.py +3 -7
- vellum/types/templating_node_error_result.py +3 -7
- vellum/types/templating_node_function_call_result.py +3 -7
- vellum/types/templating_node_json_result.py +3 -7
- vellum/types/templating_node_number_result.py +3 -7
- vellum/types/templating_node_result.py +3 -7
- vellum/types/templating_node_result_data.py +3 -7
- vellum/types/templating_node_search_results_result.py +3 -7
- vellum/types/templating_node_string_result.py +3 -7
- vellum/types/terminal_node_array_result.py +4 -8
- vellum/types/terminal_node_chat_history_result.py +4 -8
- vellum/types/terminal_node_error_result.py +4 -8
- vellum/types/terminal_node_function_call_result.py +4 -8
- vellum/types/terminal_node_json_result.py +4 -8
- vellum/types/terminal_node_number_result.py +4 -8
- vellum/types/terminal_node_result.py +3 -7
- vellum/types/terminal_node_result_data.py +3 -7
- vellum/types/terminal_node_search_results_result.py +4 -8
- vellum/types/terminal_node_string_result.py +4 -8
- vellum/types/test_case_chat_history_variable_value.py +3 -7
- vellum/types/test_case_error_variable_value.py +3 -7
- vellum/types/test_case_function_call_variable_value.py +32 -0
- vellum/types/test_case_json_variable_value.py +3 -7
- vellum/types/test_case_number_variable_value.py +3 -7
- vellum/types/test_case_search_results_variable_value.py +3 -7
- vellum/types/test_case_string_variable_value.py +3 -7
- vellum/types/test_case_variable_value.py +12 -0
- vellum/types/test_suite_run_deployment_release_tag_exec_config.py +4 -8
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +5 -9
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +5 -9
- vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +4 -8
- vellum/types/test_suite_run_execution.py +3 -7
- vellum/types/test_suite_run_execution_chat_history_output.py +3 -7
- vellum/types/test_suite_run_execution_error_output.py +3 -7
- vellum/types/{registered_prompt_model_version.py → test_suite_run_execution_function_call_output.py} +8 -13
- vellum/types/test_suite_run_execution_json_output.py +3 -7
- vellum/types/test_suite_run_execution_metric_definition.py +3 -7
- vellum/types/test_suite_run_execution_metric_result.py +3 -7
- vellum/types/test_suite_run_execution_number_output.py +3 -7
- vellum/types/test_suite_run_execution_output.py +12 -0
- vellum/types/test_suite_run_execution_search_results_output.py +3 -7
- vellum/types/test_suite_run_execution_string_output.py +3 -7
- vellum/types/test_suite_run_external_exec_config.py +4 -8
- vellum/types/test_suite_run_external_exec_config_data.py +4 -8
- vellum/types/test_suite_run_external_exec_config_data_request.py +4 -8
- vellum/types/test_suite_run_external_exec_config_request.py +4 -8
- vellum/types/test_suite_run_metric_error_output.py +3 -7
- vellum/types/test_suite_run_metric_number_output.py +3 -7
- vellum/types/test_suite_run_metric_string_output.py +3 -7
- vellum/types/test_suite_run_read.py +5 -9
- vellum/types/test_suite_run_state.py +1 -37
- vellum/types/test_suite_run_test_suite.py +3 -7
- vellum/types/test_suite_run_workflow_release_tag_exec_config.py +4 -8
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +5 -9
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +5 -9
- vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +4 -8
- vellum/types/test_suite_test_case.py +3 -7
- vellum/types/upload_document_error_response.py +3 -7
- vellum/types/upload_document_response.py +4 -8
- vellum/types/vellum_error.py +3 -7
- vellum/types/vellum_error_code_enum.py +3 -32
- vellum/types/vellum_error_request.py +3 -7
- vellum/types/vellum_image.py +3 -7
- vellum/types/vellum_image_request.py +3 -7
- vellum/types/vellum_variable.py +3 -7
- vellum/types/vellum_variable_type.py +6 -57
- vellum/types/workflow_deployment_read.py +9 -13
- vellum/types/workflow_event_error.py +3 -7
- vellum/types/workflow_execution_actual_chat_history_request.py +8 -12
- vellum/types/workflow_execution_actual_json_request.py +8 -12
- vellum/types/workflow_execution_actual_string_request.py +8 -12
- vellum/types/workflow_execution_event_error_code.py +13 -52
- vellum/types/workflow_execution_event_type.py +1 -18
- vellum/types/workflow_execution_node_result_event.py +3 -7
- vellum/types/workflow_execution_workflow_result_event.py +3 -7
- vellum/types/workflow_node_result_event_state.py +3 -32
- vellum/types/workflow_output_array.py +4 -8
- vellum/types/workflow_output_chat_history.py +4 -8
- vellum/types/workflow_output_error.py +4 -8
- vellum/types/workflow_output_function_call.py +4 -8
- vellum/types/workflow_output_image.py +4 -8
- vellum/types/workflow_output_json.py +4 -8
- vellum/types/workflow_output_number.py +4 -8
- vellum/types/workflow_output_search_results.py +4 -8
- vellum/types/workflow_output_string.py +4 -8
- vellum/types/workflow_request_chat_history_input_request.py +4 -8
- vellum/types/workflow_request_json_input_request.py +4 -8
- vellum/types/workflow_request_number_input_request.py +4 -8
- vellum/types/workflow_request_string_input_request.py +4 -8
- vellum/types/workflow_result_event.py +3 -7
- vellum/types/workflow_result_event_output_data_array.py +4 -8
- vellum/types/workflow_result_event_output_data_chat_history.py +4 -8
- vellum/types/workflow_result_event_output_data_error.py +4 -8
- vellum/types/workflow_result_event_output_data_function_call.py +4 -8
- vellum/types/workflow_result_event_output_data_json.py +4 -8
- vellum/types/workflow_result_event_output_data_number.py +4 -8
- vellum/types/workflow_result_event_output_data_search_results.py +4 -8
- vellum/types/workflow_result_event_output_data_string.py +5 -9
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.1.dist-info}/METADATA +1 -2
- vellum_ai-0.5.1.dist-info/RECORD +382 -0
- vellum/errors/conflict_error.py +0 -9
- vellum/resources/model_versions/__init__.py +0 -2
- vellum/resources/model_versions/client.py +0 -123
- vellum/resources/registered_prompts/__init__.py +0 -2
- vellum/resources/registered_prompts/client.py +0 -327
- vellum/types/block_type_enum.py +0 -36
- vellum/types/model_version_build_config.py +0 -40
- vellum/types/model_version_exec_config.py +0 -48
- vellum/types/model_version_exec_config_parameters.py +0 -37
- vellum/types/model_version_read.py +0 -82
- vellum/types/model_version_read_status_enum.py +0 -36
- vellum/types/model_version_sandbox_snapshot.py +0 -44
- vellum/types/prompt_template_block.py +0 -41
- vellum/types/prompt_template_block_data.py +0 -31
- vellum/types/prompt_template_block_data_request.py +0 -31
- vellum/types/prompt_template_block_properties.py +0 -47
- vellum/types/prompt_template_block_properties_request.py +0 -47
- vellum/types/prompt_template_block_request.py +0 -41
- vellum/types/prompt_template_block_state.py +0 -22
- vellum/types/provider_enum.py +0 -81
- vellum/types/register_prompt_model_parameters_request.py +0 -37
- vellum/types/register_prompt_prompt_info_request.py +0 -35
- vellum/types/register_prompt_response.py +0 -62
- vellum/types/registered_prompt_deployment.py +0 -42
- vellum/types/scenario_input_request.py +0 -34
- vellum/types/scenario_input_type_enum.py +0 -22
- vellum_ai-0.3.23.dist-info/RECORD +0 -394
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.1.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.1.dist-info}/WHEEL +0 -0
@@ -7,15 +7,11 @@ from json.decoder import JSONDecodeError
|
|
7
7
|
from ...core.api_error import ApiError
|
8
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...core.pydantic_utilities import pydantic_v1
|
10
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
12
|
from ...core.request_options import RequestOptions
|
13
|
+
from ...types.named_scenario_input_request import NamedScenarioInputRequest
|
12
14
|
from ...types.sandbox_scenario import SandboxScenario
|
13
|
-
from ...types.scenario_input_request import ScenarioInputRequest
|
14
|
-
|
15
|
-
try:
|
16
|
-
import pydantic.v1 as pydantic # type: ignore
|
17
|
-
except ImportError:
|
18
|
-
import pydantic # type: ignore
|
19
15
|
|
20
16
|
# this is used as the default value for optional parameters
|
21
17
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -30,7 +26,7 @@ class SandboxesClient:
|
|
30
26
|
id: str,
|
31
27
|
*,
|
32
28
|
label: typing.Optional[str] = OMIT,
|
33
|
-
inputs: typing.Sequence[
|
29
|
+
inputs: typing.Sequence[NamedScenarioInputRequest],
|
34
30
|
scenario_id: typing.Optional[str] = OMIT,
|
35
31
|
request_options: typing.Optional[RequestOptions] = None,
|
36
32
|
) -> SandboxScenario:
|
@@ -48,13 +44,12 @@ class SandboxesClient:
|
|
48
44
|
|
49
45
|
- label: typing.Optional[str].
|
50
46
|
|
51
|
-
- inputs: typing.Sequence[
|
47
|
+
- inputs: typing.Sequence[NamedScenarioInputRequest]. The inputs for the scenario
|
52
48
|
|
53
49
|
- scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
|
54
50
|
|
55
51
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
56
52
|
---
|
57
|
-
from vellum import ScenarioInputRequest, ScenarioInputTypeEnum
|
58
53
|
from vellum.client import Vellum
|
59
54
|
|
60
55
|
client = Vellum(
|
@@ -63,18 +58,7 @@ class SandboxesClient:
|
|
63
58
|
client.sandboxes.upsert_sandbox_scenario(
|
64
59
|
id="id",
|
65
60
|
label="Scenario 1",
|
66
|
-
inputs=[
|
67
|
-
ScenarioInputRequest(
|
68
|
-
key="var_1",
|
69
|
-
type=ScenarioInputTypeEnum.TEXT,
|
70
|
-
value="Hello, world!",
|
71
|
-
),
|
72
|
-
ScenarioInputRequest(
|
73
|
-
key="var_2",
|
74
|
-
type=ScenarioInputTypeEnum.TEXT,
|
75
|
-
value="Why hello, there!",
|
76
|
-
),
|
77
|
-
],
|
61
|
+
inputs=[],
|
78
62
|
)
|
79
63
|
"""
|
80
64
|
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
@@ -83,8 +67,8 @@ class SandboxesClient:
|
|
83
67
|
if scenario_id is not OMIT:
|
84
68
|
_request["scenario_id"] = scenario_id
|
85
69
|
_response = self._client_wrapper.httpx_client.request(
|
86
|
-
"POST",
|
87
|
-
urllib.parse.urljoin(
|
70
|
+
method="POST",
|
71
|
+
url=urllib.parse.urljoin(
|
88
72
|
f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{jsonable_encoder(id)}/scenarios"
|
89
73
|
),
|
90
74
|
params=jsonable_encoder(
|
@@ -111,7 +95,7 @@ class SandboxesClient:
|
|
111
95
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
112
96
|
)
|
113
97
|
if 200 <= _response.status_code < 300:
|
114
|
-
return
|
98
|
+
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
115
99
|
try:
|
116
100
|
_response_json = _response.json()
|
117
101
|
except JSONDecodeError:
|
@@ -142,8 +126,8 @@ class SandboxesClient:
|
|
142
126
|
)
|
143
127
|
"""
|
144
128
|
_response = self._client_wrapper.httpx_client.request(
|
145
|
-
"DELETE",
|
146
|
-
urllib.parse.urljoin(
|
129
|
+
method="DELETE",
|
130
|
+
url=urllib.parse.urljoin(
|
147
131
|
f"{self._client_wrapper.get_environment().default}/",
|
148
132
|
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
149
133
|
),
|
@@ -182,7 +166,7 @@ class AsyncSandboxesClient:
|
|
182
166
|
id: str,
|
183
167
|
*,
|
184
168
|
label: typing.Optional[str] = OMIT,
|
185
|
-
inputs: typing.Sequence[
|
169
|
+
inputs: typing.Sequence[NamedScenarioInputRequest],
|
186
170
|
scenario_id: typing.Optional[str] = OMIT,
|
187
171
|
request_options: typing.Optional[RequestOptions] = None,
|
188
172
|
) -> SandboxScenario:
|
@@ -200,13 +184,12 @@ class AsyncSandboxesClient:
|
|
200
184
|
|
201
185
|
- label: typing.Optional[str].
|
202
186
|
|
203
|
-
- inputs: typing.Sequence[
|
187
|
+
- inputs: typing.Sequence[NamedScenarioInputRequest]. The inputs for the scenario
|
204
188
|
|
205
189
|
- scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
|
206
190
|
|
207
191
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
208
192
|
---
|
209
|
-
from vellum import ScenarioInputRequest, ScenarioInputTypeEnum
|
210
193
|
from vellum.client import AsyncVellum
|
211
194
|
|
212
195
|
client = AsyncVellum(
|
@@ -215,18 +198,7 @@ class AsyncSandboxesClient:
|
|
215
198
|
await client.sandboxes.upsert_sandbox_scenario(
|
216
199
|
id="id",
|
217
200
|
label="Scenario 1",
|
218
|
-
inputs=[
|
219
|
-
ScenarioInputRequest(
|
220
|
-
key="var_1",
|
221
|
-
type=ScenarioInputTypeEnum.TEXT,
|
222
|
-
value="Hello, world!",
|
223
|
-
),
|
224
|
-
ScenarioInputRequest(
|
225
|
-
key="var_2",
|
226
|
-
type=ScenarioInputTypeEnum.TEXT,
|
227
|
-
value="Why hello, there!",
|
228
|
-
),
|
229
|
-
],
|
201
|
+
inputs=[],
|
230
202
|
)
|
231
203
|
"""
|
232
204
|
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
@@ -235,8 +207,8 @@ class AsyncSandboxesClient:
|
|
235
207
|
if scenario_id is not OMIT:
|
236
208
|
_request["scenario_id"] = scenario_id
|
237
209
|
_response = await self._client_wrapper.httpx_client.request(
|
238
|
-
"POST",
|
239
|
-
urllib.parse.urljoin(
|
210
|
+
method="POST",
|
211
|
+
url=urllib.parse.urljoin(
|
240
212
|
f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{jsonable_encoder(id)}/scenarios"
|
241
213
|
),
|
242
214
|
params=jsonable_encoder(
|
@@ -263,7 +235,7 @@ class AsyncSandboxesClient:
|
|
263
235
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
264
236
|
)
|
265
237
|
if 200 <= _response.status_code < 300:
|
266
|
-
return
|
238
|
+
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
267
239
|
try:
|
268
240
|
_response_json = _response.json()
|
269
241
|
except JSONDecodeError:
|
@@ -294,8 +266,8 @@ class AsyncSandboxesClient:
|
|
294
266
|
)
|
295
267
|
"""
|
296
268
|
_response = await self._client_wrapper.httpx_client.request(
|
297
|
-
"DELETE",
|
298
|
-
urllib.parse.urljoin(
|
269
|
+
method="DELETE",
|
270
|
+
url=urllib.parse.urljoin(
|
299
271
|
f"{self._client_wrapper.get_environment().default}/",
|
300
272
|
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
301
273
|
),
|
@@ -7,17 +7,13 @@ from json.decoder import JSONDecodeError
|
|
7
7
|
from ...core.api_error import ApiError
|
8
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...core.pydantic_utilities import pydantic_v1
|
10
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
12
|
from ...core.request_options import RequestOptions
|
12
13
|
from ...types.paginated_test_suite_run_execution_list import PaginatedTestSuiteRunExecutionList
|
13
14
|
from ...types.test_suite_run_exec_config_request import TestSuiteRunExecConfigRequest
|
14
15
|
from ...types.test_suite_run_read import TestSuiteRunRead
|
15
16
|
|
16
|
-
try:
|
17
|
-
import pydantic.v1 as pydantic # type: ignore
|
18
|
-
except ImportError:
|
19
|
-
import pydantic # type: ignore
|
20
|
-
|
21
17
|
# this is used as the default value for optional parameters
|
22
18
|
OMIT = typing.cast(typing.Any, ...)
|
23
19
|
|
@@ -64,8 +60,8 @@ class TestSuiteRunsClient:
|
|
64
60
|
)
|
65
61
|
"""
|
66
62
|
_response = self._client_wrapper.httpx_client.request(
|
67
|
-
"POST",
|
68
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
63
|
+
method="POST",
|
64
|
+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
69
65
|
params=jsonable_encoder(
|
70
66
|
request_options.get("additional_query_parameters") if request_options is not None else None
|
71
67
|
),
|
@@ -90,7 +86,7 @@ class TestSuiteRunsClient:
|
|
90
86
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
91
87
|
)
|
92
88
|
if 200 <= _response.status_code < 300:
|
93
|
-
return
|
89
|
+
return pydantic_v1.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
94
90
|
try:
|
95
91
|
_response_json = _response.json()
|
96
92
|
except JSONDecodeError:
|
@@ -116,8 +112,8 @@ class TestSuiteRunsClient:
|
|
116
112
|
)
|
117
113
|
"""
|
118
114
|
_response = self._client_wrapper.httpx_client.request(
|
119
|
-
"GET",
|
120
|
-
urllib.parse.urljoin(
|
115
|
+
method="GET",
|
116
|
+
url=urllib.parse.urljoin(
|
121
117
|
f"{self._client_wrapper.get_environment().default}/", f"v1/test-suite-runs/{jsonable_encoder(id)}"
|
122
118
|
),
|
123
119
|
params=jsonable_encoder(
|
@@ -138,7 +134,7 @@ class TestSuiteRunsClient:
|
|
138
134
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
139
135
|
)
|
140
136
|
if 200 <= _response.status_code < 300:
|
141
|
-
return
|
137
|
+
return pydantic_v1.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
142
138
|
try:
|
143
139
|
_response_json = _response.json()
|
144
140
|
except JSONDecodeError:
|
@@ -179,8 +175,8 @@ class TestSuiteRunsClient:
|
|
179
175
|
)
|
180
176
|
"""
|
181
177
|
_response = self._client_wrapper.httpx_client.request(
|
182
|
-
"GET",
|
183
|
-
urllib.parse.urljoin(
|
178
|
+
method="GET",
|
179
|
+
url=urllib.parse.urljoin(
|
184
180
|
f"{self._client_wrapper.get_environment().default}/",
|
185
181
|
f"v1/test-suite-runs/{jsonable_encoder(id)}/executions",
|
186
182
|
),
|
@@ -213,7 +209,7 @@ class TestSuiteRunsClient:
|
|
213
209
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
214
210
|
)
|
215
211
|
if 200 <= _response.status_code < 300:
|
216
|
-
return
|
212
|
+
return pydantic_v1.parse_obj_as(PaginatedTestSuiteRunExecutionList, _response.json()) # type: ignore
|
217
213
|
try:
|
218
214
|
_response_json = _response.json()
|
219
215
|
except JSONDecodeError:
|
@@ -263,8 +259,8 @@ class AsyncTestSuiteRunsClient:
|
|
263
259
|
)
|
264
260
|
"""
|
265
261
|
_response = await self._client_wrapper.httpx_client.request(
|
266
|
-
"POST",
|
267
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
262
|
+
method="POST",
|
263
|
+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
268
264
|
params=jsonable_encoder(
|
269
265
|
request_options.get("additional_query_parameters") if request_options is not None else None
|
270
266
|
),
|
@@ -289,7 +285,7 @@ class AsyncTestSuiteRunsClient:
|
|
289
285
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
290
286
|
)
|
291
287
|
if 200 <= _response.status_code < 300:
|
292
|
-
return
|
288
|
+
return pydantic_v1.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
293
289
|
try:
|
294
290
|
_response_json = _response.json()
|
295
291
|
except JSONDecodeError:
|
@@ -315,8 +311,8 @@ class AsyncTestSuiteRunsClient:
|
|
315
311
|
)
|
316
312
|
"""
|
317
313
|
_response = await self._client_wrapper.httpx_client.request(
|
318
|
-
"GET",
|
319
|
-
urllib.parse.urljoin(
|
314
|
+
method="GET",
|
315
|
+
url=urllib.parse.urljoin(
|
320
316
|
f"{self._client_wrapper.get_environment().default}/", f"v1/test-suite-runs/{jsonable_encoder(id)}"
|
321
317
|
),
|
322
318
|
params=jsonable_encoder(
|
@@ -337,7 +333,7 @@ class AsyncTestSuiteRunsClient:
|
|
337
333
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
338
334
|
)
|
339
335
|
if 200 <= _response.status_code < 300:
|
340
|
-
return
|
336
|
+
return pydantic_v1.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
341
337
|
try:
|
342
338
|
_response_json = _response.json()
|
343
339
|
except JSONDecodeError:
|
@@ -378,8 +374,8 @@ class AsyncTestSuiteRunsClient:
|
|
378
374
|
)
|
379
375
|
"""
|
380
376
|
_response = await self._client_wrapper.httpx_client.request(
|
381
|
-
"GET",
|
382
|
-
urllib.parse.urljoin(
|
377
|
+
method="GET",
|
378
|
+
url=urllib.parse.urljoin(
|
383
379
|
f"{self._client_wrapper.get_environment().default}/",
|
384
380
|
f"v1/test-suite-runs/{jsonable_encoder(id)}/executions",
|
385
381
|
),
|
@@ -412,7 +408,7 @@ class AsyncTestSuiteRunsClient:
|
|
412
408
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
413
409
|
)
|
414
410
|
if 200 <= _response.status_code < 300:
|
415
|
-
return
|
411
|
+
return pydantic_v1.parse_obj_as(PaginatedTestSuiteRunExecutionList, _response.json()) # type: ignore
|
416
412
|
try:
|
417
413
|
_response_json = _response.json()
|
418
414
|
except JSONDecodeError:
|
@@ -7,17 +7,13 @@ from json.decoder import JSONDecodeError
|
|
7
7
|
from ...core.api_error import ApiError
|
8
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...core.pydantic_utilities import pydantic_v1
|
10
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
12
|
from ...core.request_options import RequestOptions
|
12
13
|
from ...types.named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
13
14
|
from ...types.paginated_test_suite_test_case_list import PaginatedTestSuiteTestCaseList
|
14
15
|
from ...types.test_suite_test_case import TestSuiteTestCase
|
15
16
|
|
16
|
-
try:
|
17
|
-
import pydantic.v1 as pydantic # type: ignore
|
18
|
-
except ImportError:
|
19
|
-
import pydantic # type: ignore
|
20
|
-
|
21
17
|
# this is used as the default value for optional parameters
|
22
18
|
OMIT = typing.cast(typing.Any, ...)
|
23
19
|
|
@@ -56,8 +52,8 @@ class TestSuitesClient:
|
|
56
52
|
)
|
57
53
|
"""
|
58
54
|
_response = self._client_wrapper.httpx_client.request(
|
59
|
-
"GET",
|
60
|
-
urllib.parse.urljoin(
|
55
|
+
method="GET",
|
56
|
+
url=urllib.parse.urljoin(
|
61
57
|
f"{self._client_wrapper.get_environment().default}/",
|
62
58
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
63
59
|
),
|
@@ -89,7 +85,7 @@ class TestSuitesClient:
|
|
89
85
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
90
86
|
)
|
91
87
|
if 200 <= _response.status_code < 300:
|
92
|
-
return
|
88
|
+
return pydantic_v1.parse_obj_as(PaginatedTestSuiteTestCaseList, _response.json()) # type: ignore
|
93
89
|
try:
|
94
90
|
_response_json = _response.json()
|
95
91
|
except JSONDecodeError:
|
@@ -145,8 +141,8 @@ class TestSuitesClient:
|
|
145
141
|
if label is not OMIT:
|
146
142
|
_request["label"] = label
|
147
143
|
_response = self._client_wrapper.httpx_client.request(
|
148
|
-
"POST",
|
149
|
-
urllib.parse.urljoin(
|
144
|
+
method="POST",
|
145
|
+
url=urllib.parse.urljoin(
|
150
146
|
f"{self._client_wrapper.get_environment().default}/",
|
151
147
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
152
148
|
),
|
@@ -174,7 +170,7 @@ class TestSuitesClient:
|
|
174
170
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
175
171
|
)
|
176
172
|
if 200 <= _response.status_code < 300:
|
177
|
-
return
|
173
|
+
return pydantic_v1.parse_obj_as(TestSuiteTestCase, _response.json()) # type: ignore
|
178
174
|
try:
|
179
175
|
_response_json = _response.json()
|
180
176
|
except JSONDecodeError:
|
@@ -205,8 +201,8 @@ class TestSuitesClient:
|
|
205
201
|
)
|
206
202
|
"""
|
207
203
|
_response = self._client_wrapper.httpx_client.request(
|
208
|
-
"DELETE",
|
209
|
-
urllib.parse.urljoin(
|
204
|
+
method="DELETE",
|
205
|
+
url=urllib.parse.urljoin(
|
210
206
|
f"{self._client_wrapper.get_environment().default}/",
|
211
207
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases/{jsonable_encoder(test_case_id)}",
|
212
208
|
),
|
@@ -270,8 +266,8 @@ class AsyncTestSuitesClient:
|
|
270
266
|
)
|
271
267
|
"""
|
272
268
|
_response = await self._client_wrapper.httpx_client.request(
|
273
|
-
"GET",
|
274
|
-
urllib.parse.urljoin(
|
269
|
+
method="GET",
|
270
|
+
url=urllib.parse.urljoin(
|
275
271
|
f"{self._client_wrapper.get_environment().default}/",
|
276
272
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
277
273
|
),
|
@@ -303,7 +299,7 @@ class AsyncTestSuitesClient:
|
|
303
299
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
304
300
|
)
|
305
301
|
if 200 <= _response.status_code < 300:
|
306
|
-
return
|
302
|
+
return pydantic_v1.parse_obj_as(PaginatedTestSuiteTestCaseList, _response.json()) # type: ignore
|
307
303
|
try:
|
308
304
|
_response_json = _response.json()
|
309
305
|
except JSONDecodeError:
|
@@ -359,8 +355,8 @@ class AsyncTestSuitesClient:
|
|
359
355
|
if label is not OMIT:
|
360
356
|
_request["label"] = label
|
361
357
|
_response = await self._client_wrapper.httpx_client.request(
|
362
|
-
"POST",
|
363
|
-
urllib.parse.urljoin(
|
358
|
+
method="POST",
|
359
|
+
url=urllib.parse.urljoin(
|
364
360
|
f"{self._client_wrapper.get_environment().default}/",
|
365
361
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
366
362
|
),
|
@@ -388,7 +384,7 @@ class AsyncTestSuitesClient:
|
|
388
384
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
389
385
|
)
|
390
386
|
if 200 <= _response.status_code < 300:
|
391
|
-
return
|
387
|
+
return pydantic_v1.parse_obj_as(TestSuiteTestCase, _response.json()) # type: ignore
|
392
388
|
try:
|
393
389
|
_response_json = _response.json()
|
394
390
|
except JSONDecodeError:
|
@@ -419,8 +415,8 @@ class AsyncTestSuitesClient:
|
|
419
415
|
)
|
420
416
|
"""
|
421
417
|
_response = await self._client_wrapper.httpx_client.request(
|
422
|
-
"DELETE",
|
423
|
-
urllib.parse.urljoin(
|
418
|
+
method="DELETE",
|
419
|
+
url=urllib.parse.urljoin(
|
424
420
|
f"{self._client_wrapper.get_environment().default}/",
|
425
421
|
f"v1/test-suites/{jsonable_encoder(id)}/test-cases/{jsonable_encoder(test_case_id)}",
|
426
422
|
),
|
@@ -7,17 +7,13 @@ from json.decoder import JSONDecodeError
|
|
7
7
|
from ...core.api_error import ApiError
|
8
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...core.pydantic_utilities import pydantic_v1
|
10
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
12
|
from ...core.request_options import RequestOptions
|
12
13
|
from ...types.paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
13
14
|
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
14
15
|
from .types.workflow_deployments_list_request_status import WorkflowDeploymentsListRequestStatus
|
15
16
|
|
16
|
-
try:
|
17
|
-
import pydantic.v1 as pydantic # type: ignore
|
18
|
-
except ImportError:
|
19
|
-
import pydantic # type: ignore
|
20
|
-
|
21
17
|
|
22
18
|
class WorkflowDeploymentsClient:
|
23
19
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
@@ -52,8 +48,8 @@ class WorkflowDeploymentsClient:
|
|
52
48
|
client.workflow_deployments.list()
|
53
49
|
"""
|
54
50
|
_response = self._client_wrapper.httpx_client.request(
|
55
|
-
"GET",
|
56
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/workflow-deployments"),
|
51
|
+
method="GET",
|
52
|
+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/workflow-deployments"),
|
57
53
|
params=jsonable_encoder(
|
58
54
|
remove_none_from_dict(
|
59
55
|
{
|
@@ -84,7 +80,7 @@ class WorkflowDeploymentsClient:
|
|
84
80
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
85
81
|
)
|
86
82
|
if 200 <= _response.status_code < 300:
|
87
|
-
return
|
83
|
+
return pydantic_v1.parse_obj_as(PaginatedSlimWorkflowDeploymentList, _response.json()) # type: ignore
|
88
84
|
try:
|
89
85
|
_response_json = _response.json()
|
90
86
|
except JSONDecodeError:
|
@@ -110,8 +106,8 @@ class WorkflowDeploymentsClient:
|
|
110
106
|
)
|
111
107
|
"""
|
112
108
|
_response = self._client_wrapper.httpx_client.request(
|
113
|
-
"GET",
|
114
|
-
urllib.parse.urljoin(
|
109
|
+
method="GET",
|
110
|
+
url=urllib.parse.urljoin(
|
115
111
|
f"{self._client_wrapper.get_environment().default}/", f"v1/workflow-deployments/{jsonable_encoder(id)}"
|
116
112
|
),
|
117
113
|
params=jsonable_encoder(
|
@@ -132,7 +128,7 @@ class WorkflowDeploymentsClient:
|
|
132
128
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
133
129
|
)
|
134
130
|
if 200 <= _response.status_code < 300:
|
135
|
-
return
|
131
|
+
return pydantic_v1.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
|
136
132
|
try:
|
137
133
|
_response_json = _response.json()
|
138
134
|
except JSONDecodeError:
|
@@ -173,8 +169,8 @@ class AsyncWorkflowDeploymentsClient:
|
|
173
169
|
await client.workflow_deployments.list()
|
174
170
|
"""
|
175
171
|
_response = await self._client_wrapper.httpx_client.request(
|
176
|
-
"GET",
|
177
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/workflow-deployments"),
|
172
|
+
method="GET",
|
173
|
+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/workflow-deployments"),
|
178
174
|
params=jsonable_encoder(
|
179
175
|
remove_none_from_dict(
|
180
176
|
{
|
@@ -205,7 +201,7 @@ class AsyncWorkflowDeploymentsClient:
|
|
205
201
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
206
202
|
)
|
207
203
|
if 200 <= _response.status_code < 300:
|
208
|
-
return
|
204
|
+
return pydantic_v1.parse_obj_as(PaginatedSlimWorkflowDeploymentList, _response.json()) # type: ignore
|
209
205
|
try:
|
210
206
|
_response_json = _response.json()
|
211
207
|
except JSONDecodeError:
|
@@ -233,8 +229,8 @@ class AsyncWorkflowDeploymentsClient:
|
|
233
229
|
)
|
234
230
|
"""
|
235
231
|
_response = await self._client_wrapper.httpx_client.request(
|
236
|
-
"GET",
|
237
|
-
urllib.parse.urljoin(
|
232
|
+
method="GET",
|
233
|
+
url=urllib.parse.urljoin(
|
238
234
|
f"{self._client_wrapper.get_environment().default}/", f"v1/workflow-deployments/{jsonable_encoder(id)}"
|
239
235
|
),
|
240
236
|
params=jsonable_encoder(
|
@@ -255,7 +251,7 @@ class AsyncWorkflowDeploymentsClient:
|
|
255
251
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
256
252
|
)
|
257
253
|
if 200 <= _response.status_code < 300:
|
258
|
-
return
|
254
|
+
return pydantic_v1.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
|
259
255
|
try:
|
260
256
|
_response_json = _response.json()
|
261
257
|
except JSONDecodeError:
|
@@ -1,17 +1,5 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
import enum
|
4
3
|
import typing
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
class WorkflowDeploymentsListRequestStatus(str, enum.Enum):
|
10
|
-
ACTIVE = "ACTIVE"
|
11
|
-
ARCHIVED = "ARCHIVED"
|
12
|
-
|
13
|
-
def visit(self, active: typing.Callable[[], T_Result], archived: typing.Callable[[], T_Result]) -> T_Result:
|
14
|
-
if self is WorkflowDeploymentsListRequestStatus.ACTIVE:
|
15
|
-
return active()
|
16
|
-
if self is WorkflowDeploymentsListRequestStatus.ARCHIVED:
|
17
|
-
return archived()
|
5
|
+
WorkflowDeploymentsListRequestStatus = typing.Union[typing.Literal["ACTIVE", "ARCHIVED"], typing.Any]
|