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
vellum/types/search_result.py
CHANGED
@@ -13,12 +13,21 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SearchResult(pydantic.BaseModel):
|
16
|
-
text: str = pydantic.Field(
|
17
|
-
|
16
|
+
text: str = pydantic.Field()
|
17
|
+
"""
|
18
|
+
The text of the chunk that matched the search query.
|
19
|
+
"""
|
20
|
+
|
21
|
+
score: float = pydantic.Field()
|
22
|
+
"""
|
23
|
+
A score representing how well the chunk matches the search query.
|
24
|
+
"""
|
25
|
+
|
18
26
|
keywords: typing.List[str]
|
19
|
-
document: SearchResultDocument = pydantic.Field(
|
20
|
-
|
21
|
-
|
27
|
+
document: SearchResultDocument = pydantic.Field()
|
28
|
+
"""
|
29
|
+
The document that contains the chunk that matched the search query.
|
30
|
+
"""
|
22
31
|
|
23
32
|
def json(self, **kwargs: typing.Any) -> str:
|
24
33
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +40,5 @@ class SearchResult(pydantic.BaseModel):
|
|
31
40
|
class Config:
|
32
41
|
frozen = True
|
33
42
|
smart_union = True
|
43
|
+
extra = pydantic.Extra.allow
|
34
44
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,14 +12,25 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SearchResultDocument(pydantic.BaseModel):
|
15
|
-
id: str = pydantic.Field(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
id: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The ID of the document.
|
18
|
+
"""
|
19
|
+
|
20
|
+
label: str = pydantic.Field()
|
21
|
+
"""
|
22
|
+
The human-readable name for the document.
|
23
|
+
"""
|
24
|
+
|
25
|
+
external_id: typing.Optional[str] = pydantic.Field(default=None)
|
26
|
+
"""
|
27
|
+
The unique ID of the document as represented in an external system and specified when it was originally uploaded.
|
28
|
+
"""
|
29
|
+
|
30
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
31
|
+
"""
|
32
|
+
A previously supplied JSON object containing metadata that can be filtered on when searching.
|
33
|
+
"""
|
23
34
|
|
24
35
|
def json(self, **kwargs: typing.Any) -> str:
|
25
36
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -32,4 +43,5 @@ class SearchResultDocument(pydantic.BaseModel):
|
|
32
43
|
class Config:
|
33
44
|
frozen = True
|
34
45
|
smart_union = True
|
46
|
+
extra = pydantic.Extra.allow
|
35
47
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,13 +12,20 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SearchResultDocumentRequest(pydantic.BaseModel):
|
15
|
-
label: str = pydantic.Field(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
label: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The human-readable name for the document.
|
18
|
+
"""
|
19
|
+
|
20
|
+
external_id: typing.Optional[str] = pydantic.Field(default=None)
|
21
|
+
"""
|
22
|
+
The unique ID of the document as represented in an external system and specified when it was originally uploaded.
|
23
|
+
"""
|
24
|
+
|
25
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
26
|
+
"""
|
27
|
+
A previously supplied JSON object containing metadata that can be filtered on when searching.
|
28
|
+
"""
|
22
29
|
|
23
30
|
def json(self, **kwargs: typing.Any) -> str:
|
24
31
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +38,5 @@ class SearchResultDocumentRequest(pydantic.BaseModel):
|
|
31
38
|
class Config:
|
32
39
|
frozen = True
|
33
40
|
smart_union = True
|
41
|
+
extra = pydantic.Extra.allow
|
34
42
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,7 +12,10 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SearchResultMergingRequest(pydantic.BaseModel):
|
15
|
-
enabled: typing.Optional[bool] = pydantic.Field(
|
15
|
+
enabled: typing.Optional[bool] = pydantic.Field(default=None)
|
16
|
+
"""
|
17
|
+
Whether to enable merging results
|
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 SearchResultMergingRequest(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,21 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SearchResultRequest(pydantic.BaseModel):
|
16
|
-
text: str = pydantic.Field(
|
17
|
-
|
16
|
+
text: str = pydantic.Field()
|
17
|
+
"""
|
18
|
+
The text of the chunk that matched the search query.
|
19
|
+
"""
|
20
|
+
|
21
|
+
score: float = pydantic.Field()
|
22
|
+
"""
|
23
|
+
A score representing how well the chunk matches the search query.
|
24
|
+
"""
|
25
|
+
|
18
26
|
keywords: typing.List[str]
|
19
|
-
document: SearchResultDocumentRequest = pydantic.Field(
|
20
|
-
|
21
|
-
|
27
|
+
document: SearchResultDocumentRequest = pydantic.Field()
|
28
|
+
"""
|
29
|
+
The document that contains the chunk that matched the search query.
|
30
|
+
"""
|
22
31
|
|
23
32
|
def json(self, **kwargs: typing.Any) -> str:
|
24
33
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -31,4 +40,5 @@ class SearchResultRequest(pydantic.BaseModel):
|
|
31
40
|
class Config:
|
32
41
|
frozen = True
|
33
42
|
smart_union = True
|
43
|
+
extra = pydantic.Extra.allow
|
34
44
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -13,7 +13,7 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class SearchResultsVariableValue(pydantic.BaseModel):
|
16
|
-
value: typing.Optional[typing.List[SearchResult]]
|
16
|
+
value: typing.Optional[typing.List[SearchResult]] = None
|
17
17
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
19
19
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -26,4 +26,5 @@ class SearchResultsVariableValue(pydantic.BaseModel):
|
|
26
26
|
class Config:
|
27
27
|
frozen = True
|
28
28
|
smart_union = True
|
29
|
+
extra = pydantic.Extra.allow
|
29
30
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,10 +12,15 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SearchWeightsRequest(pydantic.BaseModel):
|
15
|
-
semantic_similarity: typing.Optional[float] = pydantic.Field(
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
semantic_similarity: typing.Optional[float] = pydantic.Field(default=None)
|
16
|
+
"""
|
17
|
+
The relative weight to give to semantic similarity
|
18
|
+
"""
|
19
|
+
|
20
|
+
keywords: typing.Optional[float] = pydantic.Field(default=None)
|
21
|
+
"""
|
22
|
+
The relative weight to give to keywords
|
23
|
+
"""
|
19
24
|
|
20
25
|
def json(self, **kwargs: typing.Any) -> str:
|
21
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -28,4 +33,5 @@ class SearchWeightsRequest(pydantic.BaseModel):
|
|
28
33
|
class Config:
|
29
34
|
frozen = True
|
30
35
|
smart_union = True
|
36
|
+
extra = pydantic.Extra.allow
|
31
37
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -17,20 +17,33 @@ except ImportError:
|
|
17
17
|
class SlimDeploymentRead(pydantic.BaseModel):
|
18
18
|
id: str
|
19
19
|
created: dt.datetime
|
20
|
-
label: str = pydantic.Field(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
20
|
+
label: str = pydantic.Field()
|
21
|
+
"""
|
22
|
+
A human-readable label for the deployment
|
23
|
+
"""
|
24
|
+
|
25
|
+
name: str = pydantic.Field()
|
26
|
+
"""
|
27
|
+
A name that uniquely identifies this deployment within its workspace
|
28
|
+
"""
|
29
|
+
|
30
|
+
status: typing.Optional[EntityStatus] = pydantic.Field(default=None)
|
31
|
+
"""
|
32
|
+
The current status of the deployment
|
33
|
+
|
34
|
+
- `ACTIVE` - Active
|
35
|
+
- `ARCHIVED` - Archived
|
36
|
+
"""
|
37
|
+
|
38
|
+
environment: typing.Optional[EnvironmentEnum] = pydantic.Field(default=None)
|
39
|
+
"""
|
40
|
+
The environment this deployment is used in
|
41
|
+
|
42
|
+
- `DEVELOPMENT` - Development
|
43
|
+
- `STAGING` - Staging
|
44
|
+
- `PRODUCTION` - Production
|
45
|
+
"""
|
46
|
+
|
34
47
|
last_deployed_on: dt.datetime
|
35
48
|
input_variables: typing.List[VellumVariable]
|
36
49
|
|
@@ -45,4 +58,5 @@ class SlimDeploymentRead(pydantic.BaseModel):
|
|
45
58
|
class Config:
|
46
59
|
frozen = True
|
47
60
|
smart_union = True
|
61
|
+
extra = pydantic.Extra.allow
|
48
62
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/slim_document.py
CHANGED
@@ -16,41 +16,61 @@ except ImportError:
|
|
16
16
|
|
17
17
|
|
18
18
|
class SlimDocument(pydantic.BaseModel):
|
19
|
-
id: str = pydantic.Field(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
19
|
+
id: str = pydantic.Field()
|
20
|
+
"""
|
21
|
+
Vellum-generated ID that uniquely identifies this document.
|
22
|
+
"""
|
23
|
+
|
24
|
+
external_id: typing.Optional[str] = pydantic.Field(default=None)
|
25
|
+
"""
|
26
|
+
The external ID that was originally provided when uploading the document.
|
27
|
+
"""
|
28
|
+
|
29
|
+
last_uploaded_at: dt.datetime = pydantic.Field()
|
30
|
+
"""
|
31
|
+
A timestamp representing when this document was most recently uploaded.
|
32
|
+
"""
|
33
|
+
|
34
|
+
label: str = pydantic.Field()
|
35
|
+
"""
|
36
|
+
Human-friendly name for this document.
|
37
|
+
"""
|
38
|
+
|
39
|
+
processing_state: typing.Optional[ProcessingStateEnum] = pydantic.Field(default=None)
|
40
|
+
"""
|
41
|
+
An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle.
|
42
|
+
|
43
|
+
- `QUEUED` - Queued
|
44
|
+
- `PROCESSING` - Processing
|
45
|
+
- `PROCESSED` - Processed
|
46
|
+
- `FAILED` - Failed
|
47
|
+
"""
|
48
|
+
|
49
|
+
processing_failure_reason: typing.Optional[ProcessingFailureReasonEnum] = pydantic.Field(default=None)
|
50
|
+
"""
|
51
|
+
An enum value representing why the document could not be processed. Is null unless processing_state is FAILED.
|
52
|
+
|
53
|
+
- `EXCEEDED_CHARACTER_LIMIT` - Exceeded Character Limit
|
54
|
+
- `INVALID_FILE` - Invalid File
|
55
|
+
"""
|
56
|
+
|
57
|
+
status: typing.Optional[DocumentStatus] = pydantic.Field(default=None)
|
58
|
+
"""
|
59
|
+
The document's current status.
|
60
|
+
|
61
|
+
- `ACTIVE` - Active
|
62
|
+
"""
|
63
|
+
|
64
|
+
keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
65
|
+
"""
|
66
|
+
A list of keywords associated with this document. Originally provided when uploading the document.
|
67
|
+
"""
|
68
|
+
|
69
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
70
|
+
"""
|
71
|
+
A previously supplied JSON object containing metadata that can be filtered on when searching.
|
72
|
+
"""
|
73
|
+
|
54
74
|
document_to_document_indexes: typing.List[DocumentDocumentToDocumentIndex]
|
55
75
|
|
56
76
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -64,4 +84,5 @@ class SlimDocument(pydantic.BaseModel):
|
|
64
84
|
class Config:
|
65
85
|
frozen = True
|
66
86
|
smart_union = True
|
87
|
+
extra = pydantic.Extra.allow
|
67
88
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -16,32 +16,44 @@ except ImportError:
|
|
16
16
|
|
17
17
|
class SlimWorkflowDeployment(pydantic.BaseModel):
|
18
18
|
id: str
|
19
|
-
name: str = pydantic.Field(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
19
|
+
name: str = pydantic.Field()
|
20
|
+
"""
|
21
|
+
A name that uniquely identifies this workflow deployment within its workspace
|
22
|
+
"""
|
23
|
+
|
24
|
+
label: str = pydantic.Field()
|
25
|
+
"""
|
26
|
+
A human-readable label for the workflow deployment
|
27
|
+
"""
|
28
|
+
|
29
|
+
status: typing.Optional[EntityStatus] = pydantic.Field(default=None)
|
30
|
+
"""
|
31
|
+
The current status of the workflow deployment
|
32
|
+
|
33
|
+
- `ACTIVE` - Active
|
34
|
+
- `ARCHIVED` - Archived
|
35
|
+
"""
|
36
|
+
|
37
|
+
environment: typing.Optional[EnvironmentEnum] = pydantic.Field(default=None)
|
38
|
+
"""
|
39
|
+
The environment this workflow deployment is used in
|
40
|
+
|
41
|
+
- `DEVELOPMENT` - Development
|
42
|
+
- `STAGING` - Staging
|
43
|
+
- `PRODUCTION` - Production
|
44
|
+
"""
|
45
|
+
|
37
46
|
created: dt.datetime
|
38
47
|
last_deployed_on: dt.datetime
|
39
|
-
input_variables: typing.List[VellumVariable] = pydantic.Field(
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
)
|
48
|
+
input_variables: typing.List[VellumVariable] = pydantic.Field()
|
49
|
+
"""
|
50
|
+
The input variables this Workflow Deployment expects to receive values for when it is executed.
|
51
|
+
"""
|
52
|
+
|
53
|
+
output_variables: typing.List[VellumVariable] = pydantic.Field()
|
54
|
+
"""
|
55
|
+
The output variables this Workflow Deployment will produce when it is executed.
|
56
|
+
"""
|
45
57
|
|
46
58
|
def json(self, **kwargs: typing.Any) -> str:
|
47
59
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -54,4 +66,5 @@ class SlimWorkflowDeployment(pydantic.BaseModel):
|
|
54
66
|
class Config:
|
55
67
|
frozen = True
|
56
68
|
smart_union = True
|
69
|
+
extra = pydantic.Extra.allow
|
57
70
|
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/streaming_enum.py
CHANGED
@@ -21,10 +21,11 @@ class StreamingExecutePromptEvent(pydantic.BaseModel):
|
|
21
21
|
output: PromptOutput
|
22
22
|
output_index: int
|
23
23
|
execution_id: str
|
24
|
-
meta: typing.Optional[StreamingPromptExecutionMeta]
|
25
|
-
raw: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(
|
26
|
-
|
27
|
-
|
24
|
+
meta: typing.Optional[StreamingPromptExecutionMeta] = None
|
25
|
+
raw: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
26
|
+
"""
|
27
|
+
The subset of the raw response from the model that the request opted into with `expand_raw`.
|
28
|
+
"""
|
28
29
|
|
29
30
|
def json(self, **kwargs: typing.Any) -> str:
|
30
31
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -37,4 +38,5 @@ class StreamingExecutePromptEvent(pydantic.BaseModel):
|
|
37
38
|
class Config:
|
38
39
|
frozen = True
|
39
40
|
smart_union = True
|
41
|
+
extra = pydantic.Extra.allow
|
40
42
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -16,7 +16,7 @@ class StreamingPromptExecutionMeta(pydantic.BaseModel):
|
|
16
16
|
The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
|
17
17
|
"""
|
18
18
|
|
19
|
-
latency: typing.Optional[int]
|
19
|
+
latency: typing.Optional[int] = None
|
20
20
|
|
21
21
|
def json(self, **kwargs: typing.Any) -> str:
|
22
22
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -29,4 +29,5 @@ class StreamingPromptExecutionMeta(pydantic.BaseModel):
|
|
29
29
|
class Config:
|
30
30
|
frozen = True
|
31
31
|
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
32
33
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -21,11 +21,11 @@ class StreamingWorkflowNodeResultEvent(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]
|
27
|
-
output: typing.Optional[NodeOutputCompiledValue]
|
28
|
-
output_index: typing.Optional[int]
|
24
|
+
ts: typing.Optional[dt.datetime] = None
|
25
|
+
data: typing.Optional[WorkflowNodeResultData] = None
|
26
|
+
source_execution_id: typing.Optional[str] = None
|
27
|
+
output: typing.Optional[NodeOutputCompiledValue] = None
|
28
|
+
output_index: typing.Optional[int] = 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,4 +38,5 @@ class StreamingWorkflowNodeResultEvent(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}
|
vellum/types/string_enum.py
CHANGED
@@ -16,7 +16,11 @@ class StringInputRequest(pydantic.BaseModel):
|
|
16
16
|
A user input representing a string value
|
17
17
|
"""
|
18
18
|
|
19
|
-
name: str = pydantic.Field(
|
19
|
+
name: str = pydantic.Field()
|
20
|
+
"""
|
21
|
+
The variable's name, as defined in the deployment.
|
22
|
+
"""
|
23
|
+
|
20
24
|
value: str
|
21
25
|
|
22
26
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -30,4 +34,5 @@ class StringInputRequest(pydantic.BaseModel):
|
|
30
34
|
class Config:
|
31
35
|
frozen = True
|
32
36
|
smart_union = True
|
37
|
+
extra = pydantic.Extra.allow
|
33
38
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,7 +12,7 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class StringVariableValue(pydantic.BaseModel):
|
15
|
-
value: typing.Optional[str]
|
15
|
+
value: typing.Optional[str] = None
|
16
16
|
|
17
17
|
def json(self, **kwargs: typing.Any) -> str:
|
18
18
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -25,4 +25,5 @@ class StringVariableValue(pydantic.BaseModel):
|
|
25
25
|
class Config:
|
26
26
|
frozen = True
|
27
27
|
smart_union = True
|
28
|
+
extra = pydantic.Extra.allow
|
28
29
|
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,19 +12,30 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class SubmitCompletionActualRequest(pydantic.BaseModel):
|
15
|
-
id: typing.Optional[str] = pydantic.Field(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
15
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
16
|
+
"""
|
17
|
+
The Vellum-generated ID of a previously generated completion. Must provide either this or external_id.
|
18
|
+
"""
|
19
|
+
|
20
|
+
external_id: typing.Optional[str] = pydantic.Field(default=None)
|
21
|
+
"""
|
22
|
+
The external ID that was originally provided when generating the completion that you'd now like to submit actuals for. Must provide either this or id.
|
23
|
+
"""
|
24
|
+
|
25
|
+
text: typing.Optional[str] = pydantic.Field(default=None)
|
26
|
+
"""
|
27
|
+
Text representing what the completion _should_ have been.
|
28
|
+
"""
|
29
|
+
|
30
|
+
quality: typing.Optional[float] = pydantic.Field(default=None)
|
31
|
+
"""
|
32
|
+
A number between 0 and 1 representing the quality of the completion. 0 is the worst, 1 is the best.
|
33
|
+
"""
|
34
|
+
|
35
|
+
timestamp: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
36
|
+
"""
|
37
|
+
Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes.
|
38
|
+
"""
|
28
39
|
|
29
40
|
def json(self, **kwargs: typing.Any) -> str:
|
30
41
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -37,4 +48,5 @@ class SubmitCompletionActualRequest(pydantic.BaseModel):
|
|
37
48
|
class Config:
|
38
49
|
frozen = True
|
39
50
|
smart_union = True
|
51
|
+
extra = pydantic.Extra.allow
|
40
52
|
json_encoders = {dt.datetime: serialize_datetime}
|