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
vellum/types/sandbox_scenario.py
CHANGED
@@ -4,22 +4,22 @@ 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 .scenario_input import ScenarioInput
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
11
|
+
class SandboxScenario(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Sandbox Scenario
|
14
|
+
"""
|
14
15
|
|
15
|
-
class SandboxScenario(pydantic.BaseModel):
|
16
16
|
label: typing.Optional[str] = None
|
17
|
-
inputs: typing.List[ScenarioInput] =
|
17
|
+
inputs: typing.List[ScenarioInput] = pydantic_v1.Field()
|
18
18
|
"""
|
19
19
|
The inputs for the scenario
|
20
20
|
"""
|
21
21
|
|
22
|
-
id: str =
|
22
|
+
id: str = pydantic_v1.Field()
|
23
23
|
"""
|
24
24
|
The id of the scenario
|
25
25
|
"""
|
@@ -35,5 +35,5 @@ class SandboxScenario(pydantic.BaseModel):
|
|
35
35
|
class Config:
|
36
36
|
frozen = True
|
37
37
|
smart_union = True
|
38
|
-
extra =
|
38
|
+
extra = pydantic_v1.Extra.allow
|
39
39
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/scenario_input.py
CHANGED
@@ -1,34 +1,31 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from __future__ import annotations
|
4
|
+
|
4
5
|
import typing
|
5
6
|
|
6
|
-
from
|
7
|
-
from .
|
8
|
-
from .scenario_input_type_enum import ScenarioInputTypeEnum
|
7
|
+
from .scenario_input_chat_history_variable_value import ScenarioInputChatHistoryVariableValue
|
8
|
+
from .scenario_input_string_variable_value import ScenarioInputStringVariableValue
|
9
9
|
|
10
|
-
try:
|
11
|
-
import pydantic.v1 as pydantic # type: ignore
|
12
|
-
except ImportError:
|
13
|
-
import pydantic # type: ignore
|
14
10
|
|
11
|
+
class ScenarioInput_String(ScenarioInputStringVariableValue):
|
12
|
+
type: typing.Literal["STRING"] = "STRING"
|
15
13
|
|
16
|
-
class
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
class Config:
|
15
|
+
frozen = True
|
16
|
+
smart_union = True
|
17
|
+
allow_population_by_field_name = True
|
18
|
+
populate_by_name = True
|
21
19
|
|
22
|
-
def json(self, **kwargs: typing.Any) -> str:
|
23
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
-
return super().json(**kwargs_with_defaults)
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
return super().dict(**kwargs_with_defaults)
|
21
|
+
class ScenarioInput_ChatHistory(ScenarioInputChatHistoryVariableValue):
|
22
|
+
type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
|
29
23
|
|
30
24
|
class Config:
|
31
25
|
frozen = True
|
32
26
|
smart_union = True
|
33
|
-
|
34
|
-
|
27
|
+
allow_population_by_field_name = True
|
28
|
+
populate_by_name = True
|
29
|
+
|
30
|
+
|
31
|
+
ScenarioInput = typing.Union[ScenarioInput_String, ScenarioInput_ChatHistory]
|
@@ -4,23 +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
|
8
|
+
from .chat_message import ChatMessage
|
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 RegisteredPromptSandbox(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field()
|
11
|
+
class ScenarioInputChatHistoryVariableValue(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
|
-
|
13
|
+
Prompt Sandbox Scenario input value that is of type CHAT_HISTORY
|
18
14
|
"""
|
19
15
|
|
20
|
-
|
21
|
-
|
22
|
-
A human-friendly label for the generated sandbox.
|
23
|
-
"""
|
16
|
+
value: typing.Optional[typing.List[ChatMessage]] = None
|
17
|
+
input_variable_id: str
|
24
18
|
|
25
19
|
def json(self, **kwargs: typing.Any) -> str:
|
26
20
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -33,5 +27,5 @@ class RegisteredPromptSandbox(pydantic.BaseModel):
|
|
33
27
|
class Config:
|
34
28
|
frozen = True
|
35
29
|
smart_union = True
|
36
|
-
extra =
|
30
|
+
extra = pydantic_v1.Extra.allow
|
37
31
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,30 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class ScenarioInputStringVariableValue(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
Prompt Sandbox Scenario input value that is of type STRING
|
13
|
+
"""
|
14
|
+
|
15
|
+
value: typing.Optional[str] = None
|
16
|
+
input_variable_id: str
|
17
|
+
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
20
|
+
return super().json(**kwargs_with_defaults)
|
21
|
+
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
extra = pydantic_v1.Extra.allow
|
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
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
|
15
|
-
detail: str = pydantic.Field()
|
10
|
+
class SearchErrorResponse(pydantic_v1.BaseModel):
|
11
|
+
detail: str = pydantic_v1.Field()
|
16
12
|
"""
|
17
13
|
Details about why the request failed.
|
18
14
|
"""
|
@@ -28,5 +24,5 @@ class SearchErrorResponse(pydantic.BaseModel):
|
|
28
24
|
class Config:
|
29
25
|
frozen = True
|
30
26
|
smart_union = True
|
31
|
-
extra =
|
27
|
+
extra = pydantic_v1.Extra.allow
|
32
28
|
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 .metadata_filter_config_request import MetadataFilterConfigRequest
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
external_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
11
|
+
class SearchFiltersRequest(pydantic_v1.BaseModel):
|
12
|
+
external_ids: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
|
17
13
|
"""
|
18
14
|
The document external IDs to filter by
|
19
15
|
"""
|
20
16
|
|
21
|
-
metadata: typing.Optional[MetadataFilterConfigRequest] =
|
17
|
+
metadata: typing.Optional[MetadataFilterConfigRequest] = pydantic_v1.Field(default=None)
|
22
18
|
"""
|
23
19
|
The metadata filters to apply to the search
|
24
20
|
"""
|
@@ -34,5 +30,5 @@ class SearchFiltersRequest(pydantic.BaseModel):
|
|
34
30
|
class Config:
|
35
31
|
frozen = True
|
36
32
|
smart_union = True
|
37
|
-
extra =
|
33
|
+
extra = pydantic_v1.Extra.allow
|
38
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 .search_node_result_data import SearchNodeResultData
|
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 SearchNodeResult(pydantic.BaseModel):
|
11
|
+
class SearchNodeResult(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A Node Result Event emitted from a Search Node.
|
18
14
|
"""
|
@@ -30,5 +26,5 @@ class SearchNodeResult(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,17 +4,13 @@ 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 SearchNodeResultData(pydantic.BaseModel):
|
11
|
+
class SearchNodeResultData(pydantic_v1.BaseModel):
|
16
12
|
results_output_id: str
|
17
|
-
results: typing.List[SearchResult] =
|
13
|
+
results: typing.List[SearchResult] = pydantic_v1.Field()
|
18
14
|
"""
|
19
15
|
The results of the search. Each result represents a chunk that matches the search query.
|
20
16
|
"""
|
@@ -33,5 +29,5 @@ class SearchNodeResultData(pydantic.BaseModel):
|
|
33
29
|
class Config:
|
34
30
|
frozen = True
|
35
31
|
smart_union = True
|
36
|
-
extra =
|
32
|
+
extra = pydantic_v1.Extra.allow
|
37
33
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,33 +4,29 @@ 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_filters_request import SearchFiltersRequest
|
8
9
|
from .search_result_merging_request import SearchResultMergingRequest
|
9
10
|
from .search_weights_request import SearchWeightsRequest
|
10
11
|
|
11
|
-
try:
|
12
|
-
import pydantic.v1 as pydantic # type: ignore
|
13
|
-
except ImportError:
|
14
|
-
import pydantic # type: ignore
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
limit: typing.Optional[int] = pydantic.Field(default=None)
|
13
|
+
class SearchRequestOptionsRequest(pydantic_v1.BaseModel):
|
14
|
+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
|
19
15
|
"""
|
20
16
|
The maximum number of results to return.
|
21
17
|
"""
|
22
18
|
|
23
|
-
weights: typing.Optional[SearchWeightsRequest] =
|
19
|
+
weights: typing.Optional[SearchWeightsRequest] = pydantic_v1.Field(default=None)
|
24
20
|
"""
|
25
21
|
The weights to use for the search. Must add up to 1.0.
|
26
22
|
"""
|
27
23
|
|
28
|
-
result_merging: typing.Optional[SearchResultMergingRequest] =
|
24
|
+
result_merging: typing.Optional[SearchResultMergingRequest] = pydantic_v1.Field(default=None)
|
29
25
|
"""
|
30
26
|
The configuration for merging results.
|
31
27
|
"""
|
32
28
|
|
33
|
-
filters: typing.Optional[SearchFiltersRequest] =
|
29
|
+
filters: typing.Optional[SearchFiltersRequest] = pydantic_v1.Field(default=None)
|
34
30
|
"""
|
35
31
|
The filters to apply to the search.
|
36
32
|
"""
|
@@ -46,5 +42,5 @@ class SearchRequestOptionsRequest(pydantic.BaseModel):
|
|
46
42
|
class Config:
|
47
43
|
frozen = True
|
48
44
|
smart_union = True
|
49
|
-
extra =
|
45
|
+
extra = pydantic_v1.Extra.allow
|
50
46
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/search_response.py
CHANGED
@@ -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 .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
|
-
|
16
|
-
results: typing.List[SearchResult] = pydantic.Field()
|
11
|
+
class SearchResponse(pydantic_v1.BaseModel):
|
12
|
+
results: typing.List[SearchResult] = pydantic_v1.Field()
|
17
13
|
"""
|
18
14
|
The results of the search. Each result represents a chunk that matches the search query.
|
19
15
|
"""
|
@@ -29,5 +25,5 @@ class SearchResponse(pydantic.BaseModel):
|
|
29
25
|
class Config:
|
30
26
|
frozen = True
|
31
27
|
smart_union = True
|
32
|
-
extra =
|
28
|
+
extra = pydantic_v1.Extra.allow
|
33
29
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/search_result.py
CHANGED
@@ -4,27 +4,23 @@ 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_document import SearchResultDocument
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
text: str = pydantic.Field()
|
11
|
+
class SearchResult(pydantic_v1.BaseModel):
|
12
|
+
text: str = pydantic_v1.Field()
|
17
13
|
"""
|
18
14
|
The text of the chunk that matched the search query.
|
19
15
|
"""
|
20
16
|
|
21
|
-
score: float =
|
17
|
+
score: float = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
A score representing how well the chunk matches the search query.
|
24
20
|
"""
|
25
21
|
|
26
22
|
keywords: typing.List[str]
|
27
|
-
document: SearchResultDocument =
|
23
|
+
document: SearchResultDocument = pydantic_v1.Field()
|
28
24
|
"""
|
29
25
|
The document that contains the chunk that matched the search query.
|
30
26
|
"""
|
@@ -40,5 +36,5 @@ class SearchResult(pydantic.BaseModel):
|
|
40
36
|
class Config:
|
41
37
|
frozen = True
|
42
38
|
smart_union = True
|
43
|
-
extra =
|
39
|
+
extra = pydantic_v1.Extra.allow
|
44
40
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,30 +4,26 @@ 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
|
-
|
15
|
-
id: str = pydantic.Field()
|
10
|
+
class SearchResultDocument(pydantic_v1.BaseModel):
|
11
|
+
id: str = pydantic_v1.Field()
|
16
12
|
"""
|
17
13
|
The ID of the document.
|
18
14
|
"""
|
19
15
|
|
20
|
-
label: str =
|
16
|
+
label: str = pydantic_v1.Field()
|
21
17
|
"""
|
22
18
|
The human-readable name for the document.
|
23
19
|
"""
|
24
20
|
|
25
|
-
external_id: typing.Optional[str] =
|
21
|
+
external_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
26
22
|
"""
|
27
23
|
The unique ID of the document as represented in an external system and specified when it was originally uploaded.
|
28
24
|
"""
|
29
25
|
|
30
|
-
metadata: typing.Optional[typing.Dict[str, typing.Any]] =
|
26
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
|
31
27
|
"""
|
32
28
|
A previously supplied JSON object containing metadata that can be filtered on when searching.
|
33
29
|
"""
|
@@ -43,5 +39,5 @@ class SearchResultDocument(pydantic.BaseModel):
|
|
43
39
|
class Config:
|
44
40
|
frozen = True
|
45
41
|
smart_union = True
|
46
|
-
extra =
|
42
|
+
extra = pydantic_v1.Extra.allow
|
47
43
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,25 +4,21 @@ 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
|
-
|
15
|
-
label: str = pydantic.Field()
|
10
|
+
class SearchResultDocumentRequest(pydantic_v1.BaseModel):
|
11
|
+
label: str = pydantic_v1.Field()
|
16
12
|
"""
|
17
13
|
The human-readable name for the document.
|
18
14
|
"""
|
19
15
|
|
20
|
-
external_id: typing.Optional[str] =
|
16
|
+
external_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
The unique ID of the document as represented in an external system and specified when it was originally uploaded.
|
23
19
|
"""
|
24
20
|
|
25
|
-
metadata: typing.Optional[typing.Dict[str, typing.Any]] =
|
21
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
|
26
22
|
"""
|
27
23
|
A previously supplied JSON object containing metadata that can be filtered on when searching.
|
28
24
|
"""
|
@@ -38,5 +34,5 @@ class SearchResultDocumentRequest(pydantic.BaseModel):
|
|
38
34
|
class Config:
|
39
35
|
frozen = True
|
40
36
|
smart_union = True
|
41
|
-
extra =
|
37
|
+
extra = pydantic_v1.Extra.allow
|
42
38
|
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
|
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
9
|
|
13
|
-
|
14
|
-
|
15
|
-
enabled: typing.Optional[bool] = pydantic.Field(default=None)
|
10
|
+
class SearchResultMergingRequest(pydantic_v1.BaseModel):
|
11
|
+
enabled: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
16
12
|
"""
|
17
13
|
Whether to enable merging results
|
18
14
|
"""
|
@@ -28,5 +24,5 @@ class SearchResultMergingRequest(pydantic.BaseModel):
|
|
28
24
|
class Config:
|
29
25
|
frozen = True
|
30
26
|
smart_union = True
|
31
|
-
extra =
|
27
|
+
extra = pydantic_v1.Extra.allow
|
32
28
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,27 +4,23 @@ 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_document_request import SearchResultDocumentRequest
|
8
9
|
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
text: str = pydantic.Field()
|
11
|
+
class SearchResultRequest(pydantic_v1.BaseModel):
|
12
|
+
text: str = pydantic_v1.Field()
|
17
13
|
"""
|
18
14
|
The text of the chunk that matched the search query.
|
19
15
|
"""
|
20
16
|
|
21
|
-
score: float =
|
17
|
+
score: float = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
A score representing how well the chunk matches the search query.
|
24
20
|
"""
|
25
21
|
|
26
22
|
keywords: typing.List[str]
|
27
|
-
document: SearchResultDocumentRequest =
|
23
|
+
document: SearchResultDocumentRequest = pydantic_v1.Field()
|
28
24
|
"""
|
29
25
|
The document that contains the chunk that matched the search query.
|
30
26
|
"""
|
@@ -40,5 +36,5 @@ class SearchResultRequest(pydantic.BaseModel):
|
|
40
36
|
class Config:
|
41
37
|
frozen = True
|
42
38
|
smart_union = True
|
43
|
-
extra =
|
39
|
+
extra = pydantic_v1.Extra.allow
|
44
40
|
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 .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 SearchResultsVariableValue(pydantic.BaseModel):
|
11
|
+
class SearchResultsVariableValue(pydantic_v1.BaseModel):
|
16
12
|
value: typing.Optional[typing.List[SearchResult]] = None
|
17
13
|
|
18
14
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -26,5 +22,5 @@ class SearchResultsVariableValue(pydantic.BaseModel):
|
|
26
22
|
class Config:
|
27
23
|
frozen = True
|
28
24
|
smart_union = True
|
29
|
-
extra =
|
25
|
+
extra = pydantic_v1.Extra.allow
|
30
26
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,20 +4,16 @@ 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
|
-
|
15
|
-
semantic_similarity: typing.Optional[float] = pydantic.Field(default=None)
|
10
|
+
class SearchWeightsRequest(pydantic_v1.BaseModel):
|
11
|
+
semantic_similarity: typing.Optional[float] = pydantic_v1.Field(default=None)
|
16
12
|
"""
|
17
13
|
The relative weight to give to semantic similarity
|
18
14
|
"""
|
19
15
|
|
20
|
-
keywords: typing.Optional[float] =
|
16
|
+
keywords: typing.Optional[float] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
The relative weight to give to keywords
|
23
19
|
"""
|
@@ -33,5 +29,5 @@ class SearchWeightsRequest(pydantic.BaseModel):
|
|
33
29
|
class Config:
|
34
30
|
frozen = True
|
35
31
|
smart_union = True
|
36
|
-
extra =
|
32
|
+
extra = pydantic_v1.Extra.allow
|
37
33
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,30 +4,26 @@ 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 .entity_status import EntityStatus
|
8
9
|
from .environment_enum import EnvironmentEnum
|
9
10
|
from .vellum_variable import VellumVariable
|
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 SlimDeploymentRead(pydantic.BaseModel):
|
13
|
+
class SlimDeploymentRead(pydantic_v1.BaseModel):
|
18
14
|
id: str
|
19
15
|
created: dt.datetime
|
20
|
-
label: str =
|
16
|
+
label: str = pydantic_v1.Field()
|
21
17
|
"""
|
22
18
|
A human-readable label for the deployment
|
23
19
|
"""
|
24
20
|
|
25
|
-
name: str =
|
21
|
+
name: str = pydantic_v1.Field()
|
26
22
|
"""
|
27
23
|
A name that uniquely identifies this deployment within its workspace
|
28
24
|
"""
|
29
25
|
|
30
|
-
status: typing.Optional[EntityStatus] =
|
26
|
+
status: typing.Optional[EntityStatus] = pydantic_v1.Field(default=None)
|
31
27
|
"""
|
32
28
|
The current status of the deployment
|
33
29
|
|
@@ -35,7 +31,7 @@ class SlimDeploymentRead(pydantic.BaseModel):
|
|
35
31
|
- `ARCHIVED` - Archived
|
36
32
|
"""
|
37
33
|
|
38
|
-
environment: typing.Optional[EnvironmentEnum] =
|
34
|
+
environment: typing.Optional[EnvironmentEnum] = pydantic_v1.Field(default=None)
|
39
35
|
"""
|
40
36
|
The environment this deployment is used in
|
41
37
|
|
@@ -58,5 +54,5 @@ class SlimDeploymentRead(pydantic.BaseModel):
|
|
58
54
|
class Config:
|
59
55
|
frozen = True
|
60
56
|
smart_union = True
|
61
|
-
extra =
|
57
|
+
extra = pydantic_v1.Extra.allow
|
62
58
|
json_encoders = {dt.datetime: serialize_datetime}
|