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,41 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import datetime as dt
|
6
|
-
import typing
|
7
|
-
|
8
|
-
from ..core.datetime_utils import serialize_datetime
|
9
|
-
from .block_type_enum import BlockTypeEnum
|
10
|
-
from .prompt_template_block_state import PromptTemplateBlockState
|
11
|
-
|
12
|
-
try:
|
13
|
-
import pydantic.v1 as pydantic # type: ignore
|
14
|
-
except ImportError:
|
15
|
-
import pydantic # type: ignore
|
16
|
-
|
17
|
-
|
18
|
-
class PromptTemplateBlock(pydantic.BaseModel):
|
19
|
-
id: str
|
20
|
-
block_type: BlockTypeEnum
|
21
|
-
properties: PromptTemplateBlockProperties
|
22
|
-
state: typing.Optional[PromptTemplateBlockState] = None
|
23
|
-
|
24
|
-
def json(self, **kwargs: typing.Any) -> str:
|
25
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
-
return super().json(**kwargs_with_defaults)
|
27
|
-
|
28
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
29
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
30
|
-
return super().dict(**kwargs_with_defaults)
|
31
|
-
|
32
|
-
class Config:
|
33
|
-
frozen = True
|
34
|
-
smart_union = True
|
35
|
-
extra = pydantic.Extra.allow
|
36
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
37
|
-
|
38
|
-
|
39
|
-
from .prompt_template_block_properties import PromptTemplateBlockProperties # noqa: E402
|
40
|
-
|
41
|
-
PromptTemplateBlock.update_forward_refs()
|
@@ -1,31 +0,0 @@
|
|
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 .prompt_template_block import PromptTemplateBlock
|
8
|
-
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
|
-
|
14
|
-
|
15
|
-
class PromptTemplateBlockData(pydantic.BaseModel):
|
16
|
-
version: int
|
17
|
-
blocks: typing.List[PromptTemplateBlock]
|
18
|
-
|
19
|
-
def json(self, **kwargs: typing.Any) -> str:
|
20
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
-
return super().json(**kwargs_with_defaults)
|
22
|
-
|
23
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
-
return super().dict(**kwargs_with_defaults)
|
26
|
-
|
27
|
-
class Config:
|
28
|
-
frozen = True
|
29
|
-
smart_union = True
|
30
|
-
extra = pydantic.Extra.allow
|
31
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,31 +0,0 @@
|
|
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 .prompt_template_block_request import PromptTemplateBlockRequest
|
8
|
-
|
9
|
-
try:
|
10
|
-
import pydantic.v1 as pydantic # type: ignore
|
11
|
-
except ImportError:
|
12
|
-
import pydantic # type: ignore
|
13
|
-
|
14
|
-
|
15
|
-
class PromptTemplateBlockDataRequest(pydantic.BaseModel):
|
16
|
-
version: int
|
17
|
-
blocks: typing.List[PromptTemplateBlockRequest]
|
18
|
-
|
19
|
-
def json(self, **kwargs: typing.Any) -> str:
|
20
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
-
return super().json(**kwargs_with_defaults)
|
22
|
-
|
23
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
-
return super().dict(**kwargs_with_defaults)
|
26
|
-
|
27
|
-
class Config:
|
28
|
-
frozen = True
|
29
|
-
smart_union = True
|
30
|
-
extra = pydantic.Extra.allow
|
31
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import datetime as dt
|
6
|
-
import typing
|
7
|
-
|
8
|
-
from ..core.datetime_utils import serialize_datetime
|
9
|
-
from .chat_message_role import ChatMessageRole
|
10
|
-
from .vellum_variable_type import VellumVariableType
|
11
|
-
|
12
|
-
try:
|
13
|
-
import pydantic.v1 as pydantic # type: ignore
|
14
|
-
except ImportError:
|
15
|
-
import pydantic # type: ignore
|
16
|
-
|
17
|
-
|
18
|
-
class PromptTemplateBlockProperties(pydantic.BaseModel):
|
19
|
-
chat_role: typing.Optional[ChatMessageRole] = None
|
20
|
-
chat_message_unterminated: typing.Optional[bool] = None
|
21
|
-
chat_source: typing.Optional[str] = None
|
22
|
-
template: typing.Optional[str] = None
|
23
|
-
template_type: typing.Optional[VellumVariableType] = None
|
24
|
-
function_name: typing.Optional[str] = None
|
25
|
-
function_description: typing.Optional[str] = None
|
26
|
-
function_parameters: typing.Optional[typing.Dict[str, typing.Any]] = None
|
27
|
-
function_forced: typing.Optional[bool] = None
|
28
|
-
blocks: typing.Optional[typing.List[PromptTemplateBlock]] = None
|
29
|
-
|
30
|
-
def json(self, **kwargs: typing.Any) -> str:
|
31
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
32
|
-
return super().json(**kwargs_with_defaults)
|
33
|
-
|
34
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
35
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
36
|
-
return super().dict(**kwargs_with_defaults)
|
37
|
-
|
38
|
-
class Config:
|
39
|
-
frozen = True
|
40
|
-
smart_union = True
|
41
|
-
extra = pydantic.Extra.allow
|
42
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
43
|
-
|
44
|
-
|
45
|
-
from .prompt_template_block import PromptTemplateBlock # noqa: E402
|
46
|
-
|
47
|
-
PromptTemplateBlockProperties.update_forward_refs()
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import datetime as dt
|
6
|
-
import typing
|
7
|
-
|
8
|
-
from ..core.datetime_utils import serialize_datetime
|
9
|
-
from .chat_message_role import ChatMessageRole
|
10
|
-
from .vellum_variable_type import VellumVariableType
|
11
|
-
|
12
|
-
try:
|
13
|
-
import pydantic.v1 as pydantic # type: ignore
|
14
|
-
except ImportError:
|
15
|
-
import pydantic # type: ignore
|
16
|
-
|
17
|
-
|
18
|
-
class PromptTemplateBlockPropertiesRequest(pydantic.BaseModel):
|
19
|
-
chat_role: typing.Optional[ChatMessageRole] = None
|
20
|
-
chat_message_unterminated: typing.Optional[bool] = None
|
21
|
-
chat_source: typing.Optional[str] = None
|
22
|
-
template: typing.Optional[str] = None
|
23
|
-
template_type: typing.Optional[VellumVariableType] = None
|
24
|
-
function_name: typing.Optional[str] = None
|
25
|
-
function_description: typing.Optional[str] = None
|
26
|
-
function_parameters: typing.Optional[typing.Dict[str, typing.Any]] = None
|
27
|
-
function_forced: typing.Optional[bool] = None
|
28
|
-
blocks: typing.Optional[typing.List[PromptTemplateBlockRequest]] = None
|
29
|
-
|
30
|
-
def json(self, **kwargs: typing.Any) -> str:
|
31
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
32
|
-
return super().json(**kwargs_with_defaults)
|
33
|
-
|
34
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
35
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
36
|
-
return super().dict(**kwargs_with_defaults)
|
37
|
-
|
38
|
-
class Config:
|
39
|
-
frozen = True
|
40
|
-
smart_union = True
|
41
|
-
extra = pydantic.Extra.allow
|
42
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
43
|
-
|
44
|
-
|
45
|
-
from .prompt_template_block_request import PromptTemplateBlockRequest # noqa: E402
|
46
|
-
|
47
|
-
PromptTemplateBlockPropertiesRequest.update_forward_refs()
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import datetime as dt
|
6
|
-
import typing
|
7
|
-
|
8
|
-
from ..core.datetime_utils import serialize_datetime
|
9
|
-
from .block_type_enum import BlockTypeEnum
|
10
|
-
from .prompt_template_block_state import PromptTemplateBlockState
|
11
|
-
|
12
|
-
try:
|
13
|
-
import pydantic.v1 as pydantic # type: ignore
|
14
|
-
except ImportError:
|
15
|
-
import pydantic # type: ignore
|
16
|
-
|
17
|
-
|
18
|
-
class PromptTemplateBlockRequest(pydantic.BaseModel):
|
19
|
-
id: str
|
20
|
-
block_type: BlockTypeEnum
|
21
|
-
properties: PromptTemplateBlockPropertiesRequest
|
22
|
-
state: typing.Optional[PromptTemplateBlockState] = None
|
23
|
-
|
24
|
-
def json(self, **kwargs: typing.Any) -> str:
|
25
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
-
return super().json(**kwargs_with_defaults)
|
27
|
-
|
28
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
29
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
30
|
-
return super().dict(**kwargs_with_defaults)
|
31
|
-
|
32
|
-
class Config:
|
33
|
-
frozen = True
|
34
|
-
smart_union = True
|
35
|
-
extra = pydantic.Extra.allow
|
36
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
37
|
-
|
38
|
-
|
39
|
-
from .prompt_template_block_properties_request import PromptTemplateBlockPropertiesRequest # noqa: E402
|
40
|
-
|
41
|
-
PromptTemplateBlockRequest.update_forward_refs()
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
import enum
|
4
|
-
import typing
|
5
|
-
|
6
|
-
T_Result = typing.TypeVar("T_Result")
|
7
|
-
|
8
|
-
|
9
|
-
class PromptTemplateBlockState(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `ENABLED` - ENABLED
|
12
|
-
- `DISABLED` - DISABLED
|
13
|
-
"""
|
14
|
-
|
15
|
-
ENABLED = "ENABLED"
|
16
|
-
DISABLED = "DISABLED"
|
17
|
-
|
18
|
-
def visit(self, enabled: typing.Callable[[], T_Result], disabled: typing.Callable[[], T_Result]) -> T_Result:
|
19
|
-
if self is PromptTemplateBlockState.ENABLED:
|
20
|
-
return enabled()
|
21
|
-
if self is PromptTemplateBlockState.DISABLED:
|
22
|
-
return disabled()
|
vellum/types/provider_enum.py
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
import enum
|
4
|
-
import typing
|
5
|
-
|
6
|
-
T_Result = typing.TypeVar("T_Result")
|
7
|
-
|
8
|
-
|
9
|
-
class ProviderEnum(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `ANTHROPIC` - Anthropic
|
12
|
-
- `AWS_BEDROCK` - AWS Bedrock
|
13
|
-
- `AZURE_OPENAI` - Azure OpenAI
|
14
|
-
- `COHERE` - Cohere
|
15
|
-
- `GOOGLE` - Google
|
16
|
-
- `HOSTED` - Hosted
|
17
|
-
- `MOSAICML` - MosaicML
|
18
|
-
- `OPENAI` - OpenAI
|
19
|
-
- `FIREWORKS_AI` - Fireworks AI
|
20
|
-
- `HUGGINGFACE` - HuggingFace
|
21
|
-
- `MYSTIC` - Mystic
|
22
|
-
- `PYQ` - Pyq
|
23
|
-
- `REPLICATE` - Replicate
|
24
|
-
"""
|
25
|
-
|
26
|
-
ANTHROPIC = "ANTHROPIC"
|
27
|
-
AWS_BEDROCK = "AWS_BEDROCK"
|
28
|
-
AZURE_OPENAI = "AZURE_OPENAI"
|
29
|
-
COHERE = "COHERE"
|
30
|
-
GOOGLE = "GOOGLE"
|
31
|
-
HOSTED = "HOSTED"
|
32
|
-
MOSAICML = "MOSAICML"
|
33
|
-
OPENAI = "OPENAI"
|
34
|
-
FIREWORKS_AI = "FIREWORKS_AI"
|
35
|
-
HUGGINGFACE = "HUGGINGFACE"
|
36
|
-
MYSTIC = "MYSTIC"
|
37
|
-
PYQ = "PYQ"
|
38
|
-
REPLICATE = "REPLICATE"
|
39
|
-
|
40
|
-
def visit(
|
41
|
-
self,
|
42
|
-
anthropic: typing.Callable[[], T_Result],
|
43
|
-
aws_bedrock: typing.Callable[[], T_Result],
|
44
|
-
azure_openai: typing.Callable[[], T_Result],
|
45
|
-
cohere: typing.Callable[[], T_Result],
|
46
|
-
google: typing.Callable[[], T_Result],
|
47
|
-
hosted: typing.Callable[[], T_Result],
|
48
|
-
mosaicml: typing.Callable[[], T_Result],
|
49
|
-
openai: typing.Callable[[], T_Result],
|
50
|
-
fireworks_ai: typing.Callable[[], T_Result],
|
51
|
-
huggingface: typing.Callable[[], T_Result],
|
52
|
-
mystic: typing.Callable[[], T_Result],
|
53
|
-
pyq: typing.Callable[[], T_Result],
|
54
|
-
replicate: typing.Callable[[], T_Result],
|
55
|
-
) -> T_Result:
|
56
|
-
if self is ProviderEnum.ANTHROPIC:
|
57
|
-
return anthropic()
|
58
|
-
if self is ProviderEnum.AWS_BEDROCK:
|
59
|
-
return aws_bedrock()
|
60
|
-
if self is ProviderEnum.AZURE_OPENAI:
|
61
|
-
return azure_openai()
|
62
|
-
if self is ProviderEnum.COHERE:
|
63
|
-
return cohere()
|
64
|
-
if self is ProviderEnum.GOOGLE:
|
65
|
-
return google()
|
66
|
-
if self is ProviderEnum.HOSTED:
|
67
|
-
return hosted()
|
68
|
-
if self is ProviderEnum.MOSAICML:
|
69
|
-
return mosaicml()
|
70
|
-
if self is ProviderEnum.OPENAI:
|
71
|
-
return openai()
|
72
|
-
if self is ProviderEnum.FIREWORKS_AI:
|
73
|
-
return fireworks_ai()
|
74
|
-
if self is ProviderEnum.HUGGINGFACE:
|
75
|
-
return huggingface()
|
76
|
-
if self is ProviderEnum.MYSTIC:
|
77
|
-
return mystic()
|
78
|
-
if self is ProviderEnum.PYQ:
|
79
|
-
return pyq()
|
80
|
-
if self is ProviderEnum.REPLICATE:
|
81
|
-
return replicate()
|
@@ -1,37 +0,0 @@
|
|
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
|
-
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
|
-
|
13
|
-
|
14
|
-
class RegisterPromptModelParametersRequest(pydantic.BaseModel):
|
15
|
-
temperature: float
|
16
|
-
max_tokens: int
|
17
|
-
stop: typing.Optional[typing.List[str]] = None
|
18
|
-
top_p: float
|
19
|
-
top_k: typing.Optional[int] = None
|
20
|
-
frequency_penalty: float
|
21
|
-
presence_penalty: float
|
22
|
-
logit_bias: typing.Optional[typing.Dict[str, typing.Optional[float]]] = None
|
23
|
-
custom_parameters: typing.Optional[typing.Dict[str, typing.Any]] = None
|
24
|
-
|
25
|
-
def json(self, **kwargs: typing.Any) -> str:
|
26
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
27
|
-
return super().json(**kwargs_with_defaults)
|
28
|
-
|
29
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
30
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
31
|
-
return super().dict(**kwargs_with_defaults)
|
32
|
-
|
33
|
-
class Config:
|
34
|
-
frozen = True
|
35
|
-
smart_union = True
|
36
|
-
extra = pydantic.Extra.allow
|
37
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,35 +0,0 @@
|
|
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 .prompt_template_block_data_request import PromptTemplateBlockDataRequest
|
8
|
-
from .registered_prompt_input_variable_request import RegisteredPromptInputVariableRequest
|
9
|
-
|
10
|
-
try:
|
11
|
-
import pydantic.v1 as pydantic # type: ignore
|
12
|
-
except ImportError:
|
13
|
-
import pydantic # type: ignore
|
14
|
-
|
15
|
-
|
16
|
-
class RegisterPromptPromptInfoRequest(pydantic.BaseModel):
|
17
|
-
prompt_block_data: PromptTemplateBlockDataRequest
|
18
|
-
input_variables: typing.List[RegisteredPromptInputVariableRequest] = pydantic.Field()
|
19
|
-
"""
|
20
|
-
The input variables specified in the prompt template.
|
21
|
-
"""
|
22
|
-
|
23
|
-
def json(self, **kwargs: typing.Any) -> str:
|
24
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
-
return super().json(**kwargs_with_defaults)
|
26
|
-
|
27
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
-
return super().dict(**kwargs_with_defaults)
|
30
|
-
|
31
|
-
class Config:
|
32
|
-
frozen = True
|
33
|
-
smart_union = True
|
34
|
-
extra = pydantic.Extra.allow
|
35
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,62 +0,0 @@
|
|
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 .register_prompt_prompt import RegisterPromptPrompt
|
8
|
-
from .registered_prompt_deployment import RegisteredPromptDeployment
|
9
|
-
from .registered_prompt_model_version import RegisteredPromptModelVersion
|
10
|
-
from .registered_prompt_sandbox import RegisteredPromptSandbox
|
11
|
-
from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
|
12
|
-
|
13
|
-
try:
|
14
|
-
import pydantic.v1 as pydantic # type: ignore
|
15
|
-
except ImportError:
|
16
|
-
import pydantic # type: ignore
|
17
|
-
|
18
|
-
|
19
|
-
class RegisterPromptResponse(pydantic.BaseModel):
|
20
|
-
prompt: RegisterPromptPrompt = pydantic.Field()
|
21
|
-
"""
|
22
|
-
Information about the generated prompt
|
23
|
-
"""
|
24
|
-
|
25
|
-
sandbox_snapshot: RegisteredPromptSandboxSnapshot = pydantic.Field()
|
26
|
-
"""
|
27
|
-
Information about the generated sandbox snapshot
|
28
|
-
"""
|
29
|
-
|
30
|
-
sandbox: RegisteredPromptSandbox = pydantic.Field()
|
31
|
-
"""
|
32
|
-
Information about the generated sandbox
|
33
|
-
"""
|
34
|
-
|
35
|
-
model_version: RegisteredPromptModelVersion = pydantic.Field()
|
36
|
-
"""
|
37
|
-
Information about the generated model version
|
38
|
-
"""
|
39
|
-
|
40
|
-
prompt_version_id: str = pydantic.Field()
|
41
|
-
"""
|
42
|
-
The ID of the generated prompt version
|
43
|
-
"""
|
44
|
-
|
45
|
-
deployment: RegisteredPromptDeployment = pydantic.Field()
|
46
|
-
"""
|
47
|
-
Information about the generated deployment
|
48
|
-
"""
|
49
|
-
|
50
|
-
def json(self, **kwargs: typing.Any) -> str:
|
51
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
52
|
-
return super().json(**kwargs_with_defaults)
|
53
|
-
|
54
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
55
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
56
|
-
return super().dict(**kwargs_with_defaults)
|
57
|
-
|
58
|
-
class Config:
|
59
|
-
frozen = True
|
60
|
-
smart_union = True
|
61
|
-
extra = pydantic.Extra.allow
|
62
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,42 +0,0 @@
|
|
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
|
-
|
8
|
-
try:
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
10
|
-
except ImportError:
|
11
|
-
import pydantic # type: ignore
|
12
|
-
|
13
|
-
|
14
|
-
class RegisteredPromptDeployment(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field()
|
16
|
-
"""
|
17
|
-
The ID of the generated deployment.
|
18
|
-
"""
|
19
|
-
|
20
|
-
name: str = pydantic.Field()
|
21
|
-
"""
|
22
|
-
A uniquely-identifying name for generated deployment.
|
23
|
-
"""
|
24
|
-
|
25
|
-
label: str = pydantic.Field()
|
26
|
-
"""
|
27
|
-
A human-friendly label for the generated deployment.
|
28
|
-
"""
|
29
|
-
|
30
|
-
def json(self, **kwargs: typing.Any) -> str:
|
31
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
32
|
-
return super().json(**kwargs_with_defaults)
|
33
|
-
|
34
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
35
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
36
|
-
return super().dict(**kwargs_with_defaults)
|
37
|
-
|
38
|
-
class Config:
|
39
|
-
frozen = True
|
40
|
-
smart_union = True
|
41
|
-
extra = pydantic.Extra.allow
|
42
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,34 +0,0 @@
|
|
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 .chat_message_request import ChatMessageRequest
|
8
|
-
from .scenario_input_type_enum import ScenarioInputTypeEnum
|
9
|
-
|
10
|
-
try:
|
11
|
-
import pydantic.v1 as pydantic # type: ignore
|
12
|
-
except ImportError:
|
13
|
-
import pydantic # type: ignore
|
14
|
-
|
15
|
-
|
16
|
-
class ScenarioInputRequest(pydantic.BaseModel):
|
17
|
-
key: str
|
18
|
-
type: typing.Optional[ScenarioInputTypeEnum] = None
|
19
|
-
value: typing.Optional[str] = None
|
20
|
-
chat_history: typing.Optional[typing.List[ChatMessageRequest]] = None
|
21
|
-
|
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
|
-
|
26
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
-
return super().dict(**kwargs_with_defaults)
|
29
|
-
|
30
|
-
class Config:
|
31
|
-
frozen = True
|
32
|
-
smart_union = True
|
33
|
-
extra = pydantic.Extra.allow
|
34
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
import enum
|
4
|
-
import typing
|
5
|
-
|
6
|
-
T_Result = typing.TypeVar("T_Result")
|
7
|
-
|
8
|
-
|
9
|
-
class ScenarioInputTypeEnum(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
- `TEXT` - TEXT
|
12
|
-
- `CHAT_HISTORY` - CHAT_HISTORY
|
13
|
-
"""
|
14
|
-
|
15
|
-
TEXT = "TEXT"
|
16
|
-
CHAT_HISTORY = "CHAT_HISTORY"
|
17
|
-
|
18
|
-
def visit(self, text: typing.Callable[[], T_Result], chat_history: typing.Callable[[], T_Result]) -> T_Result:
|
19
|
-
if self is ScenarioInputTypeEnum.TEXT:
|
20
|
-
return text()
|
21
|
-
if self is ScenarioInputTypeEnum.CHAT_HISTORY:
|
22
|
-
return chat_history()
|