vellum-ai 0.3.22__py3-none-any.whl → 0.5.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +81 -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 +253 -0
- vellum/lib/utils/__init__.py +0 -0
- vellum/lib/utils/env.py +11 -0
- vellum/lib/utils/exceptions.py +2 -0
- vellum/lib/utils/paginator.py +28 -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 +83 -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 +31 -0
- vellum/types/external_test_case_execution_request.py +31 -0
- 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/{prompt_template_block_data.py → named_scenario_input_string_variable_value_request.py} +8 -9
- vellum/types/{prompt_template_block_data_request.py → named_test_case_chat_history_variable_value.py} +9 -9
- vellum/types/named_test_case_chat_history_variable_value_request.py +3 -7
- vellum/types/named_test_case_error_variable_value.py +31 -0
- 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/{register_prompt_error_response.py → named_test_case_json_variable_value.py} +7 -9
- vellum/types/named_test_case_json_variable_value_request.py +3 -7
- vellum/types/{registered_prompt_sandbox_snapshot.py → named_test_case_number_variable_value.py} +7 -9
- vellum/types/named_test_case_number_variable_value_request.py +3 -7
- vellum/types/named_test_case_search_results_variable_value.py +31 -0
- vellum/types/named_test_case_search_results_variable_value_request.py +3 -7
- vellum/types/named_test_case_string_variable_value.py +30 -0
- vellum/types/named_test_case_string_variable_value_request.py +3 -7
- vellum/types/named_test_case_variable_value.py +94 -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 +8 -8
- vellum/types/scenario_input.py +18 -21
- vellum/types/{registered_prompt_sandbox.py → scenario_input_chat_history_variable_value.py} +7 -13
- vellum/types/scenario_input_string_variable_value.py +30 -0
- 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 +7 -6
- vellum/types/test_case_error_variable_value.py +7 -6
- vellum/types/test_case_function_call_variable_value.py +32 -0
- vellum/types/test_case_json_variable_value.py +7 -6
- vellum/types/test_case_number_variable_value.py +7 -6
- vellum/types/test_case_search_results_variable_value.py +7 -6
- vellum/types/test_case_string_variable_value.py +7 -6
- 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_exec_config.py +14 -1
- vellum/types/test_suite_run_exec_config_request.py +14 -1
- 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/test_suite_run_execution_function_call_output.py +32 -0
- 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/{model_version_sandbox_snapshot.py → test_suite_run_external_exec_config.py} +8 -18
- vellum/types/{registered_prompt_model_version.py → test_suite_run_external_exec_config_data.py} +6 -14
- vellum/types/test_suite_run_external_exec_config_data_request.py +29 -0
- vellum/types/{registered_prompt_deployment.py → test_suite_run_external_exec_config_request.py} +8 -16
- vellum/types/test_suite_run_external_exec_config_type_enum.py +5 -0
- 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.22.dist-info → vellum_ai-0.5.0.dist-info}/METADATA +1 -1
- vellum_ai-0.5.0.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/prompt_template_block.py +0 -41
- 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/scenario_input_request.py +0 -34
- vellum/types/scenario_input_type_enum.py +0 -22
- vellum_ai-0.3.22.dist-info/RECORD +0 -380
- {vellum_ai-0.3.22.dist-info → vellum_ai-0.5.0.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.22.dist-info → vellum_ai-0.5.0.dist-info}/WHEEL +0 -0
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
5
5
|
import typing
|
6
6
|
|
7
7
|
from .test_suite_run_deployment_release_tag_exec_config import TestSuiteRunDeploymentReleaseTagExecConfig
|
8
|
+
from .test_suite_run_external_exec_config import TestSuiteRunExternalExecConfig
|
8
9
|
from .test_suite_run_workflow_release_tag_exec_config import TestSuiteRunWorkflowReleaseTagExecConfig
|
9
10
|
|
10
11
|
|
@@ -28,6 +29,18 @@ class TestSuiteRunExecConfig_WorkflowReleaseTag(TestSuiteRunWorkflowReleaseTagEx
|
|
28
29
|
populate_by_name = True
|
29
30
|
|
30
31
|
|
32
|
+
class TestSuiteRunExecConfig_External(TestSuiteRunExternalExecConfig):
|
33
|
+
type: typing.Literal["EXTERNAL"] = "EXTERNAL"
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
populate_by_name = True
|
40
|
+
|
41
|
+
|
31
42
|
TestSuiteRunExecConfig = typing.Union[
|
32
|
-
TestSuiteRunExecConfig_DeploymentReleaseTag,
|
43
|
+
TestSuiteRunExecConfig_DeploymentReleaseTag,
|
44
|
+
TestSuiteRunExecConfig_WorkflowReleaseTag,
|
45
|
+
TestSuiteRunExecConfig_External,
|
33
46
|
]
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
5
5
|
import typing
|
6
6
|
|
7
7
|
from .test_suite_run_deployment_release_tag_exec_config_request import TestSuiteRunDeploymentReleaseTagExecConfigRequest
|
8
|
+
from .test_suite_run_external_exec_config_request import TestSuiteRunExternalExecConfigRequest
|
8
9
|
from .test_suite_run_workflow_release_tag_exec_config_request import TestSuiteRunWorkflowReleaseTagExecConfigRequest
|
9
10
|
|
10
11
|
|
@@ -28,6 +29,18 @@ class TestSuiteRunExecConfigRequest_WorkflowReleaseTag(TestSuiteRunWorkflowRelea
|
|
28
29
|
populate_by_name = True
|
29
30
|
|
30
31
|
|
32
|
+
class TestSuiteRunExecConfigRequest_External(TestSuiteRunExternalExecConfigRequest):
|
33
|
+
type: typing.Literal["EXTERNAL"] = "EXTERNAL"
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
populate_by_name = True
|
40
|
+
|
41
|
+
|
31
42
|
TestSuiteRunExecConfigRequest = typing.Union[
|
32
|
-
TestSuiteRunExecConfigRequest_DeploymentReleaseTag,
|
43
|
+
TestSuiteRunExecConfigRequest_DeploymentReleaseTag,
|
44
|
+
TestSuiteRunExecConfigRequest_WorkflowReleaseTag,
|
45
|
+
TestSuiteRunExecConfigRequest_External,
|
33
46
|
]
|
@@ -4,16 +4,12 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .test_suite_run_execution_metric_result import TestSuiteRunExecutionMetricResult
|
8
9
|
from .test_suite_run_execution_output import TestSuiteRunExecutionOutput
|
9
10
|
|
10
|
-
try:
|
11
|
-
import pydantic.v1 as pydantic # type: ignore
|
12
|
-
except ImportError:
|
13
|
-
import pydantic # type: ignore
|
14
11
|
|
15
|
-
|
16
|
-
class TestSuiteRunExecution(pydantic.BaseModel):
|
12
|
+
class TestSuiteRunExecution(pydantic_v1.BaseModel):
|
17
13
|
id: str
|
18
14
|
test_case_id: str
|
19
15
|
outputs: typing.List[TestSuiteRunExecutionOutput]
|
@@ -30,5 +26,5 @@ class TestSuiteRunExecution(pydantic.BaseModel):
|
|
30
26
|
class Config:
|
31
27
|
frozen = True
|
32
28
|
smart_union = True
|
33
|
-
extra =
|
29
|
+
extra = pydantic_v1.Extra.allow
|
34
30
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,15 +4,11 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .chat_message import ChatMessage
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
class TestSuiteRunExecutionChatHistoryOutput(pydantic.BaseModel):
|
11
|
+
class TestSuiteRunExecutionChatHistoryOutput(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
Execution output of an entity evaluated during a Test Suite Run that is of type CHAT_HISTORY
|
18
14
|
"""
|
@@ -32,5 +28,5 @@ class TestSuiteRunExecutionChatHistoryOutput(pydantic.BaseModel):
|
|
32
28
|
class Config:
|
33
29
|
frozen = True
|
34
30
|
smart_union = True
|
35
|
-
extra =
|
31
|
+
extra = pydantic_v1.Extra.allow
|
36
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,15 +4,11 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .vellum_error import VellumError
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
class TestSuiteRunExecutionErrorOutput(pydantic.BaseModel):
|
11
|
+
class TestSuiteRunExecutionErrorOutput(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
Execution output of an entity evaluated during a Test Suite Run that is of type ERROR
|
18
14
|
"""
|
@@ -32,5 +28,5 @@ class TestSuiteRunExecutionErrorOutput(pydantic.BaseModel):
|
|
32
28
|
class Config:
|
33
29
|
frozen = True
|
34
30
|
smart_union = True
|
35
|
-
extra =
|
31
|
+
extra = pydantic_v1.Extra.allow
|
36
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .fulfilled_function_call import FulfilledFunctionCall
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteRunExecutionFunctionCallOutput(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type FUNCTION_CALL
|
14
|
+
"""
|
15
|
+
|
16
|
+
name: str
|
17
|
+
value: typing.Optional[FulfilledFunctionCall] = None
|
18
|
+
output_variable_id: str
|
19
|
+
|
20
|
+
def json(self, **kwargs: typing.Any) -> str:
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
return super().json(**kwargs_with_defaults)
|
23
|
+
|
24
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
+
return super().dict(**kwargs_with_defaults)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunExecutionJsonOutput(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunExecutionJsonOutput(pydantic_v1.BaseModel):
|
15
11
|
"""
|
16
12
|
Execution output of an entity evaluated during a Test Suite Run that is of type JSON
|
17
13
|
"""
|
@@ -31,5 +27,5 @@ class TestSuiteRunExecutionJsonOutput(pydantic.BaseModel):
|
|
31
27
|
class Config:
|
32
28
|
frozen = True
|
33
29
|
smart_union = True
|
34
|
-
extra =
|
30
|
+
extra = pydantic_v1.Extra.allow
|
35
31
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunExecutionMetricDefinition(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunExecutionMetricDefinition(pydantic_v1.BaseModel):
|
15
11
|
id: typing.Optional[str] = None
|
16
12
|
label: typing.Optional[str] = None
|
17
13
|
name: typing.Optional[str] = None
|
@@ -27,5 +23,5 @@ class TestSuiteRunExecutionMetricDefinition(pydantic.BaseModel):
|
|
27
23
|
class Config:
|
28
24
|
frozen = True
|
29
25
|
smart_union = True
|
30
|
-
extra =
|
26
|
+
extra = pydantic_v1.Extra.allow
|
31
27
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,16 +4,12 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .test_suite_run_execution_metric_definition import TestSuiteRunExecutionMetricDefinition
|
8
9
|
from .test_suite_run_metric_output import TestSuiteRunMetricOutput
|
9
10
|
|
10
|
-
try:
|
11
|
-
import pydantic.v1 as pydantic # type: ignore
|
12
|
-
except ImportError:
|
13
|
-
import pydantic # type: ignore
|
14
11
|
|
15
|
-
|
16
|
-
class TestSuiteRunExecutionMetricResult(pydantic.BaseModel):
|
12
|
+
class TestSuiteRunExecutionMetricResult(pydantic_v1.BaseModel):
|
17
13
|
metric_id: str
|
18
14
|
outputs: typing.List[TestSuiteRunMetricOutput]
|
19
15
|
metric_label: typing.Optional[str] = None
|
@@ -30,5 +26,5 @@ class TestSuiteRunExecutionMetricResult(pydantic.BaseModel):
|
|
30
26
|
class Config:
|
31
27
|
frozen = True
|
32
28
|
smart_union = True
|
33
|
-
extra =
|
29
|
+
extra = pydantic_v1.Extra.allow
|
34
30
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunExecutionNumberOutput(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunExecutionNumberOutput(pydantic_v1.BaseModel):
|
15
11
|
"""
|
16
12
|
Execution output of an entity evaluated during a Test Suite Run that is of type NUMBER
|
17
13
|
"""
|
@@ -31,5 +27,5 @@ class TestSuiteRunExecutionNumberOutput(pydantic.BaseModel):
|
|
31
27
|
class Config:
|
32
28
|
frozen = True
|
33
29
|
smart_union = True
|
34
|
-
extra =
|
30
|
+
extra = pydantic_v1.Extra.allow
|
35
31
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -6,6 +6,7 @@ import typing
|
|
6
6
|
|
7
7
|
from .test_suite_run_execution_chat_history_output import TestSuiteRunExecutionChatHistoryOutput
|
8
8
|
from .test_suite_run_execution_error_output import TestSuiteRunExecutionErrorOutput
|
9
|
+
from .test_suite_run_execution_function_call_output import TestSuiteRunExecutionFunctionCallOutput
|
9
10
|
from .test_suite_run_execution_json_output import TestSuiteRunExecutionJsonOutput
|
10
11
|
from .test_suite_run_execution_number_output import TestSuiteRunExecutionNumberOutput
|
11
12
|
from .test_suite_run_execution_search_results_output import TestSuiteRunExecutionSearchResultsOutput
|
@@ -72,6 +73,16 @@ class TestSuiteRunExecutionOutput_Error(TestSuiteRunExecutionErrorOutput):
|
|
72
73
|
populate_by_name = True
|
73
74
|
|
74
75
|
|
76
|
+
class TestSuiteRunExecutionOutput_FunctionCall(TestSuiteRunExecutionFunctionCallOutput):
|
77
|
+
type: typing.Literal["FUNCTION_CALL"] = "FUNCTION_CALL"
|
78
|
+
|
79
|
+
class Config:
|
80
|
+
frozen = True
|
81
|
+
smart_union = True
|
82
|
+
allow_population_by_field_name = True
|
83
|
+
populate_by_name = True
|
84
|
+
|
85
|
+
|
75
86
|
TestSuiteRunExecutionOutput = typing.Union[
|
76
87
|
TestSuiteRunExecutionOutput_String,
|
77
88
|
TestSuiteRunExecutionOutput_Number,
|
@@ -79,4 +90,5 @@ TestSuiteRunExecutionOutput = typing.Union[
|
|
79
90
|
TestSuiteRunExecutionOutput_ChatHistory,
|
80
91
|
TestSuiteRunExecutionOutput_SearchResults,
|
81
92
|
TestSuiteRunExecutionOutput_Error,
|
93
|
+
TestSuiteRunExecutionOutput_FunctionCall,
|
82
94
|
]
|
@@ -4,15 +4,11 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .search_result import SearchResult
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
class TestSuiteRunExecutionSearchResultsOutput(pydantic.BaseModel):
|
11
|
+
class TestSuiteRunExecutionSearchResultsOutput(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
Execution output of an entity evaluated during a Test Suite Run that is of type SEARCH_RESULTS
|
18
14
|
"""
|
@@ -32,5 +28,5 @@ class TestSuiteRunExecutionSearchResultsOutput(pydantic.BaseModel):
|
|
32
28
|
class Config:
|
33
29
|
frozen = True
|
34
30
|
smart_union = True
|
35
|
-
extra =
|
31
|
+
extra = pydantic_v1.Extra.allow
|
36
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunExecutionStringOutput(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunExecutionStringOutput(pydantic_v1.BaseModel):
|
15
11
|
"""
|
16
12
|
Execution output of an entity evaluated during a Test Suite Run that is of type STRING
|
17
13
|
"""
|
@@ -31,5 +27,5 @@ class TestSuiteRunExecutionStringOutput(pydantic.BaseModel):
|
|
31
27
|
class Config:
|
32
28
|
frozen = True
|
33
29
|
smart_union = True
|
34
|
-
extra =
|
30
|
+
extra = pydantic_v1.Extra.allow
|
35
31
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,30 +4,20 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .test_suite_run_external_exec_config_data import TestSuiteRunExternalExecConfigData
|
7
9
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
10
|
|
13
|
-
|
14
|
-
class ModelVersionSandboxSnapshot(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field()
|
11
|
+
class TestSuiteRunExternalExecConfig(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
|
-
|
13
|
+
Execution configuration for running a Vellum Test Suite against an external callable
|
18
14
|
"""
|
19
15
|
|
20
|
-
|
21
|
-
|
22
|
-
The index of the prompt in the sandbox snapshot.
|
16
|
+
data: TestSuiteRunExternalExecConfigData
|
17
|
+
test_case_ids: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
|
23
18
|
"""
|
24
|
-
|
25
|
-
prompt_id: typing.Optional[str] = pydantic.Field(default=None)
|
19
|
+
Optionally specify a subset of test case ids to run. If not provided, all test cases within the test suite will be run by default.
|
26
20
|
"""
|
27
|
-
The id of the prompt in the sandbox snapshot.
|
28
|
-
"""
|
29
|
-
|
30
|
-
sandbox_id: typing.Optional[str] = None
|
31
21
|
|
32
22
|
def json(self, **kwargs: typing.Any) -> str:
|
33
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -40,5 +30,5 @@ class ModelVersionSandboxSnapshot(pydantic.BaseModel):
|
|
40
30
|
class Config:
|
41
31
|
frozen = True
|
42
32
|
smart_union = True
|
43
|
-
extra =
|
33
|
+
extra = pydantic_v1.Extra.allow
|
44
34
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/{registered_prompt_model_version.py → test_suite_run_external_exec_config_data.py}
RENAMED
@@ -4,22 +4,14 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .external_test_case_execution import ExternalTestCaseExecution
|
7
9
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
id: str = pydantic.Field()
|
16
|
-
"""
|
17
|
-
The ID of the generated model version.
|
18
|
-
"""
|
19
|
-
|
20
|
-
label: str = pydantic.Field()
|
11
|
+
class TestSuiteRunExternalExecConfigData(pydantic_v1.BaseModel):
|
12
|
+
executions: typing.List[ExternalTestCaseExecution] = pydantic_v1.Field()
|
21
13
|
"""
|
22
|
-
|
14
|
+
The executions of some callable external to Vellum whose outputs you would like to evaluate.
|
23
15
|
"""
|
24
16
|
|
25
17
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -33,5 +25,5 @@ class RegisteredPromptModelVersion(pydantic.BaseModel):
|
|
33
25
|
class Config:
|
34
26
|
frozen = True
|
35
27
|
smart_union = True
|
36
|
-
extra =
|
28
|
+
extra = pydantic_v1.Extra.allow
|
37
29
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .external_test_case_execution_request import ExternalTestCaseExecutionRequest
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteRunExternalExecConfigDataRequest(pydantic_v1.BaseModel):
|
12
|
+
executions: typing.List[ExternalTestCaseExecutionRequest] = pydantic_v1.Field()
|
13
|
+
"""
|
14
|
+
The executions of some callable external to Vellum whose outputs you would like to evaluate.
|
15
|
+
"""
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/{registered_prompt_deployment.py → test_suite_run_external_exec_config_request.py}
RENAMED
@@ -4,27 +4,19 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .test_suite_run_external_exec_config_data_request import TestSuiteRunExternalExecConfigDataRequest
|
7
9
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
10
|
|
13
|
-
|
14
|
-
class RegisteredPromptDeployment(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field()
|
16
|
-
"""
|
17
|
-
The ID of the generated deployment.
|
18
|
-
"""
|
19
|
-
|
20
|
-
name: str = pydantic.Field()
|
11
|
+
class TestSuiteRunExternalExecConfigRequest(pydantic_v1.BaseModel):
|
21
12
|
"""
|
22
|
-
|
13
|
+
Execution configuration for running a Vellum Test Suite against an external callable
|
23
14
|
"""
|
24
15
|
|
25
|
-
|
16
|
+
data: TestSuiteRunExternalExecConfigDataRequest
|
17
|
+
test_case_ids: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
|
26
18
|
"""
|
27
|
-
|
19
|
+
Optionally specify a subset of test case ids to run. If not provided, all test cases within the test suite will be run by default.
|
28
20
|
"""
|
29
21
|
|
30
22
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -38,5 +30,5 @@ class RegisteredPromptDeployment(pydantic.BaseModel):
|
|
38
30
|
class Config:
|
39
31
|
frozen = True
|
40
32
|
smart_union = True
|
41
|
-
extra =
|
33
|
+
extra = pydantic_v1.Extra.allow
|
42
34
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,15 +4,11 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .vellum_error import VellumError
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
class TestSuiteRunMetricErrorOutput(pydantic.BaseModel):
|
11
|
+
class TestSuiteRunMetricErrorOutput(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
Output for a test suite run metric that is of type ERROR
|
18
14
|
"""
|
@@ -31,5 +27,5 @@ class TestSuiteRunMetricErrorOutput(pydantic.BaseModel):
|
|
31
27
|
class Config:
|
32
28
|
frozen = True
|
33
29
|
smart_union = True
|
34
|
-
extra =
|
30
|
+
extra = pydantic_v1.Extra.allow
|
35
31
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunMetricNumberOutput(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunMetricNumberOutput(pydantic_v1.BaseModel):
|
15
11
|
"""
|
16
12
|
Output for a test suite run metric that is of type NUMBER
|
17
13
|
"""
|
@@ -30,5 +26,5 @@ class TestSuiteRunMetricNumberOutput(pydantic.BaseModel):
|
|
30
26
|
class Config:
|
31
27
|
frozen = True
|
32
28
|
smart_union = True
|
33
|
-
extra =
|
29
|
+
extra = pydantic_v1.Extra.allow
|
34
30
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,14 +4,10 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
class TestSuiteRunMetricStringOutput(pydantic.BaseModel):
|
10
|
+
class TestSuiteRunMetricStringOutput(pydantic_v1.BaseModel):
|
15
11
|
"""
|
16
12
|
Output for a test suite run metric that is of type STRING
|
17
13
|
"""
|
@@ -30,5 +26,5 @@ class TestSuiteRunMetricStringOutput(pydantic.BaseModel):
|
|
30
26
|
class Config:
|
31
27
|
frozen = True
|
32
28
|
smart_union = True
|
33
|
-
extra =
|
29
|
+
extra = pydantic_v1.Extra.allow
|
34
30
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,21 +4,17 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
7
8
|
from .test_suite_run_exec_config import TestSuiteRunExecConfig
|
8
9
|
from .test_suite_run_state import TestSuiteRunState
|
9
10
|
from .test_suite_run_test_suite import TestSuiteRunTestSuite
|
10
11
|
|
11
|
-
try:
|
12
|
-
import pydantic.v1 as pydantic # type: ignore
|
13
|
-
except ImportError:
|
14
|
-
import pydantic # type: ignore
|
15
12
|
|
16
|
-
|
17
|
-
class TestSuiteRunRead(pydantic.BaseModel):
|
13
|
+
class TestSuiteRunRead(pydantic_v1.BaseModel):
|
18
14
|
id: str
|
19
15
|
created: dt.datetime
|
20
16
|
test_suite: TestSuiteRunTestSuite
|
21
|
-
state: TestSuiteRunState =
|
17
|
+
state: TestSuiteRunState = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The current state of this run
|
24
20
|
|
@@ -29,7 +25,7 @@ class TestSuiteRunRead(pydantic.BaseModel):
|
|
29
25
|
- `CANCELLED` - Cancelled
|
30
26
|
"""
|
31
27
|
|
32
|
-
exec_config: typing.Optional[TestSuiteRunExecConfig] =
|
28
|
+
exec_config: typing.Optional[TestSuiteRunExecConfig] = pydantic_v1.Field(default=None)
|
33
29
|
"""
|
34
30
|
Configuration that defines how the Test Suite should be run
|
35
31
|
"""
|
@@ -45,5 +41,5 @@ class TestSuiteRunRead(pydantic.BaseModel):
|
|
45
41
|
class Config:
|
46
42
|
frozen = True
|
47
43
|
smart_union = True
|
48
|
-
extra =
|
44
|
+
extra = pydantic_v1.Extra.allow
|
49
45
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,41 +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 TestSuiteRunState(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `QUEUED` - Queued
|
12
|
-
- `RUNNING` - Running
|
13
|
-
- `COMPLETE` - Complete
|
14
|
-
- `FAILED` - Failed
|
15
|
-
- `CANCELLED` - Cancelled
|
16
|
-
"""
|
17
|
-
|
18
|
-
QUEUED = "QUEUED"
|
19
|
-
RUNNING = "RUNNING"
|
20
|
-
COMPLETE = "COMPLETE"
|
21
|
-
FAILED = "FAILED"
|
22
|
-
CANCELLED = "CANCELLED"
|
23
|
-
|
24
|
-
def visit(
|
25
|
-
self,
|
26
|
-
queued: typing.Callable[[], T_Result],
|
27
|
-
running: typing.Callable[[], T_Result],
|
28
|
-
complete: typing.Callable[[], T_Result],
|
29
|
-
failed: typing.Callable[[], T_Result],
|
30
|
-
cancelled: typing.Callable[[], T_Result],
|
31
|
-
) -> T_Result:
|
32
|
-
if self is TestSuiteRunState.QUEUED:
|
33
|
-
return queued()
|
34
|
-
if self is TestSuiteRunState.RUNNING:
|
35
|
-
return running()
|
36
|
-
if self is TestSuiteRunState.COMPLETE:
|
37
|
-
return complete()
|
38
|
-
if self is TestSuiteRunState.FAILED:
|
39
|
-
return failed()
|
40
|
-
if self is TestSuiteRunState.CANCELLED:
|
41
|
-
return cancelled()
|
5
|
+
TestSuiteRunState = typing.Union[typing.Literal["QUEUED", "RUNNING", "COMPLETE", "FAILED", "CANCELLED"], typing.Any]
|