vellum-ai 0.7.2__py3-none-any.whl → 0.7.5__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +146 -94
- vellum/client.py +1051 -1097
- vellum/core/__init__.py +4 -1
- vellum/core/client_wrapper.py +7 -3
- vellum/core/http_client.py +365 -20
- vellum/core/jsonable_encoder.py +3 -0
- vellum/core/pydantic_utilities.py +16 -0
- vellum/core/query_encoder.py +33 -0
- vellum/core/remove_none_from_dict.py +2 -2
- vellum/core/request_options.py +2 -2
- vellum/resources/__init__.py +2 -0
- vellum/resources/deployments/client.py +354 -371
- vellum/resources/document_indexes/client.py +542 -610
- vellum/resources/documents/client.py +327 -399
- vellum/resources/folder_entities/client.py +56 -72
- vellum/{types/map_enum.py → resources/ml_models/__init__.py} +0 -3
- vellum/resources/ml_models/client.py +837 -0
- vellum/resources/sandboxes/client.py +204 -242
- vellum/resources/test_suite_runs/client.py +183 -213
- vellum/resources/test_suites/client.py +307 -311
- vellum/resources/workflow_deployments/client.py +230 -268
- vellum/resources/workflow_sandboxes/client.py +82 -96
- vellum/terraform/_jsii/vellum-ai_vellum@0.0.0.jsii.tgz +0 -0
- vellum/terraform/data_vellum_document_index/__init__.py +10 -10
- vellum/terraform/document_index/__init__.py +17 -17
- vellum/terraform/provider/__init__.py +57 -12
- vellum/terraform/versions.json +1 -1
- vellum/types/__init__.py +152 -96
- vellum/types/api_node_result.py +7 -3
- vellum/types/api_node_result_data.py +7 -3
- vellum/types/array_chat_message_content.py +7 -3
- vellum/types/array_chat_message_content_item.py +53 -12
- vellum/types/array_chat_message_content_item_request.py +53 -12
- vellum/types/array_chat_message_content_request.py +7 -3
- vellum/types/array_parameter_config.py +50 -0
- vellum/types/array_parameter_config_request.py +50 -0
- vellum/types/array_variable_value_item.py +102 -24
- vellum/types/array_vellum_value_item.py +102 -24
- vellum/types/array_vellum_value_item_request.py +102 -24
- vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +7 -3
- vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +7 -3
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +7 -3
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +7 -3
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +7 -3
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +7 -3
- vellum/types/boolean_parameter_config.py +35 -0
- vellum/types/boolean_parameter_config_request.py +35 -0
- vellum/types/chat_history_input_request.py +7 -3
- vellum/types/chat_message.py +7 -3
- vellum/types/chat_message_content.py +70 -16
- vellum/types/chat_message_content_request.py +70 -16
- vellum/types/chat_message_request.py +7 -3
- vellum/types/code_execution_node_array_result.py +7 -3
- vellum/types/code_execution_node_chat_history_result.py +7 -3
- vellum/types/code_execution_node_error_result.py +7 -3
- vellum/types/code_execution_node_function_call_result.py +7 -3
- vellum/types/code_execution_node_json_result.py +7 -3
- vellum/types/code_execution_node_number_result.py +7 -3
- vellum/types/code_execution_node_result.py +7 -3
- vellum/types/code_execution_node_result_data.py +7 -3
- vellum/types/code_execution_node_result_output.py +144 -32
- vellum/types/code_execution_node_search_results_result.py +7 -3
- vellum/types/code_execution_node_string_result.py +7 -3
- vellum/types/compile_prompt_deployment_expand_meta_request.py +42 -0
- vellum/types/compile_prompt_meta.py +35 -0
- vellum/types/conditional_node_result.py +7 -3
- vellum/types/conditional_node_result_data.py +7 -3
- vellum/types/const_parameter_config.py +35 -0
- vellum/types/const_parameter_config_request.py +35 -0
- vellum/types/create_test_suite_test_case_request.py +7 -3
- vellum/types/deployment_provider_payload_response.py +9 -3
- vellum/types/deployment_read.py +12 -3
- vellum/types/deployment_release_tag_deployment_history_item.py +7 -3
- vellum/types/deployment_release_tag_read.py +7 -3
- vellum/types/document_document_to_document_index.py +7 -3
- vellum/types/document_index_chunking.py +54 -12
- vellum/types/document_index_chunking_request.py +54 -12
- vellum/types/document_index_indexing_config.py +7 -3
- vellum/types/document_index_indexing_config_request.py +7 -3
- vellum/types/document_index_read.py +7 -3
- vellum/types/document_read.py +7 -3
- vellum/types/enriched_normalized_completion.py +7 -3
- vellum/types/error_variable_value.py +7 -3
- vellum/types/error_vellum_value.py +7 -3
- vellum/types/error_vellum_value_request.py +7 -3
- vellum/types/execute_prompt_event.py +82 -16
- vellum/types/execute_prompt_response.py +44 -8
- vellum/types/execute_workflow_response.py +7 -3
- vellum/types/execute_workflow_workflow_result_event.py +41 -8
- vellum/types/execution_array_vellum_value.py +7 -3
- vellum/types/execution_chat_history_vellum_value.py +7 -3
- vellum/types/execution_error_vellum_value.py +7 -3
- vellum/types/execution_function_call_vellum_value.py +7 -3
- vellum/types/execution_json_vellum_value.py +7 -3
- vellum/types/execution_number_vellum_value.py +7 -3
- vellum/types/execution_search_results_vellum_value.py +7 -3
- vellum/types/execution_string_vellum_value.py +7 -3
- vellum/types/execution_vellum_value.py +152 -32
- vellum/types/external_test_case_execution.py +7 -3
- vellum/types/external_test_case_execution_request.py +7 -3
- vellum/types/fulfilled_execute_prompt_event.py +7 -3
- vellum/types/fulfilled_execute_prompt_response.py +7 -3
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +7 -3
- vellum/types/fulfilled_prompt_execution_meta.py +7 -3
- vellum/types/fulfilled_workflow_node_result_event.py +7 -3
- vellum/types/function_call.py +7 -3
- vellum/types/function_call_chat_message_content.py +7 -3
- vellum/types/function_call_chat_message_content_request.py +7 -3
- vellum/types/function_call_chat_message_content_value.py +7 -3
- vellum/types/function_call_chat_message_content_value_request.py +7 -3
- vellum/types/function_call_request.py +7 -3
- vellum/types/function_call_variable_value.py +7 -3
- vellum/types/function_call_vellum_value.py +7 -3
- vellum/types/function_call_vellum_value_request.py +7 -3
- vellum/types/generate_options_request.py +7 -3
- vellum/types/generate_request.py +7 -3
- vellum/types/generate_result.py +7 -3
- vellum/types/generate_result_data.py +7 -3
- vellum/types/generate_result_error.py +7 -3
- vellum/types/generate_stream_response.py +7 -3
- vellum/types/generate_stream_result.py +7 -3
- vellum/types/generate_stream_result_data.py +7 -3
- vellum/types/hkunlp_instructor_xl_vectorizer.py +7 -3
- vellum/types/hkunlp_instructor_xl_vectorizer_request.py +7 -3
- vellum/types/hosted_by_enum.py +26 -0
- vellum/types/hugging_face_tokenizer_config.py +34 -0
- vellum/types/hugging_face_tokenizer_config_request.py +34 -0
- vellum/types/image_chat_message_content.py +7 -3
- vellum/types/image_chat_message_content_request.py +7 -3
- vellum/types/image_variable_value.py +7 -3
- vellum/types/image_vellum_value.py +7 -3
- vellum/types/image_vellum_value_request.py +7 -3
- vellum/types/indexing_config_vectorizer.py +117 -36
- vellum/types/indexing_config_vectorizer_request.py +117 -36
- vellum/types/initiated_execute_prompt_event.py +7 -3
- vellum/types/initiated_prompt_execution_meta.py +7 -3
- vellum/types/initiated_workflow_node_result_event.py +7 -3
- vellum/types/instructor_vectorizer_config.py +7 -3
- vellum/types/instructor_vectorizer_config_request.py +7 -3
- vellum/types/integer_parameter_config.py +39 -0
- vellum/types/integer_parameter_config_request.py +39 -0
- vellum/types/json_input_request.py +7 -3
- vellum/types/json_variable_value.py +7 -3
- vellum/types/json_vellum_value.py +7 -3
- vellum/types/json_vellum_value_request.py +7 -3
- vellum/types/map_node_result.py +7 -3
- vellum/types/map_node_result_data.py +7 -3
- vellum/types/merge_node_result.py +7 -3
- vellum/types/merge_node_result_data.py +7 -3
- vellum/types/metadata_filter_config_request.py +7 -3
- vellum/types/metadata_filter_rule_request.py +7 -3
- vellum/types/metric_node_result.py +7 -3
- vellum/types/{execute_workflow_stream_error_response.py → ml_model_build_config.py} +9 -8
- vellum/types/{execute_prompt_api_error_response.py → ml_model_build_config_request.py} +9 -8
- vellum/types/ml_model_developer.py +27 -0
- vellum/types/ml_model_developer_enum_value_label.py +31 -0
- vellum/types/ml_model_display_config_labelled.py +33 -0
- vellum/types/ml_model_display_config_request.py +33 -0
- vellum/types/ml_model_display_tag.py +7 -0
- vellum/types/ml_model_display_tag_enum_value_label.py +31 -0
- vellum/types/ml_model_exec_config.py +40 -0
- vellum/types/ml_model_exec_config_request.py +40 -0
- vellum/types/ml_model_family.py +29 -0
- vellum/types/ml_model_family_enum_value_label.py +31 -0
- vellum/types/ml_model_feature.py +18 -0
- vellum/types/ml_model_parameter_config.py +42 -0
- vellum/types/ml_model_parameter_config_request.py +42 -0
- vellum/types/ml_model_read.py +108 -0
- vellum/types/ml_model_request_authorization_config.py +30 -0
- vellum/types/ml_model_request_authorization_config_request.py +30 -0
- vellum/types/ml_model_request_authorization_config_type_enum.py +5 -0
- vellum/types/ml_model_request_config.py +32 -0
- vellum/types/ml_model_request_config_request.py +32 -0
- vellum/types/ml_model_response_config.py +31 -0
- vellum/types/ml_model_response_config_request.py +31 -0
- vellum/types/ml_model_tokenizer_config.py +59 -0
- vellum/types/ml_model_tokenizer_config_request.py +61 -0
- vellum/types/ml_model_usage.py +7 -3
- vellum/types/named_scenario_input_chat_history_variable_value_request.py +7 -3
- vellum/types/named_scenario_input_request.py +38 -8
- vellum/types/named_scenario_input_string_variable_value_request.py +7 -3
- vellum/types/named_test_case_array_variable_value.py +7 -3
- vellum/types/named_test_case_array_variable_value_request.py +7 -3
- vellum/types/named_test_case_chat_history_variable_value.py +7 -3
- vellum/types/named_test_case_chat_history_variable_value_request.py +7 -3
- vellum/types/named_test_case_error_variable_value.py +7 -3
- vellum/types/named_test_case_error_variable_value_request.py +7 -3
- vellum/types/named_test_case_function_call_variable_value.py +7 -3
- vellum/types/named_test_case_function_call_variable_value_request.py +7 -3
- vellum/types/named_test_case_json_variable_value.py +7 -3
- vellum/types/named_test_case_json_variable_value_request.py +7 -3
- vellum/types/named_test_case_number_variable_value.py +7 -3
- vellum/types/named_test_case_number_variable_value_request.py +7 -3
- vellum/types/named_test_case_search_results_variable_value.py +7 -3
- vellum/types/named_test_case_search_results_variable_value_request.py +7 -3
- vellum/types/named_test_case_string_variable_value.py +7 -3
- vellum/types/named_test_case_string_variable_value_request.py +7 -3
- vellum/types/named_test_case_variable_value.py +144 -32
- vellum/types/named_test_case_variable_value_request.py +144 -32
- vellum/types/node_input_compiled_array_value.py +7 -3
- vellum/types/node_input_compiled_chat_history_value.py +7 -3
- vellum/types/node_input_compiled_error_value.py +7 -3
- vellum/types/node_input_compiled_function_call.py +7 -3
- vellum/types/node_input_compiled_json_value.py +7 -3
- vellum/types/node_input_compiled_number_value.py +7 -3
- vellum/types/node_input_compiled_search_results_value.py +7 -3
- vellum/types/node_input_compiled_string_value.py +7 -3
- vellum/types/node_input_variable_compiled_value.py +152 -32
- vellum/types/node_output_compiled_array_value.py +7 -3
- vellum/types/node_output_compiled_chat_history_value.py +7 -3
- vellum/types/node_output_compiled_error_value.py +7 -3
- vellum/types/node_output_compiled_function_call_value.py +7 -3
- vellum/types/node_output_compiled_json_value.py +7 -3
- vellum/types/node_output_compiled_number_value.py +7 -3
- vellum/types/node_output_compiled_search_results_value.py +7 -3
- vellum/types/node_output_compiled_string_value.py +7 -3
- vellum/types/node_output_compiled_value.py +153 -32
- vellum/types/normalized_log_probs.py +7 -3
- vellum/types/normalized_token_log_probs.py +7 -3
- vellum/types/number_parameter_config.py +40 -0
- vellum/types/number_parameter_config_request.py +40 -0
- vellum/types/number_variable_value.py +7 -3
- vellum/types/number_vellum_value.py +7 -3
- vellum/types/number_vellum_value_request.py +7 -3
- vellum/types/object_parameter_config.py +49 -0
- vellum/types/object_parameter_config_request.py +49 -0
- vellum/types/one_of_parameter_config.py +44 -0
- vellum/types/one_of_parameter_config_request.py +44 -0
- vellum/types/open_ai_vectorizer_config.py +7 -3
- vellum/types/open_ai_vectorizer_config_request.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_3_large.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_3_large_request.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_3_small.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_3_small_request.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_ada_002.py +7 -3
- vellum/types/open_ai_vectorizer_text_embedding_ada_002_request.py +7 -3
- vellum/types/paginated_document_index_read_list.py +7 -3
- vellum/types/paginated_ml_model_read_list.py +33 -0
- vellum/types/paginated_slim_deployment_read_list.py +7 -3
- vellum/types/paginated_slim_document_list.py +7 -3
- vellum/types/paginated_slim_workflow_deployment_list.py +7 -3
- vellum/types/paginated_test_suite_run_execution_list.py +7 -3
- vellum/types/paginated_test_suite_test_case_list.py +7 -3
- vellum/types/parameter_config.py +251 -0
- vellum/types/parameter_config_request.py +251 -0
- vellum/types/pdf_search_result_meta_source.py +7 -3
- vellum/types/pdf_search_result_meta_source_request.py +7 -3
- vellum/types/prompt_deployment_expand_meta_request_request.py +7 -3
- vellum/types/prompt_deployment_input_request.py +55 -12
- vellum/types/prompt_execution_meta.py +7 -3
- vellum/types/prompt_node_execution_meta.py +7 -3
- vellum/types/prompt_node_result.py +7 -3
- vellum/types/prompt_node_result_data.py +7 -3
- vellum/types/prompt_output.py +69 -16
- vellum/types/raw_prompt_execution_overrides_request.py +7 -3
- vellum/types/reducto_chunker_config.py +7 -3
- vellum/types/reducto_chunker_config_request.py +7 -3
- vellum/types/reducto_chunking.py +7 -3
- vellum/types/reducto_chunking_request.py +7 -3
- vellum/types/rejected_execute_prompt_event.py +7 -3
- vellum/types/rejected_execute_prompt_response.py +7 -3
- vellum/types/rejected_execute_workflow_workflow_result_event.py +7 -3
- vellum/types/rejected_prompt_execution_meta.py +7 -3
- vellum/types/rejected_workflow_node_result_event.py +7 -3
- vellum/types/replace_test_suite_test_case_request.py +7 -3
- vellum/types/sandbox_scenario.py +7 -3
- vellum/types/scenario_input.py +38 -8
- vellum/types/scenario_input_chat_history_variable_value.py +7 -3
- vellum/types/scenario_input_string_variable_value.py +7 -3
- vellum/types/search_filters_request.py +7 -3
- vellum/types/search_node_result.py +7 -3
- vellum/types/search_node_result_data.py +7 -3
- vellum/types/search_request_options_request.py +7 -3
- vellum/types/search_response.py +7 -3
- vellum/types/search_result.py +7 -3
- vellum/types/search_result_document.py +7 -3
- vellum/types/search_result_document_request.py +7 -3
- vellum/types/search_result_merging_request.py +7 -3
- vellum/types/search_result_meta.py +7 -3
- vellum/types/search_result_meta_request.py +7 -3
- vellum/types/search_result_meta_source.py +21 -5
- vellum/types/search_result_meta_source_request.py +21 -5
- vellum/types/search_result_request.py +7 -3
- vellum/types/search_weights_request.py +7 -3
- vellum/types/sentence_chunker_config.py +7 -3
- vellum/types/sentence_chunker_config_request.py +7 -3
- vellum/types/sentence_chunking.py +7 -3
- vellum/types/sentence_chunking_request.py +7 -3
- vellum/types/slim_deployment_read.py +11 -3
- vellum/types/slim_document.py +7 -3
- vellum/types/slim_workflow_deployment.py +12 -3
- vellum/types/streaming_execute_prompt_event.py +7 -3
- vellum/types/streaming_prompt_execution_meta.py +7 -3
- vellum/types/streaming_workflow_node_result_event.py +7 -3
- vellum/types/string_chat_message_content.py +7 -3
- vellum/types/string_chat_message_content_request.py +7 -3
- vellum/types/string_input_request.py +7 -3
- vellum/types/string_parameter_config.py +39 -0
- vellum/types/string_parameter_config_request.py +39 -0
- vellum/types/string_variable_value.py +7 -3
- vellum/types/string_vellum_value.py +7 -3
- vellum/types/string_vellum_value_request.py +7 -3
- vellum/types/submit_completion_actual_request.py +7 -3
- vellum/types/submit_workflow_execution_actual_request.py +67 -12
- vellum/types/subworkflow_node_result.py +7 -3
- vellum/types/subworkflow_node_result_data.py +7 -3
- vellum/types/templating_node_array_result.py +7 -3
- vellum/types/templating_node_chat_history_result.py +7 -3
- vellum/types/templating_node_error_result.py +7 -3
- vellum/types/templating_node_function_call_result.py +7 -3
- vellum/types/templating_node_json_result.py +7 -3
- vellum/types/templating_node_number_result.py +7 -3
- vellum/types/templating_node_result.py +7 -3
- vellum/types/templating_node_result_data.py +7 -3
- vellum/types/templating_node_result_output.py +144 -32
- vellum/types/templating_node_search_results_result.py +7 -3
- vellum/types/templating_node_string_result.py +7 -3
- vellum/types/terminal_node_array_result.py +7 -3
- vellum/types/terminal_node_chat_history_result.py +7 -3
- vellum/types/terminal_node_error_result.py +7 -3
- vellum/types/terminal_node_function_call_result.py +7 -3
- vellum/types/terminal_node_json_result.py +7 -3
- vellum/types/terminal_node_number_result.py +7 -3
- vellum/types/terminal_node_result.py +7 -3
- vellum/types/terminal_node_result_data.py +7 -3
- vellum/types/terminal_node_result_output.py +152 -32
- vellum/types/terminal_node_search_results_result.py +7 -3
- vellum/types/terminal_node_string_result.py +7 -3
- vellum/types/test_case_array_variable_value.py +7 -3
- vellum/types/test_case_chat_history_variable_value.py +7 -3
- vellum/types/test_case_error_variable_value.py +7 -3
- vellum/types/test_case_function_call_variable_value.py +7 -3
- vellum/types/test_case_json_variable_value.py +8 -4
- vellum/types/test_case_number_variable_value.py +7 -3
- vellum/types/test_case_search_results_variable_value.py +7 -3
- vellum/types/test_case_string_variable_value.py +7 -3
- vellum/types/test_case_variable_value.py +152 -32
- vellum/types/test_suite_run_deployment_release_tag_exec_config.py +7 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +7 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +7 -3
- vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +7 -3
- vellum/types/test_suite_run_exec_config.py +57 -12
- vellum/types/test_suite_run_exec_config_request.py +61 -12
- vellum/types/test_suite_run_execution.py +7 -3
- vellum/types/test_suite_run_execution_array_output.py +7 -3
- vellum/types/test_suite_run_execution_chat_history_output.py +7 -3
- vellum/types/test_suite_run_execution_error_output.py +7 -3
- vellum/types/test_suite_run_execution_function_call_output.py +7 -3
- vellum/types/test_suite_run_execution_json_output.py +7 -3
- vellum/types/test_suite_run_execution_metric_definition.py +7 -3
- vellum/types/test_suite_run_execution_metric_result.py +7 -3
- vellum/types/test_suite_run_execution_number_output.py +7 -3
- vellum/types/test_suite_run_execution_output.py +152 -32
- vellum/types/test_suite_run_execution_search_results_output.py +7 -3
- vellum/types/test_suite_run_execution_string_output.py +7 -3
- vellum/types/test_suite_run_external_exec_config.py +7 -3
- vellum/types/test_suite_run_external_exec_config_data.py +7 -3
- vellum/types/test_suite_run_external_exec_config_data_request.py +7 -3
- vellum/types/test_suite_run_external_exec_config_request.py +7 -3
- vellum/types/test_suite_run_metric_error_output.py +7 -3
- vellum/types/test_suite_run_metric_number_output.py +7 -3
- vellum/types/test_suite_run_metric_output.py +55 -12
- vellum/types/test_suite_run_metric_string_output.py +7 -3
- vellum/types/test_suite_run_read.py +7 -3
- vellum/types/test_suite_run_test_suite.py +7 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config.py +7 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +7 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +7 -3
- vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +7 -3
- vellum/types/test_suite_test_case.py +7 -3
- vellum/types/test_suite_test_case_bulk_operation_request.py +75 -16
- vellum/types/test_suite_test_case_bulk_result.py +74 -16
- vellum/types/test_suite_test_case_create_bulk_operation_request.py +7 -3
- vellum/types/test_suite_test_case_created_bulk_result.py +7 -3
- vellum/types/test_suite_test_case_created_bulk_result_data.py +7 -3
- vellum/types/test_suite_test_case_delete_bulk_operation_data_request.py +7 -3
- vellum/types/test_suite_test_case_delete_bulk_operation_request.py +7 -3
- vellum/types/test_suite_test_case_deleted_bulk_result.py +7 -3
- vellum/types/test_suite_test_case_deleted_bulk_result_data.py +7 -3
- vellum/types/test_suite_test_case_rejected_bulk_result.py +7 -3
- vellum/types/test_suite_test_case_replace_bulk_operation_request.py +7 -3
- vellum/types/test_suite_test_case_replaced_bulk_result.py +7 -3
- vellum/types/test_suite_test_case_replaced_bulk_result_data.py +7 -3
- vellum/types/test_suite_test_case_upsert_bulk_operation_request.py +7 -3
- vellum/types/{execute_workflow_error_response.py → tik_token_tokenizer_config.py} +11 -6
- vellum/types/{generate_error_response.py → tik_token_tokenizer_config_request.py} +11 -6
- vellum/types/token_overlapping_window_chunker_config.py +7 -3
- vellum/types/token_overlapping_window_chunker_config_request.py +7 -3
- vellum/types/token_overlapping_window_chunking.py +7 -3
- vellum/types/token_overlapping_window_chunking_request.py +7 -3
- vellum/types/upload_document_response.py +7 -3
- vellum/types/upsert_test_suite_test_case_request.py +7 -3
- vellum/types/vellum_error.py +7 -3
- vellum/types/vellum_error_request.py +7 -3
- vellum/types/vellum_image.py +7 -3
- vellum/types/vellum_image_request.py +7 -3
- vellum/types/vellum_variable.py +7 -3
- vellum/types/visibility_enum.py +5 -0
- vellum/types/workflow_deployment_read.py +12 -3
- vellum/types/workflow_event_error.py +7 -3
- vellum/types/workflow_execution_actual_chat_history_request.py +7 -3
- vellum/types/workflow_execution_actual_json_request.py +7 -3
- vellum/types/workflow_execution_actual_string_request.py +7 -3
- vellum/types/workflow_execution_node_result_event.py +7 -3
- vellum/types/workflow_execution_workflow_result_event.py +7 -3
- vellum/types/workflow_expand_meta_request.py +7 -3
- vellum/types/workflow_node_result_data.py +189 -45
- vellum/types/workflow_node_result_event.py +101 -20
- vellum/types/workflow_output.py +171 -36
- vellum/types/workflow_output_array.py +7 -3
- vellum/types/workflow_output_chat_history.py +7 -3
- vellum/types/workflow_output_error.py +7 -3
- vellum/types/workflow_output_function_call.py +7 -3
- vellum/types/workflow_output_image.py +7 -3
- vellum/types/workflow_output_json.py +7 -3
- vellum/types/workflow_output_number.py +7 -3
- vellum/types/workflow_output_search_results.py +7 -3
- vellum/types/workflow_output_string.py +7 -3
- vellum/types/workflow_release_tag_read.py +7 -3
- vellum/types/workflow_release_tag_workflow_deployment_history_item.py +7 -3
- vellum/types/workflow_request_chat_history_input_request.py +7 -3
- vellum/types/workflow_request_input_request.py +72 -16
- vellum/types/workflow_request_json_input_request.py +7 -3
- vellum/types/workflow_request_number_input_request.py +7 -3
- vellum/types/workflow_request_string_input_request.py +7 -3
- vellum/types/workflow_result_event.py +7 -3
- vellum/types/workflow_result_event_output_data.py +178 -33
- vellum/types/workflow_result_event_output_data_array.py +7 -3
- vellum/types/workflow_result_event_output_data_chat_history.py +7 -3
- vellum/types/workflow_result_event_output_data_error.py +7 -3
- vellum/types/workflow_result_event_output_data_function_call.py +7 -3
- vellum/types/workflow_result_event_output_data_json.py +7 -3
- vellum/types/workflow_result_event_output_data_number.py +7 -3
- vellum/types/workflow_result_event_output_data_search_results.py +7 -3
- vellum/types/workflow_result_event_output_data_string.py +7 -3
- vellum/types/workflow_stream_event.py +43 -8
- {vellum_ai-0.7.2.dist-info → vellum_ai-0.7.5.dist-info}/METADATA +13 -1
- vellum_ai-0.7.5.dist-info/RECORD +502 -0
- vellum/types/array_enum.py +0 -5
- vellum/types/chat_history_enum.py +0 -5
- vellum/types/create_enum.py +0 -5
- vellum/types/created_enum.py +0 -5
- vellum/types/delete_enum.py +0 -5
- vellum/types/deleted_enum.py +0 -5
- vellum/types/error_enum.py +0 -5
- vellum/types/function_call_enum.py +0 -5
- vellum/types/hkunlp_instructor_xl_enum.py +0 -5
- vellum/types/image_enum.py +0 -5
- vellum/types/initiated_enum.py +0 -5
- vellum/types/intfloat_multilingual_e_5_large_enum.py +0 -5
- vellum/types/json_enum.py +0 -5
- vellum/types/merge_enum.py +0 -5
- vellum/types/metric_enum.py +0 -5
- vellum/types/number_enum.py +0 -5
- vellum/types/pdf_enum.py +0 -5
- vellum/types/reducto_chunker_enum.py +0 -5
- vellum/types/rejected_enum.py +0 -5
- vellum/types/replace_enum.py +0 -5
- vellum/types/replaced_enum.py +0 -5
- vellum/types/search_error_response.py +0 -28
- vellum/types/search_results_enum.py +0 -5
- vellum/types/sentence_chunker_enum.py +0 -5
- vellum/types/sentence_transformers_multi_qa_mpnet_base_cos_v_1_enum.py +0 -5
- vellum/types/sentence_transformers_multi_qa_mpnet_base_dot_v_1_enum.py +0 -5
- vellum/types/streaming_enum.py +0 -5
- vellum/types/string_enum.py +0 -5
- vellum/types/submit_completion_actuals_error_response.py +0 -25
- vellum/types/subworkflow_enum.py +0 -5
- vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +0 -5
- vellum/types/test_suite_run_external_exec_config_type_enum.py +0 -5
- vellum/types/test_suite_run_metric_error_output_type_enum.py +0 -5
- vellum/types/test_suite_run_metric_number_output_type_enum.py +0 -5
- vellum/types/test_suite_run_metric_string_output_type_enum.py +0 -5
- vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +0 -5
- vellum/types/text_embedding_3_large_enum.py +0 -5
- vellum/types/text_embedding_3_small_enum.py +0 -5
- vellum/types/text_embedding_ada_002_enum.py +0 -5
- vellum/types/token_overlapping_window_chunker_enum.py +0 -5
- vellum/types/upload_document_error_response.py +0 -25
- vellum/types/upsert_enum.py +0 -5
- vellum_ai-0.7.2.dist-info/RECORD +0 -494
- {vellum_ai-0.7.2.dist-info → vellum_ai-0.7.5.dist-info}/LICENSE +0 -0
- {vellum_ai-0.7.2.dist-info → vellum_ai-0.7.5.dist-info}/WHEEL +0 -0
@@ -1,14 +1,12 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
3
|
import typing
|
4
|
-
import urllib.parse
|
5
4
|
from json.decoder import JSONDecodeError
|
6
5
|
|
7
6
|
from ...core.api_error import ApiError
|
8
7
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
8
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
9
|
from ...core.pydantic_utilities import pydantic_v1
|
11
|
-
from ...core.remove_none_from_dict import remove_none_from_dict
|
12
10
|
from ...core.request_options import RequestOptions
|
13
11
|
from ...types.deployment_read import DeploymentRead
|
14
12
|
from ...types.named_scenario_input_request import NamedScenarioInputRequest
|
@@ -25,7 +23,7 @@ class SandboxesClient:
|
|
25
23
|
def deploy_prompt(
|
26
24
|
self,
|
27
25
|
id: str,
|
28
|
-
|
26
|
+
prompt_variant_id: str,
|
29
27
|
*,
|
30
28
|
prompt_deployment_id: typing.Optional[str] = OMIT,
|
31
29
|
prompt_deployment_name: typing.Optional[str] = OMIT,
|
@@ -34,21 +32,36 @@ class SandboxesClient:
|
|
34
32
|
request_options: typing.Optional[RequestOptions] = None,
|
35
33
|
) -> DeploymentRead:
|
36
34
|
"""
|
37
|
-
Parameters
|
38
|
-
|
35
|
+
Parameters
|
36
|
+
----------
|
37
|
+
id : str
|
38
|
+
A UUID string identifying this sandbox.
|
39
39
|
|
40
|
-
|
40
|
+
prompt_variant_id : str
|
41
|
+
An ID identifying the Prompt you'd like to deploy.
|
41
42
|
|
42
|
-
|
43
|
+
prompt_deployment_id : typing.Optional[str]
|
44
|
+
The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
|
43
45
|
|
44
|
-
|
46
|
+
prompt_deployment_name : typing.Optional[str]
|
47
|
+
The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
|
45
48
|
|
46
|
-
|
49
|
+
label : typing.Optional[str]
|
50
|
+
In the event that a new Prompt Deployment is created, this will be the label it's given.
|
47
51
|
|
48
|
-
|
52
|
+
release_tags : typing.Optional[typing.Sequence[str]]
|
53
|
+
Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
|
49
54
|
|
50
|
-
|
51
|
-
|
55
|
+
request_options : typing.Optional[RequestOptions]
|
56
|
+
Request-specific configuration.
|
57
|
+
|
58
|
+
Returns
|
59
|
+
-------
|
60
|
+
DeploymentRead
|
61
|
+
|
62
|
+
|
63
|
+
Examples
|
64
|
+
--------
|
52
65
|
from vellum.client import Vellum
|
53
66
|
|
54
67
|
client = Vellum(
|
@@ -56,50 +69,25 @@ class SandboxesClient:
|
|
56
69
|
)
|
57
70
|
client.sandboxes.deploy_prompt(
|
58
71
|
id="id",
|
59
|
-
|
72
|
+
prompt_variant_id="prompt_variant_id",
|
60
73
|
)
|
61
74
|
"""
|
62
|
-
_request: typing.Dict[str, typing.Any] = {}
|
63
|
-
if prompt_deployment_id is not OMIT:
|
64
|
-
_request["prompt_deployment_id"] = prompt_deployment_id
|
65
|
-
if prompt_deployment_name is not OMIT:
|
66
|
-
_request["prompt_deployment_name"] = prompt_deployment_name
|
67
|
-
if label is not OMIT:
|
68
|
-
_request["label"] = label
|
69
|
-
if release_tags is not OMIT:
|
70
|
-
_request["release_tags"] = release_tags
|
71
75
|
_response = self._client_wrapper.httpx_client.request(
|
76
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_variant_id)}/deploy",
|
77
|
+
base_url=self._client_wrapper.get_environment().default,
|
72
78
|
method="POST",
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
79
|
-
),
|
80
|
-
json=jsonable_encoder(_request)
|
81
|
-
if request_options is None or request_options.get("additional_body_parameters") is None
|
82
|
-
else {
|
83
|
-
**jsonable_encoder(_request),
|
84
|
-
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
79
|
+
json={
|
80
|
+
"prompt_deployment_id": prompt_deployment_id,
|
81
|
+
"prompt_deployment_name": prompt_deployment_name,
|
82
|
+
"label": label,
|
83
|
+
"release_tags": release_tags,
|
85
84
|
},
|
86
|
-
|
87
|
-
|
88
|
-
{
|
89
|
-
**self._client_wrapper.get_headers(),
|
90
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
91
|
-
}
|
92
|
-
)
|
93
|
-
),
|
94
|
-
timeout=request_options.get("timeout_in_seconds")
|
95
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
96
|
-
else self._client_wrapper.get_timeout(),
|
97
|
-
retries=0,
|
98
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
85
|
+
request_options=request_options,
|
86
|
+
omit=OMIT,
|
99
87
|
)
|
100
|
-
if 200 <= _response.status_code < 300:
|
101
|
-
return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
|
102
88
|
try:
|
89
|
+
if 200 <= _response.status_code < 300:
|
90
|
+
return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
|
103
91
|
_response_json = _response.json()
|
104
92
|
except JSONDecodeError:
|
105
93
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
@@ -109,8 +97,8 @@ class SandboxesClient:
|
|
109
97
|
self,
|
110
98
|
id: str,
|
111
99
|
*,
|
112
|
-
label: typing.Optional[str] = OMIT,
|
113
100
|
inputs: typing.Sequence[NamedScenarioInputRequest],
|
101
|
+
label: typing.Optional[str] = OMIT,
|
114
102
|
scenario_id: typing.Optional[str] = OMIT,
|
115
103
|
request_options: typing.Optional[RequestOptions] = None,
|
116
104
|
) -> SandboxScenario:
|
@@ -123,17 +111,29 @@ class SandboxesClient:
|
|
123
111
|
Note that a full replacement of the scenario is performed, so any fields not provided will be removed
|
124
112
|
or overwritten with default values.
|
125
113
|
|
126
|
-
Parameters
|
127
|
-
|
114
|
+
Parameters
|
115
|
+
----------
|
116
|
+
id : str
|
117
|
+
A UUID string identifying this sandbox.
|
118
|
+
|
119
|
+
inputs : typing.Sequence[NamedScenarioInputRequest]
|
120
|
+
The inputs for the scenario
|
128
121
|
|
129
|
-
|
122
|
+
label : typing.Optional[str]
|
130
123
|
|
131
|
-
|
124
|
+
scenario_id : typing.Optional[str]
|
125
|
+
The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
|
132
126
|
|
133
|
-
|
127
|
+
request_options : typing.Optional[RequestOptions]
|
128
|
+
Request-specific configuration.
|
134
129
|
|
135
|
-
|
136
|
-
|
130
|
+
Returns
|
131
|
+
-------
|
132
|
+
SandboxScenario
|
133
|
+
|
134
|
+
|
135
|
+
Examples
|
136
|
+
--------
|
137
137
|
from vellum.client import Vellum
|
138
138
|
|
139
139
|
client = Vellum(
|
@@ -145,42 +145,17 @@ class SandboxesClient:
|
|
145
145
|
inputs=[],
|
146
146
|
)
|
147
147
|
"""
|
148
|
-
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
149
|
-
if label is not OMIT:
|
150
|
-
_request["label"] = label
|
151
|
-
if scenario_id is not OMIT:
|
152
|
-
_request["scenario_id"] = scenario_id
|
153
148
|
_response = self._client_wrapper.httpx_client.request(
|
149
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios",
|
150
|
+
base_url=self._client_wrapper.get_environment().default,
|
154
151
|
method="POST",
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
params=jsonable_encoder(
|
159
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
160
|
-
),
|
161
|
-
json=jsonable_encoder(_request)
|
162
|
-
if request_options is None or request_options.get("additional_body_parameters") is None
|
163
|
-
else {
|
164
|
-
**jsonable_encoder(_request),
|
165
|
-
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
166
|
-
},
|
167
|
-
headers=jsonable_encoder(
|
168
|
-
remove_none_from_dict(
|
169
|
-
{
|
170
|
-
**self._client_wrapper.get_headers(),
|
171
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
172
|
-
}
|
173
|
-
)
|
174
|
-
),
|
175
|
-
timeout=request_options.get("timeout_in_seconds")
|
176
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
177
|
-
else self._client_wrapper.get_timeout(),
|
178
|
-
retries=0,
|
179
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
152
|
+
json={"label": label, "inputs": inputs, "scenario_id": scenario_id},
|
153
|
+
request_options=request_options,
|
154
|
+
omit=OMIT,
|
180
155
|
)
|
181
|
-
if 200 <= _response.status_code < 300:
|
182
|
-
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
183
156
|
try:
|
157
|
+
if 200 <= _response.status_code < 300:
|
158
|
+
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
184
159
|
_response_json = _response.json()
|
185
160
|
except JSONDecodeError:
|
186
161
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
@@ -192,13 +167,23 @@ class SandboxesClient:
|
|
192
167
|
"""
|
193
168
|
Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
|
194
169
|
|
195
|
-
Parameters
|
196
|
-
|
170
|
+
Parameters
|
171
|
+
----------
|
172
|
+
id : str
|
173
|
+
A UUID string identifying this sandbox.
|
197
174
|
|
198
|
-
|
175
|
+
scenario_id : str
|
176
|
+
An id identifying the scenario that you'd like to delete
|
199
177
|
|
200
|
-
|
201
|
-
|
178
|
+
request_options : typing.Optional[RequestOptions]
|
179
|
+
Request-specific configuration.
|
180
|
+
|
181
|
+
Returns
|
182
|
+
-------
|
183
|
+
None
|
184
|
+
|
185
|
+
Examples
|
186
|
+
--------
|
202
187
|
from vellum.client import Vellum
|
203
188
|
|
204
189
|
client = Vellum(
|
@@ -210,31 +195,14 @@ class SandboxesClient:
|
|
210
195
|
)
|
211
196
|
"""
|
212
197
|
_response = self._client_wrapper.httpx_client.request(
|
198
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
199
|
+
base_url=self._client_wrapper.get_environment().default,
|
213
200
|
method="DELETE",
|
214
|
-
|
215
|
-
f"{self._client_wrapper.get_environment().default}/",
|
216
|
-
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
217
|
-
),
|
218
|
-
params=jsonable_encoder(
|
219
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
220
|
-
),
|
221
|
-
headers=jsonable_encoder(
|
222
|
-
remove_none_from_dict(
|
223
|
-
{
|
224
|
-
**self._client_wrapper.get_headers(),
|
225
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
226
|
-
}
|
227
|
-
)
|
228
|
-
),
|
229
|
-
timeout=request_options.get("timeout_in_seconds")
|
230
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
231
|
-
else self._client_wrapper.get_timeout(),
|
232
|
-
retries=0,
|
233
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
201
|
+
request_options=request_options,
|
234
202
|
)
|
235
|
-
if 200 <= _response.status_code < 300:
|
236
|
-
return
|
237
203
|
try:
|
204
|
+
if 200 <= _response.status_code < 300:
|
205
|
+
return
|
238
206
|
_response_json = _response.json()
|
239
207
|
except JSONDecodeError:
|
240
208
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
@@ -248,7 +216,7 @@ class AsyncSandboxesClient:
|
|
248
216
|
async def deploy_prompt(
|
249
217
|
self,
|
250
218
|
id: str,
|
251
|
-
|
219
|
+
prompt_variant_id: str,
|
252
220
|
*,
|
253
221
|
prompt_deployment_id: typing.Optional[str] = OMIT,
|
254
222
|
prompt_deployment_name: typing.Optional[str] = OMIT,
|
@@ -257,72 +225,70 @@ class AsyncSandboxesClient:
|
|
257
225
|
request_options: typing.Optional[RequestOptions] = None,
|
258
226
|
) -> DeploymentRead:
|
259
227
|
"""
|
260
|
-
Parameters
|
261
|
-
|
228
|
+
Parameters
|
229
|
+
----------
|
230
|
+
id : str
|
231
|
+
A UUID string identifying this sandbox.
|
232
|
+
|
233
|
+
prompt_variant_id : str
|
234
|
+
An ID identifying the Prompt you'd like to deploy.
|
262
235
|
|
263
|
-
|
236
|
+
prompt_deployment_id : typing.Optional[str]
|
237
|
+
The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
|
264
238
|
|
265
|
-
|
239
|
+
prompt_deployment_name : typing.Optional[str]
|
240
|
+
The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
|
266
241
|
|
267
|
-
|
242
|
+
label : typing.Optional[str]
|
243
|
+
In the event that a new Prompt Deployment is created, this will be the label it's given.
|
268
244
|
|
269
|
-
|
245
|
+
release_tags : typing.Optional[typing.Sequence[str]]
|
246
|
+
Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
|
270
247
|
|
271
|
-
|
248
|
+
request_options : typing.Optional[RequestOptions]
|
249
|
+
Request-specific configuration.
|
250
|
+
|
251
|
+
Returns
|
252
|
+
-------
|
253
|
+
DeploymentRead
|
254
|
+
|
255
|
+
|
256
|
+
Examples
|
257
|
+
--------
|
258
|
+
import asyncio
|
272
259
|
|
273
|
-
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
274
|
-
---
|
275
260
|
from vellum.client import AsyncVellum
|
276
261
|
|
277
262
|
client = AsyncVellum(
|
278
263
|
api_key="YOUR_API_KEY",
|
279
264
|
)
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
265
|
+
|
266
|
+
|
267
|
+
async def main() -> None:
|
268
|
+
await client.sandboxes.deploy_prompt(
|
269
|
+
id="id",
|
270
|
+
prompt_variant_id="prompt_variant_id",
|
271
|
+
)
|
272
|
+
|
273
|
+
|
274
|
+
asyncio.run(main())
|
284
275
|
"""
|
285
|
-
_request: typing.Dict[str, typing.Any] = {}
|
286
|
-
if prompt_deployment_id is not OMIT:
|
287
|
-
_request["prompt_deployment_id"] = prompt_deployment_id
|
288
|
-
if prompt_deployment_name is not OMIT:
|
289
|
-
_request["prompt_deployment_name"] = prompt_deployment_name
|
290
|
-
if label is not OMIT:
|
291
|
-
_request["label"] = label
|
292
|
-
if release_tags is not OMIT:
|
293
|
-
_request["release_tags"] = release_tags
|
294
276
|
_response = await self._client_wrapper.httpx_client.request(
|
277
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_variant_id)}/deploy",
|
278
|
+
base_url=self._client_wrapper.get_environment().default,
|
295
279
|
method="POST",
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
302
|
-
),
|
303
|
-
json=jsonable_encoder(_request)
|
304
|
-
if request_options is None or request_options.get("additional_body_parameters") is None
|
305
|
-
else {
|
306
|
-
**jsonable_encoder(_request),
|
307
|
-
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
280
|
+
json={
|
281
|
+
"prompt_deployment_id": prompt_deployment_id,
|
282
|
+
"prompt_deployment_name": prompt_deployment_name,
|
283
|
+
"label": label,
|
284
|
+
"release_tags": release_tags,
|
308
285
|
},
|
309
|
-
|
310
|
-
|
311
|
-
{
|
312
|
-
**self._client_wrapper.get_headers(),
|
313
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
314
|
-
}
|
315
|
-
)
|
316
|
-
),
|
317
|
-
timeout=request_options.get("timeout_in_seconds")
|
318
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
319
|
-
else self._client_wrapper.get_timeout(),
|
320
|
-
retries=0,
|
321
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
286
|
+
request_options=request_options,
|
287
|
+
omit=OMIT,
|
322
288
|
)
|
323
|
-
if 200 <= _response.status_code < 300:
|
324
|
-
return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
|
325
289
|
try:
|
290
|
+
if 200 <= _response.status_code < 300:
|
291
|
+
return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
|
326
292
|
_response_json = _response.json()
|
327
293
|
except JSONDecodeError:
|
328
294
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
@@ -332,8 +298,8 @@ class AsyncSandboxesClient:
|
|
332
298
|
self,
|
333
299
|
id: str,
|
334
300
|
*,
|
335
|
-
label: typing.Optional[str] = OMIT,
|
336
301
|
inputs: typing.Sequence[NamedScenarioInputRequest],
|
302
|
+
label: typing.Optional[str] = OMIT,
|
337
303
|
scenario_id: typing.Optional[str] = OMIT,
|
338
304
|
request_options: typing.Optional[RequestOptions] = None,
|
339
305
|
) -> SandboxScenario:
|
@@ -346,64 +312,59 @@ class AsyncSandboxesClient:
|
|
346
312
|
Note that a full replacement of the scenario is performed, so any fields not provided will be removed
|
347
313
|
or overwritten with default values.
|
348
314
|
|
349
|
-
Parameters
|
350
|
-
|
315
|
+
Parameters
|
316
|
+
----------
|
317
|
+
id : str
|
318
|
+
A UUID string identifying this sandbox.
|
351
319
|
|
352
|
-
|
320
|
+
inputs : typing.Sequence[NamedScenarioInputRequest]
|
321
|
+
The inputs for the scenario
|
353
322
|
|
354
|
-
|
323
|
+
label : typing.Optional[str]
|
355
324
|
|
356
|
-
|
325
|
+
scenario_id : typing.Optional[str]
|
326
|
+
The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
|
327
|
+
|
328
|
+
request_options : typing.Optional[RequestOptions]
|
329
|
+
Request-specific configuration.
|
330
|
+
|
331
|
+
Returns
|
332
|
+
-------
|
333
|
+
SandboxScenario
|
334
|
+
|
335
|
+
|
336
|
+
Examples
|
337
|
+
--------
|
338
|
+
import asyncio
|
357
339
|
|
358
|
-
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
359
|
-
---
|
360
340
|
from vellum.client import AsyncVellum
|
361
341
|
|
362
342
|
client = AsyncVellum(
|
363
343
|
api_key="YOUR_API_KEY",
|
364
344
|
)
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
345
|
+
|
346
|
+
|
347
|
+
async def main() -> None:
|
348
|
+
await client.sandboxes.upsert_sandbox_scenario(
|
349
|
+
id="id",
|
350
|
+
label="Scenario 1",
|
351
|
+
inputs=[],
|
352
|
+
)
|
353
|
+
|
354
|
+
|
355
|
+
asyncio.run(main())
|
370
356
|
"""
|
371
|
-
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
372
|
-
if label is not OMIT:
|
373
|
-
_request["label"] = label
|
374
|
-
if scenario_id is not OMIT:
|
375
|
-
_request["scenario_id"] = scenario_id
|
376
357
|
_response = await self._client_wrapper.httpx_client.request(
|
358
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios",
|
359
|
+
base_url=self._client_wrapper.get_environment().default,
|
377
360
|
method="POST",
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
params=jsonable_encoder(
|
382
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
383
|
-
),
|
384
|
-
json=jsonable_encoder(_request)
|
385
|
-
if request_options is None or request_options.get("additional_body_parameters") is None
|
386
|
-
else {
|
387
|
-
**jsonable_encoder(_request),
|
388
|
-
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
389
|
-
},
|
390
|
-
headers=jsonable_encoder(
|
391
|
-
remove_none_from_dict(
|
392
|
-
{
|
393
|
-
**self._client_wrapper.get_headers(),
|
394
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
395
|
-
}
|
396
|
-
)
|
397
|
-
),
|
398
|
-
timeout=request_options.get("timeout_in_seconds")
|
399
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
400
|
-
else self._client_wrapper.get_timeout(),
|
401
|
-
retries=0,
|
402
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
361
|
+
json={"label": label, "inputs": inputs, "scenario_id": scenario_id},
|
362
|
+
request_options=request_options,
|
363
|
+
omit=OMIT,
|
403
364
|
)
|
404
|
-
if 200 <= _response.status_code < 300:
|
405
|
-
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
406
365
|
try:
|
366
|
+
if 200 <= _response.status_code < 300:
|
367
|
+
return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
|
407
368
|
_response_json = _response.json()
|
408
369
|
except JSONDecodeError:
|
409
370
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
@@ -415,49 +376,50 @@ class AsyncSandboxesClient:
|
|
415
376
|
"""
|
416
377
|
Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
|
417
378
|
|
418
|
-
Parameters
|
419
|
-
|
379
|
+
Parameters
|
380
|
+
----------
|
381
|
+
id : str
|
382
|
+
A UUID string identifying this sandbox.
|
383
|
+
|
384
|
+
scenario_id : str
|
385
|
+
An id identifying the scenario that you'd like to delete
|
386
|
+
|
387
|
+
request_options : typing.Optional[RequestOptions]
|
388
|
+
Request-specific configuration.
|
420
389
|
|
421
|
-
|
390
|
+
Returns
|
391
|
+
-------
|
392
|
+
None
|
393
|
+
|
394
|
+
Examples
|
395
|
+
--------
|
396
|
+
import asyncio
|
422
397
|
|
423
|
-
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
424
|
-
---
|
425
398
|
from vellum.client import AsyncVellum
|
426
399
|
|
427
400
|
client = AsyncVellum(
|
428
401
|
api_key="YOUR_API_KEY",
|
429
402
|
)
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
403
|
+
|
404
|
+
|
405
|
+
async def main() -> None:
|
406
|
+
await client.sandboxes.delete_sandbox_scenario(
|
407
|
+
id="id",
|
408
|
+
scenario_id="scenario_id",
|
409
|
+
)
|
410
|
+
|
411
|
+
|
412
|
+
asyncio.run(main())
|
434
413
|
"""
|
435
414
|
_response = await self._client_wrapper.httpx_client.request(
|
415
|
+
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
416
|
+
base_url=self._client_wrapper.get_environment().default,
|
436
417
|
method="DELETE",
|
437
|
-
|
438
|
-
f"{self._client_wrapper.get_environment().default}/",
|
439
|
-
f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
|
440
|
-
),
|
441
|
-
params=jsonable_encoder(
|
442
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
443
|
-
),
|
444
|
-
headers=jsonable_encoder(
|
445
|
-
remove_none_from_dict(
|
446
|
-
{
|
447
|
-
**self._client_wrapper.get_headers(),
|
448
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
449
|
-
}
|
450
|
-
)
|
451
|
-
),
|
452
|
-
timeout=request_options.get("timeout_in_seconds")
|
453
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
454
|
-
else self._client_wrapper.get_timeout(),
|
455
|
-
retries=0,
|
456
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
418
|
+
request_options=request_options,
|
457
419
|
)
|
458
|
-
if 200 <= _response.status_code < 300:
|
459
|
-
return
|
460
420
|
try:
|
421
|
+
if 200 <= _response.status_code < 300:
|
422
|
+
return
|
461
423
|
_response_json = _response.json()
|
462
424
|
except JSONDecodeError:
|
463
425
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|