vellum-ai 0.3.23__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 +37 -60
- vellum/client.py +139 -137
- vellum/core/__init__.py +2 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/core/jsonable_encoder.py +5 -9
- vellum/core/pydantic_utilities.py +12 -0
- vellum/errors/__init__.py +1 -2
- vellum/lib/__init__.py +5 -0
- vellum/lib/test_suites/__init__.py +5 -0
- vellum/lib/test_suites/constants.py +2 -0
- vellum/lib/test_suites/exceptions.py +2 -0
- vellum/lib/test_suites/resources.py +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 +37 -55
- vellum/types/api_node_result.py +3 -7
- vellum/types/api_node_result_data.py +4 -8
- vellum/types/array_chat_message_content.py +3 -7
- vellum/types/array_chat_message_content_request.py +3 -7
- vellum/types/chat_history_input_request.py +4 -8
- vellum/types/chat_history_variable_value.py +3 -7
- vellum/types/chat_message.py +4 -8
- vellum/types/chat_message_request.py +4 -8
- vellum/types/chat_message_role.py +1 -32
- vellum/types/code_execution_node_array_result.py +3 -7
- vellum/types/code_execution_node_chat_history_result.py +3 -7
- vellum/types/code_execution_node_error_result.py +3 -7
- vellum/types/code_execution_node_function_call_result.py +3 -7
- vellum/types/code_execution_node_json_result.py +3 -7
- vellum/types/code_execution_node_number_result.py +3 -7
- vellum/types/code_execution_node_result.py +3 -7
- vellum/types/code_execution_node_result_data.py +3 -7
- vellum/types/code_execution_node_search_results_result.py +3 -7
- vellum/types/code_execution_node_string_result.py +3 -7
- vellum/types/conditional_node_result.py +3 -7
- vellum/types/conditional_node_result_data.py +3 -7
- vellum/types/deployment_provider_payload_response.py +3 -7
- vellum/types/deployment_read.py +8 -12
- vellum/types/document_document_to_document_index.py +6 -10
- vellum/types/document_index_read.py +8 -12
- vellum/types/document_read.py +8 -12
- vellum/types/enriched_normalized_completion.py +9 -13
- vellum/types/entity_status.py +1 -18
- vellum/types/environment_enum.py +1 -27
- vellum/types/error_variable_value.py +3 -7
- vellum/types/execute_prompt_api_error_response.py +4 -8
- vellum/types/execute_workflow_error_response.py +4 -8
- vellum/types/execute_workflow_response.py +3 -7
- vellum/types/execute_workflow_stream_error_response.py +4 -8
- vellum/types/execution_array_vellum_value.py +4 -8
- vellum/types/execution_chat_history_vellum_value.py +4 -8
- vellum/types/execution_error_vellum_value.py +4 -8
- vellum/types/execution_function_call_vellum_value.py +4 -8
- vellum/types/execution_json_vellum_value.py +4 -8
- vellum/types/execution_number_vellum_value.py +4 -8
- vellum/types/execution_search_results_vellum_value.py +4 -8
- vellum/types/execution_string_vellum_value.py +4 -8
- vellum/types/external_test_case_execution.py +4 -8
- vellum/types/external_test_case_execution_request.py +4 -8
- vellum/types/finish_reason_enum.py +1 -27
- vellum/types/fulfilled_execute_prompt_event.py +3 -7
- vellum/types/fulfilled_execute_prompt_response.py +5 -9
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +3 -7
- vellum/types/fulfilled_function_call.py +3 -7
- vellum/types/{registered_prompt_input_variable_request.py → fulfilled_function_call_request.py} +10 -9
- vellum/types/fulfilled_prompt_execution_meta.py +3 -7
- vellum/types/fulfilled_workflow_node_result_event.py +3 -7
- vellum/types/function_call_chat_message_content.py +3 -7
- vellum/types/function_call_chat_message_content_request.py +3 -7
- vellum/types/function_call_chat_message_content_value.py +3 -7
- vellum/types/function_call_chat_message_content_value_request.py +3 -7
- vellum/types/function_call_variable_value.py +3 -7
- vellum/types/generate_error_response.py +4 -8
- vellum/types/generate_options_request.py +4 -8
- vellum/types/generate_request.py +6 -10
- vellum/types/generate_result.py +5 -9
- vellum/types/generate_result_data.py +4 -8
- vellum/types/generate_result_error.py +4 -8
- vellum/types/generate_stream_response.py +3 -7
- vellum/types/generate_stream_result.py +3 -7
- vellum/types/generate_stream_result_data.py +3 -7
- vellum/types/image_chat_message_content.py +3 -7
- vellum/types/image_chat_message_content_request.py +3 -7
- vellum/types/image_variable_value.py +3 -7
- vellum/types/indexing_state_enum.py +3 -37
- vellum/types/initiated_execute_prompt_event.py +3 -7
- vellum/types/initiated_prompt_execution_meta.py +3 -7
- vellum/types/initiated_workflow_node_result_event.py +3 -7
- vellum/types/json_input_request.py +4 -8
- vellum/types/json_variable_value.py +3 -7
- vellum/types/logical_operator.py +23 -173
- vellum/types/logprobs_enum.py +1 -18
- vellum/types/metadata_filter_config_request.py +3 -7
- vellum/types/metadata_filter_rule_combinator.py +1 -18
- vellum/types/metadata_filter_rule_request.py +3 -7
- vellum/types/ml_model_usage.py +3 -7
- vellum/types/named_scenario_input_chat_history_variable_value_request.py +31 -0
- vellum/types/named_scenario_input_request.py +31 -0
- vellum/types/{registered_prompt_sandbox_snapshot.py → named_scenario_input_string_variable_value_request.py} +7 -9
- vellum/types/named_test_case_chat_history_variable_value.py +3 -7
- vellum/types/named_test_case_chat_history_variable_value_request.py +3 -7
- vellum/types/named_test_case_error_variable_value.py +3 -7
- vellum/types/named_test_case_error_variable_value_request.py +3 -7
- vellum/types/{register_prompt_prompt.py → named_test_case_function_call_variable_value.py} +7 -13
- vellum/types/named_test_case_function_call_variable_value_request.py +31 -0
- vellum/types/named_test_case_json_variable_value.py +3 -7
- vellum/types/named_test_case_json_variable_value_request.py +3 -7
- vellum/types/named_test_case_number_variable_value.py +3 -7
- vellum/types/named_test_case_number_variable_value_request.py +3 -7
- vellum/types/named_test_case_search_results_variable_value.py +3 -7
- vellum/types/named_test_case_search_results_variable_value_request.py +3 -7
- vellum/types/named_test_case_string_variable_value.py +3 -7
- vellum/types/named_test_case_string_variable_value_request.py +3 -7
- vellum/types/named_test_case_variable_value.py +12 -0
- vellum/types/named_test_case_variable_value_request.py +12 -0
- vellum/types/node_input_compiled_array_value.py +3 -7
- vellum/types/node_input_compiled_chat_history_value.py +3 -7
- vellum/types/node_input_compiled_error_value.py +3 -7
- vellum/types/node_input_compiled_function_call.py +3 -7
- vellum/types/node_input_compiled_json_value.py +3 -7
- vellum/types/node_input_compiled_number_value.py +3 -7
- vellum/types/node_input_compiled_search_results_value.py +3 -7
- vellum/types/node_input_compiled_string_value.py +3 -7
- vellum/types/node_output_compiled_array_value.py +3 -7
- vellum/types/node_output_compiled_chat_history_value.py +3 -7
- vellum/types/node_output_compiled_error_value.py +3 -7
- vellum/types/node_output_compiled_function_value.py +3 -7
- vellum/types/node_output_compiled_json_value.py +3 -7
- vellum/types/node_output_compiled_number_value.py +3 -7
- vellum/types/node_output_compiled_search_results_value.py +3 -7
- vellum/types/node_output_compiled_string_value.py +3 -7
- vellum/types/normalized_log_probs.py +3 -7
- vellum/types/normalized_token_log_probs.py +3 -7
- vellum/types/number_variable_value.py +3 -7
- vellum/types/paginated_document_index_read_list.py +3 -7
- vellum/types/paginated_slim_deployment_read_list.py +3 -7
- vellum/types/paginated_slim_document_list.py +3 -7
- vellum/types/paginated_slim_workflow_deployment_list.py +3 -7
- vellum/types/paginated_test_suite_run_execution_list.py +3 -7
- vellum/types/paginated_test_suite_test_case_list.py +3 -7
- vellum/types/processing_failure_reason_enum.py +1 -20
- vellum/types/processing_state_enum.py +1 -32
- vellum/types/prompt_deployment_expand_meta_request_request.py +9 -13
- vellum/types/prompt_execution_meta.py +3 -7
- vellum/types/prompt_node_result.py +3 -7
- vellum/types/prompt_node_result_data.py +3 -7
- vellum/types/raw_prompt_execution_overrides_request.py +5 -9
- vellum/types/rejected_execute_prompt_event.py +3 -7
- vellum/types/rejected_execute_prompt_response.py +5 -9
- vellum/types/rejected_execute_workflow_workflow_result_event.py +3 -7
- vellum/types/rejected_function_call.py +3 -7
- vellum/types/rejected_prompt_execution_meta.py +3 -7
- vellum/types/rejected_workflow_node_result_event.py +3 -7
- vellum/types/sandbox_scenario.py +5 -9
- vellum/types/scenario_input.py +18 -21
- vellum/types/{registered_prompt_sandbox.py → scenario_input_chat_history_variable_value.py} +7 -13
- vellum/types/{register_prompt_error_response.py → scenario_input_string_variable_value.py} +7 -9
- vellum/types/search_error_response.py +4 -8
- vellum/types/search_filters_request.py +5 -9
- vellum/types/search_node_result.py +3 -7
- vellum/types/search_node_result_data.py +4 -8
- vellum/types/search_request_options_request.py +7 -11
- vellum/types/search_response.py +4 -8
- vellum/types/search_result.py +6 -10
- vellum/types/search_result_document.py +7 -11
- vellum/types/search_result_document_request.py +6 -10
- vellum/types/search_result_merging_request.py +4 -8
- vellum/types/search_result_request.py +6 -10
- vellum/types/search_results_variable_value.py +3 -7
- vellum/types/search_weights_request.py +5 -9
- vellum/types/slim_deployment_read.py +7 -11
- vellum/types/slim_document.py +12 -16
- vellum/types/slim_workflow_deployment.py +9 -13
- vellum/types/streaming_execute_prompt_event.py +4 -8
- vellum/types/streaming_prompt_execution_meta.py +3 -7
- vellum/types/streaming_workflow_node_result_event.py +3 -7
- vellum/types/string_chat_message_content.py +3 -7
- vellum/types/string_chat_message_content_request.py +3 -7
- vellum/types/string_input_request.py +4 -8
- vellum/types/string_variable_value.py +3 -7
- vellum/types/submit_completion_actual_request.py +8 -12
- vellum/types/submit_completion_actuals_error_response.py +3 -7
- vellum/types/subworkflow_node_result.py +3 -7
- vellum/types/templating_node_array_result.py +3 -7
- vellum/types/templating_node_chat_history_result.py +3 -7
- vellum/types/templating_node_error_result.py +3 -7
- vellum/types/templating_node_function_call_result.py +3 -7
- vellum/types/templating_node_json_result.py +3 -7
- vellum/types/templating_node_number_result.py +3 -7
- vellum/types/templating_node_result.py +3 -7
- vellum/types/templating_node_result_data.py +3 -7
- vellum/types/templating_node_search_results_result.py +3 -7
- vellum/types/templating_node_string_result.py +3 -7
- vellum/types/terminal_node_array_result.py +4 -8
- vellum/types/terminal_node_chat_history_result.py +4 -8
- vellum/types/terminal_node_error_result.py +4 -8
- vellum/types/terminal_node_function_call_result.py +4 -8
- vellum/types/terminal_node_json_result.py +4 -8
- vellum/types/terminal_node_number_result.py +4 -8
- vellum/types/terminal_node_result.py +3 -7
- vellum/types/terminal_node_result_data.py +3 -7
- vellum/types/terminal_node_search_results_result.py +4 -8
- vellum/types/terminal_node_string_result.py +4 -8
- vellum/types/test_case_chat_history_variable_value.py +3 -7
- vellum/types/test_case_error_variable_value.py +3 -7
- vellum/types/test_case_function_call_variable_value.py +32 -0
- vellum/types/test_case_json_variable_value.py +3 -7
- vellum/types/test_case_number_variable_value.py +3 -7
- vellum/types/test_case_search_results_variable_value.py +3 -7
- vellum/types/test_case_string_variable_value.py +3 -7
- vellum/types/test_case_variable_value.py +12 -0
- vellum/types/test_suite_run_deployment_release_tag_exec_config.py +4 -8
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +5 -9
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +5 -9
- vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +4 -8
- vellum/types/test_suite_run_execution.py +3 -7
- vellum/types/test_suite_run_execution_chat_history_output.py +3 -7
- vellum/types/test_suite_run_execution_error_output.py +3 -7
- vellum/types/{registered_prompt_model_version.py → test_suite_run_execution_function_call_output.py} +8 -13
- vellum/types/test_suite_run_execution_json_output.py +3 -7
- vellum/types/test_suite_run_execution_metric_definition.py +3 -7
- vellum/types/test_suite_run_execution_metric_result.py +3 -7
- vellum/types/test_suite_run_execution_number_output.py +3 -7
- vellum/types/test_suite_run_execution_output.py +12 -0
- vellum/types/test_suite_run_execution_search_results_output.py +3 -7
- vellum/types/test_suite_run_execution_string_output.py +3 -7
- vellum/types/test_suite_run_external_exec_config.py +4 -8
- vellum/types/test_suite_run_external_exec_config_data.py +4 -8
- vellum/types/test_suite_run_external_exec_config_data_request.py +4 -8
- vellum/types/test_suite_run_external_exec_config_request.py +4 -8
- vellum/types/test_suite_run_metric_error_output.py +3 -7
- vellum/types/test_suite_run_metric_number_output.py +3 -7
- vellum/types/test_suite_run_metric_string_output.py +3 -7
- vellum/types/test_suite_run_read.py +5 -9
- vellum/types/test_suite_run_state.py +1 -37
- vellum/types/test_suite_run_test_suite.py +3 -7
- vellum/types/test_suite_run_workflow_release_tag_exec_config.py +4 -8
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +5 -9
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +5 -9
- vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +4 -8
- vellum/types/test_suite_test_case.py +3 -7
- vellum/types/upload_document_error_response.py +3 -7
- vellum/types/upload_document_response.py +4 -8
- vellum/types/vellum_error.py +3 -7
- vellum/types/vellum_error_code_enum.py +3 -32
- vellum/types/vellum_error_request.py +3 -7
- vellum/types/vellum_image.py +3 -7
- vellum/types/vellum_image_request.py +3 -7
- vellum/types/vellum_variable.py +3 -7
- vellum/types/vellum_variable_type.py +6 -57
- vellum/types/workflow_deployment_read.py +9 -13
- vellum/types/workflow_event_error.py +3 -7
- vellum/types/workflow_execution_actual_chat_history_request.py +8 -12
- vellum/types/workflow_execution_actual_json_request.py +8 -12
- vellum/types/workflow_execution_actual_string_request.py +8 -12
- vellum/types/workflow_execution_event_error_code.py +13 -52
- vellum/types/workflow_execution_event_type.py +1 -18
- vellum/types/workflow_execution_node_result_event.py +3 -7
- vellum/types/workflow_execution_workflow_result_event.py +3 -7
- vellum/types/workflow_node_result_event_state.py +3 -32
- vellum/types/workflow_output_array.py +4 -8
- vellum/types/workflow_output_chat_history.py +4 -8
- vellum/types/workflow_output_error.py +4 -8
- vellum/types/workflow_output_function_call.py +4 -8
- vellum/types/workflow_output_image.py +4 -8
- vellum/types/workflow_output_json.py +4 -8
- vellum/types/workflow_output_number.py +4 -8
- vellum/types/workflow_output_search_results.py +4 -8
- vellum/types/workflow_output_string.py +4 -8
- vellum/types/workflow_request_chat_history_input_request.py +4 -8
- vellum/types/workflow_request_json_input_request.py +4 -8
- vellum/types/workflow_request_number_input_request.py +4 -8
- vellum/types/workflow_request_string_input_request.py +4 -8
- vellum/types/workflow_result_event.py +3 -7
- vellum/types/workflow_result_event_output_data_array.py +4 -8
- vellum/types/workflow_result_event_output_data_chat_history.py +4 -8
- vellum/types/workflow_result_event_output_data_error.py +4 -8
- vellum/types/workflow_result_event_output_data_function_call.py +4 -8
- vellum/types/workflow_result_event_output_data_json.py +4 -8
- vellum/types/workflow_result_event_output_data_number.py +4 -8
- vellum/types/workflow_result_event_output_data_search_results.py +4 -8
- vellum/types/workflow_result_event_output_data_string.py +5 -9
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.0.dist-info}/METADATA +1 -2
- 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/model_version_sandbox_snapshot.py +0 -44
- vellum/types/prompt_template_block.py +0 -41
- vellum/types/prompt_template_block_data.py +0 -31
- vellum/types/prompt_template_block_data_request.py +0 -31
- vellum/types/prompt_template_block_properties.py +0 -47
- vellum/types/prompt_template_block_properties_request.py +0 -47
- vellum/types/prompt_template_block_request.py +0 -41
- vellum/types/prompt_template_block_state.py +0 -22
- vellum/types/provider_enum.py +0 -81
- vellum/types/register_prompt_model_parameters_request.py +0 -37
- vellum/types/register_prompt_prompt_info_request.py +0 -35
- vellum/types/register_prompt_response.py +0 -62
- vellum/types/registered_prompt_deployment.py +0 -42
- vellum/types/scenario_input_request.py +0 -34
- vellum/types/scenario_input_type_enum.py +0 -22
- vellum_ai-0.3.23.dist-info/RECORD +0 -394
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.0.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.23.dist-info → vellum_ai-0.5.0.dist-info}/WHEEL +0 -0
@@ -1,61 +1,10 @@
|
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- `NUMBER` - NUMBER
|
13
|
-
- `JSON` - JSON
|
14
|
-
- `CHAT_HISTORY` - CHAT_HISTORY
|
15
|
-
- `SEARCH_RESULTS` - SEARCH_RESULTS
|
16
|
-
- `ERROR` - ERROR
|
17
|
-
- `ARRAY` - ARRAY
|
18
|
-
- `FUNCTION_CALL` - FUNCTION_CALL
|
19
|
-
- `IMAGE` - IMAGE
|
20
|
-
"""
|
21
|
-
|
22
|
-
STRING = "STRING"
|
23
|
-
NUMBER = "NUMBER"
|
24
|
-
JSON = "JSON"
|
25
|
-
CHAT_HISTORY = "CHAT_HISTORY"
|
26
|
-
SEARCH_RESULTS = "SEARCH_RESULTS"
|
27
|
-
ERROR = "ERROR"
|
28
|
-
ARRAY = "ARRAY"
|
29
|
-
FUNCTION_CALL = "FUNCTION_CALL"
|
30
|
-
IMAGE = "IMAGE"
|
31
|
-
|
32
|
-
def visit(
|
33
|
-
self,
|
34
|
-
string: typing.Callable[[], T_Result],
|
35
|
-
number: typing.Callable[[], T_Result],
|
36
|
-
json: typing.Callable[[], T_Result],
|
37
|
-
chat_history: typing.Callable[[], T_Result],
|
38
|
-
search_results: typing.Callable[[], T_Result],
|
39
|
-
error: typing.Callable[[], T_Result],
|
40
|
-
array: typing.Callable[[], T_Result],
|
41
|
-
function_call: typing.Callable[[], T_Result],
|
42
|
-
image: typing.Callable[[], T_Result],
|
43
|
-
) -> T_Result:
|
44
|
-
if self is VellumVariableType.STRING:
|
45
|
-
return string()
|
46
|
-
if self is VellumVariableType.NUMBER:
|
47
|
-
return number()
|
48
|
-
if self is VellumVariableType.JSON:
|
49
|
-
return json()
|
50
|
-
if self is VellumVariableType.CHAT_HISTORY:
|
51
|
-
return chat_history()
|
52
|
-
if self is VellumVariableType.SEARCH_RESULTS:
|
53
|
-
return search_results()
|
54
|
-
if self is VellumVariableType.ERROR:
|
55
|
-
return error()
|
56
|
-
if self is VellumVariableType.ARRAY:
|
57
|
-
return array()
|
58
|
-
if self is VellumVariableType.FUNCTION_CALL:
|
59
|
-
return function_call()
|
60
|
-
if self is VellumVariableType.IMAGE:
|
61
|
-
return image()
|
5
|
+
VellumVariableType = typing.Union[
|
6
|
+
typing.Literal[
|
7
|
+
"STRING", "NUMBER", "JSON", "CHAT_HISTORY", "SEARCH_RESULTS", "ERROR", "ARRAY", "FUNCTION_CALL", "IMAGE", "NULL"
|
8
|
+
],
|
9
|
+
typing.Any,
|
10
|
+
]
|
@@ -4,29 +4,25 @@ 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 WorkflowDeploymentRead(pydantic.BaseModel):
|
13
|
+
class WorkflowDeploymentRead(pydantic_v1.BaseModel):
|
18
14
|
id: str
|
19
|
-
name: str =
|
15
|
+
name: str = pydantic_v1.Field()
|
20
16
|
"""
|
21
17
|
A name that uniquely identifies this workflow deployment within its workspace
|
22
18
|
"""
|
23
19
|
|
24
|
-
label: str =
|
20
|
+
label: str = pydantic_v1.Field()
|
25
21
|
"""
|
26
22
|
A human-readable label for the workflow deployment
|
27
23
|
"""
|
28
24
|
|
29
|
-
status: typing.Optional[EntityStatus] =
|
25
|
+
status: typing.Optional[EntityStatus] = pydantic_v1.Field(default=None)
|
30
26
|
"""
|
31
27
|
The current status of the workflow deployment
|
32
28
|
|
@@ -34,7 +30,7 @@ class WorkflowDeploymentRead(pydantic.BaseModel):
|
|
34
30
|
- `ARCHIVED` - Archived
|
35
31
|
"""
|
36
32
|
|
37
|
-
environment: typing.Optional[EnvironmentEnum] =
|
33
|
+
environment: typing.Optional[EnvironmentEnum] = pydantic_v1.Field(default=None)
|
38
34
|
"""
|
39
35
|
The environment this workflow deployment is used in
|
40
36
|
|
@@ -45,12 +41,12 @@ class WorkflowDeploymentRead(pydantic.BaseModel):
|
|
45
41
|
|
46
42
|
created: dt.datetime
|
47
43
|
last_deployed_on: dt.datetime
|
48
|
-
input_variables: typing.List[VellumVariable] =
|
44
|
+
input_variables: typing.List[VellumVariable] = pydantic_v1.Field()
|
49
45
|
"""
|
50
46
|
The input variables this Workflow Deployment expects to receive values for when it is executed.
|
51
47
|
"""
|
52
48
|
|
53
|
-
output_variables: typing.List[VellumVariable] =
|
49
|
+
output_variables: typing.List[VellumVariable] = pydantic_v1.Field()
|
54
50
|
"""
|
55
51
|
The output variables this Workflow Deployment produces values for when it's executed.
|
56
52
|
"""
|
@@ -66,5 +62,5 @@ class WorkflowDeploymentRead(pydantic.BaseModel):
|
|
66
62
|
class Config:
|
67
63
|
frozen = True
|
68
64
|
smart_union = True
|
69
|
-
extra =
|
65
|
+
extra = pydantic_v1.Extra.allow
|
70
66
|
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 .workflow_execution_event_error_code import WorkflowExecutionEventErrorCode
|
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 WorkflowEventError(pydantic.BaseModel):
|
11
|
+
class WorkflowEventError(pydantic_v1.BaseModel):
|
16
12
|
message: str
|
17
13
|
code: WorkflowExecutionEventErrorCode
|
18
14
|
|
@@ -27,5 +23,5 @@ class WorkflowEventError(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,36 +4,32 @@ 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_request import ChatMessageRequest
|
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
|
-
output_id: typing.Optional[str] = pydantic.Field(default=None)
|
11
|
+
class WorkflowExecutionActualChatHistoryRequest(pydantic_v1.BaseModel):
|
12
|
+
output_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
17
13
|
"""
|
18
14
|
The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred.
|
19
15
|
"""
|
20
16
|
|
21
|
-
output_key: typing.Optional[str] =
|
17
|
+
output_key: typing.Optional[str] = pydantic_v1.Field(default=None)
|
22
18
|
"""
|
23
19
|
The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id.
|
24
20
|
"""
|
25
21
|
|
26
|
-
quality: typing.Optional[float] =
|
22
|
+
quality: typing.Optional[float] = pydantic_v1.Field(default=None)
|
27
23
|
"""
|
28
24
|
Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best.
|
29
25
|
"""
|
30
26
|
|
31
|
-
timestamp: typing.Optional[float] =
|
27
|
+
timestamp: typing.Optional[float] = pydantic_v1.Field(default=None)
|
32
28
|
"""
|
33
29
|
Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes.
|
34
30
|
"""
|
35
31
|
|
36
|
-
desired_output_value: typing.Optional[typing.List[ChatMessageRequest]] =
|
32
|
+
desired_output_value: typing.Optional[typing.List[ChatMessageRequest]] = pydantic_v1.Field(default=None)
|
37
33
|
"""
|
38
34
|
Optionally provide the value that the output ideally should have been.
|
39
35
|
"""
|
@@ -49,5 +45,5 @@ class WorkflowExecutionActualChatHistoryRequest(pydantic.BaseModel):
|
|
49
45
|
class Config:
|
50
46
|
frozen = True
|
51
47
|
smart_union = True
|
52
|
-
extra =
|
48
|
+
extra = pydantic_v1.Extra.allow
|
53
49
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,35 +4,31 @@ 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
|
-
output_id: typing.Optional[str] = pydantic.Field(default=None)
|
10
|
+
class WorkflowExecutionActualJsonRequest(pydantic_v1.BaseModel):
|
11
|
+
output_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
16
12
|
"""
|
17
13
|
The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred.
|
18
14
|
"""
|
19
15
|
|
20
|
-
output_key: typing.Optional[str] =
|
16
|
+
output_key: typing.Optional[str] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id.
|
23
19
|
"""
|
24
20
|
|
25
|
-
quality: typing.Optional[float] =
|
21
|
+
quality: typing.Optional[float] = pydantic_v1.Field(default=None)
|
26
22
|
"""
|
27
23
|
Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best.
|
28
24
|
"""
|
29
25
|
|
30
|
-
timestamp: typing.Optional[float] =
|
26
|
+
timestamp: typing.Optional[float] = pydantic_v1.Field(default=None)
|
31
27
|
"""
|
32
28
|
Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes.
|
33
29
|
"""
|
34
30
|
|
35
|
-
desired_output_value: typing.Optional[typing.Dict[str, typing.Any]] =
|
31
|
+
desired_output_value: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
|
36
32
|
"""
|
37
33
|
Optionally provide the value that the output ideally should have been.
|
38
34
|
"""
|
@@ -48,5 +44,5 @@ class WorkflowExecutionActualJsonRequest(pydantic.BaseModel):
|
|
48
44
|
class Config:
|
49
45
|
frozen = True
|
50
46
|
smart_union = True
|
51
|
-
extra =
|
47
|
+
extra = pydantic_v1.Extra.allow
|
52
48
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,35 +4,31 @@ 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
|
-
output_id: typing.Optional[str] = pydantic.Field(default=None)
|
10
|
+
class WorkflowExecutionActualStringRequest(pydantic_v1.BaseModel):
|
11
|
+
output_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
16
12
|
"""
|
17
13
|
The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred.
|
18
14
|
"""
|
19
15
|
|
20
|
-
output_key: typing.Optional[str] =
|
16
|
+
output_key: typing.Optional[str] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id.
|
23
19
|
"""
|
24
20
|
|
25
|
-
quality: typing.Optional[float] =
|
21
|
+
quality: typing.Optional[float] = pydantic_v1.Field(default=None)
|
26
22
|
"""
|
27
23
|
Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best.
|
28
24
|
"""
|
29
25
|
|
30
|
-
timestamp: typing.Optional[float] =
|
26
|
+
timestamp: typing.Optional[float] = pydantic_v1.Field(default=None)
|
31
27
|
"""
|
32
28
|
Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes.
|
33
29
|
"""
|
34
30
|
|
35
|
-
desired_output_value: typing.Optional[str] =
|
31
|
+
desired_output_value: typing.Optional[str] = pydantic_v1.Field(default=None)
|
36
32
|
"""
|
37
33
|
Optionally provide the value that the output ideally should have been.
|
38
34
|
"""
|
@@ -48,5 +44,5 @@ class WorkflowExecutionActualStringRequest(pydantic.BaseModel):
|
|
48
44
|
class Config:
|
49
45
|
frozen = True
|
50
46
|
smart_union = True
|
51
|
-
extra =
|
47
|
+
extra = pydantic_v1.Extra.allow
|
52
48
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,56 +1,17 @@
|
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"""
|
20
|
-
|
21
|
-
WORKFLOW_INITIALIZATION = "WORKFLOW_INITIALIZATION"
|
22
|
-
WORKFLOW_CANCELLED = "WORKFLOW_CANCELLED"
|
23
|
-
NODE_EXECUTION_COUNT_LIMIT_REACHED = "NODE_EXECUTION_COUNT_LIMIT_REACHED"
|
24
|
-
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"
|
25
|
-
NODE_EXECUTION = "NODE_EXECUTION"
|
26
|
-
LLM_PROVIDER = "LLM_PROVIDER"
|
27
|
-
INVALID_TEMPLATE = "INVALID_TEMPLATE"
|
28
|
-
USER_DEFINED_ERROR = "USER_DEFINED_ERROR"
|
29
|
-
|
30
|
-
def visit(
|
31
|
-
self,
|
32
|
-
workflow_initialization: typing.Callable[[], T_Result],
|
33
|
-
workflow_cancelled: typing.Callable[[], T_Result],
|
34
|
-
node_execution_count_limit_reached: typing.Callable[[], T_Result],
|
35
|
-
internal_server_error: typing.Callable[[], T_Result],
|
36
|
-
node_execution: typing.Callable[[], T_Result],
|
37
|
-
llm_provider: typing.Callable[[], T_Result],
|
38
|
-
invalid_template: typing.Callable[[], T_Result],
|
39
|
-
user_defined_error: typing.Callable[[], T_Result],
|
40
|
-
) -> T_Result:
|
41
|
-
if self is WorkflowExecutionEventErrorCode.WORKFLOW_INITIALIZATION:
|
42
|
-
return workflow_initialization()
|
43
|
-
if self is WorkflowExecutionEventErrorCode.WORKFLOW_CANCELLED:
|
44
|
-
return workflow_cancelled()
|
45
|
-
if self is WorkflowExecutionEventErrorCode.NODE_EXECUTION_COUNT_LIMIT_REACHED:
|
46
|
-
return node_execution_count_limit_reached()
|
47
|
-
if self is WorkflowExecutionEventErrorCode.INTERNAL_SERVER_ERROR:
|
48
|
-
return internal_server_error()
|
49
|
-
if self is WorkflowExecutionEventErrorCode.NODE_EXECUTION:
|
50
|
-
return node_execution()
|
51
|
-
if self is WorkflowExecutionEventErrorCode.LLM_PROVIDER:
|
52
|
-
return llm_provider()
|
53
|
-
if self is WorkflowExecutionEventErrorCode.INVALID_TEMPLATE:
|
54
|
-
return invalid_template()
|
55
|
-
if self is WorkflowExecutionEventErrorCode.USER_DEFINED_ERROR:
|
56
|
-
return user_defined_error()
|
5
|
+
WorkflowExecutionEventErrorCode = typing.Union[
|
6
|
+
typing.Literal[
|
7
|
+
"WORKFLOW_INITIALIZATION",
|
8
|
+
"WORKFLOW_CANCELLED",
|
9
|
+
"NODE_EXECUTION_COUNT_LIMIT_REACHED",
|
10
|
+
"INTERNAL_SERVER_ERROR",
|
11
|
+
"NODE_EXECUTION",
|
12
|
+
"LLM_PROVIDER",
|
13
|
+
"INVALID_TEMPLATE",
|
14
|
+
"USER_DEFINED_ERROR",
|
15
|
+
],
|
16
|
+
typing.Any,
|
17
|
+
]
|
@@ -1,22 +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 WorkflowExecutionEventType(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `NODE` - NODE
|
12
|
-
- `WORKFLOW` - WORKFLOW
|
13
|
-
"""
|
14
|
-
|
15
|
-
NODE = "NODE"
|
16
|
-
WORKFLOW = "WORKFLOW"
|
17
|
-
|
18
|
-
def visit(self, node: typing.Callable[[], T_Result], workflow: typing.Callable[[], T_Result]) -> T_Result:
|
19
|
-
if self is WorkflowExecutionEventType.NODE:
|
20
|
-
return node()
|
21
|
-
if self is WorkflowExecutionEventType.WORKFLOW:
|
22
|
-
return workflow()
|
5
|
+
WorkflowExecutionEventType = typing.Union[typing.Literal["NODE", "WORKFLOW"], typing.Any]
|
@@ -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 .workflow_node_result_event import WorkflowNodeResultEvent
|
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 WorkflowExecutionNodeResultEvent(pydantic.BaseModel):
|
11
|
+
class WorkflowExecutionNodeResultEvent(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A NODE-level event emitted from the workflow's execution.
|
18
14
|
"""
|
@@ -33,5 +29,5 @@ class WorkflowExecutionNodeResultEvent(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,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 .workflow_result_event import WorkflowResultEvent
|
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 WorkflowExecutionWorkflowResultEvent(pydantic.BaseModel):
|
11
|
+
class WorkflowExecutionWorkflowResultEvent(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A WORKFLOW-level event emitted from the workflow's execution.
|
18
14
|
"""
|
@@ -33,5 +29,5 @@ class WorkflowExecutionWorkflowResultEvent(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}
|
@@ -1,36 +1,7 @@
|
|
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 WorkflowNodeResultEventState(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `INITIATED` - INITIATED
|
12
|
-
- `STREAMING` - STREAMING
|
13
|
-
- `FULFILLED` - FULFILLED
|
14
|
-
- `REJECTED` - REJECTED
|
15
|
-
"""
|
16
|
-
|
17
|
-
INITIATED = "INITIATED"
|
18
|
-
STREAMING = "STREAMING"
|
19
|
-
FULFILLED = "FULFILLED"
|
20
|
-
REJECTED = "REJECTED"
|
21
|
-
|
22
|
-
def visit(
|
23
|
-
self,
|
24
|
-
initiated: typing.Callable[[], T_Result],
|
25
|
-
streaming: typing.Callable[[], T_Result],
|
26
|
-
fulfilled: typing.Callable[[], T_Result],
|
27
|
-
rejected: typing.Callable[[], T_Result],
|
28
|
-
) -> T_Result:
|
29
|
-
if self is WorkflowNodeResultEventState.INITIATED:
|
30
|
-
return initiated()
|
31
|
-
if self is WorkflowNodeResultEventState.STREAMING:
|
32
|
-
return streaming()
|
33
|
-
if self is WorkflowNodeResultEventState.FULFILLED:
|
34
|
-
return fulfilled()
|
35
|
-
if self is WorkflowNodeResultEventState.REJECTED:
|
36
|
-
return rejected()
|
5
|
+
WorkflowNodeResultEventState = typing.Union[
|
6
|
+
typing.Literal["INITIATED", "STREAMING", "FULFILLED", "REJECTED"], typing.Any
|
7
|
+
]
|
@@ -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 .array_variable_value_item import ArrayVariableValueItem
|
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 WorkflowOutputArray(pydantic.BaseModel):
|
11
|
+
class WorkflowOutputArray(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
An array output from a Workflow execution.
|
18
14
|
"""
|
19
15
|
|
20
16
|
id: str
|
21
|
-
name: str =
|
17
|
+
name: str = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The output's name, as defined in the workflow
|
24
20
|
"""
|
@@ -36,5 +32,5 @@ class WorkflowOutputArray(pydantic.BaseModel):
|
|
36
32
|
class Config:
|
37
33
|
frozen = True
|
38
34
|
smart_union = True
|
39
|
-
extra =
|
35
|
+
extra = pydantic_v1.Extra.allow
|
40
36
|
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 .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 WorkflowOutputChatHistory(pydantic.BaseModel):
|
11
|
+
class WorkflowOutputChatHistory(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A chat history output from a Workflow execution.
|
18
14
|
"""
|
19
15
|
|
20
16
|
id: str
|
21
|
-
name: str =
|
17
|
+
name: str = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The output's name, as defined in the workflow
|
24
20
|
"""
|
@@ -36,5 +32,5 @@ class WorkflowOutputChatHistory(pydantic.BaseModel):
|
|
36
32
|
class Config:
|
37
33
|
frozen = True
|
38
34
|
smart_union = True
|
39
|
-
extra =
|
35
|
+
extra = pydantic_v1.Extra.allow
|
40
36
|
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 .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 WorkflowOutputError(pydantic.BaseModel):
|
11
|
+
class WorkflowOutputError(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
An error output from a Workflow execution.
|
18
14
|
"""
|
19
15
|
|
20
16
|
id: str
|
21
|
-
name: str =
|
17
|
+
name: str = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The output's name, as defined in the workflow
|
24
20
|
"""
|
@@ -36,5 +32,5 @@ class WorkflowOutputError(pydantic.BaseModel):
|
|
36
32
|
class Config:
|
37
33
|
frozen = True
|
38
34
|
smart_union = True
|
39
|
-
extra =
|
35
|
+
extra = pydantic_v1.Extra.allow
|
40
36
|
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 .function_call import FunctionCall
|
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 WorkflowOutputFunctionCall(pydantic.BaseModel):
|
11
|
+
class WorkflowOutputFunctionCall(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A function call output from a Workflow execution.
|
18
14
|
"""
|
19
15
|
|
20
16
|
id: str
|
21
|
-
name: str =
|
17
|
+
name: str = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The output's name, as defined in the workflow
|
24
20
|
"""
|
@@ -36,5 +32,5 @@ class WorkflowOutputFunctionCall(pydantic.BaseModel):
|
|
36
32
|
class Config:
|
37
33
|
frozen = True
|
38
34
|
smart_union = True
|
39
|
-
extra =
|
35
|
+
extra = pydantic_v1.Extra.allow
|
40
36
|
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 .vellum_image import VellumImage
|
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 WorkflowOutputImage(pydantic.BaseModel):
|
11
|
+
class WorkflowOutputImage(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
An image output from a Workflow execution.
|
18
14
|
"""
|
19
15
|
|
20
16
|
id: str
|
21
|
-
name: str =
|
17
|
+
name: str = pydantic_v1.Field()
|
22
18
|
"""
|
23
19
|
The output's name, as defined in the workflow
|
24
20
|
"""
|
@@ -36,5 +32,5 @@ class WorkflowOutputImage(pydantic.BaseModel):
|
|
36
32
|
class Config:
|
37
33
|
frozen = True
|
38
34
|
smart_union = True
|
39
|
-
extra =
|
35
|
+
extra = pydantic_v1.Extra.allow
|
40
36
|
json_encoders = {dt.datetime: serialize_datetime}
|