vellum-ai 0.3.14__py3-none-any.whl → 0.3.15__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +22 -0
- vellum/client.py +846 -100
- vellum/core/__init__.py +8 -0
- vellum/core/client_wrapper.py +27 -8
- vellum/core/file.py +38 -0
- vellum/core/http_client.py +130 -0
- vellum/core/jsonable_encoder.py +2 -2
- vellum/core/request_options.py +32 -0
- vellum/resources/deployments/client.py +161 -24
- vellum/resources/document_indexes/client.py +337 -80
- vellum/resources/documents/client.py +278 -58
- vellum/resources/folder_entities/client.py +60 -10
- vellum/resources/model_versions/client.py +48 -8
- vellum/resources/registered_prompts/client.py +52 -6
- vellum/resources/sandboxes/client.py +108 -26
- vellum/resources/test_suite_runs/client.py +221 -38
- vellum/resources/test_suites/client.py +110 -24
- vellum/resources/workflow_deployments/client.py +110 -14
- vellum/types/__init__.py +20 -0
- vellum/types/api_node_result.py +1 -0
- vellum/types/api_node_result_data.py +4 -2
- vellum/types/array_chat_message_content.py +1 -0
- vellum/types/array_chat_message_content_item.py +6 -5
- vellum/types/array_chat_message_content_item_request.py +6 -5
- vellum/types/array_chat_message_content_request.py +1 -0
- vellum/types/array_enum.py +2 -2
- vellum/types/array_variable_value_item.py +16 -10
- vellum/types/chat_history_enum.py +2 -2
- vellum/types/chat_history_input_request.py +6 -1
- vellum/types/chat_history_variable_value.py +2 -1
- vellum/types/chat_message.py +7 -5
- vellum/types/chat_message_content.py +8 -6
- vellum/types/chat_message_content_request.py +8 -6
- vellum/types/chat_message_request.py +7 -5
- vellum/types/code_execution_node_array_result.py +31 -0
- vellum/types/code_execution_node_chat_history_result.py +2 -1
- vellum/types/code_execution_node_error_result.py +2 -1
- vellum/types/code_execution_node_function_call_result.py +31 -0
- vellum/types/code_execution_node_json_result.py +2 -1
- vellum/types/code_execution_node_number_result.py +2 -1
- vellum/types/code_execution_node_result.py +1 -0
- vellum/types/code_execution_node_result_data.py +2 -1
- vellum/types/code_execution_node_result_output.py +36 -8
- vellum/types/code_execution_node_search_results_result.py +2 -1
- vellum/types/code_execution_node_string_result.py +2 -1
- vellum/types/conditional_node_result.py +1 -0
- vellum/types/conditional_node_result_data.py +2 -1
- vellum/types/deployment_provider_payload_response.py +1 -0
- vellum/types/deployment_read.py +32 -17
- vellum/types/document_document_to_document_index.py +21 -15
- vellum/types/document_index_read.py +32 -19
- vellum/types/document_read.py +34 -24
- vellum/types/document_status.py +2 -2
- vellum/types/enriched_normalized_completion.py +36 -19
- vellum/types/error_enum.py +2 -2
- vellum/types/error_variable_value.py +2 -1
- vellum/types/execute_prompt_api_error_response.py +5 -1
- vellum/types/execute_prompt_event.py +8 -6
- vellum/types/execute_prompt_response.py +4 -4
- vellum/types/execute_workflow_error_response.py +5 -1
- vellum/types/execute_workflow_response.py +3 -2
- vellum/types/execute_workflow_stream_error_response.py +5 -1
- vellum/types/execute_workflow_workflow_result_event.py +4 -4
- vellum/types/execution_array_vellum_value.py +7 -2
- vellum/types/execution_chat_history_vellum_value.py +7 -2
- vellum/types/execution_error_vellum_value.py +7 -2
- vellum/types/execution_function_call_vellum_value.py +7 -2
- vellum/types/execution_json_vellum_value.py +7 -2
- vellum/types/execution_number_vellum_value.py +7 -2
- vellum/types/execution_search_results_vellum_value.py +7 -2
- vellum/types/execution_string_vellum_value.py +7 -2
- vellum/types/execution_vellum_value.py +16 -10
- vellum/types/fulfilled_enum.py +2 -2
- vellum/types/fulfilled_execute_prompt_event.py +2 -1
- vellum/types/fulfilled_execute_prompt_response.py +12 -5
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +1 -0
- vellum/types/fulfilled_function_call.py +2 -1
- vellum/types/fulfilled_prompt_execution_meta.py +3 -2
- vellum/types/fulfilled_workflow_node_result_event.py +6 -5
- vellum/types/function_call.py +4 -4
- vellum/types/function_call_chat_message_content.py +1 -0
- vellum/types/function_call_chat_message_content_request.py +1 -0
- vellum/types/function_call_chat_message_content_value.py +2 -1
- vellum/types/function_call_chat_message_content_value_request.py +2 -1
- vellum/types/function_call_enum.py +2 -2
- vellum/types/function_call_variable_value.py +1 -0
- vellum/types/generate_error_response.py +5 -1
- vellum/types/generate_options_request.py +8 -5
- vellum/types/generate_request.py +15 -9
- vellum/types/generate_result.py +10 -6
- vellum/types/generate_result_data.py +5 -3
- vellum/types/generate_result_error.py +5 -1
- vellum/types/generate_stream_response.py +1 -0
- vellum/types/generate_stream_result.py +3 -2
- vellum/types/generate_stream_result_data.py +1 -0
- vellum/types/image_chat_message_content.py +1 -0
- vellum/types/image_chat_message_content_request.py +1 -0
- vellum/types/image_enum.py +2 -2
- vellum/types/image_variable_value.py +2 -1
- vellum/types/initiated_enum.py +2 -2
- vellum/types/initiated_execute_prompt_event.py +2 -1
- vellum/types/initiated_prompt_execution_meta.py +5 -4
- vellum/types/initiated_workflow_node_result_event.py +5 -4
- vellum/types/json_enum.py +2 -2
- vellum/types/json_input_request.py +6 -1
- vellum/types/json_variable_value.py +2 -1
- vellum/types/logprobs_enum.py +2 -2
- vellum/types/metadata_filter_config_request.py +7 -6
- vellum/types/metadata_filter_rule_request.py +7 -6
- vellum/types/model_version_build_config.py +12 -7
- vellum/types/model_version_exec_config.py +18 -11
- vellum/types/model_version_exec_config_parameters.py +7 -6
- vellum/types/model_version_read.py +51 -32
- vellum/types/model_version_sandbox_snapshot.py +17 -4
- vellum/types/named_test_case_chat_history_variable_value_request.py +2 -1
- vellum/types/named_test_case_error_variable_value_request.py +2 -1
- vellum/types/named_test_case_json_variable_value_request.py +2 -1
- vellum/types/named_test_case_number_variable_value_request.py +2 -1
- vellum/types/named_test_case_search_results_variable_value_request.py +2 -1
- vellum/types/named_test_case_string_variable_value_request.py +2 -1
- vellum/types/named_test_case_variable_value_request.py +12 -8
- vellum/types/node_input_compiled_array_value.py +2 -1
- vellum/types/node_input_compiled_chat_history_value.py +2 -1
- vellum/types/node_input_compiled_error_value.py +2 -1
- vellum/types/node_input_compiled_function_call.py +32 -0
- vellum/types/node_input_compiled_json_value.py +2 -1
- vellum/types/node_input_compiled_number_value.py +2 -1
- vellum/types/node_input_compiled_search_results_value.py +2 -1
- vellum/types/node_input_compiled_string_value.py +2 -1
- vellum/types/node_input_variable_compiled_value.py +26 -9
- vellum/types/node_output_compiled_array_value.py +2 -1
- vellum/types/node_output_compiled_chat_history_value.py +2 -1
- vellum/types/node_output_compiled_error_value.py +2 -1
- vellum/types/node_output_compiled_function_value.py +2 -1
- vellum/types/node_output_compiled_json_value.py +2 -1
- vellum/types/node_output_compiled_number_value.py +2 -1
- vellum/types/node_output_compiled_search_results_value.py +2 -1
- vellum/types/node_output_compiled_string_value.py +2 -1
- vellum/types/node_output_compiled_value.py +16 -10
- vellum/types/normalized_log_probs.py +2 -1
- vellum/types/normalized_token_log_probs.py +3 -2
- vellum/types/number_enum.py +2 -2
- vellum/types/number_variable_value.py +2 -1
- vellum/types/paginated_document_index_read_list.py +5 -4
- vellum/types/paginated_slim_deployment_read_list.py +5 -4
- vellum/types/paginated_slim_document_list.py +5 -4
- vellum/types/paginated_slim_workflow_deployment_list.py +5 -4
- vellum/types/paginated_test_suite_run_execution_list.py +5 -4
- vellum/types/prompt_deployment_expand_meta_request_request.py +25 -15
- vellum/types/prompt_deployment_input_request.py +6 -5
- vellum/types/prompt_execution_meta.py +6 -5
- vellum/types/prompt_node_result.py +1 -0
- vellum/types/prompt_node_result_data.py +4 -3
- vellum/types/prompt_output.py +8 -6
- vellum/types/prompt_template_block.py +1 -0
- vellum/types/prompt_template_block_data.py +1 -0
- vellum/types/prompt_template_block_data_request.py +1 -0
- vellum/types/prompt_template_block_properties.py +11 -10
- vellum/types/prompt_template_block_properties_request.py +11 -10
- vellum/types/prompt_template_block_request.py +1 -0
- vellum/types/raw_prompt_execution_overrides_request.py +11 -5
- vellum/types/register_prompt_error_response.py +5 -1
- vellum/types/register_prompt_model_parameters_request.py +5 -4
- vellum/types/register_prompt_prompt.py +10 -2
- vellum/types/register_prompt_prompt_info_request.py +5 -3
- vellum/types/register_prompt_response.py +30 -10
- vellum/types/registered_prompt_deployment.py +15 -3
- vellum/types/registered_prompt_input_variable_request.py +3 -2
- vellum/types/registered_prompt_model_version.py +10 -2
- vellum/types/registered_prompt_sandbox.py +10 -2
- vellum/types/registered_prompt_sandbox_snapshot.py +5 -1
- vellum/types/rejected_enum.py +2 -2
- vellum/types/rejected_execute_prompt_event.py +2 -1
- vellum/types/rejected_execute_prompt_response.py +12 -5
- vellum/types/rejected_execute_workflow_workflow_result_event.py +1 -0
- vellum/types/rejected_function_call.py +2 -1
- vellum/types/rejected_prompt_execution_meta.py +3 -2
- vellum/types/rejected_workflow_node_result_event.py +4 -3
- vellum/types/sandbox_scenario.py +11 -3
- vellum/types/scenario_input.py +4 -3
- vellum/types/scenario_input_request.py +4 -3
- vellum/types/search_error_response.py +5 -1
- vellum/types/search_filters_request.py +10 -6
- vellum/types/search_node_result.py +1 -0
- vellum/types/search_node_result_data.py +7 -4
- vellum/types/search_request_options_request.py +20 -8
- vellum/types/search_response.py +5 -3
- vellum/types/search_result.py +15 -5
- vellum/types/search_result_document.py +20 -8
- vellum/types/search_result_document_request.py +15 -7
- vellum/types/search_result_merging_request.py +5 -1
- vellum/types/search_result_request.py +15 -5
- vellum/types/search_results_enum.py +2 -2
- vellum/types/search_results_variable_value.py +2 -1
- vellum/types/search_weights_request.py +10 -4
- vellum/types/slim_deployment_read.py +28 -14
- vellum/types/slim_document.py +56 -35
- vellum/types/slim_workflow_deployment.py +37 -24
- vellum/types/streaming_enum.py +2 -2
- vellum/types/streaming_execute_prompt_event.py +6 -4
- vellum/types/streaming_prompt_execution_meta.py +2 -1
- vellum/types/streaming_workflow_node_result_event.py +6 -5
- vellum/types/string_chat_message_content.py +1 -0
- vellum/types/string_chat_message_content_request.py +1 -0
- vellum/types/string_enum.py +2 -2
- vellum/types/string_input_request.py +6 -1
- vellum/types/string_variable_value.py +2 -1
- vellum/types/submit_completion_actual_request.py +25 -13
- vellum/types/submit_completion_actuals_error_response.py +1 -0
- vellum/types/submit_workflow_execution_actual_request.py +6 -5
- vellum/types/subworkflow_enum.py +2 -2
- vellum/types/subworkflow_node_result.py +1 -0
- vellum/types/templating_node_array_result.py +31 -0
- vellum/types/templating_node_chat_history_result.py +2 -1
- vellum/types/templating_node_error_result.py +2 -1
- vellum/types/templating_node_function_call_result.py +31 -0
- vellum/types/templating_node_json_result.py +2 -1
- vellum/types/templating_node_number_result.py +2 -1
- vellum/types/templating_node_result.py +1 -0
- vellum/types/templating_node_result_data.py +1 -0
- vellum/types/templating_node_result_output.py +36 -8
- vellum/types/templating_node_search_results_result.py +2 -1
- vellum/types/templating_node_string_result.py +2 -1
- vellum/types/terminal_node_array_result.py +8 -3
- vellum/types/terminal_node_chat_history_result.py +8 -3
- vellum/types/terminal_node_error_result.py +8 -3
- vellum/types/terminal_node_function_call_result.py +8 -3
- vellum/types/terminal_node_json_result.py +8 -3
- vellum/types/terminal_node_number_result.py +8 -3
- vellum/types/terminal_node_result.py +1 -0
- vellum/types/terminal_node_result_data.py +1 -0
- vellum/types/terminal_node_result_output.py +16 -10
- vellum/types/terminal_node_search_results_result.py +8 -3
- vellum/types/terminal_node_string_result.py +8 -3
- vellum/types/test_case_chat_history_variable_value.py +2 -1
- vellum/types/test_case_error_variable_value.py +2 -1
- vellum/types/test_case_json_variable_value.py +2 -1
- vellum/types/test_case_number_variable_value.py +2 -1
- vellum/types/test_case_search_results_variable_value.py +2 -1
- vellum/types/test_case_string_variable_value.py +2 -1
- vellum/types/test_case_variable_value.py +12 -8
- vellum/types/test_suite_run_deployment_release_tag_exec_config.py +5 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +10 -4
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +10 -4
- vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +5 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +2 -2
- vellum/types/test_suite_run_exec_config.py +4 -4
- vellum/types/test_suite_run_exec_config_request.py +4 -4
- vellum/types/test_suite_run_execution.py +1 -0
- vellum/types/test_suite_run_execution_chat_history_output.py +2 -1
- vellum/types/test_suite_run_execution_error_output.py +2 -1
- vellum/types/test_suite_run_execution_json_output.py +2 -1
- vellum/types/test_suite_run_execution_metric_result.py +1 -0
- vellum/types/test_suite_run_execution_number_output.py +2 -1
- vellum/types/test_suite_run_execution_output.py +12 -8
- vellum/types/test_suite_run_execution_search_results_output.py +2 -1
- vellum/types/test_suite_run_execution_string_output.py +2 -1
- vellum/types/test_suite_run_metric_error_output.py +1 -0
- vellum/types/test_suite_run_metric_error_output_type_enum.py +2 -2
- vellum/types/test_suite_run_metric_number_output.py +1 -0
- vellum/types/test_suite_run_metric_number_output_type_enum.py +2 -2
- vellum/types/test_suite_run_metric_output.py +4 -4
- vellum/types/test_suite_run_read.py +16 -14
- vellum/types/test_suite_run_test_suite.py +1 -0
- vellum/types/test_suite_run_workflow_release_tag_exec_config.py +5 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +10 -6
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +10 -6
- vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +5 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +2 -2
- vellum/types/test_suite_test_case.py +3 -2
- vellum/types/upload_document_error_response.py +1 -0
- vellum/types/upload_document_response.py +5 -1
- vellum/types/vellum_error.py +1 -0
- vellum/types/vellum_error_request.py +1 -0
- vellum/types/vellum_image.py +2 -1
- vellum/types/vellum_image_request.py +2 -1
- vellum/types/vellum_variable.py +1 -0
- vellum/types/workflow_deployment_read.py +37 -24
- vellum/types/workflow_event_error.py +1 -0
- vellum/types/workflow_execution_actual_chat_history_request.py +25 -15
- vellum/types/workflow_execution_actual_json_request.py +25 -15
- vellum/types/workflow_execution_actual_string_request.py +25 -15
- vellum/types/workflow_execution_node_result_event.py +3 -2
- vellum/types/workflow_execution_workflow_result_event.py +3 -2
- vellum/types/workflow_node_result_data.py +16 -10
- vellum/types/workflow_node_result_event.py +8 -6
- vellum/types/workflow_output.py +18 -11
- vellum/types/workflow_output_array.py +7 -2
- vellum/types/workflow_output_chat_history.py +7 -2
- vellum/types/workflow_output_error.py +7 -2
- vellum/types/workflow_output_function_call.py +7 -2
- vellum/types/workflow_output_image.py +7 -2
- vellum/types/workflow_output_json.py +7 -2
- vellum/types/workflow_output_number.py +7 -2
- vellum/types/workflow_output_search_results.py +7 -2
- vellum/types/workflow_output_string.py +7 -2
- vellum/types/workflow_request_chat_history_input_request.py +6 -1
- vellum/types/workflow_request_input_request.py +8 -6
- vellum/types/workflow_request_json_input_request.py +6 -1
- vellum/types/workflow_request_number_input_request.py +6 -1
- vellum/types/workflow_request_string_input_request.py +6 -1
- vellum/types/workflow_result_event.py +5 -4
- vellum/types/workflow_result_event_output_data.py +16 -10
- vellum/types/workflow_result_event_output_data_array.py +8 -5
- vellum/types/workflow_result_event_output_data_chat_history.py +8 -5
- vellum/types/workflow_result_event_output_data_error.py +8 -5
- vellum/types/workflow_result_event_output_data_function_call.py +8 -5
- vellum/types/workflow_result_event_output_data_json.py +8 -5
- vellum/types/workflow_result_event_output_data_number.py +8 -5
- vellum/types/workflow_result_event_output_data_search_results.py +8 -5
- vellum/types/workflow_result_event_output_data_string.py +11 -7
- vellum/types/workflow_stream_event.py +4 -4
- vellum/version.py +4 -0
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/METADATA +4 -4
- vellum_ai-0.3.15.dist-info/RECORD +365 -0
- vellum_ai-0.3.14.dist-info/RECORD +0 -356
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.15.dist-info}/WHEEL +0 -0
@@ -16,16 +16,16 @@ except ImportError:
|
|
16
16
|
|
17
17
|
|
18
18
|
class PromptTemplateBlockPropertiesRequest(pydantic.BaseModel):
|
19
|
-
chat_role: typing.Optional[ChatMessageRole]
|
20
|
-
chat_message_unterminated: typing.Optional[bool]
|
21
|
-
chat_source: typing.Optional[str]
|
22
|
-
template: typing.Optional[str]
|
23
|
-
template_type: typing.Optional[VellumVariableType]
|
24
|
-
function_name: typing.Optional[str]
|
25
|
-
function_description: typing.Optional[str]
|
26
|
-
function_parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
27
|
-
function_forced: typing.Optional[bool]
|
28
|
-
blocks: typing.Optional[typing.List[PromptTemplateBlockRequest]]
|
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
29
|
|
30
30
|
def json(self, **kwargs: typing.Any) -> str:
|
31
31
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -38,6 +38,7 @@ class PromptTemplateBlockPropertiesRequest(pydantic.BaseModel):
|
|
38
38
|
class Config:
|
39
39
|
frozen = True
|
40
40
|
smart_union = True
|
41
|
+
extra = pydantic.Extra.allow
|
41
42
|
json_encoders = {dt.datetime: serialize_datetime}
|
42
43
|
|
43
44
|
|
@@ -12,11 +12,16 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RawPromptExecutionOverridesRequest(pydantic.BaseModel):
|
15
|
-
body: typing.Optional[typing.Dict[str, typing.Any]]
|
16
|
-
headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
body: typing.Optional[typing.Dict[str, typing.Any]] = None
|
16
|
+
headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
17
|
+
"""
|
18
|
+
The raw headers to send to the model host.
|
19
|
+
"""
|
20
|
+
|
21
|
+
url: typing.Optional[str] = pydantic.Field(default=None)
|
22
|
+
"""
|
23
|
+
The raw URL to send to the model host.
|
24
|
+
"""
|
20
25
|
|
21
26
|
def json(self, **kwargs: typing.Any) -> str:
|
22
27
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -29,4 +34,5 @@ class RawPromptExecutionOverridesRequest(pydantic.BaseModel):
|
|
29
34
|
class Config:
|
30
35
|
frozen = True
|
31
36
|
smart_union = True
|
37
|
+
extra = pydantic.Extra.allow
|
32
38
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,7 +12,10 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisterPromptErrorResponse(pydantic.BaseModel):
|
15
|
-
detail: str = pydantic.Field(
|
15
|
+
detail: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
Details about why the request failed.
|
18
|
+
"""
|
16
19
|
|
17
20
|
def json(self, **kwargs: typing.Any) -> str:
|
18
21
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -25,4 +28,5 @@ class RegisterPromptErrorResponse(pydantic.BaseModel):
|
|
25
28
|
class Config:
|
26
29
|
frozen = True
|
27
30
|
smart_union = True
|
31
|
+
extra = pydantic.Extra.allow
|
28
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -14,13 +14,13 @@ except ImportError:
|
|
14
14
|
class RegisterPromptModelParametersRequest(pydantic.BaseModel):
|
15
15
|
temperature: float
|
16
16
|
max_tokens: int
|
17
|
-
stop: typing.Optional[typing.List[str]]
|
17
|
+
stop: typing.Optional[typing.List[str]] = None
|
18
18
|
top_p: float
|
19
|
-
top_k: typing.Optional[int]
|
19
|
+
top_k: typing.Optional[int] = None
|
20
20
|
frequency_penalty: float
|
21
21
|
presence_penalty: float
|
22
|
-
logit_bias: typing.Optional[typing.Dict[str, typing.Optional[float]]]
|
23
|
-
custom_parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
22
|
+
logit_bias: typing.Optional[typing.Dict[str, typing.Optional[float]]] = None
|
23
|
+
custom_parameters: typing.Optional[typing.Dict[str, typing.Any]] = None
|
24
24
|
|
25
25
|
def json(self, **kwargs: typing.Any) -> str:
|
26
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -33,4 +33,5 @@ class RegisterPromptModelParametersRequest(pydantic.BaseModel):
|
|
33
33
|
class Config:
|
34
34
|
frozen = True
|
35
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
36
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,8 +12,15 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisterPromptPrompt(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
16
|
-
|
15
|
+
id: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The ID of the generated prompt.
|
18
|
+
"""
|
19
|
+
|
20
|
+
label: str = pydantic.Field()
|
21
|
+
"""
|
22
|
+
A human-friendly label for the generated prompt.
|
23
|
+
"""
|
17
24
|
|
18
25
|
def json(self, **kwargs: typing.Any) -> str:
|
19
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -26,4 +33,5 @@ class RegisterPromptPrompt(pydantic.BaseModel):
|
|
26
33
|
class Config:
|
27
34
|
frozen = True
|
28
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
29
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -15,9 +15,10 @@ except ImportError:
|
|
15
15
|
|
16
16
|
class RegisterPromptPromptInfoRequest(pydantic.BaseModel):
|
17
17
|
prompt_block_data: PromptTemplateBlockDataRequest
|
18
|
-
input_variables: typing.List[RegisteredPromptInputVariableRequest] = pydantic.Field(
|
19
|
-
|
20
|
-
|
18
|
+
input_variables: typing.List[RegisteredPromptInputVariableRequest] = pydantic.Field()
|
19
|
+
"""
|
20
|
+
The input variables specified in the prompt template.
|
21
|
+
"""
|
21
22
|
|
22
23
|
def json(self, **kwargs: typing.Any) -> str:
|
23
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -30,4 +31,5 @@ class RegisterPromptPromptInfoRequest(pydantic.BaseModel):
|
|
30
31
|
class Config:
|
31
32
|
frozen = True
|
32
33
|
smart_union = True
|
34
|
+
extra = pydantic.Extra.allow
|
33
35
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -17,16 +17,35 @@ except ImportError:
|
|
17
17
|
|
18
18
|
|
19
19
|
class RegisterPromptResponse(pydantic.BaseModel):
|
20
|
-
prompt: RegisterPromptPrompt = pydantic.Field(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
+
"""
|
30
49
|
|
31
50
|
def json(self, **kwargs: typing.Any) -> str:
|
32
51
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -39,4 +58,5 @@ class RegisterPromptResponse(pydantic.BaseModel):
|
|
39
58
|
class Config:
|
40
59
|
frozen = True
|
41
60
|
smart_union = True
|
61
|
+
extra = pydantic.Extra.allow
|
42
62
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,9 +12,20 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisteredPromptDeployment(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
16
|
-
|
17
|
-
|
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
|
+
"""
|
18
29
|
|
19
30
|
def json(self, **kwargs: typing.Any) -> str:
|
20
31
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -27,4 +38,5 @@ class RegisteredPromptDeployment(pydantic.BaseModel):
|
|
27
38
|
class Config:
|
28
39
|
frozen = True
|
29
40
|
smart_union = True
|
41
|
+
extra = pydantic.Extra.allow
|
30
42
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -14,8 +14,8 @@ except ImportError:
|
|
14
14
|
|
15
15
|
class RegisteredPromptInputVariableRequest(pydantic.BaseModel):
|
16
16
|
key: str
|
17
|
-
id: typing.Optional[str]
|
18
|
-
type: typing.Optional[VellumVariableType]
|
17
|
+
id: typing.Optional[str] = None
|
18
|
+
type: typing.Optional[VellumVariableType] = None
|
19
19
|
|
20
20
|
def json(self, **kwargs: typing.Any) -> str:
|
21
21
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -28,4 +28,5 @@ class RegisteredPromptInputVariableRequest(pydantic.BaseModel):
|
|
28
28
|
class Config:
|
29
29
|
frozen = True
|
30
30
|
smart_union = True
|
31
|
+
extra = pydantic.Extra.allow
|
31
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,8 +12,15 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisteredPromptModelVersion(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
16
|
-
|
15
|
+
id: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The ID of the generated model version.
|
18
|
+
"""
|
19
|
+
|
20
|
+
label: str = pydantic.Field()
|
21
|
+
"""
|
22
|
+
A human-friendly label for the generated model version.
|
23
|
+
"""
|
17
24
|
|
18
25
|
def json(self, **kwargs: typing.Any) -> str:
|
19
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -26,4 +33,5 @@ class RegisteredPromptModelVersion(pydantic.BaseModel):
|
|
26
33
|
class Config:
|
27
34
|
frozen = True
|
28
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
29
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,8 +12,15 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisteredPromptSandbox(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
16
|
-
|
15
|
+
id: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The ID of the generated sandbox.
|
18
|
+
"""
|
19
|
+
|
20
|
+
label: str = pydantic.Field()
|
21
|
+
"""
|
22
|
+
A human-friendly label for the generated sandbox.
|
23
|
+
"""
|
17
24
|
|
18
25
|
def json(self, **kwargs: typing.Any) -> str:
|
19
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -26,4 +33,5 @@ class RegisteredPromptSandbox(pydantic.BaseModel):
|
|
26
33
|
class Config:
|
27
34
|
frozen = True
|
28
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
29
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,7 +12,10 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class RegisteredPromptSandboxSnapshot(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
15
|
+
id: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The ID of the generated sandbox snapshot.
|
18
|
+
"""
|
16
19
|
|
17
20
|
def json(self, **kwargs: typing.Any) -> str:
|
18
21
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -25,4 +28,5 @@ class RegisteredPromptSandboxSnapshot(pydantic.BaseModel):
|
|
25
28
|
class Config:
|
26
29
|
frozen = True
|
27
30
|
smart_union = True
|
31
|
+
extra = pydantic.Extra.allow
|
28
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/rejected_enum.py
CHANGED
@@ -20,7 +20,7 @@ class RejectedExecutePromptEvent(pydantic.BaseModel):
|
|
20
20
|
|
21
21
|
error: VellumError
|
22
22
|
execution_id: str
|
23
|
-
meta: typing.Optional[RejectedPromptExecutionMeta]
|
23
|
+
meta: typing.Optional[RejectedPromptExecutionMeta] = None
|
24
24
|
|
25
25
|
def json(self, **kwargs: typing.Any) -> str:
|
26
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -33,4 +33,5 @@ class RejectedExecutePromptEvent(pydantic.BaseModel):
|
|
33
33
|
class Config:
|
34
34
|
frozen = True
|
35
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
36
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -18,11 +18,17 @@ class RejectedExecutePromptResponse(pydantic.BaseModel):
|
|
18
18
|
The unsuccessful response from the model containing an error of what went wrong.
|
19
19
|
"""
|
20
20
|
|
21
|
-
meta: typing.Optional[PromptExecutionMeta]
|
22
|
-
raw: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
meta: typing.Optional[PromptExecutionMeta] = None
|
22
|
+
raw: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
23
|
+
"""
|
24
|
+
The subset of the raw response from the model that the request opted into with `expand_raw`.
|
25
|
+
"""
|
26
|
+
|
27
|
+
execution_id: str = pydantic.Field()
|
28
|
+
"""
|
29
|
+
The ID of the execution.
|
30
|
+
"""
|
31
|
+
|
26
32
|
error: VellumError
|
27
33
|
|
28
34
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -36,4 +42,5 @@ class RejectedExecutePromptResponse(pydantic.BaseModel):
|
|
36
42
|
class Config:
|
37
43
|
frozen = True
|
38
44
|
smart_union = True
|
45
|
+
extra = pydantic.Extra.allow
|
39
46
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -18,7 +18,7 @@ class RejectedFunctionCall(pydantic.BaseModel):
|
|
18
18
|
"""
|
19
19
|
|
20
20
|
error: VellumError
|
21
|
-
id: typing.Optional[str]
|
21
|
+
id: typing.Optional[str] = None
|
22
22
|
name: str
|
23
23
|
|
24
24
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -32,4 +32,5 @@ class RejectedFunctionCall(pydantic.BaseModel):
|
|
32
32
|
class Config:
|
33
33
|
frozen = True
|
34
34
|
smart_union = True
|
35
|
+
extra = pydantic.Extra.allow
|
35
36
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -17,8 +17,8 @@ class RejectedPromptExecutionMeta(pydantic.BaseModel):
|
|
17
17
|
The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
|
18
18
|
"""
|
19
19
|
|
20
|
-
latency: typing.Optional[int]
|
21
|
-
finish_reason: typing.Optional[FinishReasonEnum]
|
20
|
+
latency: typing.Optional[int] = None
|
21
|
+
finish_reason: typing.Optional[FinishReasonEnum] = None
|
22
22
|
|
23
23
|
def json(self, **kwargs: typing.Any) -> str:
|
24
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +31,5 @@ class RejectedPromptExecutionMeta(pydantic.BaseModel):
|
|
31
31
|
class Config:
|
32
32
|
frozen = True
|
33
33
|
smart_union = True
|
34
|
+
extra = pydantic.Extra.allow
|
34
35
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -21,9 +21,9 @@ class RejectedWorkflowNodeResultEvent(pydantic.BaseModel):
|
|
21
21
|
id: str
|
22
22
|
node_id: str
|
23
23
|
node_result_id: str
|
24
|
-
ts: typing.Optional[dt.datetime]
|
25
|
-
data: typing.Optional[WorkflowNodeResultData]
|
26
|
-
source_execution_id: typing.Optional[str]
|
24
|
+
ts: typing.Optional[dt.datetime] = None
|
25
|
+
data: typing.Optional[WorkflowNodeResultData] = None
|
26
|
+
source_execution_id: typing.Optional[str] = None
|
27
27
|
error: WorkflowEventError
|
28
28
|
|
29
29
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -37,4 +37,5 @@ class RejectedWorkflowNodeResultEvent(pydantic.BaseModel):
|
|
37
37
|
class Config:
|
38
38
|
frozen = True
|
39
39
|
smart_union = True
|
40
|
+
extra = pydantic.Extra.allow
|
40
41
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/sandbox_scenario.py
CHANGED
@@ -13,9 +13,16 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SandboxScenario(pydantic.BaseModel):
|
16
|
-
label: typing.Optional[str]
|
17
|
-
inputs: typing.List[ScenarioInput] = pydantic.Field(
|
18
|
-
|
16
|
+
label: typing.Optional[str] = None
|
17
|
+
inputs: typing.List[ScenarioInput] = pydantic.Field()
|
18
|
+
"""
|
19
|
+
The inputs for the scenario
|
20
|
+
"""
|
21
|
+
|
22
|
+
id: str = pydantic.Field()
|
23
|
+
"""
|
24
|
+
The id of the scenario
|
25
|
+
"""
|
19
26
|
|
20
27
|
def json(self, **kwargs: typing.Any) -> str:
|
21
28
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -28,4 +35,5 @@ class SandboxScenario(pydantic.BaseModel):
|
|
28
35
|
class Config:
|
29
36
|
frozen = True
|
30
37
|
smart_union = True
|
38
|
+
extra = pydantic.Extra.allow
|
31
39
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/scenario_input.py
CHANGED
@@ -15,9 +15,9 @@ except ImportError:
|
|
15
15
|
|
16
16
|
class ScenarioInput(pydantic.BaseModel):
|
17
17
|
key: str
|
18
|
-
type: typing.Optional[ScenarioInputTypeEnum]
|
19
|
-
value: typing.Optional[str]
|
20
|
-
chat_history: typing.Optional[typing.List[ChatMessage]]
|
18
|
+
type: typing.Optional[ScenarioInputTypeEnum] = None
|
19
|
+
value: typing.Optional[str] = None
|
20
|
+
chat_history: typing.Optional[typing.List[ChatMessage]] = None
|
21
21
|
|
22
22
|
def json(self, **kwargs: typing.Any) -> str:
|
23
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -30,4 +30,5 @@ class ScenarioInput(pydantic.BaseModel):
|
|
30
30
|
class Config:
|
31
31
|
frozen = True
|
32
32
|
smart_union = True
|
33
|
+
extra = pydantic.Extra.allow
|
33
34
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -15,9 +15,9 @@ except ImportError:
|
|
15
15
|
|
16
16
|
class ScenarioInputRequest(pydantic.BaseModel):
|
17
17
|
key: str
|
18
|
-
type: typing.Optional[ScenarioInputTypeEnum]
|
19
|
-
value: typing.Optional[str]
|
20
|
-
chat_history: typing.Optional[typing.List[ChatMessageRequest]]
|
18
|
+
type: typing.Optional[ScenarioInputTypeEnum] = None
|
19
|
+
value: typing.Optional[str] = None
|
20
|
+
chat_history: typing.Optional[typing.List[ChatMessageRequest]] = None
|
21
21
|
|
22
22
|
def json(self, **kwargs: typing.Any) -> str:
|
23
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -30,4 +30,5 @@ class ScenarioInputRequest(pydantic.BaseModel):
|
|
30
30
|
class Config:
|
31
31
|
frozen = True
|
32
32
|
smart_union = True
|
33
|
+
extra = pydantic.Extra.allow
|
33
34
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,7 +12,10 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SearchErrorResponse(pydantic.BaseModel):
|
15
|
-
detail: str = pydantic.Field(
|
15
|
+
detail: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
Details about why the request failed.
|
18
|
+
"""
|
16
19
|
|
17
20
|
def json(self, **kwargs: typing.Any) -> str:
|
18
21
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -25,4 +28,5 @@ class SearchErrorResponse(pydantic.BaseModel):
|
|
25
28
|
class Config:
|
26
29
|
frozen = True
|
27
30
|
smart_union = True
|
31
|
+
extra = pydantic.Extra.allow
|
28
32
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -13,12 +13,15 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SearchFiltersRequest(pydantic.BaseModel):
|
16
|
-
external_ids: typing.Optional[typing.List[str]] = pydantic.Field(
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
)
|
16
|
+
external_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
17
|
+
"""
|
18
|
+
The document external IDs to filter by
|
19
|
+
"""
|
20
|
+
|
21
|
+
metadata: typing.Optional[MetadataFilterConfigRequest] = pydantic.Field(default=None)
|
22
|
+
"""
|
23
|
+
The metadata filters to apply to the search
|
24
|
+
"""
|
22
25
|
|
23
26
|
def json(self, **kwargs: typing.Any) -> str:
|
24
27
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +34,5 @@ class SearchFiltersRequest(pydantic.BaseModel):
|
|
31
34
|
class Config:
|
32
35
|
frozen = True
|
33
36
|
smart_union = True
|
37
|
+
extra = pydantic.Extra.allow
|
34
38
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -14,11 +14,13 @@ except ImportError:
|
|
14
14
|
|
15
15
|
class SearchNodeResultData(pydantic.BaseModel):
|
16
16
|
results_output_id: str
|
17
|
-
results: typing.List[SearchResult] = pydantic.Field(
|
18
|
-
|
19
|
-
|
17
|
+
results: typing.List[SearchResult] = pydantic.Field()
|
18
|
+
"""
|
19
|
+
The results of the search. Each result represents a chunk that matches the search query.
|
20
|
+
"""
|
21
|
+
|
20
22
|
text_output_id: str
|
21
|
-
text: typing.Optional[str]
|
23
|
+
text: typing.Optional[str] = None
|
22
24
|
|
23
25
|
def json(self, **kwargs: typing.Any) -> str:
|
24
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +33,5 @@ class SearchNodeResultData(pydantic.BaseModel):
|
|
31
33
|
class Config:
|
32
34
|
frozen = True
|
33
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
34
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -15,14 +15,25 @@ except ImportError:
|
|
15
15
|
|
16
16
|
|
17
17
|
class SearchRequestOptionsRequest(pydantic.BaseModel):
|
18
|
-
limit: typing.Optional[int] = pydantic.Field(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
limit: typing.Optional[int] = pydantic.Field(default=None)
|
19
|
+
"""
|
20
|
+
The maximum number of results to return.
|
21
|
+
"""
|
22
|
+
|
23
|
+
weights: typing.Optional[SearchWeightsRequest] = pydantic.Field(default=None)
|
24
|
+
"""
|
25
|
+
The weights to use for the search. Must add up to 1.0.
|
26
|
+
"""
|
27
|
+
|
28
|
+
result_merging: typing.Optional[SearchResultMergingRequest] = pydantic.Field(default=None)
|
29
|
+
"""
|
30
|
+
The configuration for merging results.
|
31
|
+
"""
|
32
|
+
|
33
|
+
filters: typing.Optional[SearchFiltersRequest] = pydantic.Field(default=None)
|
34
|
+
"""
|
35
|
+
The filters to apply to the search.
|
36
|
+
"""
|
26
37
|
|
27
38
|
def json(self, **kwargs: typing.Any) -> str:
|
28
39
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -35,4 +46,5 @@ class SearchRequestOptionsRequest(pydantic.BaseModel):
|
|
35
46
|
class Config:
|
36
47
|
frozen = True
|
37
48
|
smart_union = True
|
49
|
+
extra = pydantic.Extra.allow
|
38
50
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/search_response.py
CHANGED
@@ -13,9 +13,10 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SearchResponse(pydantic.BaseModel):
|
16
|
-
results: typing.List[SearchResult] = pydantic.Field(
|
17
|
-
|
18
|
-
|
16
|
+
results: typing.List[SearchResult] = pydantic.Field()
|
17
|
+
"""
|
18
|
+
The results of the search. Each result represents a chunk that matches the search query.
|
19
|
+
"""
|
19
20
|
|
20
21
|
def json(self, **kwargs: typing.Any) -> str:
|
21
22
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -28,4 +29,5 @@ class SearchResponse(pydantic.BaseModel):
|
|
28
29
|
class Config:
|
29
30
|
frozen = True
|
30
31
|
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
31
33
|
json_encoders = {dt.datetime: serialize_datetime}
|