vellum-ai 1.1.3__py3-none-any.whl → 1.1.5__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 +2 -0
- vellum/client/README.md +22 -0
- vellum/client/__init__.py +89 -99
- 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 +270 -201
- vellum/client/resources/__init__.py +2 -0
- vellum/client/resources/ad_hoc/__init__.py +2 -0
- vellum/client/resources/ad_hoc/client.py +16 -17
- vellum/client/resources/ad_hoc/raw_client.py +68 -53
- vellum/client/resources/container_images/__init__.py +2 -0
- vellum/client/resources/container_images/client.py +24 -21
- vellum/client/resources/container_images/raw_client.py +23 -24
- vellum/client/resources/deployments/__init__.py +2 -0
- vellum/client/resources/deployments/client.py +43 -44
- 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 +38 -39
- 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 +25 -26
- 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 +12 -13
- 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 +12 -13
- 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 -8
- 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 -8
- vellum/client/resources/organizations/raw_client.py +10 -11
- vellum/client/resources/prompts/__init__.py +2 -0
- vellum/client/resources/prompts/client.py +13 -12
- vellum/client/resources/prompts/raw_client.py +40 -33
- vellum/client/resources/sandboxes/__init__.py +2 -0
- vellum/client/resources/sandboxes/client.py +15 -16
- 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 +17 -18
- 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 +20 -19
- vellum/client/resources/test_suites/raw_client.py +46 -31
- vellum/client/resources/workflow_deployments/__init__.py +2 -0
- vellum/client/resources/workflow_deployments/client.py +45 -46
- 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 +7 -8
- 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 +12 -13
- 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 +11 -12
- vellum/client/resources/workflows/raw_client.py +34 -27
- vellum/client/resources/workspace_secrets/__init__.py +2 -0
- vellum/client/resources/workspace_secrets/client.py +11 -12
- 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 -8
- vellum/client/resources/workspaces/raw_client.py +10 -11
- vellum/client/types/__init__.py +2 -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 +5 -4
- vellum/client/types/array_chat_message_content_item_request.py +5 -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 +5 -4
- vellum/client/types/chat_message_content_request.py +5 -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 +19 -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 +7 -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 +9 -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 +9 -8
- vellum/client/types/vellum_variable.py +13 -7
- vellum/client/types/vellum_variable_extensions.py +2 -2
- vellum/client/types/vellum_video.py +3 -3
- vellum/client/types/vellum_video_request.py +3 -3
- vellum/client/types/vellum_workflow_execution_event.py +4 -3
- vellum/client/types/video_chat_message_content.py +3 -3
- vellum/client/types/video_chat_message_content_request.py +3 -3
- vellum/client/types/video_prompt_block.py +4 -4
- vellum/client/types/video_vellum_value.py +3 -3
- vellum/client/types/video_vellum_value_request.py +3 -3
- 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 +18 -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 +3 -3
- 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/workflows/emitters/vellum_emitter.py +5 -0
- vellum/workflows/events/node.py +25 -10
- vellum/workflows/events/tests/test_event.py +19 -19
- vellum/workflows/state/context.py +8 -52
- vellum/workflows/state/encoder.py +2 -4
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/workflows/base.py +1 -1
- {vellum_ai-1.1.3.dist-info → vellum_ai-1.1.5.dist-info}/METADATA +2 -2
- {vellum_ai-1.1.3.dist-info → vellum_ai-1.1.5.dist-info}/RECORD +671 -669
- vellum_ee/workflows/display/nodes/base_node_display.py +3 -3
- vellum_ee/workflows/display/nodes/tests/test_base_node_display.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +154 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +50 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_serialization.py +4 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +4 -1
- vellum_ee/workflows/display/types.py +13 -2
- vellum_ee/workflows/display/workflows/base_workflow_display.py +15 -0
- vellum_ee/workflows/display/workflows/tests/test_workflow_display.py +44 -2
- {vellum_ai-1.1.3.dist-info → vellum_ai-1.1.5.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.3.dist-info → vellum_ai-1.1.5.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.3.dist-info → vellum_ai-1.1.5.dist-info}/entry_points.txt +0 -0
vellum/client/raw_client.py
CHANGED
@@ -1,49 +1,48 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
import contextlib
|
4
|
+
import json
|
3
5
|
import typing
|
4
|
-
from .core.client_wrapper import SyncClientWrapper
|
5
|
-
from .types.method_enum import MethodEnum
|
6
|
-
from .types.execute_api_request_body import ExecuteApiRequestBody
|
7
|
-
from .types.execute_api_request_headers_value import ExecuteApiRequestHeadersValue
|
8
|
-
from .types.execute_api_request_bearer_token import ExecuteApiRequestBearerToken
|
9
|
-
from .core.request_options import RequestOptions
|
10
|
-
from .core.http_response import HttpResponse
|
11
|
-
from .types.execute_api_response import ExecuteApiResponse
|
12
|
-
from .core.serialization import convert_and_respect_annotation_metadata
|
13
|
-
from .core.pydantic_utilities import parse_obj_as
|
14
6
|
from json.decoder import JSONDecodeError
|
7
|
+
|
15
8
|
from .core.api_error import ApiError
|
16
|
-
from .
|
17
|
-
from .
|
18
|
-
from .
|
19
|
-
from .
|
20
|
-
from .
|
9
|
+
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
10
|
+
from .core.http_response import AsyncHttpResponse, HttpResponse
|
11
|
+
from .core.pydantic_utilities import parse_obj_as
|
12
|
+
from .core.request_options import RequestOptions
|
13
|
+
from .core.serialization import convert_and_respect_annotation_metadata
|
21
14
|
from .errors.bad_request_error import BadRequestError
|
22
|
-
from .types.prompt_deployment_input_request import PromptDeploymentInputRequest
|
23
|
-
from .types.prompt_deployment_expand_meta_request import PromptDeploymentExpandMetaRequest
|
24
|
-
from .types.raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
|
25
|
-
from .types.execute_prompt_response import ExecutePromptResponse
|
26
15
|
from .errors.forbidden_error import ForbiddenError
|
27
|
-
from .errors.not_found_error import NotFoundError
|
28
16
|
from .errors.internal_server_error import InternalServerError
|
17
|
+
from .errors.not_found_error import NotFoundError
|
18
|
+
from .types.code_execution_package import CodeExecutionPackage
|
19
|
+
from .types.code_execution_runtime import CodeExecutionRuntime
|
20
|
+
from .types.code_executor_input import CodeExecutorInput
|
21
|
+
from .types.code_executor_response import CodeExecutorResponse
|
22
|
+
from .types.execute_api_request_bearer_token import ExecuteApiRequestBearerToken
|
23
|
+
from .types.execute_api_request_body import ExecuteApiRequestBody
|
24
|
+
from .types.execute_api_request_headers_value import ExecuteApiRequestHeadersValue
|
25
|
+
from .types.execute_api_response import ExecuteApiResponse
|
29
26
|
from .types.execute_prompt_event import ExecutePromptEvent
|
30
|
-
import
|
31
|
-
import contextlib
|
32
|
-
from .types.workflow_request_input_request import WorkflowRequestInputRequest
|
33
|
-
from .types.workflow_expand_meta_request import WorkflowExpandMetaRequest
|
27
|
+
from .types.execute_prompt_response import ExecutePromptResponse
|
34
28
|
from .types.execute_workflow_response import ExecuteWorkflowResponse
|
35
|
-
from .types.workflow_execution_event_type import WorkflowExecutionEventType
|
36
|
-
from .types.workflow_stream_event import WorkflowStreamEvent
|
37
|
-
from .types.generate_request import GenerateRequest
|
38
29
|
from .types.generate_options_request import GenerateOptionsRequest
|
30
|
+
from .types.generate_request import GenerateRequest
|
39
31
|
from .types.generate_response import GenerateResponse
|
40
32
|
from .types.generate_stream_response import GenerateStreamResponse
|
33
|
+
from .types.method_enum import MethodEnum
|
34
|
+
from .types.prompt_deployment_expand_meta_request import PromptDeploymentExpandMetaRequest
|
35
|
+
from .types.prompt_deployment_input_request import PromptDeploymentInputRequest
|
36
|
+
from .types.raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
|
41
37
|
from .types.search_request_options_request import SearchRequestOptionsRequest
|
42
38
|
from .types.search_response import SearchResponse
|
43
39
|
from .types.submit_completion_actual_request import SubmitCompletionActualRequest
|
44
40
|
from .types.submit_workflow_execution_actual_request import SubmitWorkflowExecutionActualRequest
|
45
|
-
from .
|
46
|
-
from .
|
41
|
+
from .types.vellum_variable_type import VellumVariableType
|
42
|
+
from .types.workflow_execution_event_type import WorkflowExecutionEventType
|
43
|
+
from .types.workflow_expand_meta_request import WorkflowExpandMetaRequest
|
44
|
+
from .types.workflow_request_input_request import WorkflowRequestInputRequest
|
45
|
+
from .types.workflow_stream_event import WorkflowStreamEvent
|
47
46
|
|
48
47
|
# this is used as the default value for optional parameters
|
49
48
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -119,8 +118,8 @@ class RawVellum:
|
|
119
118
|
return HttpResponse(response=_response, data=_data)
|
120
119
|
_response_json = _response.json()
|
121
120
|
except JSONDecodeError:
|
122
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
123
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
121
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
122
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
124
123
|
|
125
124
|
def execute_code(
|
126
125
|
self,
|
@@ -186,18 +185,19 @@ class RawVellum:
|
|
186
185
|
return HttpResponse(response=_response, data=_data)
|
187
186
|
if _response.status_code == 400:
|
188
187
|
raise BadRequestError(
|
189
|
-
|
188
|
+
headers=dict(_response.headers),
|
189
|
+
body=typing.cast(
|
190
190
|
typing.Optional[typing.Any],
|
191
191
|
parse_obj_as(
|
192
192
|
type_=typing.Optional[typing.Any], # type: ignore
|
193
193
|
object_=_response.json(),
|
194
194
|
),
|
195
|
-
)
|
195
|
+
),
|
196
196
|
)
|
197
197
|
_response_json = _response.json()
|
198
198
|
except JSONDecodeError:
|
199
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
200
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
199
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
200
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
201
201
|
|
202
202
|
def execute_prompt(
|
203
203
|
self,
|
@@ -296,48 +296,52 @@ class RawVellum:
|
|
296
296
|
return HttpResponse(response=_response, data=_data)
|
297
297
|
if _response.status_code == 400:
|
298
298
|
raise BadRequestError(
|
299
|
-
|
299
|
+
headers=dict(_response.headers),
|
300
|
+
body=typing.cast(
|
300
301
|
typing.Optional[typing.Any],
|
301
302
|
parse_obj_as(
|
302
303
|
type_=typing.Optional[typing.Any], # type: ignore
|
303
304
|
object_=_response.json(),
|
304
305
|
),
|
305
|
-
)
|
306
|
+
),
|
306
307
|
)
|
307
308
|
if _response.status_code == 403:
|
308
309
|
raise ForbiddenError(
|
309
|
-
|
310
|
+
headers=dict(_response.headers),
|
311
|
+
body=typing.cast(
|
310
312
|
typing.Optional[typing.Any],
|
311
313
|
parse_obj_as(
|
312
314
|
type_=typing.Optional[typing.Any], # type: ignore
|
313
315
|
object_=_response.json(),
|
314
316
|
),
|
315
|
-
)
|
317
|
+
),
|
316
318
|
)
|
317
319
|
if _response.status_code == 404:
|
318
320
|
raise NotFoundError(
|
319
|
-
|
321
|
+
headers=dict(_response.headers),
|
322
|
+
body=typing.cast(
|
320
323
|
typing.Optional[typing.Any],
|
321
324
|
parse_obj_as(
|
322
325
|
type_=typing.Optional[typing.Any], # type: ignore
|
323
326
|
object_=_response.json(),
|
324
327
|
),
|
325
|
-
)
|
328
|
+
),
|
326
329
|
)
|
327
330
|
if _response.status_code == 500:
|
328
331
|
raise InternalServerError(
|
329
|
-
|
332
|
+
headers=dict(_response.headers),
|
333
|
+
body=typing.cast(
|
330
334
|
typing.Optional[typing.Any],
|
331
335
|
parse_obj_as(
|
332
336
|
type_=typing.Optional[typing.Any], # type: ignore
|
333
337
|
object_=_response.json(),
|
334
338
|
),
|
335
|
-
)
|
339
|
+
),
|
336
340
|
)
|
337
341
|
_response_json = _response.json()
|
338
342
|
except JSONDecodeError:
|
339
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
340
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
343
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
344
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
341
345
|
|
342
346
|
@contextlib.contextmanager
|
343
347
|
def execute_prompt_stream(
|
@@ -426,7 +430,7 @@ class RawVellum:
|
|
426
430
|
omit=OMIT,
|
427
431
|
) as _response:
|
428
432
|
|
429
|
-
def
|
433
|
+
def _stream() -> HttpResponse[typing.Iterator[ExecutePromptEvent]]:
|
430
434
|
try:
|
431
435
|
if 200 <= _response.status_code < 300:
|
432
436
|
|
@@ -450,50 +454,56 @@ class RawVellum:
|
|
450
454
|
_response.read()
|
451
455
|
if _response.status_code == 400:
|
452
456
|
raise BadRequestError(
|
453
|
-
|
457
|
+
headers=dict(_response.headers),
|
458
|
+
body=typing.cast(
|
454
459
|
typing.Optional[typing.Any],
|
455
460
|
parse_obj_as(
|
456
461
|
type_=typing.Optional[typing.Any], # type: ignore
|
457
462
|
object_=_response.json(),
|
458
463
|
),
|
459
|
-
)
|
464
|
+
),
|
460
465
|
)
|
461
466
|
if _response.status_code == 403:
|
462
467
|
raise ForbiddenError(
|
463
|
-
|
468
|
+
headers=dict(_response.headers),
|
469
|
+
body=typing.cast(
|
464
470
|
typing.Optional[typing.Any],
|
465
471
|
parse_obj_as(
|
466
472
|
type_=typing.Optional[typing.Any], # type: ignore
|
467
473
|
object_=_response.json(),
|
468
474
|
),
|
469
|
-
)
|
475
|
+
),
|
470
476
|
)
|
471
477
|
if _response.status_code == 404:
|
472
478
|
raise NotFoundError(
|
473
|
-
|
479
|
+
headers=dict(_response.headers),
|
480
|
+
body=typing.cast(
|
474
481
|
typing.Optional[typing.Any],
|
475
482
|
parse_obj_as(
|
476
483
|
type_=typing.Optional[typing.Any], # type: ignore
|
477
484
|
object_=_response.json(),
|
478
485
|
),
|
479
|
-
)
|
486
|
+
),
|
480
487
|
)
|
481
488
|
if _response.status_code == 500:
|
482
489
|
raise InternalServerError(
|
483
|
-
|
490
|
+
headers=dict(_response.headers),
|
491
|
+
body=typing.cast(
|
484
492
|
typing.Optional[typing.Any],
|
485
493
|
parse_obj_as(
|
486
494
|
type_=typing.Optional[typing.Any], # type: ignore
|
487
495
|
object_=_response.json(),
|
488
496
|
),
|
489
|
-
)
|
497
|
+
),
|
490
498
|
)
|
491
499
|
_response_json = _response.json()
|
492
500
|
except JSONDecodeError:
|
493
|
-
raise ApiError(
|
494
|
-
|
501
|
+
raise ApiError(
|
502
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
503
|
+
)
|
504
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
495
505
|
|
496
|
-
yield
|
506
|
+
yield _stream()
|
497
507
|
|
498
508
|
def execute_workflow(
|
499
509
|
self,
|
@@ -576,38 +586,41 @@ class RawVellum:
|
|
576
586
|
return HttpResponse(response=_response, data=_data)
|
577
587
|
if _response.status_code == 400:
|
578
588
|
raise BadRequestError(
|
579
|
-
|
589
|
+
headers=dict(_response.headers),
|
590
|
+
body=typing.cast(
|
580
591
|
typing.Optional[typing.Any],
|
581
592
|
parse_obj_as(
|
582
593
|
type_=typing.Optional[typing.Any], # type: ignore
|
583
594
|
object_=_response.json(),
|
584
595
|
),
|
585
|
-
)
|
596
|
+
),
|
586
597
|
)
|
587
598
|
if _response.status_code == 404:
|
588
599
|
raise NotFoundError(
|
589
|
-
|
600
|
+
headers=dict(_response.headers),
|
601
|
+
body=typing.cast(
|
590
602
|
typing.Optional[typing.Any],
|
591
603
|
parse_obj_as(
|
592
604
|
type_=typing.Optional[typing.Any], # type: ignore
|
593
605
|
object_=_response.json(),
|
594
606
|
),
|
595
|
-
)
|
607
|
+
),
|
596
608
|
)
|
597
609
|
if _response.status_code == 500:
|
598
610
|
raise InternalServerError(
|
599
|
-
|
611
|
+
headers=dict(_response.headers),
|
612
|
+
body=typing.cast(
|
600
613
|
typing.Optional[typing.Any],
|
601
614
|
parse_obj_as(
|
602
615
|
type_=typing.Optional[typing.Any], # type: ignore
|
603
616
|
object_=_response.json(),
|
604
617
|
),
|
605
|
-
)
|
618
|
+
),
|
606
619
|
)
|
607
620
|
_response_json = _response.json()
|
608
621
|
except JSONDecodeError:
|
609
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
610
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
622
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
623
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
611
624
|
|
612
625
|
@contextlib.contextmanager
|
613
626
|
def execute_workflow_stream(
|
@@ -685,7 +698,7 @@ class RawVellum:
|
|
685
698
|
omit=OMIT,
|
686
699
|
) as _response:
|
687
700
|
|
688
|
-
def
|
701
|
+
def _stream() -> HttpResponse[typing.Iterator[WorkflowStreamEvent]]:
|
689
702
|
try:
|
690
703
|
if 200 <= _response.status_code < 300:
|
691
704
|
|
@@ -709,40 +722,45 @@ class RawVellum:
|
|
709
722
|
_response.read()
|
710
723
|
if _response.status_code == 400:
|
711
724
|
raise BadRequestError(
|
712
|
-
|
725
|
+
headers=dict(_response.headers),
|
726
|
+
body=typing.cast(
|
713
727
|
typing.Optional[typing.Any],
|
714
728
|
parse_obj_as(
|
715
729
|
type_=typing.Optional[typing.Any], # type: ignore
|
716
730
|
object_=_response.json(),
|
717
731
|
),
|
718
|
-
)
|
732
|
+
),
|
719
733
|
)
|
720
734
|
if _response.status_code == 404:
|
721
735
|
raise NotFoundError(
|
722
|
-
|
736
|
+
headers=dict(_response.headers),
|
737
|
+
body=typing.cast(
|
723
738
|
typing.Optional[typing.Any],
|
724
739
|
parse_obj_as(
|
725
740
|
type_=typing.Optional[typing.Any], # type: ignore
|
726
741
|
object_=_response.json(),
|
727
742
|
),
|
728
|
-
)
|
743
|
+
),
|
729
744
|
)
|
730
745
|
if _response.status_code == 500:
|
731
746
|
raise InternalServerError(
|
732
|
-
|
747
|
+
headers=dict(_response.headers),
|
748
|
+
body=typing.cast(
|
733
749
|
typing.Optional[typing.Any],
|
734
750
|
parse_obj_as(
|
735
751
|
type_=typing.Optional[typing.Any], # type: ignore
|
736
752
|
object_=_response.json(),
|
737
753
|
),
|
738
|
-
)
|
754
|
+
),
|
739
755
|
)
|
740
756
|
_response_json = _response.json()
|
741
757
|
except JSONDecodeError:
|
742
|
-
raise ApiError(
|
743
|
-
|
758
|
+
raise ApiError(
|
759
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
760
|
+
)
|
761
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
744
762
|
|
745
|
-
yield
|
763
|
+
yield _stream()
|
746
764
|
|
747
765
|
def generate(
|
748
766
|
self,
|
@@ -813,48 +831,52 @@ class RawVellum:
|
|
813
831
|
return HttpResponse(response=_response, data=_data)
|
814
832
|
if _response.status_code == 400:
|
815
833
|
raise BadRequestError(
|
816
|
-
|
834
|
+
headers=dict(_response.headers),
|
835
|
+
body=typing.cast(
|
817
836
|
typing.Optional[typing.Any],
|
818
837
|
parse_obj_as(
|
819
838
|
type_=typing.Optional[typing.Any], # type: ignore
|
820
839
|
object_=_response.json(),
|
821
840
|
),
|
822
|
-
)
|
841
|
+
),
|
823
842
|
)
|
824
843
|
if _response.status_code == 403:
|
825
844
|
raise ForbiddenError(
|
826
|
-
|
845
|
+
headers=dict(_response.headers),
|
846
|
+
body=typing.cast(
|
827
847
|
typing.Optional[typing.Any],
|
828
848
|
parse_obj_as(
|
829
849
|
type_=typing.Optional[typing.Any], # type: ignore
|
830
850
|
object_=_response.json(),
|
831
851
|
),
|
832
|
-
)
|
852
|
+
),
|
833
853
|
)
|
834
854
|
if _response.status_code == 404:
|
835
855
|
raise NotFoundError(
|
836
|
-
|
856
|
+
headers=dict(_response.headers),
|
857
|
+
body=typing.cast(
|
837
858
|
typing.Optional[typing.Any],
|
838
859
|
parse_obj_as(
|
839
860
|
type_=typing.Optional[typing.Any], # type: ignore
|
840
861
|
object_=_response.json(),
|
841
862
|
),
|
842
|
-
)
|
863
|
+
),
|
843
864
|
)
|
844
865
|
if _response.status_code == 500:
|
845
866
|
raise InternalServerError(
|
846
|
-
|
867
|
+
headers=dict(_response.headers),
|
868
|
+
body=typing.cast(
|
847
869
|
typing.Optional[typing.Any],
|
848
870
|
parse_obj_as(
|
849
871
|
type_=typing.Optional[typing.Any], # type: ignore
|
850
872
|
object_=_response.json(),
|
851
873
|
),
|
852
|
-
)
|
874
|
+
),
|
853
875
|
)
|
854
876
|
_response_json = _response.json()
|
855
877
|
except JSONDecodeError:
|
856
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
857
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
878
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
879
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
858
880
|
|
859
881
|
@contextlib.contextmanager
|
860
882
|
def generate_stream(
|
@@ -915,7 +937,7 @@ class RawVellum:
|
|
915
937
|
omit=OMIT,
|
916
938
|
) as _response:
|
917
939
|
|
918
|
-
def
|
940
|
+
def _stream() -> HttpResponse[typing.Iterator[GenerateStreamResponse]]:
|
919
941
|
try:
|
920
942
|
if 200 <= _response.status_code < 300:
|
921
943
|
|
@@ -939,50 +961,56 @@ class RawVellum:
|
|
939
961
|
_response.read()
|
940
962
|
if _response.status_code == 400:
|
941
963
|
raise BadRequestError(
|
942
|
-
|
964
|
+
headers=dict(_response.headers),
|
965
|
+
body=typing.cast(
|
943
966
|
typing.Optional[typing.Any],
|
944
967
|
parse_obj_as(
|
945
968
|
type_=typing.Optional[typing.Any], # type: ignore
|
946
969
|
object_=_response.json(),
|
947
970
|
),
|
948
|
-
)
|
971
|
+
),
|
949
972
|
)
|
950
973
|
if _response.status_code == 403:
|
951
974
|
raise ForbiddenError(
|
952
|
-
|
975
|
+
headers=dict(_response.headers),
|
976
|
+
body=typing.cast(
|
953
977
|
typing.Optional[typing.Any],
|
954
978
|
parse_obj_as(
|
955
979
|
type_=typing.Optional[typing.Any], # type: ignore
|
956
980
|
object_=_response.json(),
|
957
981
|
),
|
958
|
-
)
|
982
|
+
),
|
959
983
|
)
|
960
984
|
if _response.status_code == 404:
|
961
985
|
raise NotFoundError(
|
962
|
-
|
986
|
+
headers=dict(_response.headers),
|
987
|
+
body=typing.cast(
|
963
988
|
typing.Optional[typing.Any],
|
964
989
|
parse_obj_as(
|
965
990
|
type_=typing.Optional[typing.Any], # type: ignore
|
966
991
|
object_=_response.json(),
|
967
992
|
),
|
968
|
-
)
|
993
|
+
),
|
969
994
|
)
|
970
995
|
if _response.status_code == 500:
|
971
996
|
raise InternalServerError(
|
972
|
-
|
997
|
+
headers=dict(_response.headers),
|
998
|
+
body=typing.cast(
|
973
999
|
typing.Optional[typing.Any],
|
974
1000
|
parse_obj_as(
|
975
1001
|
type_=typing.Optional[typing.Any], # type: ignore
|
976
1002
|
object_=_response.json(),
|
977
1003
|
),
|
978
|
-
)
|
1004
|
+
),
|
979
1005
|
)
|
980
1006
|
_response_json = _response.json()
|
981
1007
|
except JSONDecodeError:
|
982
|
-
raise ApiError(
|
983
|
-
|
1008
|
+
raise ApiError(
|
1009
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
1010
|
+
)
|
1011
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
984
1012
|
|
985
|
-
yield
|
1013
|
+
yield _stream()
|
986
1014
|
|
987
1015
|
def search(
|
988
1016
|
self,
|
@@ -1053,38 +1081,41 @@ class RawVellum:
|
|
1053
1081
|
return HttpResponse(response=_response, data=_data)
|
1054
1082
|
if _response.status_code == 400:
|
1055
1083
|
raise BadRequestError(
|
1056
|
-
|
1084
|
+
headers=dict(_response.headers),
|
1085
|
+
body=typing.cast(
|
1057
1086
|
typing.Optional[typing.Any],
|
1058
1087
|
parse_obj_as(
|
1059
1088
|
type_=typing.Optional[typing.Any], # type: ignore
|
1060
1089
|
object_=_response.json(),
|
1061
1090
|
),
|
1062
|
-
)
|
1091
|
+
),
|
1063
1092
|
)
|
1064
1093
|
if _response.status_code == 404:
|
1065
1094
|
raise NotFoundError(
|
1066
|
-
|
1095
|
+
headers=dict(_response.headers),
|
1096
|
+
body=typing.cast(
|
1067
1097
|
typing.Optional[typing.Any],
|
1068
1098
|
parse_obj_as(
|
1069
1099
|
type_=typing.Optional[typing.Any], # type: ignore
|
1070
1100
|
object_=_response.json(),
|
1071
1101
|
),
|
1072
|
-
)
|
1102
|
+
),
|
1073
1103
|
)
|
1074
1104
|
if _response.status_code == 500:
|
1075
1105
|
raise InternalServerError(
|
1076
|
-
|
1106
|
+
headers=dict(_response.headers),
|
1107
|
+
body=typing.cast(
|
1077
1108
|
typing.Optional[typing.Any],
|
1078
1109
|
parse_obj_as(
|
1079
1110
|
type_=typing.Optional[typing.Any], # type: ignore
|
1080
1111
|
object_=_response.json(),
|
1081
1112
|
),
|
1082
|
-
)
|
1113
|
+
),
|
1083
1114
|
)
|
1084
1115
|
_response_json = _response.json()
|
1085
1116
|
except JSONDecodeError:
|
1086
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1087
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1117
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1118
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1088
1119
|
|
1089
1120
|
def submit_completion_actuals(
|
1090
1121
|
self,
|
@@ -1137,38 +1168,41 @@ class RawVellum:
|
|
1137
1168
|
return HttpResponse(response=_response, data=None)
|
1138
1169
|
if _response.status_code == 400:
|
1139
1170
|
raise BadRequestError(
|
1140
|
-
|
1171
|
+
headers=dict(_response.headers),
|
1172
|
+
body=typing.cast(
|
1141
1173
|
typing.Optional[typing.Any],
|
1142
1174
|
parse_obj_as(
|
1143
1175
|
type_=typing.Optional[typing.Any], # type: ignore
|
1144
1176
|
object_=_response.json(),
|
1145
1177
|
),
|
1146
|
-
)
|
1178
|
+
),
|
1147
1179
|
)
|
1148
1180
|
if _response.status_code == 404:
|
1149
1181
|
raise NotFoundError(
|
1150
|
-
|
1182
|
+
headers=dict(_response.headers),
|
1183
|
+
body=typing.cast(
|
1151
1184
|
typing.Optional[typing.Any],
|
1152
1185
|
parse_obj_as(
|
1153
1186
|
type_=typing.Optional[typing.Any], # type: ignore
|
1154
1187
|
object_=_response.json(),
|
1155
1188
|
),
|
1156
|
-
)
|
1189
|
+
),
|
1157
1190
|
)
|
1158
1191
|
if _response.status_code == 500:
|
1159
1192
|
raise InternalServerError(
|
1160
|
-
|
1193
|
+
headers=dict(_response.headers),
|
1194
|
+
body=typing.cast(
|
1161
1195
|
typing.Optional[typing.Any],
|
1162
1196
|
parse_obj_as(
|
1163
1197
|
type_=typing.Optional[typing.Any], # type: ignore
|
1164
1198
|
object_=_response.json(),
|
1165
1199
|
),
|
1166
|
-
)
|
1200
|
+
),
|
1167
1201
|
)
|
1168
1202
|
_response_json = _response.json()
|
1169
1203
|
except JSONDecodeError:
|
1170
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1171
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1204
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1205
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1172
1206
|
|
1173
1207
|
def submit_workflow_execution_actuals(
|
1174
1208
|
self,
|
@@ -1223,8 +1257,8 @@ class RawVellum:
|
|
1223
1257
|
return HttpResponse(response=_response, data=None)
|
1224
1258
|
_response_json = _response.json()
|
1225
1259
|
except JSONDecodeError:
|
1226
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1227
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1260
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1261
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1228
1262
|
|
1229
1263
|
|
1230
1264
|
class AsyncRawVellum:
|
@@ -1297,8 +1331,8 @@ class AsyncRawVellum:
|
|
1297
1331
|
return AsyncHttpResponse(response=_response, data=_data)
|
1298
1332
|
_response_json = _response.json()
|
1299
1333
|
except JSONDecodeError:
|
1300
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1301
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1334
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1335
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1302
1336
|
|
1303
1337
|
async def execute_code(
|
1304
1338
|
self,
|
@@ -1364,18 +1398,19 @@ class AsyncRawVellum:
|
|
1364
1398
|
return AsyncHttpResponse(response=_response, data=_data)
|
1365
1399
|
if _response.status_code == 400:
|
1366
1400
|
raise BadRequestError(
|
1367
|
-
|
1401
|
+
headers=dict(_response.headers),
|
1402
|
+
body=typing.cast(
|
1368
1403
|
typing.Optional[typing.Any],
|
1369
1404
|
parse_obj_as(
|
1370
1405
|
type_=typing.Optional[typing.Any], # type: ignore
|
1371
1406
|
object_=_response.json(),
|
1372
1407
|
),
|
1373
|
-
)
|
1408
|
+
),
|
1374
1409
|
)
|
1375
1410
|
_response_json = _response.json()
|
1376
1411
|
except JSONDecodeError:
|
1377
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1378
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1412
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1413
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1379
1414
|
|
1380
1415
|
async def execute_prompt(
|
1381
1416
|
self,
|
@@ -1474,48 +1509,52 @@ class AsyncRawVellum:
|
|
1474
1509
|
return AsyncHttpResponse(response=_response, data=_data)
|
1475
1510
|
if _response.status_code == 400:
|
1476
1511
|
raise BadRequestError(
|
1477
|
-
|
1512
|
+
headers=dict(_response.headers),
|
1513
|
+
body=typing.cast(
|
1478
1514
|
typing.Optional[typing.Any],
|
1479
1515
|
parse_obj_as(
|
1480
1516
|
type_=typing.Optional[typing.Any], # type: ignore
|
1481
1517
|
object_=_response.json(),
|
1482
1518
|
),
|
1483
|
-
)
|
1519
|
+
),
|
1484
1520
|
)
|
1485
1521
|
if _response.status_code == 403:
|
1486
1522
|
raise ForbiddenError(
|
1487
|
-
|
1523
|
+
headers=dict(_response.headers),
|
1524
|
+
body=typing.cast(
|
1488
1525
|
typing.Optional[typing.Any],
|
1489
1526
|
parse_obj_as(
|
1490
1527
|
type_=typing.Optional[typing.Any], # type: ignore
|
1491
1528
|
object_=_response.json(),
|
1492
1529
|
),
|
1493
|
-
)
|
1530
|
+
),
|
1494
1531
|
)
|
1495
1532
|
if _response.status_code == 404:
|
1496
1533
|
raise NotFoundError(
|
1497
|
-
|
1534
|
+
headers=dict(_response.headers),
|
1535
|
+
body=typing.cast(
|
1498
1536
|
typing.Optional[typing.Any],
|
1499
1537
|
parse_obj_as(
|
1500
1538
|
type_=typing.Optional[typing.Any], # type: ignore
|
1501
1539
|
object_=_response.json(),
|
1502
1540
|
),
|
1503
|
-
)
|
1541
|
+
),
|
1504
1542
|
)
|
1505
1543
|
if _response.status_code == 500:
|
1506
1544
|
raise InternalServerError(
|
1507
|
-
|
1545
|
+
headers=dict(_response.headers),
|
1546
|
+
body=typing.cast(
|
1508
1547
|
typing.Optional[typing.Any],
|
1509
1548
|
parse_obj_as(
|
1510
1549
|
type_=typing.Optional[typing.Any], # type: ignore
|
1511
1550
|
object_=_response.json(),
|
1512
1551
|
),
|
1513
|
-
)
|
1552
|
+
),
|
1514
1553
|
)
|
1515
1554
|
_response_json = _response.json()
|
1516
1555
|
except JSONDecodeError:
|
1517
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1518
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1556
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1557
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1519
1558
|
|
1520
1559
|
@contextlib.asynccontextmanager
|
1521
1560
|
async def execute_prompt_stream(
|
@@ -1604,7 +1643,7 @@ class AsyncRawVellum:
|
|
1604
1643
|
omit=OMIT,
|
1605
1644
|
) as _response:
|
1606
1645
|
|
1607
|
-
async def
|
1646
|
+
async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[ExecutePromptEvent]]:
|
1608
1647
|
try:
|
1609
1648
|
if 200 <= _response.status_code < 300:
|
1610
1649
|
|
@@ -1628,50 +1667,56 @@ class AsyncRawVellum:
|
|
1628
1667
|
await _response.aread()
|
1629
1668
|
if _response.status_code == 400:
|
1630
1669
|
raise BadRequestError(
|
1631
|
-
|
1670
|
+
headers=dict(_response.headers),
|
1671
|
+
body=typing.cast(
|
1632
1672
|
typing.Optional[typing.Any],
|
1633
1673
|
parse_obj_as(
|
1634
1674
|
type_=typing.Optional[typing.Any], # type: ignore
|
1635
1675
|
object_=_response.json(),
|
1636
1676
|
),
|
1637
|
-
)
|
1677
|
+
),
|
1638
1678
|
)
|
1639
1679
|
if _response.status_code == 403:
|
1640
1680
|
raise ForbiddenError(
|
1641
|
-
|
1681
|
+
headers=dict(_response.headers),
|
1682
|
+
body=typing.cast(
|
1642
1683
|
typing.Optional[typing.Any],
|
1643
1684
|
parse_obj_as(
|
1644
1685
|
type_=typing.Optional[typing.Any], # type: ignore
|
1645
1686
|
object_=_response.json(),
|
1646
1687
|
),
|
1647
|
-
)
|
1688
|
+
),
|
1648
1689
|
)
|
1649
1690
|
if _response.status_code == 404:
|
1650
1691
|
raise NotFoundError(
|
1651
|
-
|
1692
|
+
headers=dict(_response.headers),
|
1693
|
+
body=typing.cast(
|
1652
1694
|
typing.Optional[typing.Any],
|
1653
1695
|
parse_obj_as(
|
1654
1696
|
type_=typing.Optional[typing.Any], # type: ignore
|
1655
1697
|
object_=_response.json(),
|
1656
1698
|
),
|
1657
|
-
)
|
1699
|
+
),
|
1658
1700
|
)
|
1659
1701
|
if _response.status_code == 500:
|
1660
1702
|
raise InternalServerError(
|
1661
|
-
|
1703
|
+
headers=dict(_response.headers),
|
1704
|
+
body=typing.cast(
|
1662
1705
|
typing.Optional[typing.Any],
|
1663
1706
|
parse_obj_as(
|
1664
1707
|
type_=typing.Optional[typing.Any], # type: ignore
|
1665
1708
|
object_=_response.json(),
|
1666
1709
|
),
|
1667
|
-
)
|
1710
|
+
),
|
1668
1711
|
)
|
1669
1712
|
_response_json = _response.json()
|
1670
1713
|
except JSONDecodeError:
|
1671
|
-
raise ApiError(
|
1672
|
-
|
1714
|
+
raise ApiError(
|
1715
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
1716
|
+
)
|
1717
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1673
1718
|
|
1674
|
-
yield await
|
1719
|
+
yield await _stream()
|
1675
1720
|
|
1676
1721
|
async def execute_workflow(
|
1677
1722
|
self,
|
@@ -1754,38 +1799,41 @@ class AsyncRawVellum:
|
|
1754
1799
|
return AsyncHttpResponse(response=_response, data=_data)
|
1755
1800
|
if _response.status_code == 400:
|
1756
1801
|
raise BadRequestError(
|
1757
|
-
|
1802
|
+
headers=dict(_response.headers),
|
1803
|
+
body=typing.cast(
|
1758
1804
|
typing.Optional[typing.Any],
|
1759
1805
|
parse_obj_as(
|
1760
1806
|
type_=typing.Optional[typing.Any], # type: ignore
|
1761
1807
|
object_=_response.json(),
|
1762
1808
|
),
|
1763
|
-
)
|
1809
|
+
),
|
1764
1810
|
)
|
1765
1811
|
if _response.status_code == 404:
|
1766
1812
|
raise NotFoundError(
|
1767
|
-
|
1813
|
+
headers=dict(_response.headers),
|
1814
|
+
body=typing.cast(
|
1768
1815
|
typing.Optional[typing.Any],
|
1769
1816
|
parse_obj_as(
|
1770
1817
|
type_=typing.Optional[typing.Any], # type: ignore
|
1771
1818
|
object_=_response.json(),
|
1772
1819
|
),
|
1773
|
-
)
|
1820
|
+
),
|
1774
1821
|
)
|
1775
1822
|
if _response.status_code == 500:
|
1776
1823
|
raise InternalServerError(
|
1777
|
-
|
1824
|
+
headers=dict(_response.headers),
|
1825
|
+
body=typing.cast(
|
1778
1826
|
typing.Optional[typing.Any],
|
1779
1827
|
parse_obj_as(
|
1780
1828
|
type_=typing.Optional[typing.Any], # type: ignore
|
1781
1829
|
object_=_response.json(),
|
1782
1830
|
),
|
1783
|
-
)
|
1831
|
+
),
|
1784
1832
|
)
|
1785
1833
|
_response_json = _response.json()
|
1786
1834
|
except JSONDecodeError:
|
1787
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1788
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1835
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
1836
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1789
1837
|
|
1790
1838
|
@contextlib.asynccontextmanager
|
1791
1839
|
async def execute_workflow_stream(
|
@@ -1863,7 +1911,7 @@ class AsyncRawVellum:
|
|
1863
1911
|
omit=OMIT,
|
1864
1912
|
) as _response:
|
1865
1913
|
|
1866
|
-
async def
|
1914
|
+
async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[WorkflowStreamEvent]]:
|
1867
1915
|
try:
|
1868
1916
|
if 200 <= _response.status_code < 300:
|
1869
1917
|
|
@@ -1887,40 +1935,45 @@ class AsyncRawVellum:
|
|
1887
1935
|
await _response.aread()
|
1888
1936
|
if _response.status_code == 400:
|
1889
1937
|
raise BadRequestError(
|
1890
|
-
|
1938
|
+
headers=dict(_response.headers),
|
1939
|
+
body=typing.cast(
|
1891
1940
|
typing.Optional[typing.Any],
|
1892
1941
|
parse_obj_as(
|
1893
1942
|
type_=typing.Optional[typing.Any], # type: ignore
|
1894
1943
|
object_=_response.json(),
|
1895
1944
|
),
|
1896
|
-
)
|
1945
|
+
),
|
1897
1946
|
)
|
1898
1947
|
if _response.status_code == 404:
|
1899
1948
|
raise NotFoundError(
|
1900
|
-
|
1949
|
+
headers=dict(_response.headers),
|
1950
|
+
body=typing.cast(
|
1901
1951
|
typing.Optional[typing.Any],
|
1902
1952
|
parse_obj_as(
|
1903
1953
|
type_=typing.Optional[typing.Any], # type: ignore
|
1904
1954
|
object_=_response.json(),
|
1905
1955
|
),
|
1906
|
-
)
|
1956
|
+
),
|
1907
1957
|
)
|
1908
1958
|
if _response.status_code == 500:
|
1909
1959
|
raise InternalServerError(
|
1910
|
-
|
1960
|
+
headers=dict(_response.headers),
|
1961
|
+
body=typing.cast(
|
1911
1962
|
typing.Optional[typing.Any],
|
1912
1963
|
parse_obj_as(
|
1913
1964
|
type_=typing.Optional[typing.Any], # type: ignore
|
1914
1965
|
object_=_response.json(),
|
1915
1966
|
),
|
1916
|
-
)
|
1967
|
+
),
|
1917
1968
|
)
|
1918
1969
|
_response_json = _response.json()
|
1919
1970
|
except JSONDecodeError:
|
1920
|
-
raise ApiError(
|
1921
|
-
|
1971
|
+
raise ApiError(
|
1972
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
1973
|
+
)
|
1974
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
1922
1975
|
|
1923
|
-
yield await
|
1976
|
+
yield await _stream()
|
1924
1977
|
|
1925
1978
|
async def generate(
|
1926
1979
|
self,
|
@@ -1991,48 +2044,52 @@ class AsyncRawVellum:
|
|
1991
2044
|
return AsyncHttpResponse(response=_response, data=_data)
|
1992
2045
|
if _response.status_code == 400:
|
1993
2046
|
raise BadRequestError(
|
1994
|
-
|
2047
|
+
headers=dict(_response.headers),
|
2048
|
+
body=typing.cast(
|
1995
2049
|
typing.Optional[typing.Any],
|
1996
2050
|
parse_obj_as(
|
1997
2051
|
type_=typing.Optional[typing.Any], # type: ignore
|
1998
2052
|
object_=_response.json(),
|
1999
2053
|
),
|
2000
|
-
)
|
2054
|
+
),
|
2001
2055
|
)
|
2002
2056
|
if _response.status_code == 403:
|
2003
2057
|
raise ForbiddenError(
|
2004
|
-
|
2058
|
+
headers=dict(_response.headers),
|
2059
|
+
body=typing.cast(
|
2005
2060
|
typing.Optional[typing.Any],
|
2006
2061
|
parse_obj_as(
|
2007
2062
|
type_=typing.Optional[typing.Any], # type: ignore
|
2008
2063
|
object_=_response.json(),
|
2009
2064
|
),
|
2010
|
-
)
|
2065
|
+
),
|
2011
2066
|
)
|
2012
2067
|
if _response.status_code == 404:
|
2013
2068
|
raise NotFoundError(
|
2014
|
-
|
2069
|
+
headers=dict(_response.headers),
|
2070
|
+
body=typing.cast(
|
2015
2071
|
typing.Optional[typing.Any],
|
2016
2072
|
parse_obj_as(
|
2017
2073
|
type_=typing.Optional[typing.Any], # type: ignore
|
2018
2074
|
object_=_response.json(),
|
2019
2075
|
),
|
2020
|
-
)
|
2076
|
+
),
|
2021
2077
|
)
|
2022
2078
|
if _response.status_code == 500:
|
2023
2079
|
raise InternalServerError(
|
2024
|
-
|
2080
|
+
headers=dict(_response.headers),
|
2081
|
+
body=typing.cast(
|
2025
2082
|
typing.Optional[typing.Any],
|
2026
2083
|
parse_obj_as(
|
2027
2084
|
type_=typing.Optional[typing.Any], # type: ignore
|
2028
2085
|
object_=_response.json(),
|
2029
2086
|
),
|
2030
|
-
)
|
2087
|
+
),
|
2031
2088
|
)
|
2032
2089
|
_response_json = _response.json()
|
2033
2090
|
except JSONDecodeError:
|
2034
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
2035
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
2091
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
2092
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
2036
2093
|
|
2037
2094
|
@contextlib.asynccontextmanager
|
2038
2095
|
async def generate_stream(
|
@@ -2093,7 +2150,7 @@ class AsyncRawVellum:
|
|
2093
2150
|
omit=OMIT,
|
2094
2151
|
) as _response:
|
2095
2152
|
|
2096
|
-
async def
|
2153
|
+
async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[GenerateStreamResponse]]:
|
2097
2154
|
try:
|
2098
2155
|
if 200 <= _response.status_code < 300:
|
2099
2156
|
|
@@ -2117,50 +2174,56 @@ class AsyncRawVellum:
|
|
2117
2174
|
await _response.aread()
|
2118
2175
|
if _response.status_code == 400:
|
2119
2176
|
raise BadRequestError(
|
2120
|
-
|
2177
|
+
headers=dict(_response.headers),
|
2178
|
+
body=typing.cast(
|
2121
2179
|
typing.Optional[typing.Any],
|
2122
2180
|
parse_obj_as(
|
2123
2181
|
type_=typing.Optional[typing.Any], # type: ignore
|
2124
2182
|
object_=_response.json(),
|
2125
2183
|
),
|
2126
|
-
)
|
2184
|
+
),
|
2127
2185
|
)
|
2128
2186
|
if _response.status_code == 403:
|
2129
2187
|
raise ForbiddenError(
|
2130
|
-
|
2188
|
+
headers=dict(_response.headers),
|
2189
|
+
body=typing.cast(
|
2131
2190
|
typing.Optional[typing.Any],
|
2132
2191
|
parse_obj_as(
|
2133
2192
|
type_=typing.Optional[typing.Any], # type: ignore
|
2134
2193
|
object_=_response.json(),
|
2135
2194
|
),
|
2136
|
-
)
|
2195
|
+
),
|
2137
2196
|
)
|
2138
2197
|
if _response.status_code == 404:
|
2139
2198
|
raise NotFoundError(
|
2140
|
-
|
2199
|
+
headers=dict(_response.headers),
|
2200
|
+
body=typing.cast(
|
2141
2201
|
typing.Optional[typing.Any],
|
2142
2202
|
parse_obj_as(
|
2143
2203
|
type_=typing.Optional[typing.Any], # type: ignore
|
2144
2204
|
object_=_response.json(),
|
2145
2205
|
),
|
2146
|
-
)
|
2206
|
+
),
|
2147
2207
|
)
|
2148
2208
|
if _response.status_code == 500:
|
2149
2209
|
raise InternalServerError(
|
2150
|
-
|
2210
|
+
headers=dict(_response.headers),
|
2211
|
+
body=typing.cast(
|
2151
2212
|
typing.Optional[typing.Any],
|
2152
2213
|
parse_obj_as(
|
2153
2214
|
type_=typing.Optional[typing.Any], # type: ignore
|
2154
2215
|
object_=_response.json(),
|
2155
2216
|
),
|
2156
|
-
)
|
2217
|
+
),
|
2157
2218
|
)
|
2158
2219
|
_response_json = _response.json()
|
2159
2220
|
except JSONDecodeError:
|
2160
|
-
raise ApiError(
|
2161
|
-
|
2221
|
+
raise ApiError(
|
2222
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
|
2223
|
+
)
|
2224
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
2162
2225
|
|
2163
|
-
yield await
|
2226
|
+
yield await _stream()
|
2164
2227
|
|
2165
2228
|
async def search(
|
2166
2229
|
self,
|
@@ -2231,38 +2294,41 @@ class AsyncRawVellum:
|
|
2231
2294
|
return AsyncHttpResponse(response=_response, data=_data)
|
2232
2295
|
if _response.status_code == 400:
|
2233
2296
|
raise BadRequestError(
|
2234
|
-
|
2297
|
+
headers=dict(_response.headers),
|
2298
|
+
body=typing.cast(
|
2235
2299
|
typing.Optional[typing.Any],
|
2236
2300
|
parse_obj_as(
|
2237
2301
|
type_=typing.Optional[typing.Any], # type: ignore
|
2238
2302
|
object_=_response.json(),
|
2239
2303
|
),
|
2240
|
-
)
|
2304
|
+
),
|
2241
2305
|
)
|
2242
2306
|
if _response.status_code == 404:
|
2243
2307
|
raise NotFoundError(
|
2244
|
-
|
2308
|
+
headers=dict(_response.headers),
|
2309
|
+
body=typing.cast(
|
2245
2310
|
typing.Optional[typing.Any],
|
2246
2311
|
parse_obj_as(
|
2247
2312
|
type_=typing.Optional[typing.Any], # type: ignore
|
2248
2313
|
object_=_response.json(),
|
2249
2314
|
),
|
2250
|
-
)
|
2315
|
+
),
|
2251
2316
|
)
|
2252
2317
|
if _response.status_code == 500:
|
2253
2318
|
raise InternalServerError(
|
2254
|
-
|
2319
|
+
headers=dict(_response.headers),
|
2320
|
+
body=typing.cast(
|
2255
2321
|
typing.Optional[typing.Any],
|
2256
2322
|
parse_obj_as(
|
2257
2323
|
type_=typing.Optional[typing.Any], # type: ignore
|
2258
2324
|
object_=_response.json(),
|
2259
2325
|
),
|
2260
|
-
)
|
2326
|
+
),
|
2261
2327
|
)
|
2262
2328
|
_response_json = _response.json()
|
2263
2329
|
except JSONDecodeError:
|
2264
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
2265
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
2330
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
2331
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
2266
2332
|
|
2267
2333
|
async def submit_completion_actuals(
|
2268
2334
|
self,
|
@@ -2315,38 +2381,41 @@ class AsyncRawVellum:
|
|
2315
2381
|
return AsyncHttpResponse(response=_response, data=None)
|
2316
2382
|
if _response.status_code == 400:
|
2317
2383
|
raise BadRequestError(
|
2318
|
-
|
2384
|
+
headers=dict(_response.headers),
|
2385
|
+
body=typing.cast(
|
2319
2386
|
typing.Optional[typing.Any],
|
2320
2387
|
parse_obj_as(
|
2321
2388
|
type_=typing.Optional[typing.Any], # type: ignore
|
2322
2389
|
object_=_response.json(),
|
2323
2390
|
),
|
2324
|
-
)
|
2391
|
+
),
|
2325
2392
|
)
|
2326
2393
|
if _response.status_code == 404:
|
2327
2394
|
raise NotFoundError(
|
2328
|
-
|
2395
|
+
headers=dict(_response.headers),
|
2396
|
+
body=typing.cast(
|
2329
2397
|
typing.Optional[typing.Any],
|
2330
2398
|
parse_obj_as(
|
2331
2399
|
type_=typing.Optional[typing.Any], # type: ignore
|
2332
2400
|
object_=_response.json(),
|
2333
2401
|
),
|
2334
|
-
)
|
2402
|
+
),
|
2335
2403
|
)
|
2336
2404
|
if _response.status_code == 500:
|
2337
2405
|
raise InternalServerError(
|
2338
|
-
|
2406
|
+
headers=dict(_response.headers),
|
2407
|
+
body=typing.cast(
|
2339
2408
|
typing.Optional[typing.Any],
|
2340
2409
|
parse_obj_as(
|
2341
2410
|
type_=typing.Optional[typing.Any], # type: ignore
|
2342
2411
|
object_=_response.json(),
|
2343
2412
|
),
|
2344
|
-
)
|
2413
|
+
),
|
2345
2414
|
)
|
2346
2415
|
_response_json = _response.json()
|
2347
2416
|
except JSONDecodeError:
|
2348
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
2349
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
2417
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
2418
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
2350
2419
|
|
2351
2420
|
async def submit_workflow_execution_actuals(
|
2352
2421
|
self,
|
@@ -2401,5 +2470,5 @@ class AsyncRawVellum:
|
|
2401
2470
|
return AsyncHttpResponse(response=_response, data=None)
|
2402
2471
|
_response_json = _response.json()
|
2403
2472
|
except JSONDecodeError:
|
2404
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
2405
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
2473
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
2474
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|