vellum-ai 1.1.2__py3-none-any.whl → 1.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vellum/__init__.py +18 -0
- vellum/client/README.md +77 -0
- vellum/client/__init__.py +149 -600
- vellum/client/core/__init__.py +2 -0
- vellum/client/core/api_error.py +13 -5
- vellum/client/core/client_wrapper.py +16 -4
- vellum/client/core/force_multipart.py +16 -0
- vellum/client/core/http_client.py +70 -24
- vellum/client/core/http_response.py +19 -11
- vellum/client/core/pydantic_utilities.py +71 -114
- vellum/client/core/serialization.py +6 -1
- vellum/client/errors/__init__.py +2 -0
- vellum/client/errors/bad_request_error.py +4 -3
- vellum/client/errors/forbidden_error.py +4 -3
- vellum/client/errors/internal_server_error.py +4 -3
- vellum/client/errors/not_found_error.py +4 -3
- vellum/client/raw_client.py +1041 -128
- vellum/client/reference.md +692 -19
- vellum/client/resources/__init__.py +2 -0
- vellum/client/resources/ad_hoc/__init__.py +2 -0
- vellum/client/resources/ad_hoc/client.py +37 -195
- vellum/client/resources/ad_hoc/raw_client.py +322 -31
- vellum/client/resources/container_images/__init__.py +2 -0
- vellum/client/resources/container_images/client.py +26 -49
- vellum/client/resources/container_images/raw_client.py +23 -24
- vellum/client/resources/deployments/__init__.py +2 -0
- vellum/client/resources/deployments/client.py +55 -102
- vellum/client/resources/deployments/raw_client.py +73 -66
- vellum/client/resources/deployments/types/__init__.py +2 -0
- vellum/client/resources/document_indexes/__init__.py +2 -0
- vellum/client/resources/document_indexes/client.py +43 -100
- vellum/client/resources/document_indexes/raw_client.py +42 -43
- vellum/client/resources/document_indexes/types/__init__.py +2 -0
- vellum/client/resources/documents/__init__.py +2 -0
- vellum/client/resources/documents/client.py +29 -52
- vellum/client/resources/documents/raw_client.py +51 -44
- vellum/client/resources/folder_entities/__init__.py +2 -0
- vellum/client/resources/folder_entities/client.py +16 -21
- vellum/client/resources/folder_entities/raw_client.py +15 -16
- vellum/client/resources/folder_entities/types/__init__.py +2 -0
- vellum/client/resources/metric_definitions/__init__.py +2 -0
- vellum/client/resources/metric_definitions/client.py +16 -27
- vellum/client/resources/metric_definitions/raw_client.py +17 -18
- vellum/client/resources/ml_models/__init__.py +2 -0
- vellum/client/resources/ml_models/client.py +7 -14
- vellum/client/resources/ml_models/raw_client.py +11 -12
- vellum/client/resources/organizations/__init__.py +2 -0
- vellum/client/resources/organizations/client.py +7 -12
- vellum/client/resources/organizations/raw_client.py +10 -11
- vellum/client/resources/prompts/__init__.py +2 -0
- vellum/client/resources/prompts/client.py +12 -19
- vellum/client/resources/prompts/raw_client.py +40 -33
- vellum/client/resources/sandboxes/__init__.py +2 -0
- vellum/client/resources/sandboxes/client.py +17 -34
- vellum/client/resources/sandboxes/raw_client.py +20 -21
- vellum/client/resources/test_suite_runs/__init__.py +2 -0
- vellum/client/resources/test_suite_runs/client.py +19 -34
- vellum/client/resources/test_suite_runs/raw_client.py +20 -21
- vellum/client/resources/test_suites/__init__.py +2 -0
- vellum/client/resources/test_suites/client.py +26 -100
- vellum/client/resources/test_suites/raw_client.py +172 -21
- vellum/client/resources/workflow_deployments/__init__.py +2 -0
- vellum/client/resources/workflow_deployments/client.py +61 -120
- vellum/client/resources/workflow_deployments/raw_client.py +48 -49
- vellum/client/resources/workflow_deployments/types/__init__.py +2 -0
- vellum/client/resources/workflow_executions/__init__.py +2 -0
- vellum/client/resources/workflow_executions/client.py +8 -13
- vellum/client/resources/workflow_executions/raw_client.py +11 -12
- vellum/client/resources/workflow_sandboxes/__init__.py +2 -0
- vellum/client/resources/workflow_sandboxes/client.py +14 -23
- vellum/client/resources/workflow_sandboxes/raw_client.py +16 -17
- vellum/client/resources/workflow_sandboxes/types/__init__.py +2 -0
- vellum/client/resources/workflows/__init__.py +2 -0
- vellum/client/resources/workflows/client.py +16 -16
- vellum/client/resources/workflows/raw_client.py +75 -57
- vellum/client/resources/workspace_secrets/__init__.py +2 -0
- vellum/client/resources/workspace_secrets/client.py +11 -28
- vellum/client/resources/workspace_secrets/raw_client.py +15 -16
- vellum/client/resources/workspaces/__init__.py +2 -0
- vellum/client/resources/workspaces/client.py +7 -12
- vellum/client/resources/workspaces/raw_client.py +10 -11
- vellum/client/types/__init__.py +18 -0
- vellum/client/types/ad_hoc_execute_prompt_event.py +3 -2
- vellum/client/types/ad_hoc_expand_meta.py +2 -2
- vellum/client/types/ad_hoc_fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/ad_hoc_rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/api_node_result.py +3 -3
- vellum/client/types/api_node_result_data.py +4 -4
- vellum/client/types/api_request_parent_context.py +11 -11
- vellum/client/types/array_chat_message_content.py +3 -3
- vellum/client/types/array_chat_message_content_item.py +7 -4
- vellum/client/types/array_chat_message_content_item_request.py +7 -4
- vellum/client/types/array_chat_message_content_request.py +3 -3
- vellum/client/types/array_input.py +12 -6
- vellum/client/types/array_vellum_value.py +4 -4
- vellum/client/types/array_vellum_value_request.py +4 -4
- vellum/client/types/audio_chat_message_content.py +3 -3
- vellum/client/types/audio_chat_message_content_request.py +3 -3
- vellum/client/types/audio_prompt_block.py +4 -4
- vellum/client/types/audio_vellum_value.py +3 -3
- vellum/client/types/audio_vellum_value_request.py +3 -3
- vellum/client/types/base_output.py +2 -2
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +2 -2
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +2 -2
- vellum/client/types/chat_history_input.py +3 -3
- vellum/client/types/chat_history_input_request.py +3 -3
- vellum/client/types/chat_history_vellum_value.py +3 -3
- vellum/client/types/chat_history_vellum_value_request.py +3 -3
- vellum/client/types/chat_message.py +4 -4
- vellum/client/types/chat_message_content.py +7 -4
- vellum/client/types/chat_message_content_request.py +7 -4
- vellum/client/types/chat_message_prompt_block.py +7 -7
- vellum/client/types/chat_message_request.py +4 -4
- vellum/client/types/code_execution_node_array_result.py +11 -5
- vellum/client/types/code_execution_node_chat_history_result.py +3 -3
- vellum/client/types/code_execution_node_error_result.py +3 -3
- vellum/client/types/code_execution_node_function_call_result.py +3 -3
- vellum/client/types/code_execution_node_json_result.py +2 -2
- vellum/client/types/code_execution_node_number_result.py +2 -2
- vellum/client/types/code_execution_node_result.py +10 -4
- vellum/client/types/code_execution_node_result_data.py +10 -4
- vellum/client/types/code_execution_node_result_output.py +6 -5
- vellum/client/types/code_execution_node_search_results_result.py +3 -3
- vellum/client/types/code_execution_node_string_result.py +2 -2
- vellum/client/types/code_execution_package.py +2 -2
- vellum/client/types/code_executor_input.py +7 -6
- vellum/client/types/code_executor_response.py +11 -5
- vellum/client/types/code_executor_secret_input.py +3 -3
- vellum/client/types/code_resource_definition.py +3 -3
- vellum/client/types/compile_prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/compile_prompt_meta.py +2 -2
- vellum/client/types/conditional_node_result.py +3 -3
- vellum/client/types/conditional_node_result_data.py +2 -2
- vellum/client/types/container_image_build_config.py +3 -3
- vellum/client/types/container_image_container_image_tag.py +2 -2
- vellum/client/types/container_image_read.py +5 -5
- vellum/client/types/create_test_suite_test_case_request.py +9 -3
- vellum/client/types/deployment_history_item.py +10 -4
- vellum/client/types/deployment_provider_payload_response.py +4 -4
- vellum/client/types/deployment_read.py +10 -4
- vellum/client/types/deployment_release_tag_deployment_history_item.py +2 -2
- vellum/client/types/deployment_release_tag_read.py +4 -4
- vellum/client/types/docker_service_token.py +2 -2
- vellum/client/types/document_chat_message_content.py +3 -3
- vellum/client/types/document_chat_message_content_request.py +3 -3
- vellum/client/types/document_document_to_document_index.py +3 -3
- vellum/client/types/document_index_chunking.py +1 -0
- vellum/client/types/document_index_chunking_request.py +1 -0
- vellum/client/types/document_index_indexing_config.py +4 -4
- vellum/client/types/document_index_indexing_config_request.py +4 -4
- vellum/client/types/document_index_read.py +4 -4
- vellum/client/types/document_prompt_block.py +4 -4
- vellum/client/types/document_read.py +4 -4
- vellum/client/types/document_vellum_value.py +3 -3
- vellum/client/types/document_vellum_value_request.py +3 -3
- vellum/client/types/enriched_normalized_completion.py +3 -3
- vellum/client/types/ephemeral_prompt_cache_config.py +3 -3
- vellum/client/types/error_input.py +3 -3
- vellum/client/types/error_vellum_value.py +3 -3
- vellum/client/types/error_vellum_value_request.py +3 -3
- vellum/client/types/execute_api_request_bearer_token.py +1 -0
- vellum/client/types/execute_api_request_headers_value.py +1 -0
- vellum/client/types/execute_api_response.py +5 -5
- vellum/client/types/execute_prompt_event.py +3 -2
- vellum/client/types/execute_prompt_response.py +1 -0
- vellum/client/types/execute_workflow_response.py +10 -4
- vellum/client/types/execute_workflow_workflow_result_event.py +1 -0
- vellum/client/types/execution_array_vellum_value.py +12 -6
- vellum/client/types/execution_chat_history_vellum_value.py +3 -3
- vellum/client/types/execution_error_vellum_value.py +3 -3
- vellum/client/types/execution_function_call_vellum_value.py +3 -3
- vellum/client/types/execution_json_vellum_value.py +3 -3
- vellum/client/types/execution_number_vellum_value.py +3 -3
- vellum/client/types/execution_search_results_vellum_value.py +3 -3
- vellum/client/types/execution_string_vellum_value.py +3 -3
- vellum/client/types/execution_thinking_vellum_value.py +3 -3
- vellum/client/types/execution_vellum_value.py +6 -5
- vellum/client/types/external_input_descriptor.py +3 -3
- vellum/client/types/external_parent_context.py +11 -11
- vellum/client/types/external_test_case_execution.py +10 -4
- vellum/client/types/external_test_case_execution_request.py +10 -4
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15.py +2 -2
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.py +2 -2
- vellum/client/types/folder_entity.py +4 -3
- vellum/client/types/folder_entity_dataset.py +3 -3
- vellum/client/types/folder_entity_dataset_data.py +3 -3
- vellum/client/types/folder_entity_document_index.py +3 -3
- vellum/client/types/folder_entity_document_index_data.py +4 -4
- vellum/client/types/folder_entity_folder.py +3 -3
- vellum/client/types/folder_entity_folder_data.py +2 -2
- vellum/client/types/folder_entity_prompt_sandbox.py +3 -3
- vellum/client/types/folder_entity_prompt_sandbox_data.py +3 -3
- vellum/client/types/folder_entity_test_suite.py +3 -3
- vellum/client/types/folder_entity_test_suite_data.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox_data.py +3 -3
- vellum/client/types/fulfilled_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_response.py +3 -3
- vellum/client/types/fulfilled_execute_workflow_workflow_result_event.py +11 -5
- vellum/client/types/fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/fulfilled_workflow_node_result_event.py +12 -6
- vellum/client/types/function_call.py +2 -2
- vellum/client/types/function_call_chat_message_content.py +3 -3
- vellum/client/types/function_call_chat_message_content_request.py +3 -3
- vellum/client/types/function_call_chat_message_content_value.py +2 -2
- vellum/client/types/function_call_chat_message_content_value_request.py +2 -2
- vellum/client/types/function_call_input.py +3 -3
- vellum/client/types/function_call_prompt_block.py +4 -4
- vellum/client/types/function_call_request.py +2 -2
- vellum/client/types/function_call_vellum_value.py +3 -3
- vellum/client/types/function_call_vellum_value_request.py +3 -3
- vellum/client/types/function_definition.py +4 -4
- vellum/client/types/generate_options_request.py +3 -3
- vellum/client/types/generate_request.py +2 -2
- vellum/client/types/generate_response.py +3 -3
- vellum/client/types/generate_result.py +3 -3
- vellum/client/types/generate_result_data.py +3 -3
- vellum/client/types/generate_result_error.py +3 -3
- vellum/client/types/generate_stream_response.py +3 -3
- vellum/client/types/generate_stream_result.py +4 -4
- vellum/client/types/generate_stream_result_data.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_config.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_config_request.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001_request.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004_request.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002_request.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer_request.py +3 -3
- vellum/client/types/image_chat_message_content.py +3 -3
- vellum/client/types/image_chat_message_content_request.py +3 -3
- vellum/client/types/image_prompt_block.py +4 -4
- vellum/client/types/image_vellum_value.py +3 -3
- vellum/client/types/image_vellum_value_request.py +3 -3
- vellum/client/types/indexing_config_vectorizer.py +7 -6
- vellum/client/types/indexing_config_vectorizer_request.py +7 -6
- vellum/client/types/initiated_ad_hoc_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/initiated_workflow_node_result_event.py +12 -6
- vellum/client/types/instructor_vectorizer_config.py +2 -2
- vellum/client/types/instructor_vectorizer_config_request.py +2 -2
- vellum/client/types/invoked_port.py +2 -2
- vellum/client/types/jinja_prompt_block.py +4 -4
- vellum/client/types/json_input.py +3 -3
- vellum/client/types/json_input_request.py +3 -3
- vellum/client/types/json_vellum_value.py +2 -2
- vellum/client/types/json_vellum_value_request.py +2 -2
- vellum/client/types/map_node_result.py +3 -3
- vellum/client/types/map_node_result_data.py +3 -3
- vellum/client/types/merge_node_result.py +3 -3
- vellum/client/types/merge_node_result_data.py +2 -2
- vellum/client/types/metadata_filter_config_request.py +12 -6
- vellum/client/types/metadata_filter_rule_request.py +5 -5
- vellum/client/types/metadata_filters_request.py +1 -0
- vellum/client/types/metric_definition_execution.py +10 -4
- vellum/client/types/metric_definition_history_item.py +10 -4
- vellum/client/types/metric_definition_input.py +3 -2
- vellum/client/types/metric_node_result.py +2 -2
- vellum/client/types/ml_model_read.py +6 -3
- vellum/client/types/ml_model_usage.py +2 -2
- vellum/client/types/ml_model_usage_wrapper.py +3 -3
- vellum/client/types/named_scenario_input_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_scenario_input_json_variable_value_request.py +2 -2
- vellum/client/types/named_scenario_input_request.py +3 -2
- vellum/client/types/named_scenario_input_string_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_array_variable_value.py +11 -5
- vellum/client/types/named_test_case_array_variable_value_request.py +11 -5
- vellum/client/types/named_test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/named_test_case_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_error_variable_value.py +3 -3
- vellum/client/types/named_test_case_error_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_json_variable_value.py +2 -2
- vellum/client/types/named_test_case_json_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_number_variable_value.py +2 -2
- vellum/client/types/named_test_case_number_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_search_results_variable_value.py +3 -3
- vellum/client/types/named_test_case_search_results_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_string_variable_value.py +2 -2
- vellum/client/types/named_test_case_string_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_variable_value.py +6 -5
- vellum/client/types/named_test_case_variable_value_request.py +6 -5
- vellum/client/types/node_execution_fulfilled_body.py +4 -4
- vellum/client/types/node_execution_fulfilled_event.py +22 -16
- vellum/client/types/node_execution_initiated_body.py +3 -3
- vellum/client/types/node_execution_initiated_event.py +22 -16
- vellum/client/types/node_execution_paused_body.py +3 -3
- vellum/client/types/node_execution_paused_event.py +22 -16
- vellum/client/types/node_execution_rejected_body.py +4 -4
- vellum/client/types/node_execution_rejected_event.py +22 -16
- vellum/client/types/node_execution_resumed_body.py +3 -3
- vellum/client/types/node_execution_resumed_event.py +22 -16
- vellum/client/types/node_execution_span.py +21 -13
- vellum/client/types/node_execution_span_attributes.py +2 -2
- vellum/client/types/node_execution_streaming_body.py +4 -4
- vellum/client/types/node_execution_streaming_event.py +22 -16
- vellum/client/types/node_input_compiled_array_value.py +11 -5
- vellum/client/types/node_input_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_input_compiled_error_value.py +3 -3
- vellum/client/types/node_input_compiled_function_call_value.py +3 -3
- vellum/client/types/node_input_compiled_json_value.py +2 -2
- vellum/client/types/node_input_compiled_number_value.py +2 -2
- vellum/client/types/node_input_compiled_search_results_value.py +3 -3
- vellum/client/types/node_input_compiled_secret_value.py +3 -3
- vellum/client/types/node_input_compiled_string_value.py +2 -2
- vellum/client/types/node_input_variable_compiled_value.py +6 -5
- vellum/client/types/node_output_compiled_array_value.py +12 -6
- vellum/client/types/node_output_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_output_compiled_error_value.py +3 -3
- vellum/client/types/node_output_compiled_function_call_value.py +3 -3
- vellum/client/types/node_output_compiled_json_value.py +3 -3
- vellum/client/types/node_output_compiled_number_value.py +3 -3
- vellum/client/types/node_output_compiled_search_results_value.py +3 -3
- vellum/client/types/node_output_compiled_string_value.py +3 -3
- vellum/client/types/node_output_compiled_thinking_value.py +3 -3
- vellum/client/types/node_output_compiled_value.py +6 -5
- vellum/client/types/node_parent_context.py +12 -12
- vellum/client/types/normalized_log_probs.py +3 -3
- vellum/client/types/normalized_token_log_probs.py +2 -2
- vellum/client/types/number_input.py +3 -3
- vellum/client/types/number_vellum_value.py +2 -2
- vellum/client/types/number_vellum_value_request.py +2 -2
- vellum/client/types/open_ai_vectorizer_config.py +3 -3
- vellum/client/types/open_ai_vectorizer_config_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002_request.py +3 -3
- vellum/client/types/organization_read.py +4 -4
- vellum/client/types/paginated_container_image_read_list.py +3 -3
- vellum/client/types/paginated_deployment_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_document_index_read_list.py +3 -3
- vellum/client/types/paginated_folder_entity_list.py +3 -3
- vellum/client/types/paginated_slim_deployment_read_list.py +10 -4
- vellum/client/types/paginated_slim_document_list.py +3 -3
- vellum/client/types/paginated_slim_workflow_deployment_list.py +10 -4
- vellum/client/types/paginated_test_suite_run_execution_list.py +10 -4
- vellum/client/types/paginated_test_suite_test_case_list.py +10 -4
- vellum/client/types/paginated_workflow_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_workflow_sandbox_example_list.py +3 -3
- vellum/client/types/parent_context.py +5 -5
- vellum/client/types/pdf_search_result_meta_source.py +2 -2
- vellum/client/types/pdf_search_result_meta_source_request.py +2 -2
- vellum/client/types/plain_text_prompt_block.py +4 -4
- vellum/client/types/price.py +3 -3
- vellum/client/types/prompt_block.py +9 -6
- vellum/client/types/prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/prompt_deployment_input_request.py +3 -2
- vellum/client/types/prompt_deployment_parent_context.py +11 -11
- vellum/client/types/prompt_deployment_release.py +6 -6
- vellum/client/types/prompt_deployment_release_prompt_deployment.py +2 -2
- vellum/client/types/prompt_deployment_release_prompt_version.py +4 -4
- vellum/client/types/prompt_exec_config.py +15 -9
- vellum/client/types/prompt_execution_meta.py +3 -3
- vellum/client/types/prompt_node_execution_meta.py +3 -3
- vellum/client/types/prompt_node_result.py +3 -3
- vellum/client/types/prompt_node_result_data.py +3 -3
- vellum/client/types/prompt_output.py +3 -2
- vellum/client/types/prompt_parameters.py +2 -2
- vellum/client/types/prompt_push_response.py +2 -2
- vellum/client/types/prompt_request_chat_history_input.py +3 -3
- vellum/client/types/prompt_request_input.py +3 -2
- vellum/client/types/prompt_request_json_input.py +3 -3
- vellum/client/types/prompt_request_string_input.py +3 -3
- vellum/client/types/prompt_settings.py +2 -2
- vellum/client/types/prompt_version_build_config_sandbox.py +2 -2
- vellum/client/types/raw_prompt_execution_overrides_request.py +2 -2
- vellum/client/types/reducto_chunker_config.py +2 -2
- vellum/client/types/reducto_chunker_config_request.py +2 -2
- vellum/client/types/reducto_chunking.py +3 -3
- vellum/client/types/reducto_chunking_request.py +3 -3
- vellum/client/types/rejected_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_response.py +3 -3
- vellum/client/types/rejected_execute_workflow_workflow_result_event.py +4 -4
- vellum/client/types/rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/rejected_workflow_node_result_event.py +12 -6
- vellum/client/types/release_created_by.py +2 -2
- vellum/client/types/release_environment.py +2 -2
- vellum/client/types/release_release_tag.py +3 -3
- vellum/client/types/release_review_reviewer.py +2 -2
- vellum/client/types/release_tag_release.py +2 -2
- vellum/client/types/replace_test_suite_test_case_request.py +9 -3
- vellum/client/types/rich_text_child_block.py +2 -1
- vellum/client/types/rich_text_prompt_block.py +4 -4
- vellum/client/types/sandbox_scenario.py +3 -3
- vellum/client/types/scenario_input.py +3 -2
- vellum/client/types/scenario_input_chat_history_variable_value.py +3 -3
- vellum/client/types/scenario_input_json_variable_value.py +2 -2
- vellum/client/types/scenario_input_string_variable_value.py +2 -2
- vellum/client/types/search_filters_request.py +11 -5
- vellum/client/types/search_node_result.py +3 -3
- vellum/client/types/search_node_result_data.py +3 -3
- vellum/client/types/search_request_options_request.py +13 -7
- vellum/client/types/search_response.py +3 -3
- vellum/client/types/search_result.py +3 -3
- vellum/client/types/search_result_document.py +2 -2
- vellum/client/types/search_result_document_request.py +2 -2
- vellum/client/types/search_result_merging_request.py +2 -2
- vellum/client/types/search_result_meta.py +3 -3
- vellum/client/types/search_result_meta_request.py +3 -3
- vellum/client/types/search_result_request.py +3 -3
- vellum/client/types/search_results_input.py +3 -3
- vellum/client/types/search_results_vellum_value.py +3 -3
- vellum/client/types/search_results_vellum_value_request.py +3 -3
- vellum/client/types/search_weights_request.py +2 -2
- vellum/client/types/sentence_chunker_config.py +2 -2
- vellum/client/types/sentence_chunker_config_request.py +2 -2
- vellum/client/types/sentence_chunking.py +3 -3
- vellum/client/types/sentence_chunking_request.py +3 -3
- vellum/client/types/slim_deployment_read.py +10 -4
- vellum/client/types/slim_document.py +5 -5
- vellum/client/types/slim_document_document_to_document_index.py +3 -3
- vellum/client/types/slim_release_review.py +4 -4
- vellum/client/types/slim_workflow_deployment.py +11 -5
- vellum/client/types/slim_workflow_execution_read.py +21 -15
- vellum/client/types/span_link.py +12 -12
- vellum/client/types/streaming_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/streaming_execute_prompt_event.py +3 -3
- vellum/client/types/streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/streaming_workflow_node_result_event.py +12 -6
- vellum/client/types/string_chat_message_content.py +2 -2
- vellum/client/types/string_chat_message_content_request.py +2 -2
- vellum/client/types/string_input.py +3 -3
- vellum/client/types/string_input_request.py +3 -3
- vellum/client/types/string_vellum_value.py +2 -2
- vellum/client/types/string_vellum_value_request.py +2 -2
- vellum/client/types/submit_completion_actual_request.py +3 -3
- vellum/client/types/submit_workflow_execution_actual_request.py +3 -2
- vellum/client/types/subworkflow_node_result.py +3 -3
- vellum/client/types/subworkflow_node_result_data.py +2 -2
- vellum/client/types/templating_node_array_result.py +11 -5
- vellum/client/types/templating_node_chat_history_result.py +3 -3
- vellum/client/types/templating_node_error_result.py +3 -3
- vellum/client/types/templating_node_function_call_result.py +3 -3
- vellum/client/types/templating_node_json_result.py +2 -2
- vellum/client/types/templating_node_number_result.py +2 -2
- vellum/client/types/templating_node_result.py +10 -4
- vellum/client/types/templating_node_result_data.py +10 -4
- vellum/client/types/templating_node_result_output.py +6 -5
- vellum/client/types/templating_node_search_results_result.py +3 -3
- vellum/client/types/templating_node_string_result.py +2 -2
- vellum/client/types/terminal_node_array_result.py +11 -5
- vellum/client/types/terminal_node_chat_history_result.py +2 -2
- vellum/client/types/terminal_node_error_result.py +2 -2
- vellum/client/types/terminal_node_function_call_result.py +2 -2
- vellum/client/types/terminal_node_json_result.py +2 -2
- vellum/client/types/terminal_node_number_result.py +2 -2
- vellum/client/types/terminal_node_result.py +10 -4
- vellum/client/types/terminal_node_result_data.py +10 -4
- vellum/client/types/terminal_node_result_output.py +6 -5
- vellum/client/types/terminal_node_search_results_result.py +2 -2
- vellum/client/types/terminal_node_string_result.py +2 -2
- vellum/client/types/test_case_array_variable_value.py +11 -5
- vellum/client/types/test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/test_case_error_variable_value.py +3 -3
- vellum/client/types/test_case_function_call_variable_value.py +3 -3
- vellum/client/types/test_case_json_variable_value.py +2 -2
- vellum/client/types/test_case_number_variable_value.py +2 -2
- vellum/client/types/test_case_search_results_variable_value.py +3 -3
- vellum/client/types/test_case_string_variable_value.py +2 -2
- vellum/client/types/test_case_variable_value.py +6 -5
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_exec_config.py +2 -1
- vellum/client/types/test_suite_run_exec_config_request.py +2 -1
- vellum/client/types/test_suite_run_execution.py +11 -5
- vellum/client/types/test_suite_run_execution_array_output.py +11 -5
- vellum/client/types/test_suite_run_execution_chat_history_output.py +3 -3
- vellum/client/types/test_suite_run_execution_error_output.py +3 -3
- vellum/client/types/test_suite_run_execution_function_call_output.py +3 -3
- vellum/client/types/test_suite_run_execution_json_output.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_definition.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_result.py +11 -5
- vellum/client/types/test_suite_run_execution_number_output.py +2 -2
- vellum/client/types/test_suite_run_execution_output.py +6 -5
- vellum/client/types/test_suite_run_execution_search_results_output.py +3 -3
- vellum/client/types/test_suite_run_execution_string_output.py +2 -2
- vellum/client/types/test_suite_run_external_exec_config.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_data.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_data_request.py +10 -4
- vellum/client/types/test_suite_run_external_exec_config_request.py +10 -4
- vellum/client/types/test_suite_run_metric_array_output.py +11 -5
- vellum/client/types/test_suite_run_metric_error_output.py +3 -3
- vellum/client/types/test_suite_run_metric_json_output.py +2 -2
- vellum/client/types/test_suite_run_metric_number_output.py +2 -2
- vellum/client/types/test_suite_run_metric_output.py +5 -4
- vellum/client/types/test_suite_run_metric_string_output.py +2 -2
- vellum/client/types/test_suite_run_progress.py +2 -2
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_read.py +12 -6
- vellum/client/types/test_suite_run_test_suite.py +2 -2
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_test_case.py +10 -4
- vellum/client/types/test_suite_test_case_bulk_operation_request.py +2 -1
- vellum/client/types/test_suite_test_case_bulk_result.py +2 -1
- vellum/client/types/test_suite_test_case_create_bulk_operation_request.py +10 -4
- vellum/client/types/test_suite_test_case_created_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_created_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_data_request.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_request.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_rejected_bulk_result.py +2 -2
- vellum/client/types/test_suite_test_case_replace_bulk_operation_request.py +10 -4
- vellum/client/types/test_suite_test_case_replaced_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_replaced_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_upsert_bulk_operation_request.py +10 -4
- vellum/client/types/thinking_vellum_value.py +3 -3
- vellum/client/types/thinking_vellum_value_request.py +3 -3
- vellum/client/types/token_overlapping_window_chunker_config.py +2 -2
- vellum/client/types/token_overlapping_window_chunker_config_request.py +2 -2
- vellum/client/types/token_overlapping_window_chunking.py +3 -3
- vellum/client/types/token_overlapping_window_chunking_request.py +3 -3
- vellum/client/types/upload_document_response.py +3 -3
- vellum/client/types/upsert_test_suite_test_case_request.py +9 -3
- vellum/client/types/variable_prompt_block.py +4 -4
- vellum/client/types/vellum_audio.py +3 -3
- vellum/client/types/vellum_audio_request.py +3 -3
- vellum/client/types/vellum_code_resource_definition.py +2 -2
- vellum/client/types/vellum_document.py +2 -2
- vellum/client/types/vellum_document_request.py +2 -2
- vellum/client/types/vellum_error.py +3 -3
- vellum/client/types/vellum_error_request.py +3 -3
- vellum/client/types/vellum_image.py +2 -2
- vellum/client/types/vellum_image_request.py +2 -2
- vellum/client/types/vellum_node_execution_event.py +4 -3
- vellum/client/types/vellum_sdk_error.py +3 -3
- vellum/client/types/vellum_secret.py +2 -2
- vellum/client/types/vellum_span.py +2 -1
- vellum/client/types/vellum_value.py +11 -8
- vellum/client/types/vellum_value_logical_condition_group_request.py +6 -6
- vellum/client/types/vellum_value_logical_condition_request.py +13 -7
- vellum/client/types/vellum_value_logical_expression_request.py +2 -1
- vellum/client/types/vellum_value_request.py +11 -8
- vellum/client/types/vellum_variable.py +13 -7
- vellum/client/types/vellum_variable_extensions.py +2 -2
- vellum/client/types/vellum_variable_type.py +2 -1
- vellum/client/types/vellum_video.py +24 -0
- vellum/client/types/vellum_video_request.py +24 -0
- vellum/client/types/vellum_workflow_execution_event.py +4 -3
- vellum/client/types/video_chat_message_content.py +25 -0
- vellum/client/types/video_chat_message_content_request.py +25 -0
- vellum/client/types/video_prompt_block.py +29 -0
- vellum/client/types/video_vellum_value.py +25 -0
- vellum/client/types/video_vellum_value_request.py +25 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +18 -12
- vellum/client/types/workflow_deployment_history_item.py +10 -4
- vellum/client/types/workflow_deployment_parent_context.py +11 -11
- vellum/client/types/workflow_deployment_read.py +11 -5
- vellum/client/types/workflow_deployment_release.py +13 -7
- vellum/client/types/workflow_deployment_release_workflow_deployment.py +2 -2
- vellum/client/types/workflow_deployment_release_workflow_version.py +10 -4
- vellum/client/types/workflow_error.py +1 -0
- vellum/client/types/workflow_event_error.py +3 -3
- vellum/client/types/workflow_event_execution_read.py +22 -16
- vellum/client/types/workflow_execution_actual.py +10 -4
- vellum/client/types/workflow_execution_actual_chat_history_request.py +2 -2
- vellum/client/types/workflow_execution_actual_json_request.py +2 -2
- vellum/client/types/workflow_execution_actual_string_request.py +2 -2
- vellum/client/types/workflow_execution_detail.py +22 -16
- vellum/client/types/workflow_execution_fulfilled_body.py +3 -3
- vellum/client/types/workflow_execution_fulfilled_event.py +22 -16
- vellum/client/types/workflow_execution_initiated_body.py +3 -3
- vellum/client/types/workflow_execution_initiated_event.py +22 -16
- vellum/client/types/workflow_execution_node_result_event.py +10 -4
- vellum/client/types/workflow_execution_paused_body.py +4 -4
- vellum/client/types/workflow_execution_paused_event.py +22 -16
- vellum/client/types/workflow_execution_rejected_body.py +4 -4
- vellum/client/types/workflow_execution_rejected_event.py +22 -16
- vellum/client/types/workflow_execution_resumed_body.py +3 -3
- vellum/client/types/workflow_execution_resumed_event.py +22 -16
- vellum/client/types/workflow_execution_snapshotted_body.py +3 -3
- vellum/client/types/workflow_execution_snapshotted_event.py +22 -16
- vellum/client/types/workflow_execution_span.py +20 -12
- vellum/client/types/workflow_execution_span_attributes.py +2 -2
- vellum/client/types/workflow_execution_streaming_body.py +4 -4
- vellum/client/types/workflow_execution_streaming_event.py +22 -16
- vellum/client/types/workflow_execution_usage_calculation_error.py +3 -3
- vellum/client/types/workflow_execution_usage_calculation_fulfilled_body.py +22 -0
- vellum/client/types/workflow_execution_usage_result.py +3 -3
- vellum/client/types/workflow_execution_view_online_eval_metric_result.py +10 -4
- vellum/client/types/workflow_execution_workflow_result_event.py +10 -4
- vellum/client/types/workflow_expand_meta_request.py +2 -2
- vellum/client/types/workflow_initialization_error.py +2 -2
- vellum/client/types/workflow_node_result_data.py +8 -7
- vellum/client/types/workflow_node_result_event.py +3 -2
- vellum/client/types/workflow_output.py +6 -5
- vellum/client/types/workflow_output_array.py +12 -6
- vellum/client/types/workflow_output_chat_history.py +3 -3
- vellum/client/types/workflow_output_error.py +3 -3
- vellum/client/types/workflow_output_function_call.py +3 -3
- vellum/client/types/workflow_output_image.py +3 -3
- vellum/client/types/workflow_output_json.py +3 -3
- vellum/client/types/workflow_output_number.py +3 -3
- vellum/client/types/workflow_output_search_results.py +3 -3
- vellum/client/types/workflow_output_string.py +3 -3
- vellum/client/types/workflow_parent_context.py +12 -12
- vellum/client/types/workflow_push_deployment_config_request.py +2 -2
- vellum/client/types/workflow_push_response.py +2 -2
- vellum/client/types/workflow_release_tag_read.py +4 -4
- vellum/client/types/workflow_release_tag_workflow_deployment_history_item.py +2 -2
- vellum/client/types/workflow_request_chat_history_input_request.py +3 -3
- vellum/client/types/workflow_request_input_request.py +3 -2
- vellum/client/types/workflow_request_json_input_request.py +3 -3
- vellum/client/types/workflow_request_number_input_request.py +3 -3
- vellum/client/types/workflow_request_string_input_request.py +3 -3
- vellum/client/types/workflow_result_event.py +13 -7
- vellum/client/types/workflow_result_event_output_data.py +7 -6
- vellum/client/types/workflow_result_event_output_data_array.py +12 -6
- vellum/client/types/workflow_result_event_output_data_chat_history.py +3 -3
- vellum/client/types/workflow_result_event_output_data_error.py +3 -3
- vellum/client/types/workflow_result_event_output_data_function_call.py +3 -3
- vellum/client/types/workflow_result_event_output_data_json.py +3 -3
- vellum/client/types/workflow_result_event_output_data_number.py +3 -3
- vellum/client/types/workflow_result_event_output_data_search_results.py +3 -3
- vellum/client/types/workflow_result_event_output_data_string.py +3 -3
- vellum/client/types/workflow_sandbox_example.py +2 -2
- vellum/client/types/workflow_sandbox_parent_context.py +11 -11
- vellum/client/types/workflow_stream_event.py +2 -1
- vellum/client/types/workspace_read.py +3 -3
- vellum/client/types/workspace_secret_read.py +3 -3
- vellum/core/force_multipart.py +3 -0
- vellum/prompts/blocks/compilation.py +22 -10
- vellum/types/vellum_video.py +3 -0
- vellum/types/vellum_video_request.py +3 -0
- vellum/types/video_chat_message_content.py +3 -0
- vellum/types/video_chat_message_content_request.py +3 -0
- vellum/types/video_prompt_block.py +3 -0
- vellum/types/video_vellum_value.py +3 -0
- vellum/types/video_vellum_value_request.py +3 -0
- vellum/types/workflow_execution_usage_calculation_fulfilled_body.py +3 -0
- vellum/workflows/events/node.py +25 -10
- vellum/workflows/events/tests/test_event.py +19 -19
- vellum/workflows/events/workflow.py +11 -0
- vellum/workflows/graph/graph.py +103 -1
- vellum/workflows/graph/tests/test_graph.py +99 -0
- vellum/workflows/nodes/bases/base.py +9 -1
- vellum/workflows/nodes/displayable/bases/utils.py +4 -2
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +19 -18
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +17 -7
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +7 -7
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +47 -80
- vellum/workflows/references/environment_variable.py +10 -0
- vellum/workflows/runner/runner.py +18 -2
- vellum/workflows/state/context.py +101 -12
- vellum/workflows/state/encoder.py +2 -4
- vellum/workflows/types/definition.py +11 -1
- vellum/workflows/types/tests/test_definition.py +19 -0
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/vellum_variables.py +9 -5
- vellum/workflows/workflows/base.py +12 -5
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/METADATA +2 -2
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/RECORD +693 -675
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +55 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +164 -47
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +15 -49
- vellum_ee/workflows/display/types.py +14 -1
- vellum_ee/workflows/display/utils/expressions.py +13 -4
- vellum_ee/workflows/display/workflows/base_workflow_display.py +6 -19
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.4.dist-info}/entry_points.txt +0 -0
vellum/client/__init__.py
CHANGED
@@ -1,90 +1,62 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
import typing
|
4
|
-
from .environment import VellumEnvironment
|
5
|
-
from .types.api_version_enum import ApiVersionEnum
|
6
3
|
import os
|
4
|
+
import typing
|
5
|
+
|
7
6
|
import httpx
|
8
|
-
from .core.
|
9
|
-
from .
|
10
|
-
from .resources.ad_hoc.client import AdHocClient
|
11
|
-
from .resources.container_images.client import ContainerImagesClient
|
12
|
-
from .resources.deployments.client import DeploymentsClient
|
13
|
-
from .resources.document_indexes.client import DocumentIndexesClient
|
14
|
-
from .resources.documents.client import DocumentsClient
|
15
|
-
from .resources.folder_entities.client import FolderEntitiesClient
|
16
|
-
from .resources.metric_definitions.client import MetricDefinitionsClient
|
17
|
-
from .resources.ml_models.client import MlModelsClient
|
18
|
-
from .resources.organizations.client import OrganizationsClient
|
19
|
-
from .resources.prompts.client import PromptsClient
|
20
|
-
from .resources.sandboxes.client import SandboxesClient
|
21
|
-
from .resources.test_suite_runs.client import TestSuiteRunsClient
|
22
|
-
from .resources.test_suites.client import TestSuitesClient
|
23
|
-
from .resources.workflow_deployments.client import WorkflowDeploymentsClient
|
24
|
-
from .resources.workflow_executions.client import WorkflowExecutionsClient
|
25
|
-
from .resources.workflow_sandboxes.client import WorkflowSandboxesClient
|
26
|
-
from .resources.workflows.client import WorkflowsClient
|
27
|
-
from .resources.workspace_secrets.client import WorkspaceSecretsClient
|
28
|
-
from .resources.workspaces.client import WorkspacesClient
|
29
|
-
from .types.method_enum import MethodEnum
|
30
|
-
from .types.execute_api_request_body import ExecuteApiRequestBody
|
31
|
-
from .types.execute_api_request_headers_value import ExecuteApiRequestHeadersValue
|
32
|
-
from .types.execute_api_request_bearer_token import ExecuteApiRequestBearerToken
|
7
|
+
from .core.api_error import ApiError
|
8
|
+
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
33
9
|
from .core.request_options import RequestOptions
|
34
|
-
from .
|
10
|
+
from .environment import VellumEnvironment
|
11
|
+
from .raw_client import AsyncRawVellum, RawVellum
|
12
|
+
from .resources.ad_hoc.client import AdHocClient, AsyncAdHocClient
|
13
|
+
from .resources.container_images.client import AsyncContainerImagesClient, ContainerImagesClient
|
14
|
+
from .resources.deployments.client import AsyncDeploymentsClient, DeploymentsClient
|
15
|
+
from .resources.document_indexes.client import AsyncDocumentIndexesClient, DocumentIndexesClient
|
16
|
+
from .resources.documents.client import AsyncDocumentsClient, DocumentsClient
|
17
|
+
from .resources.folder_entities.client import AsyncFolderEntitiesClient, FolderEntitiesClient
|
18
|
+
from .resources.metric_definitions.client import AsyncMetricDefinitionsClient, MetricDefinitionsClient
|
19
|
+
from .resources.ml_models.client import AsyncMlModelsClient, MlModelsClient
|
20
|
+
from .resources.organizations.client import AsyncOrganizationsClient, OrganizationsClient
|
21
|
+
from .resources.prompts.client import AsyncPromptsClient, PromptsClient
|
22
|
+
from .resources.sandboxes.client import AsyncSandboxesClient, SandboxesClient
|
23
|
+
from .resources.test_suite_runs.client import AsyncTestSuiteRunsClient, TestSuiteRunsClient
|
24
|
+
from .resources.test_suites.client import AsyncTestSuitesClient, TestSuitesClient
|
25
|
+
from .resources.workflow_deployments.client import AsyncWorkflowDeploymentsClient, WorkflowDeploymentsClient
|
26
|
+
from .resources.workflow_executions.client import AsyncWorkflowExecutionsClient, WorkflowExecutionsClient
|
27
|
+
from .resources.workflow_sandboxes.client import AsyncWorkflowSandboxesClient, WorkflowSandboxesClient
|
28
|
+
from .resources.workflows.client import AsyncWorkflowsClient, WorkflowsClient
|
29
|
+
from .resources.workspace_secrets.client import AsyncWorkspaceSecretsClient, WorkspaceSecretsClient
|
30
|
+
from .resources.workspaces.client import AsyncWorkspacesClient, WorkspacesClient
|
31
|
+
from .types.api_version_enum import ApiVersionEnum
|
32
|
+
from .types.code_execution_package import CodeExecutionPackage
|
35
33
|
from .types.code_execution_runtime import CodeExecutionRuntime
|
36
34
|
from .types.code_executor_input import CodeExecutorInput
|
37
|
-
from .types.code_execution_package import CodeExecutionPackage
|
38
|
-
from .types.vellum_variable_type import VellumVariableType
|
39
35
|
from .types.code_executor_response import CodeExecutorResponse
|
40
|
-
from .types.
|
41
|
-
from .types.
|
42
|
-
from .types.
|
43
|
-
from .types.
|
36
|
+
from .types.execute_api_request_bearer_token import ExecuteApiRequestBearerToken
|
37
|
+
from .types.execute_api_request_body import ExecuteApiRequestBody
|
38
|
+
from .types.execute_api_request_headers_value import ExecuteApiRequestHeadersValue
|
39
|
+
from .types.execute_api_response import ExecuteApiResponse
|
44
40
|
from .types.execute_prompt_event import ExecutePromptEvent
|
45
|
-
from .
|
46
|
-
from .core.pydantic_utilities import parse_obj_as
|
47
|
-
import json
|
48
|
-
from .errors.bad_request_error import BadRequestError
|
49
|
-
from .errors.forbidden_error import ForbiddenError
|
50
|
-
from .errors.not_found_error import NotFoundError
|
51
|
-
from .errors.internal_server_error import InternalServerError
|
52
|
-
from json.decoder import JSONDecodeError
|
53
|
-
from .core.api_error import ApiError
|
54
|
-
from .types.workflow_request_input_request import WorkflowRequestInputRequest
|
55
|
-
from .types.workflow_expand_meta_request import WorkflowExpandMetaRequest
|
41
|
+
from .types.execute_prompt_response import ExecutePromptResponse
|
56
42
|
from .types.execute_workflow_response import ExecuteWorkflowResponse
|
57
|
-
from .types.workflow_execution_event_type import WorkflowExecutionEventType
|
58
|
-
from .types.workflow_stream_event import WorkflowStreamEvent
|
59
|
-
from .types.generate_request import GenerateRequest
|
60
43
|
from .types.generate_options_request import GenerateOptionsRequest
|
44
|
+
from .types.generate_request import GenerateRequest
|
61
45
|
from .types.generate_response import GenerateResponse
|
62
46
|
from .types.generate_stream_response import GenerateStreamResponse
|
47
|
+
from .types.method_enum import MethodEnum
|
48
|
+
from .types.prompt_deployment_expand_meta_request import PromptDeploymentExpandMetaRequest
|
49
|
+
from .types.prompt_deployment_input_request import PromptDeploymentInputRequest
|
50
|
+
from .types.raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
|
63
51
|
from .types.search_request_options_request import SearchRequestOptionsRequest
|
64
52
|
from .types.search_response import SearchResponse
|
65
53
|
from .types.submit_completion_actual_request import SubmitCompletionActualRequest
|
66
54
|
from .types.submit_workflow_execution_actual_request import SubmitWorkflowExecutionActualRequest
|
67
|
-
from .
|
68
|
-
from .
|
69
|
-
from .
|
70
|
-
from .
|
71
|
-
from .
|
72
|
-
from .resources.document_indexes.client import AsyncDocumentIndexesClient
|
73
|
-
from .resources.documents.client import AsyncDocumentsClient
|
74
|
-
from .resources.folder_entities.client import AsyncFolderEntitiesClient
|
75
|
-
from .resources.metric_definitions.client import AsyncMetricDefinitionsClient
|
76
|
-
from .resources.ml_models.client import AsyncMlModelsClient
|
77
|
-
from .resources.organizations.client import AsyncOrganizationsClient
|
78
|
-
from .resources.prompts.client import AsyncPromptsClient
|
79
|
-
from .resources.sandboxes.client import AsyncSandboxesClient
|
80
|
-
from .resources.test_suite_runs.client import AsyncTestSuiteRunsClient
|
81
|
-
from .resources.test_suites.client import AsyncTestSuitesClient
|
82
|
-
from .resources.workflow_deployments.client import AsyncWorkflowDeploymentsClient
|
83
|
-
from .resources.workflow_executions.client import AsyncWorkflowExecutionsClient
|
84
|
-
from .resources.workflow_sandboxes.client import AsyncWorkflowSandboxesClient
|
85
|
-
from .resources.workflows.client import AsyncWorkflowsClient
|
86
|
-
from .resources.workspace_secrets.client import AsyncWorkspaceSecretsClient
|
87
|
-
from .resources.workspaces.client import AsyncWorkspacesClient
|
55
|
+
from .types.vellum_variable_type import VellumVariableType
|
56
|
+
from .types.workflow_execution_event_type import WorkflowExecutionEventType
|
57
|
+
from .types.workflow_expand_meta_request import WorkflowExpandMetaRequest
|
58
|
+
from .types.workflow_request_input_request import WorkflowRequestInputRequest
|
59
|
+
from .types.workflow_stream_event import WorkflowStreamEvent
|
88
60
|
|
89
61
|
# this is used as the default value for optional parameters
|
90
62
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -107,6 +79,9 @@ class Vellum:
|
|
107
79
|
|
108
80
|
api_version : typing.Optional[ApiVersionEnum]
|
109
81
|
api_key : str
|
82
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
83
|
+
Additional headers to send with every request.
|
84
|
+
|
110
85
|
timeout : typing.Optional[float]
|
111
86
|
The timeout to be used, in seconds, for requests. By default there is no timeout set, unless a custom httpx client is used, in which case this default is not enforced.
|
112
87
|
|
@@ -132,6 +107,7 @@ class Vellum:
|
|
132
107
|
environment: VellumEnvironment = VellumEnvironment.PRODUCTION,
|
133
108
|
api_version: typing.Optional[ApiVersionEnum] = os.getenv("VELLUM_API_VERSION", "2025-07-30"),
|
134
109
|
api_key: str,
|
110
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
135
111
|
timeout: typing.Optional[float] = None,
|
136
112
|
follow_redirects: typing.Optional[bool] = True,
|
137
113
|
httpx_client: typing.Optional[httpx.Client] = None,
|
@@ -143,6 +119,7 @@ class Vellum:
|
|
143
119
|
environment=environment,
|
144
120
|
api_version=api_version,
|
145
121
|
api_key=api_key,
|
122
|
+
headers=headers,
|
146
123
|
httpx_client=httpx_client
|
147
124
|
if httpx_client is not None
|
148
125
|
else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
@@ -225,7 +202,7 @@ class Vellum:
|
|
225
202
|
url="x",
|
226
203
|
)
|
227
204
|
"""
|
228
|
-
|
205
|
+
_response = self._raw_client.execute_api(
|
229
206
|
url=url,
|
230
207
|
method=method,
|
231
208
|
body=body,
|
@@ -233,7 +210,7 @@ class Vellum:
|
|
233
210
|
bearer_token=bearer_token,
|
234
211
|
request_options=request_options,
|
235
212
|
)
|
236
|
-
return
|
213
|
+
return _response.data
|
237
214
|
|
238
215
|
def execute_code(
|
239
216
|
self,
|
@@ -300,7 +277,7 @@ class Vellum:
|
|
300
277
|
output_type="STRING",
|
301
278
|
)
|
302
279
|
"""
|
303
|
-
|
280
|
+
_response = self._raw_client.execute_code(
|
304
281
|
code=code,
|
305
282
|
runtime=runtime,
|
306
283
|
input_values=input_values,
|
@@ -308,7 +285,7 @@ class Vellum:
|
|
308
285
|
output_type=output_type,
|
309
286
|
request_options=request_options,
|
310
287
|
)
|
311
|
-
return
|
288
|
+
return _response.data
|
312
289
|
|
313
290
|
def execute_prompt(
|
314
291
|
self,
|
@@ -385,7 +362,7 @@ class Vellum:
|
|
385
362
|
],
|
386
363
|
)
|
387
364
|
"""
|
388
|
-
|
365
|
+
_response = self._raw_client.execute_prompt(
|
389
366
|
inputs=inputs,
|
390
367
|
prompt_deployment_id=prompt_deployment_id,
|
391
368
|
prompt_deployment_name=prompt_deployment_name,
|
@@ -397,7 +374,7 @@ class Vellum:
|
|
397
374
|
metadata=metadata,
|
398
375
|
request_options=request_options,
|
399
376
|
)
|
400
|
-
return
|
377
|
+
return _response.data
|
401
378
|
|
402
379
|
def execute_prompt_stream(
|
403
380
|
self,
|
@@ -476,98 +453,19 @@ class Vellum:
|
|
476
453
|
for chunk in response:
|
477
454
|
yield chunk
|
478
455
|
"""
|
479
|
-
with self._raw_client.
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
"release_tag": release_tag,
|
490
|
-
"external_id": external_id,
|
491
|
-
"expand_meta": convert_and_respect_annotation_metadata(
|
492
|
-
object_=expand_meta,
|
493
|
-
annotation=typing.Optional[PromptDeploymentExpandMetaRequest],
|
494
|
-
direction="write",
|
495
|
-
),
|
496
|
-
"raw_overrides": convert_and_respect_annotation_metadata(
|
497
|
-
object_=raw_overrides,
|
498
|
-
annotation=typing.Optional[RawPromptExecutionOverridesRequest],
|
499
|
-
direction="write",
|
500
|
-
),
|
501
|
-
"expand_raw": expand_raw,
|
502
|
-
"metadata": metadata,
|
503
|
-
},
|
504
|
-
headers={
|
505
|
-
"content-type": "application/json",
|
506
|
-
},
|
456
|
+
with self._raw_client.execute_prompt_stream(
|
457
|
+
inputs=inputs,
|
458
|
+
prompt_deployment_id=prompt_deployment_id,
|
459
|
+
prompt_deployment_name=prompt_deployment_name,
|
460
|
+
release_tag=release_tag,
|
461
|
+
external_id=external_id,
|
462
|
+
expand_meta=expand_meta,
|
463
|
+
raw_overrides=raw_overrides,
|
464
|
+
expand_raw=expand_raw,
|
465
|
+
metadata=metadata,
|
507
466
|
request_options=request_options,
|
508
|
-
|
509
|
-
|
510
|
-
try:
|
511
|
-
if 200 <= _response.status_code < 300:
|
512
|
-
for _text in _response.iter_lines():
|
513
|
-
try:
|
514
|
-
if len(_text) == 0:
|
515
|
-
continue
|
516
|
-
yield typing.cast(
|
517
|
-
ExecutePromptEvent,
|
518
|
-
parse_obj_as(
|
519
|
-
type_=ExecutePromptEvent, # type: ignore
|
520
|
-
object_=json.loads(_text),
|
521
|
-
),
|
522
|
-
)
|
523
|
-
except Exception:
|
524
|
-
pass
|
525
|
-
return
|
526
|
-
_response.read()
|
527
|
-
if _response.status_code == 400:
|
528
|
-
raise BadRequestError(
|
529
|
-
typing.cast(
|
530
|
-
typing.Optional[typing.Any],
|
531
|
-
parse_obj_as(
|
532
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
533
|
-
object_=_response.json(),
|
534
|
-
),
|
535
|
-
)
|
536
|
-
)
|
537
|
-
if _response.status_code == 403:
|
538
|
-
raise ForbiddenError(
|
539
|
-
typing.cast(
|
540
|
-
typing.Optional[typing.Any],
|
541
|
-
parse_obj_as(
|
542
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
543
|
-
object_=_response.json(),
|
544
|
-
),
|
545
|
-
)
|
546
|
-
)
|
547
|
-
if _response.status_code == 404:
|
548
|
-
raise NotFoundError(
|
549
|
-
typing.cast(
|
550
|
-
typing.Optional[typing.Any],
|
551
|
-
parse_obj_as(
|
552
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
553
|
-
object_=_response.json(),
|
554
|
-
),
|
555
|
-
)
|
556
|
-
)
|
557
|
-
if _response.status_code == 500:
|
558
|
-
raise InternalServerError(
|
559
|
-
typing.cast(
|
560
|
-
typing.Optional[typing.Any],
|
561
|
-
parse_obj_as(
|
562
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
563
|
-
object_=_response.json(),
|
564
|
-
),
|
565
|
-
)
|
566
|
-
)
|
567
|
-
_response_json = _response.json()
|
568
|
-
except JSONDecodeError:
|
569
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
570
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
467
|
+
) as r:
|
468
|
+
yield from r.data
|
571
469
|
|
572
470
|
def execute_workflow(
|
573
471
|
self,
|
@@ -636,7 +534,7 @@ class Vellum:
|
|
636
534
|
],
|
637
535
|
)
|
638
536
|
"""
|
639
|
-
|
537
|
+
_response = self._raw_client.execute_workflow(
|
640
538
|
inputs=inputs,
|
641
539
|
expand_meta=expand_meta,
|
642
540
|
workflow_deployment_id=workflow_deployment_id,
|
@@ -646,7 +544,7 @@ class Vellum:
|
|
646
544
|
metadata=metadata,
|
647
545
|
request_options=request_options,
|
648
546
|
)
|
649
|
-
return
|
547
|
+
return _response.data
|
650
548
|
|
651
549
|
def execute_workflow_stream(
|
652
550
|
self,
|
@@ -721,81 +619,18 @@ class Vellum:
|
|
721
619
|
for chunk in response:
|
722
620
|
yield chunk
|
723
621
|
"""
|
724
|
-
with self._raw_client.
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
object_=expand_meta, annotation=typing.Optional[WorkflowExpandMetaRequest], direction="write"
|
734
|
-
),
|
735
|
-
"workflow_deployment_id": workflow_deployment_id,
|
736
|
-
"workflow_deployment_name": workflow_deployment_name,
|
737
|
-
"release_tag": release_tag,
|
738
|
-
"external_id": external_id,
|
739
|
-
"event_types": event_types,
|
740
|
-
"metadata": metadata,
|
741
|
-
},
|
742
|
-
headers={
|
743
|
-
"content-type": "application/json",
|
744
|
-
},
|
622
|
+
with self._raw_client.execute_workflow_stream(
|
623
|
+
inputs=inputs,
|
624
|
+
expand_meta=expand_meta,
|
625
|
+
workflow_deployment_id=workflow_deployment_id,
|
626
|
+
workflow_deployment_name=workflow_deployment_name,
|
627
|
+
release_tag=release_tag,
|
628
|
+
external_id=external_id,
|
629
|
+
event_types=event_types,
|
630
|
+
metadata=metadata,
|
745
631
|
request_options=request_options,
|
746
|
-
|
747
|
-
|
748
|
-
try:
|
749
|
-
if 200 <= _response.status_code < 300:
|
750
|
-
for _text in _response.iter_lines():
|
751
|
-
try:
|
752
|
-
if len(_text) == 0:
|
753
|
-
continue
|
754
|
-
yield typing.cast(
|
755
|
-
WorkflowStreamEvent,
|
756
|
-
parse_obj_as(
|
757
|
-
type_=WorkflowStreamEvent, # type: ignore
|
758
|
-
object_=json.loads(_text),
|
759
|
-
),
|
760
|
-
)
|
761
|
-
except Exception:
|
762
|
-
pass
|
763
|
-
return
|
764
|
-
_response.read()
|
765
|
-
if _response.status_code == 400:
|
766
|
-
raise BadRequestError(
|
767
|
-
typing.cast(
|
768
|
-
typing.Optional[typing.Any],
|
769
|
-
parse_obj_as(
|
770
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
771
|
-
object_=_response.json(),
|
772
|
-
),
|
773
|
-
)
|
774
|
-
)
|
775
|
-
if _response.status_code == 404:
|
776
|
-
raise NotFoundError(
|
777
|
-
typing.cast(
|
778
|
-
typing.Optional[typing.Any],
|
779
|
-
parse_obj_as(
|
780
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
781
|
-
object_=_response.json(),
|
782
|
-
),
|
783
|
-
)
|
784
|
-
)
|
785
|
-
if _response.status_code == 500:
|
786
|
-
raise InternalServerError(
|
787
|
-
typing.cast(
|
788
|
-
typing.Optional[typing.Any],
|
789
|
-
parse_obj_as(
|
790
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
791
|
-
object_=_response.json(),
|
792
|
-
),
|
793
|
-
)
|
794
|
-
)
|
795
|
-
_response_json = _response.json()
|
796
|
-
except JSONDecodeError:
|
797
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
798
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
632
|
+
) as r:
|
633
|
+
yield from r.data
|
799
634
|
|
800
635
|
def generate(
|
801
636
|
self,
|
@@ -853,14 +688,14 @@ class Vellum:
|
|
853
688
|
],
|
854
689
|
)
|
855
690
|
"""
|
856
|
-
|
691
|
+
_response = self._raw_client.generate(
|
857
692
|
requests=requests,
|
858
693
|
deployment_id=deployment_id,
|
859
694
|
deployment_name=deployment_name,
|
860
695
|
options=options,
|
861
696
|
request_options=request_options,
|
862
697
|
)
|
863
|
-
return
|
698
|
+
return _response.data
|
864
699
|
|
865
700
|
def generate_stream(
|
866
701
|
self,
|
@@ -920,87 +755,14 @@ class Vellum:
|
|
920
755
|
for chunk in response:
|
921
756
|
yield chunk
|
922
757
|
"""
|
923
|
-
with self._raw_client.
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
"deployment_id": deployment_id,
|
929
|
-
"deployment_name": deployment_name,
|
930
|
-
"requests": convert_and_respect_annotation_metadata(
|
931
|
-
object_=requests, annotation=typing.Sequence[GenerateRequest], direction="write"
|
932
|
-
),
|
933
|
-
"options": convert_and_respect_annotation_metadata(
|
934
|
-
object_=options, annotation=typing.Optional[GenerateOptionsRequest], direction="write"
|
935
|
-
),
|
936
|
-
},
|
937
|
-
headers={
|
938
|
-
"content-type": "application/json",
|
939
|
-
},
|
758
|
+
with self._raw_client.generate_stream(
|
759
|
+
requests=requests,
|
760
|
+
deployment_id=deployment_id,
|
761
|
+
deployment_name=deployment_name,
|
762
|
+
options=options,
|
940
763
|
request_options=request_options,
|
941
|
-
|
942
|
-
|
943
|
-
try:
|
944
|
-
if 200 <= _response.status_code < 300:
|
945
|
-
for _text in _response.iter_lines():
|
946
|
-
try:
|
947
|
-
if len(_text) == 0:
|
948
|
-
continue
|
949
|
-
yield typing.cast(
|
950
|
-
GenerateStreamResponse,
|
951
|
-
parse_obj_as(
|
952
|
-
type_=GenerateStreamResponse, # type: ignore
|
953
|
-
object_=json.loads(_text),
|
954
|
-
),
|
955
|
-
)
|
956
|
-
except Exception:
|
957
|
-
pass
|
958
|
-
return
|
959
|
-
_response.read()
|
960
|
-
if _response.status_code == 400:
|
961
|
-
raise BadRequestError(
|
962
|
-
typing.cast(
|
963
|
-
typing.Optional[typing.Any],
|
964
|
-
parse_obj_as(
|
965
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
966
|
-
object_=_response.json(),
|
967
|
-
),
|
968
|
-
)
|
969
|
-
)
|
970
|
-
if _response.status_code == 403:
|
971
|
-
raise ForbiddenError(
|
972
|
-
typing.cast(
|
973
|
-
typing.Optional[typing.Any],
|
974
|
-
parse_obj_as(
|
975
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
976
|
-
object_=_response.json(),
|
977
|
-
),
|
978
|
-
)
|
979
|
-
)
|
980
|
-
if _response.status_code == 404:
|
981
|
-
raise NotFoundError(
|
982
|
-
typing.cast(
|
983
|
-
typing.Optional[typing.Any],
|
984
|
-
parse_obj_as(
|
985
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
986
|
-
object_=_response.json(),
|
987
|
-
),
|
988
|
-
)
|
989
|
-
)
|
990
|
-
if _response.status_code == 500:
|
991
|
-
raise InternalServerError(
|
992
|
-
typing.cast(
|
993
|
-
typing.Optional[typing.Any],
|
994
|
-
parse_obj_as(
|
995
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
996
|
-
object_=_response.json(),
|
997
|
-
),
|
998
|
-
)
|
999
|
-
)
|
1000
|
-
_response_json = _response.json()
|
1001
|
-
except JSONDecodeError:
|
1002
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1003
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
764
|
+
) as r:
|
765
|
+
yield from r.data
|
1004
766
|
|
1005
767
|
def search(
|
1006
768
|
self,
|
@@ -1052,7 +814,7 @@ class Vellum:
|
|
1052
814
|
query="x",
|
1053
815
|
)
|
1054
816
|
"""
|
1055
|
-
|
817
|
+
_response = self._raw_client.search(
|
1056
818
|
query=query,
|
1057
819
|
index_id=index_id,
|
1058
820
|
index_name=index_name,
|
@@ -1060,7 +822,7 @@ class Vellum:
|
|
1060
822
|
document_index=document_index,
|
1061
823
|
request_options=request_options,
|
1062
824
|
)
|
1063
|
-
return
|
825
|
+
return _response.data
|
1064
826
|
|
1065
827
|
def submit_completion_actuals(
|
1066
828
|
self,
|
@@ -1103,13 +865,13 @@ class Vellum:
|
|
1103
865
|
actuals=[SubmitCompletionActualRequest(), SubmitCompletionActualRequest()],
|
1104
866
|
)
|
1105
867
|
"""
|
1106
|
-
|
868
|
+
_response = self._raw_client.submit_completion_actuals(
|
1107
869
|
actuals=actuals,
|
1108
870
|
deployment_id=deployment_id,
|
1109
871
|
deployment_name=deployment_name,
|
1110
872
|
request_options=request_options,
|
1111
873
|
)
|
1112
|
-
return
|
874
|
+
return _response.data
|
1113
875
|
|
1114
876
|
def submit_workflow_execution_actuals(
|
1115
877
|
self,
|
@@ -1157,13 +919,10 @@ class Vellum:
|
|
1157
919
|
],
|
1158
920
|
)
|
1159
921
|
"""
|
1160
|
-
|
1161
|
-
actuals=actuals,
|
1162
|
-
execution_id=execution_id,
|
1163
|
-
external_id=external_id,
|
1164
|
-
request_options=request_options,
|
922
|
+
_response = self._raw_client.submit_workflow_execution_actuals(
|
923
|
+
actuals=actuals, execution_id=execution_id, external_id=external_id, request_options=request_options
|
1165
924
|
)
|
1166
|
-
return
|
925
|
+
return _response.data
|
1167
926
|
|
1168
927
|
|
1169
928
|
class AsyncVellum:
|
@@ -1183,6 +942,9 @@ class AsyncVellum:
|
|
1183
942
|
|
1184
943
|
api_version : typing.Optional[ApiVersionEnum]
|
1185
944
|
api_key : str
|
945
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
946
|
+
Additional headers to send with every request.
|
947
|
+
|
1186
948
|
timeout : typing.Optional[float]
|
1187
949
|
The timeout to be used, in seconds, for requests. By default there is no timeout set, unless a custom httpx client is used, in which case this default is not enforced.
|
1188
950
|
|
@@ -1208,6 +970,7 @@ class AsyncVellum:
|
|
1208
970
|
environment: VellumEnvironment = VellumEnvironment.PRODUCTION,
|
1209
971
|
api_version: typing.Optional[ApiVersionEnum] = os.getenv("VELLUM_API_VERSION", "2025-07-30"),
|
1210
972
|
api_key: str,
|
973
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
1211
974
|
timeout: typing.Optional[float] = None,
|
1212
975
|
follow_redirects: typing.Optional[bool] = True,
|
1213
976
|
httpx_client: typing.Optional[httpx.AsyncClient] = None,
|
@@ -1219,6 +982,7 @@ class AsyncVellum:
|
|
1219
982
|
environment=environment,
|
1220
983
|
api_version=api_version,
|
1221
984
|
api_key=api_key,
|
985
|
+
headers=headers,
|
1222
986
|
httpx_client=httpx_client
|
1223
987
|
if httpx_client is not None
|
1224
988
|
else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
@@ -1309,7 +1073,7 @@ class AsyncVellum:
|
|
1309
1073
|
|
1310
1074
|
asyncio.run(main())
|
1311
1075
|
"""
|
1312
|
-
|
1076
|
+
_response = await self._raw_client.execute_api(
|
1313
1077
|
url=url,
|
1314
1078
|
method=method,
|
1315
1079
|
body=body,
|
@@ -1317,7 +1081,7 @@ class AsyncVellum:
|
|
1317
1081
|
bearer_token=bearer_token,
|
1318
1082
|
request_options=request_options,
|
1319
1083
|
)
|
1320
|
-
return
|
1084
|
+
return _response.data
|
1321
1085
|
|
1322
1086
|
async def execute_code(
|
1323
1087
|
self,
|
@@ -1392,7 +1156,7 @@ class AsyncVellum:
|
|
1392
1156
|
|
1393
1157
|
asyncio.run(main())
|
1394
1158
|
"""
|
1395
|
-
|
1159
|
+
_response = await self._raw_client.execute_code(
|
1396
1160
|
code=code,
|
1397
1161
|
runtime=runtime,
|
1398
1162
|
input_values=input_values,
|
@@ -1400,7 +1164,7 @@ class AsyncVellum:
|
|
1400
1164
|
output_type=output_type,
|
1401
1165
|
request_options=request_options,
|
1402
1166
|
)
|
1403
|
-
return
|
1167
|
+
return _response.data
|
1404
1168
|
|
1405
1169
|
async def execute_prompt(
|
1406
1170
|
self,
|
@@ -1485,7 +1249,7 @@ class AsyncVellum:
|
|
1485
1249
|
|
1486
1250
|
asyncio.run(main())
|
1487
1251
|
"""
|
1488
|
-
|
1252
|
+
_response = await self._raw_client.execute_prompt(
|
1489
1253
|
inputs=inputs,
|
1490
1254
|
prompt_deployment_id=prompt_deployment_id,
|
1491
1255
|
prompt_deployment_name=prompt_deployment_name,
|
@@ -1497,7 +1261,7 @@ class AsyncVellum:
|
|
1497
1261
|
metadata=metadata,
|
1498
1262
|
request_options=request_options,
|
1499
1263
|
)
|
1500
|
-
return
|
1264
|
+
return _response.data
|
1501
1265
|
|
1502
1266
|
async def execute_prompt_stream(
|
1503
1267
|
self,
|
@@ -1584,98 +1348,20 @@ class AsyncVellum:
|
|
1584
1348
|
|
1585
1349
|
asyncio.run(main())
|
1586
1350
|
"""
|
1587
|
-
async with self._raw_client.
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
"release_tag": release_tag,
|
1598
|
-
"external_id": external_id,
|
1599
|
-
"expand_meta": convert_and_respect_annotation_metadata(
|
1600
|
-
object_=expand_meta,
|
1601
|
-
annotation=typing.Optional[PromptDeploymentExpandMetaRequest],
|
1602
|
-
direction="write",
|
1603
|
-
),
|
1604
|
-
"raw_overrides": convert_and_respect_annotation_metadata(
|
1605
|
-
object_=raw_overrides,
|
1606
|
-
annotation=typing.Optional[RawPromptExecutionOverridesRequest],
|
1607
|
-
direction="write",
|
1608
|
-
),
|
1609
|
-
"expand_raw": expand_raw,
|
1610
|
-
"metadata": metadata,
|
1611
|
-
},
|
1612
|
-
headers={
|
1613
|
-
"content-type": "application/json",
|
1614
|
-
},
|
1351
|
+
async with self._raw_client.execute_prompt_stream(
|
1352
|
+
inputs=inputs,
|
1353
|
+
prompt_deployment_id=prompt_deployment_id,
|
1354
|
+
prompt_deployment_name=prompt_deployment_name,
|
1355
|
+
release_tag=release_tag,
|
1356
|
+
external_id=external_id,
|
1357
|
+
expand_meta=expand_meta,
|
1358
|
+
raw_overrides=raw_overrides,
|
1359
|
+
expand_raw=expand_raw,
|
1360
|
+
metadata=metadata,
|
1615
1361
|
request_options=request_options,
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
if 200 <= _response.status_code < 300:
|
1620
|
-
async for _text in _response.aiter_lines():
|
1621
|
-
try:
|
1622
|
-
if len(_text) == 0:
|
1623
|
-
continue
|
1624
|
-
yield typing.cast(
|
1625
|
-
ExecutePromptEvent,
|
1626
|
-
parse_obj_as(
|
1627
|
-
type_=ExecutePromptEvent, # type: ignore
|
1628
|
-
object_=json.loads(_text),
|
1629
|
-
),
|
1630
|
-
)
|
1631
|
-
except Exception:
|
1632
|
-
pass
|
1633
|
-
return
|
1634
|
-
await _response.aread()
|
1635
|
-
if _response.status_code == 400:
|
1636
|
-
raise BadRequestError(
|
1637
|
-
typing.cast(
|
1638
|
-
typing.Optional[typing.Any],
|
1639
|
-
parse_obj_as(
|
1640
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1641
|
-
object_=_response.json(),
|
1642
|
-
),
|
1643
|
-
)
|
1644
|
-
)
|
1645
|
-
if _response.status_code == 403:
|
1646
|
-
raise ForbiddenError(
|
1647
|
-
typing.cast(
|
1648
|
-
typing.Optional[typing.Any],
|
1649
|
-
parse_obj_as(
|
1650
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1651
|
-
object_=_response.json(),
|
1652
|
-
),
|
1653
|
-
)
|
1654
|
-
)
|
1655
|
-
if _response.status_code == 404:
|
1656
|
-
raise NotFoundError(
|
1657
|
-
typing.cast(
|
1658
|
-
typing.Optional[typing.Any],
|
1659
|
-
parse_obj_as(
|
1660
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1661
|
-
object_=_response.json(),
|
1662
|
-
),
|
1663
|
-
)
|
1664
|
-
)
|
1665
|
-
if _response.status_code == 500:
|
1666
|
-
raise InternalServerError(
|
1667
|
-
typing.cast(
|
1668
|
-
typing.Optional[typing.Any],
|
1669
|
-
parse_obj_as(
|
1670
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1671
|
-
object_=_response.json(),
|
1672
|
-
),
|
1673
|
-
)
|
1674
|
-
)
|
1675
|
-
_response_json = _response.json()
|
1676
|
-
except JSONDecodeError:
|
1677
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1678
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1362
|
+
) as r:
|
1363
|
+
async for _chunk in r.data:
|
1364
|
+
yield _chunk
|
1679
1365
|
|
1680
1366
|
async def execute_workflow(
|
1681
1367
|
self,
|
@@ -1752,7 +1438,7 @@ class AsyncVellum:
|
|
1752
1438
|
|
1753
1439
|
asyncio.run(main())
|
1754
1440
|
"""
|
1755
|
-
|
1441
|
+
_response = await self._raw_client.execute_workflow(
|
1756
1442
|
inputs=inputs,
|
1757
1443
|
expand_meta=expand_meta,
|
1758
1444
|
workflow_deployment_id=workflow_deployment_id,
|
@@ -1762,7 +1448,7 @@ class AsyncVellum:
|
|
1762
1448
|
metadata=metadata,
|
1763
1449
|
request_options=request_options,
|
1764
1450
|
)
|
1765
|
-
return
|
1451
|
+
return _response.data
|
1766
1452
|
|
1767
1453
|
async def execute_workflow_stream(
|
1768
1454
|
self,
|
@@ -1845,81 +1531,19 @@ class AsyncVellum:
|
|
1845
1531
|
|
1846
1532
|
asyncio.run(main())
|
1847
1533
|
"""
|
1848
|
-
async with self._raw_client.
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
object_=expand_meta, annotation=typing.Optional[WorkflowExpandMetaRequest], direction="write"
|
1858
|
-
),
|
1859
|
-
"workflow_deployment_id": workflow_deployment_id,
|
1860
|
-
"workflow_deployment_name": workflow_deployment_name,
|
1861
|
-
"release_tag": release_tag,
|
1862
|
-
"external_id": external_id,
|
1863
|
-
"event_types": event_types,
|
1864
|
-
"metadata": metadata,
|
1865
|
-
},
|
1866
|
-
headers={
|
1867
|
-
"content-type": "application/json",
|
1868
|
-
},
|
1534
|
+
async with self._raw_client.execute_workflow_stream(
|
1535
|
+
inputs=inputs,
|
1536
|
+
expand_meta=expand_meta,
|
1537
|
+
workflow_deployment_id=workflow_deployment_id,
|
1538
|
+
workflow_deployment_name=workflow_deployment_name,
|
1539
|
+
release_tag=release_tag,
|
1540
|
+
external_id=external_id,
|
1541
|
+
event_types=event_types,
|
1542
|
+
metadata=metadata,
|
1869
1543
|
request_options=request_options,
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
if 200 <= _response.status_code < 300:
|
1874
|
-
async for _text in _response.aiter_lines():
|
1875
|
-
try:
|
1876
|
-
if len(_text) == 0:
|
1877
|
-
continue
|
1878
|
-
yield typing.cast(
|
1879
|
-
WorkflowStreamEvent,
|
1880
|
-
parse_obj_as(
|
1881
|
-
type_=WorkflowStreamEvent, # type: ignore
|
1882
|
-
object_=json.loads(_text),
|
1883
|
-
),
|
1884
|
-
)
|
1885
|
-
except Exception:
|
1886
|
-
pass
|
1887
|
-
return
|
1888
|
-
await _response.aread()
|
1889
|
-
if _response.status_code == 400:
|
1890
|
-
raise BadRequestError(
|
1891
|
-
typing.cast(
|
1892
|
-
typing.Optional[typing.Any],
|
1893
|
-
parse_obj_as(
|
1894
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1895
|
-
object_=_response.json(),
|
1896
|
-
),
|
1897
|
-
)
|
1898
|
-
)
|
1899
|
-
if _response.status_code == 404:
|
1900
|
-
raise NotFoundError(
|
1901
|
-
typing.cast(
|
1902
|
-
typing.Optional[typing.Any],
|
1903
|
-
parse_obj_as(
|
1904
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1905
|
-
object_=_response.json(),
|
1906
|
-
),
|
1907
|
-
)
|
1908
|
-
)
|
1909
|
-
if _response.status_code == 500:
|
1910
|
-
raise InternalServerError(
|
1911
|
-
typing.cast(
|
1912
|
-
typing.Optional[typing.Any],
|
1913
|
-
parse_obj_as(
|
1914
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
1915
|
-
object_=_response.json(),
|
1916
|
-
),
|
1917
|
-
)
|
1918
|
-
)
|
1919
|
-
_response_json = _response.json()
|
1920
|
-
except JSONDecodeError:
|
1921
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1922
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1544
|
+
) as r:
|
1545
|
+
async for _chunk in r.data:
|
1546
|
+
yield _chunk
|
1923
1547
|
|
1924
1548
|
async def generate(
|
1925
1549
|
self,
|
@@ -1985,14 +1609,14 @@ class AsyncVellum:
|
|
1985
1609
|
|
1986
1610
|
asyncio.run(main())
|
1987
1611
|
"""
|
1988
|
-
|
1612
|
+
_response = await self._raw_client.generate(
|
1989
1613
|
requests=requests,
|
1990
1614
|
deployment_id=deployment_id,
|
1991
1615
|
deployment_name=deployment_name,
|
1992
1616
|
options=options,
|
1993
1617
|
request_options=request_options,
|
1994
1618
|
)
|
1995
|
-
return
|
1619
|
+
return _response.data
|
1996
1620
|
|
1997
1621
|
async def generate_stream(
|
1998
1622
|
self,
|
@@ -2060,87 +1684,15 @@ class AsyncVellum:
|
|
2060
1684
|
|
2061
1685
|
asyncio.run(main())
|
2062
1686
|
"""
|
2063
|
-
async with self._raw_client.
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
"deployment_id": deployment_id,
|
2069
|
-
"deployment_name": deployment_name,
|
2070
|
-
"requests": convert_and_respect_annotation_metadata(
|
2071
|
-
object_=requests, annotation=typing.Sequence[GenerateRequest], direction="write"
|
2072
|
-
),
|
2073
|
-
"options": convert_and_respect_annotation_metadata(
|
2074
|
-
object_=options, annotation=typing.Optional[GenerateOptionsRequest], direction="write"
|
2075
|
-
),
|
2076
|
-
},
|
2077
|
-
headers={
|
2078
|
-
"content-type": "application/json",
|
2079
|
-
},
|
1687
|
+
async with self._raw_client.generate_stream(
|
1688
|
+
requests=requests,
|
1689
|
+
deployment_id=deployment_id,
|
1690
|
+
deployment_name=deployment_name,
|
1691
|
+
options=options,
|
2080
1692
|
request_options=request_options,
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
if 200 <= _response.status_code < 300:
|
2085
|
-
async for _text in _response.aiter_lines():
|
2086
|
-
try:
|
2087
|
-
if len(_text) == 0:
|
2088
|
-
continue
|
2089
|
-
yield typing.cast(
|
2090
|
-
GenerateStreamResponse,
|
2091
|
-
parse_obj_as(
|
2092
|
-
type_=GenerateStreamResponse, # type: ignore
|
2093
|
-
object_=json.loads(_text),
|
2094
|
-
),
|
2095
|
-
)
|
2096
|
-
except Exception:
|
2097
|
-
pass
|
2098
|
-
return
|
2099
|
-
await _response.aread()
|
2100
|
-
if _response.status_code == 400:
|
2101
|
-
raise BadRequestError(
|
2102
|
-
typing.cast(
|
2103
|
-
typing.Optional[typing.Any],
|
2104
|
-
parse_obj_as(
|
2105
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
2106
|
-
object_=_response.json(),
|
2107
|
-
),
|
2108
|
-
)
|
2109
|
-
)
|
2110
|
-
if _response.status_code == 403:
|
2111
|
-
raise ForbiddenError(
|
2112
|
-
typing.cast(
|
2113
|
-
typing.Optional[typing.Any],
|
2114
|
-
parse_obj_as(
|
2115
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
2116
|
-
object_=_response.json(),
|
2117
|
-
),
|
2118
|
-
)
|
2119
|
-
)
|
2120
|
-
if _response.status_code == 404:
|
2121
|
-
raise NotFoundError(
|
2122
|
-
typing.cast(
|
2123
|
-
typing.Optional[typing.Any],
|
2124
|
-
parse_obj_as(
|
2125
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
2126
|
-
object_=_response.json(),
|
2127
|
-
),
|
2128
|
-
)
|
2129
|
-
)
|
2130
|
-
if _response.status_code == 500:
|
2131
|
-
raise InternalServerError(
|
2132
|
-
typing.cast(
|
2133
|
-
typing.Optional[typing.Any],
|
2134
|
-
parse_obj_as(
|
2135
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
2136
|
-
object_=_response.json(),
|
2137
|
-
),
|
2138
|
-
)
|
2139
|
-
)
|
2140
|
-
_response_json = _response.json()
|
2141
|
-
except JSONDecodeError:
|
2142
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
2143
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1693
|
+
) as r:
|
1694
|
+
async for _chunk in r.data:
|
1695
|
+
yield _chunk
|
2144
1696
|
|
2145
1697
|
async def search(
|
2146
1698
|
self,
|
@@ -2200,7 +1752,7 @@ class AsyncVellum:
|
|
2200
1752
|
|
2201
1753
|
asyncio.run(main())
|
2202
1754
|
"""
|
2203
|
-
|
1755
|
+
_response = await self._raw_client.search(
|
2204
1756
|
query=query,
|
2205
1757
|
index_id=index_id,
|
2206
1758
|
index_name=index_name,
|
@@ -2208,7 +1760,7 @@ class AsyncVellum:
|
|
2208
1760
|
document_index=document_index,
|
2209
1761
|
request_options=request_options,
|
2210
1762
|
)
|
2211
|
-
return
|
1763
|
+
return _response.data
|
2212
1764
|
|
2213
1765
|
async def submit_completion_actuals(
|
2214
1766
|
self,
|
@@ -2262,13 +1814,13 @@ class AsyncVellum:
|
|
2262
1814
|
|
2263
1815
|
asyncio.run(main())
|
2264
1816
|
"""
|
2265
|
-
|
1817
|
+
_response = await self._raw_client.submit_completion_actuals(
|
2266
1818
|
actuals=actuals,
|
2267
1819
|
deployment_id=deployment_id,
|
2268
1820
|
deployment_name=deployment_name,
|
2269
1821
|
request_options=request_options,
|
2270
1822
|
)
|
2271
|
-
return
|
1823
|
+
return _response.data
|
2272
1824
|
|
2273
1825
|
async def submit_workflow_execution_actuals(
|
2274
1826
|
self,
|
@@ -2324,10 +1876,7 @@ class AsyncVellum:
|
|
2324
1876
|
|
2325
1877
|
asyncio.run(main())
|
2326
1878
|
"""
|
2327
|
-
|
2328
|
-
actuals=actuals,
|
2329
|
-
execution_id=execution_id,
|
2330
|
-
external_id=external_id,
|
2331
|
-
request_options=request_options,
|
1879
|
+
_response = await self._raw_client.submit_workflow_execution_actuals(
|
1880
|
+
actuals=actuals, execution_id=execution_id, external_id=external_id, request_options=request_options
|
2332
1881
|
)
|
2333
|
-
return
|
1882
|
+
return _response.data
|