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/__init__.py
CHANGED
@@ -28,7 +28,6 @@ from .array_variable_value_item import (
|
|
28
28
|
ArrayVariableValueItem_SearchResults,
|
29
29
|
ArrayVariableValueItem_String,
|
30
30
|
)
|
31
|
-
from .block_type_enum import BlockTypeEnum
|
32
31
|
from .chat_history_enum import ChatHistoryEnum
|
33
32
|
from .chat_history_input_request import ChatHistoryInputRequest
|
34
33
|
from .chat_history_variable_value import ChatHistoryVariableValue
|
@@ -123,12 +122,15 @@ from .execution_vellum_value import (
|
|
123
122
|
ExecutionVellumValue_SearchResults,
|
124
123
|
ExecutionVellumValue_String,
|
125
124
|
)
|
125
|
+
from .external_test_case_execution import ExternalTestCaseExecution
|
126
|
+
from .external_test_case_execution_request import ExternalTestCaseExecutionRequest
|
126
127
|
from .finish_reason_enum import FinishReasonEnum
|
127
128
|
from .fulfilled_enum import FulfilledEnum
|
128
129
|
from .fulfilled_execute_prompt_event import FulfilledExecutePromptEvent
|
129
130
|
from .fulfilled_execute_prompt_response import FulfilledExecutePromptResponse
|
130
131
|
from .fulfilled_execute_workflow_workflow_result_event import FulfilledExecuteWorkflowWorkflowResultEvent
|
131
132
|
from .fulfilled_function_call import FulfilledFunctionCall
|
133
|
+
from .fulfilled_function_call_request import FulfilledFunctionCallRequest
|
132
134
|
from .fulfilled_prompt_execution_meta import FulfilledPromptExecutionMeta
|
133
135
|
from .fulfilled_workflow_node_result_event import FulfilledWorkflowNodeResultEvent
|
134
136
|
from .function_call import FunctionCall, FunctionCall_Fulfilled, FunctionCall_Rejected
|
@@ -166,22 +168,42 @@ from .metadata_filter_config_request import MetadataFilterConfigRequest
|
|
166
168
|
from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
|
167
169
|
from .metadata_filter_rule_request import MetadataFilterRuleRequest
|
168
170
|
from .ml_model_usage import MlModelUsage
|
169
|
-
from .
|
170
|
-
from .
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
171
|
+
from .named_scenario_input_chat_history_variable_value_request import NamedScenarioInputChatHistoryVariableValueRequest
|
172
|
+
from .named_scenario_input_request import (
|
173
|
+
NamedScenarioInputRequest,
|
174
|
+
NamedScenarioInputRequest_ChatHistory,
|
175
|
+
NamedScenarioInputRequest_String,
|
176
|
+
)
|
177
|
+
from .named_scenario_input_string_variable_value_request import NamedScenarioInputStringVariableValueRequest
|
178
|
+
from .named_test_case_chat_history_variable_value import NamedTestCaseChatHistoryVariableValue
|
175
179
|
from .named_test_case_chat_history_variable_value_request import NamedTestCaseChatHistoryVariableValueRequest
|
180
|
+
from .named_test_case_error_variable_value import NamedTestCaseErrorVariableValue
|
176
181
|
from .named_test_case_error_variable_value_request import NamedTestCaseErrorVariableValueRequest
|
182
|
+
from .named_test_case_function_call_variable_value import NamedTestCaseFunctionCallVariableValue
|
183
|
+
from .named_test_case_function_call_variable_value_request import NamedTestCaseFunctionCallVariableValueRequest
|
184
|
+
from .named_test_case_json_variable_value import NamedTestCaseJsonVariableValue
|
177
185
|
from .named_test_case_json_variable_value_request import NamedTestCaseJsonVariableValueRequest
|
186
|
+
from .named_test_case_number_variable_value import NamedTestCaseNumberVariableValue
|
178
187
|
from .named_test_case_number_variable_value_request import NamedTestCaseNumberVariableValueRequest
|
188
|
+
from .named_test_case_search_results_variable_value import NamedTestCaseSearchResultsVariableValue
|
179
189
|
from .named_test_case_search_results_variable_value_request import NamedTestCaseSearchResultsVariableValueRequest
|
190
|
+
from .named_test_case_string_variable_value import NamedTestCaseStringVariableValue
|
180
191
|
from .named_test_case_string_variable_value_request import NamedTestCaseStringVariableValueRequest
|
192
|
+
from .named_test_case_variable_value import (
|
193
|
+
NamedTestCaseVariableValue,
|
194
|
+
NamedTestCaseVariableValue_ChatHistory,
|
195
|
+
NamedTestCaseVariableValue_Error,
|
196
|
+
NamedTestCaseVariableValue_FunctionCall,
|
197
|
+
NamedTestCaseVariableValue_Json,
|
198
|
+
NamedTestCaseVariableValue_Number,
|
199
|
+
NamedTestCaseVariableValue_SearchResults,
|
200
|
+
NamedTestCaseVariableValue_String,
|
201
|
+
)
|
181
202
|
from .named_test_case_variable_value_request import (
|
182
203
|
NamedTestCaseVariableValueRequest,
|
183
204
|
NamedTestCaseVariableValueRequest_ChatHistory,
|
184
205
|
NamedTestCaseVariableValueRequest_Error,
|
206
|
+
NamedTestCaseVariableValueRequest_FunctionCall,
|
185
207
|
NamedTestCaseVariableValueRequest_Json,
|
186
208
|
NamedTestCaseVariableValueRequest_Number,
|
187
209
|
NamedTestCaseVariableValueRequest_SearchResults,
|
@@ -254,25 +276,7 @@ from .prompt_output import (
|
|
254
276
|
PromptOutput_Json,
|
255
277
|
PromptOutput_String,
|
256
278
|
)
|
257
|
-
from .prompt_template_block import PromptTemplateBlock
|
258
|
-
from .prompt_template_block_data import PromptTemplateBlockData
|
259
|
-
from .prompt_template_block_data_request import PromptTemplateBlockDataRequest
|
260
|
-
from .prompt_template_block_properties import PromptTemplateBlockProperties
|
261
|
-
from .prompt_template_block_properties_request import PromptTemplateBlockPropertiesRequest
|
262
|
-
from .prompt_template_block_request import PromptTemplateBlockRequest
|
263
|
-
from .prompt_template_block_state import PromptTemplateBlockState
|
264
|
-
from .provider_enum import ProviderEnum
|
265
279
|
from .raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
|
266
|
-
from .register_prompt_error_response import RegisterPromptErrorResponse
|
267
|
-
from .register_prompt_model_parameters_request import RegisterPromptModelParametersRequest
|
268
|
-
from .register_prompt_prompt import RegisterPromptPrompt
|
269
|
-
from .register_prompt_prompt_info_request import RegisterPromptPromptInfoRequest
|
270
|
-
from .register_prompt_response import RegisterPromptResponse
|
271
|
-
from .registered_prompt_deployment import RegisteredPromptDeployment
|
272
|
-
from .registered_prompt_input_variable_request import RegisteredPromptInputVariableRequest
|
273
|
-
from .registered_prompt_model_version import RegisteredPromptModelVersion
|
274
|
-
from .registered_prompt_sandbox import RegisteredPromptSandbox
|
275
|
-
from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
|
276
280
|
from .rejected_enum import RejectedEnum
|
277
281
|
from .rejected_execute_prompt_event import RejectedExecutePromptEvent
|
278
282
|
from .rejected_execute_prompt_response import RejectedExecutePromptResponse
|
@@ -281,9 +285,9 @@ from .rejected_function_call import RejectedFunctionCall
|
|
281
285
|
from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
|
282
286
|
from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
|
283
287
|
from .sandbox_scenario import SandboxScenario
|
284
|
-
from .scenario_input import ScenarioInput
|
285
|
-
from .
|
286
|
-
from .
|
288
|
+
from .scenario_input import ScenarioInput, ScenarioInput_ChatHistory, ScenarioInput_String
|
289
|
+
from .scenario_input_chat_history_variable_value import ScenarioInputChatHistoryVariableValue
|
290
|
+
from .scenario_input_string_variable_value import ScenarioInputStringVariableValue
|
287
291
|
from .search_error_response import SearchErrorResponse
|
288
292
|
from .search_filters_request import SearchFiltersRequest
|
289
293
|
from .search_node_result import SearchNodeResult
|
@@ -364,6 +368,7 @@ from .terminal_node_search_results_result import TerminalNodeSearchResultsResult
|
|
364
368
|
from .terminal_node_string_result import TerminalNodeStringResult
|
365
369
|
from .test_case_chat_history_variable_value import TestCaseChatHistoryVariableValue
|
366
370
|
from .test_case_error_variable_value import TestCaseErrorVariableValue
|
371
|
+
from .test_case_function_call_variable_value import TestCaseFunctionCallVariableValue
|
367
372
|
from .test_case_json_variable_value import TestCaseJsonVariableValue
|
368
373
|
from .test_case_number_variable_value import TestCaseNumberVariableValue
|
369
374
|
from .test_case_search_results_variable_value import TestCaseSearchResultsVariableValue
|
@@ -372,6 +377,7 @@ from .test_case_variable_value import (
|
|
372
377
|
TestCaseVariableValue,
|
373
378
|
TestCaseVariableValue_ChatHistory,
|
374
379
|
TestCaseVariableValue_Error,
|
380
|
+
TestCaseVariableValue_FunctionCall,
|
375
381
|
TestCaseVariableValue_Json,
|
376
382
|
TestCaseVariableValue_Number,
|
377
383
|
TestCaseVariableValue_SearchResults,
|
@@ -389,16 +395,19 @@ from .test_suite_run_deployment_release_tag_exec_config_type_enum import (
|
|
389
395
|
from .test_suite_run_exec_config import (
|
390
396
|
TestSuiteRunExecConfig,
|
391
397
|
TestSuiteRunExecConfig_DeploymentReleaseTag,
|
398
|
+
TestSuiteRunExecConfig_External,
|
392
399
|
TestSuiteRunExecConfig_WorkflowReleaseTag,
|
393
400
|
)
|
394
401
|
from .test_suite_run_exec_config_request import (
|
395
402
|
TestSuiteRunExecConfigRequest,
|
396
403
|
TestSuiteRunExecConfigRequest_DeploymentReleaseTag,
|
404
|
+
TestSuiteRunExecConfigRequest_External,
|
397
405
|
TestSuiteRunExecConfigRequest_WorkflowReleaseTag,
|
398
406
|
)
|
399
407
|
from .test_suite_run_execution import TestSuiteRunExecution
|
400
408
|
from .test_suite_run_execution_chat_history_output import TestSuiteRunExecutionChatHistoryOutput
|
401
409
|
from .test_suite_run_execution_error_output import TestSuiteRunExecutionErrorOutput
|
410
|
+
from .test_suite_run_execution_function_call_output import TestSuiteRunExecutionFunctionCallOutput
|
402
411
|
from .test_suite_run_execution_json_output import TestSuiteRunExecutionJsonOutput
|
403
412
|
from .test_suite_run_execution_metric_definition import TestSuiteRunExecutionMetricDefinition
|
404
413
|
from .test_suite_run_execution_metric_result import TestSuiteRunExecutionMetricResult
|
@@ -407,6 +416,7 @@ from .test_suite_run_execution_output import (
|
|
407
416
|
TestSuiteRunExecutionOutput,
|
408
417
|
TestSuiteRunExecutionOutput_ChatHistory,
|
409
418
|
TestSuiteRunExecutionOutput_Error,
|
419
|
+
TestSuiteRunExecutionOutput_FunctionCall,
|
410
420
|
TestSuiteRunExecutionOutput_Json,
|
411
421
|
TestSuiteRunExecutionOutput_Number,
|
412
422
|
TestSuiteRunExecutionOutput_SearchResults,
|
@@ -414,6 +424,11 @@ from .test_suite_run_execution_output import (
|
|
414
424
|
)
|
415
425
|
from .test_suite_run_execution_search_results_output import TestSuiteRunExecutionSearchResultsOutput
|
416
426
|
from .test_suite_run_execution_string_output import TestSuiteRunExecutionStringOutput
|
427
|
+
from .test_suite_run_external_exec_config import TestSuiteRunExternalExecConfig
|
428
|
+
from .test_suite_run_external_exec_config_data import TestSuiteRunExternalExecConfigData
|
429
|
+
from .test_suite_run_external_exec_config_data_request import TestSuiteRunExternalExecConfigDataRequest
|
430
|
+
from .test_suite_run_external_exec_config_request import TestSuiteRunExternalExecConfigRequest
|
431
|
+
from .test_suite_run_external_exec_config_type_enum import TestSuiteRunExternalExecConfigTypeEnum
|
417
432
|
from .test_suite_run_metric_error_output import TestSuiteRunMetricErrorOutput
|
418
433
|
from .test_suite_run_metric_error_output_type_enum import TestSuiteRunMetricErrorOutputTypeEnum
|
419
434
|
from .test_suite_run_metric_number_output import TestSuiteRunMetricNumberOutput
|
@@ -551,7 +566,6 @@ __all__ = [
|
|
551
566
|
"ArrayVariableValueItem_Number",
|
552
567
|
"ArrayVariableValueItem_SearchResults",
|
553
568
|
"ArrayVariableValueItem_String",
|
554
|
-
"BlockTypeEnum",
|
555
569
|
"ChatHistoryEnum",
|
556
570
|
"ChatHistoryInputRequest",
|
557
571
|
"ChatHistoryVariableValue",
|
@@ -632,12 +646,15 @@ __all__ = [
|
|
632
646
|
"ExecutionVellumValue_Number",
|
633
647
|
"ExecutionVellumValue_SearchResults",
|
634
648
|
"ExecutionVellumValue_String",
|
649
|
+
"ExternalTestCaseExecution",
|
650
|
+
"ExternalTestCaseExecutionRequest",
|
635
651
|
"FinishReasonEnum",
|
636
652
|
"FulfilledEnum",
|
637
653
|
"FulfilledExecutePromptEvent",
|
638
654
|
"FulfilledExecutePromptResponse",
|
639
655
|
"FulfilledExecuteWorkflowWorkflowResultEvent",
|
640
656
|
"FulfilledFunctionCall",
|
657
|
+
"FulfilledFunctionCallRequest",
|
641
658
|
"FulfilledPromptExecutionMeta",
|
642
659
|
"FulfilledWorkflowNodeResultEvent",
|
643
660
|
"FunctionCall",
|
@@ -677,25 +694,41 @@ __all__ = [
|
|
677
694
|
"MetadataFilterRuleCombinator",
|
678
695
|
"MetadataFilterRuleRequest",
|
679
696
|
"MlModelUsage",
|
680
|
-
"
|
681
|
-
"
|
682
|
-
"
|
683
|
-
"
|
684
|
-
"
|
685
|
-
"
|
697
|
+
"NamedScenarioInputChatHistoryVariableValueRequest",
|
698
|
+
"NamedScenarioInputRequest",
|
699
|
+
"NamedScenarioInputRequest_ChatHistory",
|
700
|
+
"NamedScenarioInputRequest_String",
|
701
|
+
"NamedScenarioInputStringVariableValueRequest",
|
702
|
+
"NamedTestCaseChatHistoryVariableValue",
|
686
703
|
"NamedTestCaseChatHistoryVariableValueRequest",
|
704
|
+
"NamedTestCaseErrorVariableValue",
|
687
705
|
"NamedTestCaseErrorVariableValueRequest",
|
706
|
+
"NamedTestCaseFunctionCallVariableValue",
|
707
|
+
"NamedTestCaseFunctionCallVariableValueRequest",
|
708
|
+
"NamedTestCaseJsonVariableValue",
|
688
709
|
"NamedTestCaseJsonVariableValueRequest",
|
710
|
+
"NamedTestCaseNumberVariableValue",
|
689
711
|
"NamedTestCaseNumberVariableValueRequest",
|
712
|
+
"NamedTestCaseSearchResultsVariableValue",
|
690
713
|
"NamedTestCaseSearchResultsVariableValueRequest",
|
714
|
+
"NamedTestCaseStringVariableValue",
|
691
715
|
"NamedTestCaseStringVariableValueRequest",
|
716
|
+
"NamedTestCaseVariableValue",
|
692
717
|
"NamedTestCaseVariableValueRequest",
|
693
718
|
"NamedTestCaseVariableValueRequest_ChatHistory",
|
694
719
|
"NamedTestCaseVariableValueRequest_Error",
|
720
|
+
"NamedTestCaseVariableValueRequest_FunctionCall",
|
695
721
|
"NamedTestCaseVariableValueRequest_Json",
|
696
722
|
"NamedTestCaseVariableValueRequest_Number",
|
697
723
|
"NamedTestCaseVariableValueRequest_SearchResults",
|
698
724
|
"NamedTestCaseVariableValueRequest_String",
|
725
|
+
"NamedTestCaseVariableValue_ChatHistory",
|
726
|
+
"NamedTestCaseVariableValue_Error",
|
727
|
+
"NamedTestCaseVariableValue_FunctionCall",
|
728
|
+
"NamedTestCaseVariableValue_Json",
|
729
|
+
"NamedTestCaseVariableValue_Number",
|
730
|
+
"NamedTestCaseVariableValue_SearchResults",
|
731
|
+
"NamedTestCaseVariableValue_String",
|
699
732
|
"NodeInputCompiledArrayValue",
|
700
733
|
"NodeInputCompiledChatHistoryValue",
|
701
734
|
"NodeInputCompiledErrorValue",
|
@@ -755,25 +788,7 @@ __all__ = [
|
|
755
788
|
"PromptOutput_FunctionCall",
|
756
789
|
"PromptOutput_Json",
|
757
790
|
"PromptOutput_String",
|
758
|
-
"PromptTemplateBlock",
|
759
|
-
"PromptTemplateBlockData",
|
760
|
-
"PromptTemplateBlockDataRequest",
|
761
|
-
"PromptTemplateBlockProperties",
|
762
|
-
"PromptTemplateBlockPropertiesRequest",
|
763
|
-
"PromptTemplateBlockRequest",
|
764
|
-
"PromptTemplateBlockState",
|
765
|
-
"ProviderEnum",
|
766
791
|
"RawPromptExecutionOverridesRequest",
|
767
|
-
"RegisterPromptErrorResponse",
|
768
|
-
"RegisterPromptModelParametersRequest",
|
769
|
-
"RegisterPromptPrompt",
|
770
|
-
"RegisterPromptPromptInfoRequest",
|
771
|
-
"RegisterPromptResponse",
|
772
|
-
"RegisteredPromptDeployment",
|
773
|
-
"RegisteredPromptInputVariableRequest",
|
774
|
-
"RegisteredPromptModelVersion",
|
775
|
-
"RegisteredPromptSandbox",
|
776
|
-
"RegisteredPromptSandboxSnapshot",
|
777
792
|
"RejectedEnum",
|
778
793
|
"RejectedExecutePromptEvent",
|
779
794
|
"RejectedExecutePromptResponse",
|
@@ -783,8 +798,10 @@ __all__ = [
|
|
783
798
|
"RejectedWorkflowNodeResultEvent",
|
784
799
|
"SandboxScenario",
|
785
800
|
"ScenarioInput",
|
786
|
-
"
|
787
|
-
"
|
801
|
+
"ScenarioInputChatHistoryVariableValue",
|
802
|
+
"ScenarioInputStringVariableValue",
|
803
|
+
"ScenarioInput_ChatHistory",
|
804
|
+
"ScenarioInput_String",
|
788
805
|
"SearchErrorResponse",
|
789
806
|
"SearchFiltersRequest",
|
790
807
|
"SearchNodeResult",
|
@@ -859,6 +876,7 @@ __all__ = [
|
|
859
876
|
"TerminalNodeStringResult",
|
860
877
|
"TestCaseChatHistoryVariableValue",
|
861
878
|
"TestCaseErrorVariableValue",
|
879
|
+
"TestCaseFunctionCallVariableValue",
|
862
880
|
"TestCaseJsonVariableValue",
|
863
881
|
"TestCaseNumberVariableValue",
|
864
882
|
"TestCaseSearchResultsVariableValue",
|
@@ -866,6 +884,7 @@ __all__ = [
|
|
866
884
|
"TestCaseVariableValue",
|
867
885
|
"TestCaseVariableValue_ChatHistory",
|
868
886
|
"TestCaseVariableValue_Error",
|
887
|
+
"TestCaseVariableValue_FunctionCall",
|
869
888
|
"TestCaseVariableValue_Json",
|
870
889
|
"TestCaseVariableValue_Number",
|
871
890
|
"TestCaseVariableValue_SearchResults",
|
@@ -878,12 +897,15 @@ __all__ = [
|
|
878
897
|
"TestSuiteRunExecConfig",
|
879
898
|
"TestSuiteRunExecConfigRequest",
|
880
899
|
"TestSuiteRunExecConfigRequest_DeploymentReleaseTag",
|
900
|
+
"TestSuiteRunExecConfigRequest_External",
|
881
901
|
"TestSuiteRunExecConfigRequest_WorkflowReleaseTag",
|
882
902
|
"TestSuiteRunExecConfig_DeploymentReleaseTag",
|
903
|
+
"TestSuiteRunExecConfig_External",
|
883
904
|
"TestSuiteRunExecConfig_WorkflowReleaseTag",
|
884
905
|
"TestSuiteRunExecution",
|
885
906
|
"TestSuiteRunExecutionChatHistoryOutput",
|
886
907
|
"TestSuiteRunExecutionErrorOutput",
|
908
|
+
"TestSuiteRunExecutionFunctionCallOutput",
|
887
909
|
"TestSuiteRunExecutionJsonOutput",
|
888
910
|
"TestSuiteRunExecutionMetricDefinition",
|
889
911
|
"TestSuiteRunExecutionMetricResult",
|
@@ -891,12 +913,18 @@ __all__ = [
|
|
891
913
|
"TestSuiteRunExecutionOutput",
|
892
914
|
"TestSuiteRunExecutionOutput_ChatHistory",
|
893
915
|
"TestSuiteRunExecutionOutput_Error",
|
916
|
+
"TestSuiteRunExecutionOutput_FunctionCall",
|
894
917
|
"TestSuiteRunExecutionOutput_Json",
|
895
918
|
"TestSuiteRunExecutionOutput_Number",
|
896
919
|
"TestSuiteRunExecutionOutput_SearchResults",
|
897
920
|
"TestSuiteRunExecutionOutput_String",
|
898
921
|
"TestSuiteRunExecutionSearchResultsOutput",
|
899
922
|
"TestSuiteRunExecutionStringOutput",
|
923
|
+
"TestSuiteRunExternalExecConfig",
|
924
|
+
"TestSuiteRunExternalExecConfigData",
|
925
|
+
"TestSuiteRunExternalExecConfigDataRequest",
|
926
|
+
"TestSuiteRunExternalExecConfigRequest",
|
927
|
+
"TestSuiteRunExternalExecConfigTypeEnum",
|
900
928
|
"TestSuiteRunMetricErrorOutput",
|
901
929
|
"TestSuiteRunMetricErrorOutputTypeEnum",
|
902
930
|
"TestSuiteRunMetricNumberOutput",
|
vellum/types/api_node_result.py
CHANGED
@@ -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 .api_node_result_data import ApiNodeResultData
|
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 ApiNodeResult(pydantic.BaseModel):
|
11
|
+
class ApiNodeResult(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A Node Result Event emitted from an API Node.
|
18
14
|
"""
|
@@ -30,5 +26,5 @@ class ApiNodeResult(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,18 +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
|
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 ApiNodeResultData(pydantic.BaseModel):
|
10
|
+
class ApiNodeResultData(pydantic_v1.BaseModel):
|
15
11
|
text_output_id: str
|
16
12
|
text: typing.Optional[str] = None
|
17
13
|
json_output_id: str
|
18
|
-
json_: typing.Optional[typing.Dict[str, typing.Any]] =
|
14
|
+
json_: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(alias="json", default=None)
|
19
15
|
status_code_output_id: str
|
20
16
|
status_code: int
|
21
17
|
|
@@ -32,5 +28,5 @@ class ApiNodeResultData(pydantic.BaseModel):
|
|
32
28
|
smart_union = True
|
33
29
|
allow_population_by_field_name = True
|
34
30
|
populate_by_name = 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 .array_chat_message_content_item import ArrayChatMessageContentItem
|
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 ArrayChatMessageContent(pydantic.BaseModel):
|
11
|
+
class ArrayChatMessageContent(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A list of chat message content items.
|
18
14
|
"""
|
@@ -30,5 +26,5 @@ class ArrayChatMessageContent(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 .array_chat_message_content_item_request import ArrayChatMessageContentItemRequest
|
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 ArrayChatMessageContentRequest(pydantic.BaseModel):
|
11
|
+
class ArrayChatMessageContentRequest(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A list of chat message content items.
|
18
14
|
"""
|
@@ -30,5 +26,5 @@ class ArrayChatMessageContentRequest(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,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
|
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
|
-
class ChatHistoryInputRequest(pydantic.BaseModel):
|
11
|
+
class ChatHistoryInputRequest(pydantic_v1.BaseModel):
|
16
12
|
"""
|
17
13
|
A user input representing a list of chat messages
|
18
14
|
"""
|
19
15
|
|
20
|
-
name: str =
|
16
|
+
name: str = pydantic_v1.Field()
|
21
17
|
"""
|
22
18
|
The variable's name, as defined in the deployment.
|
23
19
|
"""
|
@@ -35,5 +31,5 @@ class ChatHistoryInputRequest(pydantic.BaseModel):
|
|
35
31
|
class Config:
|
36
32
|
frozen = True
|
37
33
|
smart_union = True
|
38
|
-
extra =
|
34
|
+
extra = pydantic_v1.Extra.allow
|
39
35
|
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 ChatHistoryVariableValue(pydantic.BaseModel):
|
11
|
+
class ChatHistoryVariableValue(pydantic_v1.BaseModel):
|
16
12
|
value: typing.Optional[typing.List[ChatMessage]] = None
|
17
13
|
|
18
14
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -26,5 +22,5 @@ class ChatHistoryVariableValue(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}
|
vellum/types/chat_message.py
CHANGED
@@ -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
|
from .chat_message_content import ChatMessageContent
|
8
9
|
from .chat_message_role import ChatMessageRole
|
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 ChatMessage(pydantic.BaseModel):
|
12
|
+
class ChatMessage(pydantic_v1.BaseModel):
|
17
13
|
text: typing.Optional[str] = None
|
18
14
|
role: ChatMessageRole
|
19
15
|
content: typing.Optional[ChatMessageContent] = None
|
20
|
-
source: typing.Optional[str] =
|
16
|
+
source: typing.Optional[str] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
An optional identifier representing who or what generated this message.
|
23
19
|
"""
|
@@ -33,5 +29,5 @@ class ChatMessage(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,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
|
from .chat_message_content_request import ChatMessageContentRequest
|
8
9
|
from .chat_message_role import ChatMessageRole
|
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 ChatMessageRequest(pydantic.BaseModel):
|
12
|
+
class ChatMessageRequest(pydantic_v1.BaseModel):
|
17
13
|
text: typing.Optional[str] = None
|
18
14
|
role: ChatMessageRole
|
19
15
|
content: typing.Optional[ChatMessageContentRequest] = None
|
20
|
-
source: typing.Optional[str] =
|
16
|
+
source: typing.Optional[str] = pydantic_v1.Field(default=None)
|
21
17
|
"""
|
22
18
|
An optional identifier representing who or what generated this message.
|
23
19
|
"""
|
@@ -33,5 +29,5 @@ class ChatMessageRequest(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,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 ChatMessageRole(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `SYSTEM` - System
|
12
|
-
- `ASSISTANT` - Assistant
|
13
|
-
- `USER` - User
|
14
|
-
- `FUNCTION` - Function
|
15
|
-
"""
|
16
|
-
|
17
|
-
SYSTEM = "SYSTEM"
|
18
|
-
ASSISTANT = "ASSISTANT"
|
19
|
-
USER = "USER"
|
20
|
-
FUNCTION = "FUNCTION"
|
21
|
-
|
22
|
-
def visit(
|
23
|
-
self,
|
24
|
-
system: typing.Callable[[], T_Result],
|
25
|
-
assistant: typing.Callable[[], T_Result],
|
26
|
-
user: typing.Callable[[], T_Result],
|
27
|
-
function: typing.Callable[[], T_Result],
|
28
|
-
) -> T_Result:
|
29
|
-
if self is ChatMessageRole.SYSTEM:
|
30
|
-
return system()
|
31
|
-
if self is ChatMessageRole.ASSISTANT:
|
32
|
-
return assistant()
|
33
|
-
if self is ChatMessageRole.USER:
|
34
|
-
return user()
|
35
|
-
if self is ChatMessageRole.FUNCTION:
|
36
|
-
return function()
|
5
|
+
ChatMessageRole = typing.Union[typing.Literal["SYSTEM", "ASSISTANT", "USER", "FUNCTION"], 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 .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 CodeExecutionNodeArrayResult(pydantic.BaseModel):
|
11
|
+
class CodeExecutionNodeArrayResult(pydantic_v1.BaseModel):
|
16
12
|
id: str
|
17
13
|
value: typing.Optional[typing.List[ArrayVariableValueItem]] = None
|
18
14
|
|
@@ -27,5 +23,5 @@ class CodeExecutionNodeArrayResult(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,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 CodeExecutionNodeChatHistoryResult(pydantic.BaseModel):
|
11
|
+
class CodeExecutionNodeChatHistoryResult(pydantic_v1.BaseModel):
|
16
12
|
id: str
|
17
13
|
value: typing.Optional[typing.List[ChatMessage]] = None
|
18
14
|
|
@@ -27,5 +23,5 @@ class CodeExecutionNodeChatHistoryResult(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,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 CodeExecutionNodeErrorResult(pydantic.BaseModel):
|
11
|
+
class CodeExecutionNodeErrorResult(pydantic_v1.BaseModel):
|
16
12
|
id: str
|
17
13
|
value: typing.Optional[VellumError] = None
|
18
14
|
|
@@ -27,5 +23,5 @@ class CodeExecutionNodeErrorResult(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}
|