vellum-ai 0.3.14__py3-none-any.whl → 0.3.15__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +22 -0
- vellum/client.py +846 -100
- vellum/core/__init__.py +8 -0
- vellum/core/client_wrapper.py +27 -8
- vellum/core/file.py +38 -0
- vellum/core/http_client.py +130 -0
- vellum/core/jsonable_encoder.py +2 -2
- vellum/core/request_options.py +32 -0
- vellum/resources/deployments/client.py +161 -24
- vellum/resources/document_indexes/client.py +337 -80
- vellum/resources/documents/client.py +278 -58
- vellum/resources/folder_entities/client.py +60 -10
- vellum/resources/model_versions/client.py +48 -8
- vellum/resources/registered_prompts/client.py +52 -6
- vellum/resources/sandboxes/client.py +108 -26
- vellum/resources/test_suite_runs/client.py +221 -38
- vellum/resources/test_suites/client.py +110 -24
- vellum/resources/workflow_deployments/client.py +110 -14
- vellum/types/__init__.py +20 -0
- vellum/types/api_node_result.py +1 -0
- vellum/types/api_node_result_data.py +4 -2
- vellum/types/array_chat_message_content.py +1 -0
- vellum/types/array_chat_message_content_item.py +6 -5
- vellum/types/array_chat_message_content_item_request.py +6 -5
- vellum/types/array_chat_message_content_request.py +1 -0
- vellum/types/array_enum.py +2 -2
- vellum/types/array_variable_value_item.py +16 -10
- vellum/types/chat_history_enum.py +2 -2
- vellum/types/chat_history_input_request.py +6 -1
- vellum/types/chat_history_variable_value.py +2 -1
- vellum/types/chat_message.py +7 -5
- vellum/types/chat_message_content.py +8 -6
- vellum/types/chat_message_content_request.py +8 -6
- vellum/types/chat_message_request.py +7 -5
- vellum/types/code_execution_node_array_result.py +31 -0
- vellum/types/code_execution_node_chat_history_result.py +2 -1
- vellum/types/code_execution_node_error_result.py +2 -1
- vellum/types/code_execution_node_function_call_result.py +31 -0
- vellum/types/code_execution_node_json_result.py +2 -1
- vellum/types/code_execution_node_number_result.py +2 -1
- vellum/types/code_execution_node_result.py +1 -0
- vellum/types/code_execution_node_result_data.py +2 -1
- vellum/types/code_execution_node_result_output.py +36 -8
- vellum/types/code_execution_node_search_results_result.py +2 -1
- vellum/types/code_execution_node_string_result.py +2 -1
- vellum/types/conditional_node_result.py +1 -0
- vellum/types/conditional_node_result_data.py +2 -1
- vellum/types/deployment_provider_payload_response.py +1 -0
- vellum/types/deployment_read.py +32 -17
- vellum/types/document_document_to_document_index.py +21 -15
- vellum/types/document_index_read.py +32 -19
- vellum/types/document_read.py +34 -24
- vellum/types/document_status.py +2 -2
- vellum/types/enriched_normalized_completion.py +36 -19
- vellum/types/error_enum.py +2 -2
- vellum/types/error_variable_value.py +2 -1
- vellum/types/execute_prompt_api_error_response.py +5 -1
- vellum/types/execute_prompt_event.py +8 -6
- vellum/types/execute_prompt_response.py +4 -4
- vellum/types/execute_workflow_error_response.py +5 -1
- vellum/types/execute_workflow_response.py +3 -2
- vellum/types/execute_workflow_stream_error_response.py +5 -1
- vellum/types/execute_workflow_workflow_result_event.py +4 -4
- vellum/types/execution_array_vellum_value.py +7 -2
- vellum/types/execution_chat_history_vellum_value.py +7 -2
- vellum/types/execution_error_vellum_value.py +7 -2
- vellum/types/execution_function_call_vellum_value.py +7 -2
- vellum/types/execution_json_vellum_value.py +7 -2
- vellum/types/execution_number_vellum_value.py +7 -2
- vellum/types/execution_search_results_vellum_value.py +7 -2
- vellum/types/execution_string_vellum_value.py +7 -2
- vellum/types/execution_vellum_value.py +16 -10
- vellum/types/fulfilled_enum.py +2 -2
- vellum/types/fulfilled_execute_prompt_event.py +2 -1
- vellum/types/fulfilled_execute_prompt_response.py +12 -5
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +1 -0
- vellum/types/fulfilled_function_call.py +2 -1
- vellum/types/fulfilled_prompt_execution_meta.py +3 -2
- vellum/types/fulfilled_workflow_node_result_event.py +6 -5
- vellum/types/function_call.py +4 -4
- vellum/types/function_call_chat_message_content.py +1 -0
- vellum/types/function_call_chat_message_content_request.py +1 -0
- vellum/types/function_call_chat_message_content_value.py +2 -1
- vellum/types/function_call_chat_message_content_value_request.py +2 -1
- vellum/types/function_call_enum.py +2 -2
- vellum/types/function_call_variable_value.py +1 -0
- vellum/types/generate_error_response.py +5 -1
- vellum/types/generate_options_request.py +8 -5
- vellum/types/generate_request.py +15 -9
- vellum/types/generate_result.py +10 -6
- vellum/types/generate_result_data.py +5 -3
- vellum/types/generate_result_error.py +5 -1
- vellum/types/generate_stream_response.py +1 -0
- vellum/types/generate_stream_result.py +3 -2
- vellum/types/generate_stream_result_data.py +1 -0
- vellum/types/image_chat_message_content.py +1 -0
- vellum/types/image_chat_message_content_request.py +1 -0
- vellum/types/image_enum.py +2 -2
- vellum/types/image_variable_value.py +2 -1
- vellum/types/initiated_enum.py +2 -2
- vellum/types/initiated_execute_prompt_event.py +2 -1
- vellum/types/initiated_prompt_execution_meta.py +5 -4
- vellum/types/initiated_workflow_node_result_event.py +5 -4
- vellum/types/json_enum.py +2 -2
- vellum/types/json_input_request.py +6 -1
- vellum/types/json_variable_value.py +2 -1
- vellum/types/logprobs_enum.py +2 -2
- vellum/types/metadata_filter_config_request.py +7 -6
- vellum/types/metadata_filter_rule_request.py +7 -6
- vellum/types/model_version_build_config.py +12 -7
- vellum/types/model_version_exec_config.py +18 -11
- vellum/types/model_version_exec_config_parameters.py +7 -6
- vellum/types/model_version_read.py +51 -32
- vellum/types/model_version_sandbox_snapshot.py +17 -4
- vellum/types/named_test_case_chat_history_variable_value_request.py +2 -1
- vellum/types/named_test_case_error_variable_value_request.py +2 -1
- vellum/types/named_test_case_json_variable_value_request.py +2 -1
- vellum/types/named_test_case_number_variable_value_request.py +2 -1
- vellum/types/named_test_case_search_results_variable_value_request.py +2 -1
- vellum/types/named_test_case_string_variable_value_request.py +2 -1
- vellum/types/named_test_case_variable_value_request.py +12 -8
- vellum/types/node_input_compiled_array_value.py +2 -1
- vellum/types/node_input_compiled_chat_history_value.py +2 -1
- vellum/types/node_input_compiled_error_value.py +2 -1
- vellum/types/node_input_compiled_function_call.py +32 -0
- vellum/types/node_input_compiled_json_value.py +2 -1
- vellum/types/node_input_compiled_number_value.py +2 -1
- vellum/types/node_input_compiled_search_results_value.py +2 -1
- vellum/types/node_input_compiled_string_value.py +2 -1
- vellum/types/node_input_variable_compiled_value.py +26 -9
- vellum/types/node_output_compiled_array_value.py +2 -1
- vellum/types/node_output_compiled_chat_history_value.py +2 -1
- vellum/types/node_output_compiled_error_value.py +2 -1
- vellum/types/node_output_compiled_function_value.py +2 -1
- vellum/types/node_output_compiled_json_value.py +2 -1
- vellum/types/node_output_compiled_number_value.py +2 -1
- vellum/types/node_output_compiled_search_results_value.py +2 -1
- vellum/types/node_output_compiled_string_value.py +2 -1
- vellum/types/node_output_compiled_value.py +16 -10
- vellum/types/normalized_log_probs.py +2 -1
- vellum/types/normalized_token_log_probs.py +3 -2
- vellum/types/number_enum.py +2 -2
- vellum/types/number_variable_value.py +2 -1
- vellum/types/paginated_document_index_read_list.py +5 -4
- vellum/types/paginated_slim_deployment_read_list.py +5 -4
- vellum/types/paginated_slim_document_list.py +5 -4
- vellum/types/paginated_slim_workflow_deployment_list.py +5 -4
- vellum/types/paginated_test_suite_run_execution_list.py +5 -4
- vellum/types/prompt_deployment_expand_meta_request_request.py +25 -15
- vellum/types/prompt_deployment_input_request.py +6 -5
- vellum/types/prompt_execution_meta.py +6 -5
- vellum/types/prompt_node_result.py +1 -0
- vellum/types/prompt_node_result_data.py +4 -3
- vellum/types/prompt_output.py +8 -6
- vellum/types/prompt_template_block.py +1 -0
- vellum/types/prompt_template_block_data.py +1 -0
- vellum/types/prompt_template_block_data_request.py +1 -0
- vellum/types/prompt_template_block_properties.py +11 -10
- vellum/types/prompt_template_block_properties_request.py +11 -10
- vellum/types/prompt_template_block_request.py +1 -0
- vellum/types/raw_prompt_execution_overrides_request.py +11 -5
- vellum/types/register_prompt_error_response.py +5 -1
- vellum/types/register_prompt_model_parameters_request.py +5 -4
- vellum/types/register_prompt_prompt.py +10 -2
- vellum/types/register_prompt_prompt_info_request.py +5 -3
- vellum/types/register_prompt_response.py +30 -10
- vellum/types/registered_prompt_deployment.py +15 -3
- vellum/types/registered_prompt_input_variable_request.py +3 -2
- vellum/types/registered_prompt_model_version.py +10 -2
- vellum/types/registered_prompt_sandbox.py +10 -2
- vellum/types/registered_prompt_sandbox_snapshot.py +5 -1
- vellum/types/rejected_enum.py +2 -2
- vellum/types/rejected_execute_prompt_event.py +2 -1
- vellum/types/rejected_execute_prompt_response.py +12 -5
- vellum/types/rejected_execute_workflow_workflow_result_event.py +1 -0
- vellum/types/rejected_function_call.py +2 -1
- vellum/types/rejected_prompt_execution_meta.py +3 -2
- vellum/types/rejected_workflow_node_result_event.py +4 -3
- vellum/types/sandbox_scenario.py +11 -3
- vellum/types/scenario_input.py +4 -3
- vellum/types/scenario_input_request.py +4 -3
- vellum/types/search_error_response.py +5 -1
- vellum/types/search_filters_request.py +10 -6
- vellum/types/search_node_result.py +1 -0
- vellum/types/search_node_result_data.py +7 -4
- vellum/types/search_request_options_request.py +20 -8
- vellum/types/search_response.py +5 -3
- vellum/types/search_result.py +15 -5
- vellum/types/search_result_document.py +20 -8
- vellum/types/search_result_document_request.py +15 -7
- vellum/types/search_result_merging_request.py +5 -1
- vellum/types/search_result_request.py +15 -5
- vellum/types/search_results_enum.py +2 -2
- vellum/types/search_results_variable_value.py +2 -1
- vellum/types/search_weights_request.py +10 -4
- vellum/types/slim_deployment_read.py +28 -14
- vellum/types/slim_document.py +56 -35
- vellum/types/slim_workflow_deployment.py +37 -24
- vellum/types/streaming_enum.py +2 -2
- vellum/types/streaming_execute_prompt_event.py +6 -4
- vellum/types/streaming_prompt_execution_meta.py +2 -1
- vellum/types/streaming_workflow_node_result_event.py +6 -5
- vellum/types/string_chat_message_content.py +1 -0
- vellum/types/string_chat_message_content_request.py +1 -0
- vellum/types/string_enum.py +2 -2
- vellum/types/string_input_request.py +6 -1
- vellum/types/string_variable_value.py +2 -1
- vellum/types/submit_completion_actual_request.py +25 -13
- vellum/types/submit_completion_actuals_error_response.py +1 -0
- vellum/types/submit_workflow_execution_actual_request.py +6 -5
- vellum/types/subworkflow_enum.py +2 -2
- vellum/types/subworkflow_node_result.py +1 -0
- vellum/types/templating_node_array_result.py +31 -0
- vellum/types/templating_node_chat_history_result.py +2 -1
- vellum/types/templating_node_error_result.py +2 -1
- vellum/types/templating_node_function_call_result.py +31 -0
- vellum/types/templating_node_json_result.py +2 -1
- vellum/types/templating_node_number_result.py +2 -1
- vellum/types/templating_node_result.py +1 -0
- vellum/types/templating_node_result_data.py +1 -0
- vellum/types/templating_node_result_output.py +36 -8
- vellum/types/templating_node_search_results_result.py +2 -1
- vellum/types/templating_node_string_result.py +2 -1
- vellum/types/terminal_node_array_result.py +8 -3
- vellum/types/terminal_node_chat_history_result.py +8 -3
- vellum/types/terminal_node_error_result.py +8 -3
- vellum/types/terminal_node_function_call_result.py +8 -3
- vellum/types/terminal_node_json_result.py +8 -3
- vellum/types/terminal_node_number_result.py +8 -3
- vellum/types/terminal_node_result.py +1 -0
- vellum/types/terminal_node_result_data.py +1 -0
- vellum/types/terminal_node_result_output.py +16 -10
- vellum/types/terminal_node_search_results_result.py +8 -3
- vellum/types/terminal_node_string_result.py +8 -3
- vellum/types/test_case_chat_history_variable_value.py +2 -1
- vellum/types/test_case_error_variable_value.py +2 -1
- vellum/types/test_case_json_variable_value.py +2 -1
- vellum/types/test_case_number_variable_value.py +2 -1
- vellum/types/test_case_search_results_variable_value.py +2 -1
- vellum/types/test_case_string_variable_value.py +2 -1
- vellum/types/test_case_variable_value.py +12 -8
- vellum/types/test_suite_run_deployment_release_tag_exec_config.py +5 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +10 -4
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +10 -4
- vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +5 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +2 -2
- vellum/types/test_suite_run_exec_config.py +4 -4
- vellum/types/test_suite_run_exec_config_request.py +4 -4
- vellum/types/test_suite_run_execution.py +1 -0
- vellum/types/test_suite_run_execution_chat_history_output.py +2 -1
- vellum/types/test_suite_run_execution_error_output.py +2 -1
- vellum/types/test_suite_run_execution_json_output.py +2 -1
- vellum/types/test_suite_run_execution_metric_result.py +1 -0
- vellum/types/test_suite_run_execution_number_output.py +2 -1
- vellum/types/test_suite_run_execution_output.py +12 -8
- vellum/types/test_suite_run_execution_search_results_output.py +2 -1
- vellum/types/test_suite_run_execution_string_output.py +2 -1
- vellum/types/test_suite_run_metric_error_output.py +1 -0
- vellum/types/test_suite_run_metric_error_output_type_enum.py +2 -2
- vellum/types/test_suite_run_metric_number_output.py +1 -0
- vellum/types/test_suite_run_metric_number_output_type_enum.py +2 -2
- vellum/types/test_suite_run_metric_output.py +4 -4
- vellum/types/test_suite_run_read.py +16 -14
- vellum/types/test_suite_run_test_suite.py +1 -0
- vellum/types/test_suite_run_workflow_release_tag_exec_config.py +5 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +10 -6
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +10 -6
- vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +5 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +2 -2
- vellum/types/test_suite_test_case.py +3 -2
- vellum/types/upload_document_error_response.py +1 -0
- vellum/types/upload_document_response.py +5 -1
- vellum/types/vellum_error.py +1 -0
- vellum/types/vellum_error_request.py +1 -0
- vellum/types/vellum_image.py +2 -1
- vellum/types/vellum_image_request.py +2 -1
- vellum/types/vellum_variable.py +1 -0
- vellum/types/workflow_deployment_read.py +37 -24
- vellum/types/workflow_event_error.py +1 -0
- vellum/types/workflow_execution_actual_chat_history_request.py +25 -15
- vellum/types/workflow_execution_actual_json_request.py +25 -15
- vellum/types/workflow_execution_actual_string_request.py +25 -15
- vellum/types/workflow_execution_node_result_event.py +3 -2
- vellum/types/workflow_execution_workflow_result_event.py +3 -2
- vellum/types/workflow_node_result_data.py +16 -10
- vellum/types/workflow_node_result_event.py +8 -6
- vellum/types/workflow_output.py +18 -11
- vellum/types/workflow_output_array.py +7 -2
- vellum/types/workflow_output_chat_history.py +7 -2
- vellum/types/workflow_output_error.py +7 -2
- vellum/types/workflow_output_function_call.py +7 -2
- vellum/types/workflow_output_image.py +7 -2
- vellum/types/workflow_output_json.py +7 -2
- vellum/types/workflow_output_number.py +7 -2
- vellum/types/workflow_output_search_results.py +7 -2
- vellum/types/workflow_output_string.py +7 -2
- vellum/types/workflow_request_chat_history_input_request.py +6 -1
- vellum/types/workflow_request_input_request.py +8 -6
- vellum/types/workflow_request_json_input_request.py +6 -1
- vellum/types/workflow_request_number_input_request.py +6 -1
- vellum/types/workflow_request_string_input_request.py +6 -1
- vellum/types/workflow_result_event.py +5 -4
- vellum/types/workflow_result_event_output_data.py +16 -10
- vellum/types/workflow_result_event_output_data_array.py +8 -5
- vellum/types/workflow_result_event_output_data_chat_history.py +8 -5
- vellum/types/workflow_result_event_output_data_error.py +8 -5
- vellum/types/workflow_result_event_output_data_function_call.py +8 -5
- vellum/types/workflow_result_event_output_data_json.py +8 -5
- vellum/types/workflow_result_event_output_data_number.py +8 -5
- vellum/types/workflow_result_event_output_data_search_results.py +8 -5
- vellum/types/workflow_result_event_output_data_string.py +11 -7
- vellum/types/workflow_stream_event.py +4 -4
- vellum/version.py +4 -0
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/METADATA +4 -4
- vellum_ai-0.3.15.dist-info/RECORD +365 -0
- vellum_ai-0.3.14.dist-info/RECORD +0 -356
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/WHEEL +0 -0
@@ -8,6 +8,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
10
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
|
+
from ...core.request_options import RequestOptions
|
11
12
|
from ...types.paginated_test_suite_run_execution_list import PaginatedTestSuiteRunExecutionList
|
12
13
|
from ...types.test_suite_run_exec_config_request import TestSuiteRunExecConfigRequest
|
13
14
|
from ...types.test_suite_run_read import TestSuiteRunRead
|
@@ -26,25 +27,67 @@ class TestSuiteRunsClient:
|
|
26
27
|
self._client_wrapper = client_wrapper
|
27
28
|
|
28
29
|
def create(
|
29
|
-
self,
|
30
|
+
self,
|
31
|
+
*,
|
32
|
+
test_suite_id: str,
|
33
|
+
exec_config: TestSuiteRunExecConfigRequest,
|
34
|
+
request_options: typing.Optional[RequestOptions] = None,
|
30
35
|
) -> TestSuiteRunRead:
|
31
36
|
"""
|
32
37
|
Trigger a Test Suite and create a new Test Suite Run
|
33
38
|
|
34
39
|
Parameters:
|
35
|
-
- test_suite_id:
|
40
|
+
- test_suite_id: str. The ID of the Test Suite to run
|
36
41
|
|
37
42
|
- exec_config: TestSuiteRunExecConfigRequest. Configuration that defines how the Test Suite should be run
|
43
|
+
|
44
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
45
|
+
---
|
46
|
+
from vellum import (
|
47
|
+
TestSuiteRunDeploymentReleaseTagExecConfigDataRequest,
|
48
|
+
TestSuiteRunExecConfigRequest_DeploymentReleaseTag,
|
49
|
+
)
|
50
|
+
from vellum.client import Vellum
|
51
|
+
|
52
|
+
client = Vellum(
|
53
|
+
api_key="YOUR_API_KEY",
|
54
|
+
)
|
55
|
+
client.test_suite_runs.create(
|
56
|
+
test_suite_id="string",
|
57
|
+
exec_config=TestSuiteRunExecConfigRequest_DeploymentReleaseTag(
|
58
|
+
data=TestSuiteRunDeploymentReleaseTagExecConfigDataRequest(
|
59
|
+
deployment_id="string",
|
60
|
+
tag="string",
|
61
|
+
),
|
62
|
+
test_case_ids=["string"],
|
63
|
+
),
|
64
|
+
)
|
38
65
|
"""
|
39
|
-
_request: typing.Dict[str, typing.Any] = {"exec_config": exec_config}
|
40
|
-
if test_suite_id is not OMIT:
|
41
|
-
_request["test_suite_id"] = test_suite_id
|
42
66
|
_response = self._client_wrapper.httpx_client.request(
|
43
67
|
"POST",
|
44
68
|
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
45
|
-
|
46
|
-
|
47
|
-
|
69
|
+
params=jsonable_encoder(
|
70
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
71
|
+
),
|
72
|
+
json=jsonable_encoder({"test_suite_id": test_suite_id, "exec_config": exec_config})
|
73
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
74
|
+
else {
|
75
|
+
**jsonable_encoder({"test_suite_id": test_suite_id, "exec_config": exec_config}),
|
76
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
77
|
+
},
|
78
|
+
headers=jsonable_encoder(
|
79
|
+
remove_none_from_dict(
|
80
|
+
{
|
81
|
+
**self._client_wrapper.get_headers(),
|
82
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
83
|
+
}
|
84
|
+
)
|
85
|
+
),
|
86
|
+
timeout=request_options.get("timeout_in_seconds")
|
87
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
88
|
+
else self._client_wrapper.get_timeout(),
|
89
|
+
retries=0,
|
90
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
48
91
|
)
|
49
92
|
if 200 <= _response.status_code < 300:
|
50
93
|
return pydantic.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
@@ -54,12 +97,14 @@ class TestSuiteRunsClient:
|
|
54
97
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
55
98
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
56
99
|
|
57
|
-
def retrieve(self, id: str) -> TestSuiteRunRead:
|
100
|
+
def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> TestSuiteRunRead:
|
58
101
|
"""
|
59
102
|
Retrieve a specific Test Suite Run by ID
|
60
103
|
|
61
104
|
Parameters:
|
62
105
|
- id: str. A UUID string identifying this test suite run.
|
106
|
+
|
107
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
63
108
|
---
|
64
109
|
from vellum.client import Vellum
|
65
110
|
|
@@ -72,9 +117,25 @@ class TestSuiteRunsClient:
|
|
72
117
|
"""
|
73
118
|
_response = self._client_wrapper.httpx_client.request(
|
74
119
|
"GET",
|
75
|
-
urllib.parse.urljoin(
|
76
|
-
|
77
|
-
|
120
|
+
urllib.parse.urljoin(
|
121
|
+
f"{self._client_wrapper.get_environment().default}/", f"v1/test-suite-runs/{jsonable_encoder(id)}"
|
122
|
+
),
|
123
|
+
params=jsonable_encoder(
|
124
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
125
|
+
),
|
126
|
+
headers=jsonable_encoder(
|
127
|
+
remove_none_from_dict(
|
128
|
+
{
|
129
|
+
**self._client_wrapper.get_headers(),
|
130
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
131
|
+
}
|
132
|
+
)
|
133
|
+
),
|
134
|
+
timeout=request_options.get("timeout_in_seconds")
|
135
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
136
|
+
else self._client_wrapper.get_timeout(),
|
137
|
+
retries=0,
|
138
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
78
139
|
)
|
79
140
|
if 200 <= _response.status_code < 300:
|
80
141
|
return pydantic.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
@@ -84,8 +145,13 @@ class TestSuiteRunsClient:
|
|
84
145
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
85
146
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
86
147
|
|
87
|
-
def
|
88
|
-
self,
|
148
|
+
def list_executions(
|
149
|
+
self,
|
150
|
+
id: str,
|
151
|
+
*,
|
152
|
+
limit: typing.Optional[int] = None,
|
153
|
+
offset: typing.Optional[int] = None,
|
154
|
+
request_options: typing.Optional[RequestOptions] = None,
|
89
155
|
) -> PaginatedTestSuiteRunExecutionList:
|
90
156
|
"""
|
91
157
|
Parameters:
|
@@ -94,24 +160,50 @@ class TestSuiteRunsClient:
|
|
94
160
|
- limit: typing.Optional[int]. Number of results to return per page.
|
95
161
|
|
96
162
|
- offset: typing.Optional[int]. The initial index from which to return the results.
|
163
|
+
|
164
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
97
165
|
---
|
98
166
|
from vellum.client import Vellum
|
99
167
|
|
100
168
|
client = Vellum(
|
101
169
|
api_key="YOUR_API_KEY",
|
102
170
|
)
|
103
|
-
client.test_suite_runs.
|
171
|
+
client.test_suite_runs.list_executions(
|
104
172
|
id="id",
|
105
173
|
)
|
106
174
|
"""
|
107
175
|
_response = self._client_wrapper.httpx_client.request(
|
108
176
|
"GET",
|
109
177
|
urllib.parse.urljoin(
|
110
|
-
f"{self._client_wrapper.get_environment().default}/",
|
178
|
+
f"{self._client_wrapper.get_environment().default}/",
|
179
|
+
f"v1/test-suite-runs/{jsonable_encoder(id)}/executions",
|
180
|
+
),
|
181
|
+
params=jsonable_encoder(
|
182
|
+
remove_none_from_dict(
|
183
|
+
{
|
184
|
+
"limit": limit,
|
185
|
+
"offset": offset,
|
186
|
+
**(
|
187
|
+
request_options.get("additional_query_parameters", {})
|
188
|
+
if request_options is not None
|
189
|
+
else {}
|
190
|
+
),
|
191
|
+
}
|
192
|
+
)
|
193
|
+
),
|
194
|
+
headers=jsonable_encoder(
|
195
|
+
remove_none_from_dict(
|
196
|
+
{
|
197
|
+
**self._client_wrapper.get_headers(),
|
198
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
199
|
+
}
|
200
|
+
)
|
111
201
|
),
|
112
|
-
|
113
|
-
|
114
|
-
|
202
|
+
timeout=request_options.get("timeout_in_seconds")
|
203
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
204
|
+
else self._client_wrapper.get_timeout(),
|
205
|
+
retries=0,
|
206
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
115
207
|
)
|
116
208
|
if 200 <= _response.status_code < 300:
|
117
209
|
return pydantic.parse_obj_as(PaginatedTestSuiteRunExecutionList, _response.json()) # type: ignore
|
@@ -127,25 +219,67 @@ class AsyncTestSuiteRunsClient:
|
|
127
219
|
self._client_wrapper = client_wrapper
|
128
220
|
|
129
221
|
async def create(
|
130
|
-
self,
|
222
|
+
self,
|
223
|
+
*,
|
224
|
+
test_suite_id: str,
|
225
|
+
exec_config: TestSuiteRunExecConfigRequest,
|
226
|
+
request_options: typing.Optional[RequestOptions] = None,
|
131
227
|
) -> TestSuiteRunRead:
|
132
228
|
"""
|
133
229
|
Trigger a Test Suite and create a new Test Suite Run
|
134
230
|
|
135
231
|
Parameters:
|
136
|
-
- test_suite_id:
|
232
|
+
- test_suite_id: str. The ID of the Test Suite to run
|
137
233
|
|
138
234
|
- exec_config: TestSuiteRunExecConfigRequest. Configuration that defines how the Test Suite should be run
|
235
|
+
|
236
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
237
|
+
---
|
238
|
+
from vellum import (
|
239
|
+
TestSuiteRunDeploymentReleaseTagExecConfigDataRequest,
|
240
|
+
TestSuiteRunExecConfigRequest_DeploymentReleaseTag,
|
241
|
+
)
|
242
|
+
from vellum.client import AsyncVellum
|
243
|
+
|
244
|
+
client = AsyncVellum(
|
245
|
+
api_key="YOUR_API_KEY",
|
246
|
+
)
|
247
|
+
await client.test_suite_runs.create(
|
248
|
+
test_suite_id="string",
|
249
|
+
exec_config=TestSuiteRunExecConfigRequest_DeploymentReleaseTag(
|
250
|
+
data=TestSuiteRunDeploymentReleaseTagExecConfigDataRequest(
|
251
|
+
deployment_id="string",
|
252
|
+
tag="string",
|
253
|
+
),
|
254
|
+
test_case_ids=["string"],
|
255
|
+
),
|
256
|
+
)
|
139
257
|
"""
|
140
|
-
_request: typing.Dict[str, typing.Any] = {"exec_config": exec_config}
|
141
|
-
if test_suite_id is not OMIT:
|
142
|
-
_request["test_suite_id"] = test_suite_id
|
143
258
|
_response = await self._client_wrapper.httpx_client.request(
|
144
259
|
"POST",
|
145
260
|
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/test-suite-runs"),
|
146
|
-
|
147
|
-
|
148
|
-
|
261
|
+
params=jsonable_encoder(
|
262
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
263
|
+
),
|
264
|
+
json=jsonable_encoder({"test_suite_id": test_suite_id, "exec_config": exec_config})
|
265
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
266
|
+
else {
|
267
|
+
**jsonable_encoder({"test_suite_id": test_suite_id, "exec_config": exec_config}),
|
268
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
269
|
+
},
|
270
|
+
headers=jsonable_encoder(
|
271
|
+
remove_none_from_dict(
|
272
|
+
{
|
273
|
+
**self._client_wrapper.get_headers(),
|
274
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
275
|
+
}
|
276
|
+
)
|
277
|
+
),
|
278
|
+
timeout=request_options.get("timeout_in_seconds")
|
279
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
280
|
+
else self._client_wrapper.get_timeout(),
|
281
|
+
retries=0,
|
282
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
149
283
|
)
|
150
284
|
if 200 <= _response.status_code < 300:
|
151
285
|
return pydantic.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
@@ -155,12 +289,14 @@ class AsyncTestSuiteRunsClient:
|
|
155
289
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
156
290
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
157
291
|
|
158
|
-
async def retrieve(self, id: str) -> TestSuiteRunRead:
|
292
|
+
async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> TestSuiteRunRead:
|
159
293
|
"""
|
160
294
|
Retrieve a specific Test Suite Run by ID
|
161
295
|
|
162
296
|
Parameters:
|
163
297
|
- id: str. A UUID string identifying this test suite run.
|
298
|
+
|
299
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
164
300
|
---
|
165
301
|
from vellum.client import AsyncVellum
|
166
302
|
|
@@ -173,9 +309,25 @@ class AsyncTestSuiteRunsClient:
|
|
173
309
|
"""
|
174
310
|
_response = await self._client_wrapper.httpx_client.request(
|
175
311
|
"GET",
|
176
|
-
urllib.parse.urljoin(
|
177
|
-
|
178
|
-
|
312
|
+
urllib.parse.urljoin(
|
313
|
+
f"{self._client_wrapper.get_environment().default}/", f"v1/test-suite-runs/{jsonable_encoder(id)}"
|
314
|
+
),
|
315
|
+
params=jsonable_encoder(
|
316
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
317
|
+
),
|
318
|
+
headers=jsonable_encoder(
|
319
|
+
remove_none_from_dict(
|
320
|
+
{
|
321
|
+
**self._client_wrapper.get_headers(),
|
322
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
323
|
+
}
|
324
|
+
)
|
325
|
+
),
|
326
|
+
timeout=request_options.get("timeout_in_seconds")
|
327
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
328
|
+
else self._client_wrapper.get_timeout(),
|
329
|
+
retries=0,
|
330
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
179
331
|
)
|
180
332
|
if 200 <= _response.status_code < 300:
|
181
333
|
return pydantic.parse_obj_as(TestSuiteRunRead, _response.json()) # type: ignore
|
@@ -185,8 +337,13 @@ class AsyncTestSuiteRunsClient:
|
|
185
337
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
186
338
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
187
339
|
|
188
|
-
async def
|
189
|
-
self,
|
340
|
+
async def list_executions(
|
341
|
+
self,
|
342
|
+
id: str,
|
343
|
+
*,
|
344
|
+
limit: typing.Optional[int] = None,
|
345
|
+
offset: typing.Optional[int] = None,
|
346
|
+
request_options: typing.Optional[RequestOptions] = None,
|
190
347
|
) -> PaginatedTestSuiteRunExecutionList:
|
191
348
|
"""
|
192
349
|
Parameters:
|
@@ -195,24 +352,50 @@ class AsyncTestSuiteRunsClient:
|
|
195
352
|
- limit: typing.Optional[int]. Number of results to return per page.
|
196
353
|
|
197
354
|
- offset: typing.Optional[int]. The initial index from which to return the results.
|
355
|
+
|
356
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
198
357
|
---
|
199
358
|
from vellum.client import AsyncVellum
|
200
359
|
|
201
360
|
client = AsyncVellum(
|
202
361
|
api_key="YOUR_API_KEY",
|
203
362
|
)
|
204
|
-
await client.test_suite_runs.
|
363
|
+
await client.test_suite_runs.list_executions(
|
205
364
|
id="id",
|
206
365
|
)
|
207
366
|
"""
|
208
367
|
_response = await self._client_wrapper.httpx_client.request(
|
209
368
|
"GET",
|
210
369
|
urllib.parse.urljoin(
|
211
|
-
f"{self._client_wrapper.get_environment().default}/",
|
370
|
+
f"{self._client_wrapper.get_environment().default}/",
|
371
|
+
f"v1/test-suite-runs/{jsonable_encoder(id)}/executions",
|
372
|
+
),
|
373
|
+
params=jsonable_encoder(
|
374
|
+
remove_none_from_dict(
|
375
|
+
{
|
376
|
+
"limit": limit,
|
377
|
+
"offset": offset,
|
378
|
+
**(
|
379
|
+
request_options.get("additional_query_parameters", {})
|
380
|
+
if request_options is not None
|
381
|
+
else {}
|
382
|
+
),
|
383
|
+
}
|
384
|
+
)
|
385
|
+
),
|
386
|
+
headers=jsonable_encoder(
|
387
|
+
remove_none_from_dict(
|
388
|
+
{
|
389
|
+
**self._client_wrapper.get_headers(),
|
390
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
391
|
+
}
|
392
|
+
)
|
212
393
|
),
|
213
|
-
|
214
|
-
|
215
|
-
|
394
|
+
timeout=request_options.get("timeout_in_seconds")
|
395
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
396
|
+
else self._client_wrapper.get_timeout(),
|
397
|
+
retries=0,
|
398
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
216
399
|
)
|
217
400
|
if 200 <= _response.status_code < 300:
|
218
401
|
return pydantic.parse_obj_as(PaginatedTestSuiteRunExecutionList, _response.json()) # type: ignore
|
@@ -7,6 +7,8 @@ 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.remove_none_from_dict import remove_none_from_dict
|
11
|
+
from ...core.request_options import RequestOptions
|
10
12
|
from ...types.named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
11
13
|
from ...types.test_suite_test_case import TestSuiteTestCase
|
12
14
|
|
@@ -29,8 +31,9 @@ class TestSuitesClient:
|
|
29
31
|
*,
|
30
32
|
upsert_test_suite_test_case_request_id: typing.Optional[str] = OMIT,
|
31
33
|
label: typing.Optional[str] = OMIT,
|
32
|
-
input_values: typing.
|
33
|
-
evaluation_values: typing.
|
34
|
+
input_values: typing.Sequence[NamedTestCaseVariableValueRequest],
|
35
|
+
evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest],
|
36
|
+
request_options: typing.Optional[RequestOptions] = None,
|
34
37
|
) -> TestSuiteTestCase:
|
35
38
|
"""
|
36
39
|
Upserts a new test case for a test suite, keying off of the optionally provided test case id.
|
@@ -48,9 +51,11 @@ class TestSuitesClient:
|
|
48
51
|
|
49
52
|
- label: typing.Optional[str].
|
50
53
|
|
51
|
-
- input_values: typing.
|
54
|
+
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
52
55
|
|
53
|
-
- evaluation_values: typing.
|
56
|
+
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
57
|
+
|
58
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
54
59
|
---
|
55
60
|
from vellum.client import Vellum
|
56
61
|
|
@@ -71,11 +76,31 @@ class TestSuitesClient:
|
|
71
76
|
_response = self._client_wrapper.httpx_client.request(
|
72
77
|
"POST",
|
73
78
|
urllib.parse.urljoin(
|
74
|
-
f"{self._client_wrapper.get_environment().default}/",
|
79
|
+
f"{self._client_wrapper.get_environment().default}/",
|
80
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
81
|
+
),
|
82
|
+
params=jsonable_encoder(
|
83
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
84
|
+
),
|
85
|
+
json=jsonable_encoder(_request)
|
86
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
87
|
+
else {
|
88
|
+
**jsonable_encoder(_request),
|
89
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
90
|
+
},
|
91
|
+
headers=jsonable_encoder(
|
92
|
+
remove_none_from_dict(
|
93
|
+
{
|
94
|
+
**self._client_wrapper.get_headers(),
|
95
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
96
|
+
}
|
97
|
+
)
|
75
98
|
),
|
76
|
-
|
77
|
-
|
78
|
-
|
99
|
+
timeout=request_options.get("timeout_in_seconds")
|
100
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
101
|
+
else self._client_wrapper.get_timeout(),
|
102
|
+
retries=0,
|
103
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
79
104
|
)
|
80
105
|
if 200 <= _response.status_code < 300:
|
81
106
|
return pydantic.parse_obj_as(TestSuiteTestCase, _response.json()) # type: ignore
|
@@ -85,7 +110,9 @@ class TestSuitesClient:
|
|
85
110
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
86
111
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
87
112
|
|
88
|
-
def delete_test_suite_test_case(
|
113
|
+
def delete_test_suite_test_case(
|
114
|
+
self, id: str, test_case_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
115
|
+
) -> None:
|
89
116
|
"""
|
90
117
|
Deletes an existing test case for a test suite, keying off of the test case id.
|
91
118
|
|
@@ -93,6 +120,8 @@ class TestSuitesClient:
|
|
93
120
|
- id: str. A UUID string identifying this test suite.
|
94
121
|
|
95
122
|
- test_case_id: str. An id identifying the test case that you'd like to delete
|
123
|
+
|
124
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
96
125
|
---
|
97
126
|
from vellum.client import Vellum
|
98
127
|
|
@@ -107,10 +136,25 @@ class TestSuitesClient:
|
|
107
136
|
_response = self._client_wrapper.httpx_client.request(
|
108
137
|
"DELETE",
|
109
138
|
urllib.parse.urljoin(
|
110
|
-
f"{self._client_wrapper.get_environment().default}/",
|
139
|
+
f"{self._client_wrapper.get_environment().default}/",
|
140
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases/{jsonable_encoder(test_case_id)}",
|
141
|
+
),
|
142
|
+
params=jsonable_encoder(
|
143
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
144
|
+
),
|
145
|
+
headers=jsonable_encoder(
|
146
|
+
remove_none_from_dict(
|
147
|
+
{
|
148
|
+
**self._client_wrapper.get_headers(),
|
149
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
150
|
+
}
|
151
|
+
)
|
111
152
|
),
|
112
|
-
|
113
|
-
|
153
|
+
timeout=request_options.get("timeout_in_seconds")
|
154
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
155
|
+
else self._client_wrapper.get_timeout(),
|
156
|
+
retries=0,
|
157
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
114
158
|
)
|
115
159
|
if 200 <= _response.status_code < 300:
|
116
160
|
return
|
@@ -131,8 +175,9 @@ class AsyncTestSuitesClient:
|
|
131
175
|
*,
|
132
176
|
upsert_test_suite_test_case_request_id: typing.Optional[str] = OMIT,
|
133
177
|
label: typing.Optional[str] = OMIT,
|
134
|
-
input_values: typing.
|
135
|
-
evaluation_values: typing.
|
178
|
+
input_values: typing.Sequence[NamedTestCaseVariableValueRequest],
|
179
|
+
evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest],
|
180
|
+
request_options: typing.Optional[RequestOptions] = None,
|
136
181
|
) -> TestSuiteTestCase:
|
137
182
|
"""
|
138
183
|
Upserts a new test case for a test suite, keying off of the optionally provided test case id.
|
@@ -150,9 +195,11 @@ class AsyncTestSuitesClient:
|
|
150
195
|
|
151
196
|
- label: typing.Optional[str].
|
152
197
|
|
153
|
-
- input_values: typing.
|
198
|
+
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
154
199
|
|
155
|
-
- evaluation_values: typing.
|
200
|
+
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
201
|
+
|
202
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
156
203
|
---
|
157
204
|
from vellum.client import AsyncVellum
|
158
205
|
|
@@ -173,11 +220,31 @@ class AsyncTestSuitesClient:
|
|
173
220
|
_response = await self._client_wrapper.httpx_client.request(
|
174
221
|
"POST",
|
175
222
|
urllib.parse.urljoin(
|
176
|
-
f"{self._client_wrapper.get_environment().default}/",
|
223
|
+
f"{self._client_wrapper.get_environment().default}/",
|
224
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
225
|
+
),
|
226
|
+
params=jsonable_encoder(
|
227
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
228
|
+
),
|
229
|
+
json=jsonable_encoder(_request)
|
230
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
231
|
+
else {
|
232
|
+
**jsonable_encoder(_request),
|
233
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
234
|
+
},
|
235
|
+
headers=jsonable_encoder(
|
236
|
+
remove_none_from_dict(
|
237
|
+
{
|
238
|
+
**self._client_wrapper.get_headers(),
|
239
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
240
|
+
}
|
241
|
+
)
|
177
242
|
),
|
178
|
-
|
179
|
-
|
180
|
-
|
243
|
+
timeout=request_options.get("timeout_in_seconds")
|
244
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
245
|
+
else self._client_wrapper.get_timeout(),
|
246
|
+
retries=0,
|
247
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
181
248
|
)
|
182
249
|
if 200 <= _response.status_code < 300:
|
183
250
|
return pydantic.parse_obj_as(TestSuiteTestCase, _response.json()) # type: ignore
|
@@ -187,7 +254,9 @@ class AsyncTestSuitesClient:
|
|
187
254
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
188
255
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
189
256
|
|
190
|
-
async def delete_test_suite_test_case(
|
257
|
+
async def delete_test_suite_test_case(
|
258
|
+
self, id: str, test_case_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
259
|
+
) -> None:
|
191
260
|
"""
|
192
261
|
Deletes an existing test case for a test suite, keying off of the test case id.
|
193
262
|
|
@@ -195,6 +264,8 @@ class AsyncTestSuitesClient:
|
|
195
264
|
- id: str. A UUID string identifying this test suite.
|
196
265
|
|
197
266
|
- test_case_id: str. An id identifying the test case that you'd like to delete
|
267
|
+
|
268
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
198
269
|
---
|
199
270
|
from vellum.client import AsyncVellum
|
200
271
|
|
@@ -209,10 +280,25 @@ class AsyncTestSuitesClient:
|
|
209
280
|
_response = await self._client_wrapper.httpx_client.request(
|
210
281
|
"DELETE",
|
211
282
|
urllib.parse.urljoin(
|
212
|
-
f"{self._client_wrapper.get_environment().default}/",
|
283
|
+
f"{self._client_wrapper.get_environment().default}/",
|
284
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases/{jsonable_encoder(test_case_id)}",
|
285
|
+
),
|
286
|
+
params=jsonable_encoder(
|
287
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
288
|
+
),
|
289
|
+
headers=jsonable_encoder(
|
290
|
+
remove_none_from_dict(
|
291
|
+
{
|
292
|
+
**self._client_wrapper.get_headers(),
|
293
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
294
|
+
}
|
295
|
+
)
|
213
296
|
),
|
214
|
-
|
215
|
-
|
297
|
+
timeout=request_options.get("timeout_in_seconds")
|
298
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
299
|
+
else self._client_wrapper.get_timeout(),
|
300
|
+
retries=0,
|
301
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
216
302
|
)
|
217
303
|
if 200 <= _response.status_code < 300:
|
218
304
|
return
|