vellum_ai 0.3.15 → 0.14.75
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.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/lib/core/file_utilities.rb +14 -13
- data/lib/environment.rb +4 -6
- data/lib/requests.rb +141 -59
- data/lib/types_export.rb +392 -110
- data/lib/vellum_ai/ad_hoc/client.rb +179 -0
- data/lib/vellum_ai/container_images/client.rb +289 -0
- data/lib/vellum_ai/deployments/client.rb +581 -111
- data/lib/vellum_ai/deployments/types/deployments_list_request_status.rb +7 -3
- data/lib/vellum_ai/deployments/types/list_deployment_release_tags_request_source.rb +12 -0
- data/lib/vellum_ai/document_indexes/client.rb +517 -261
- data/lib/vellum_ai/document_indexes/types/document_indexes_list_request_status.rb +7 -3
- data/lib/vellum_ai/documents/client.rb +337 -186
- data/lib/vellum_ai/folder_entities/client.rb +165 -33
- data/lib/vellum_ai/folder_entities/types/folder_entities_list_request_entity_status.rb +12 -0
- data/lib/vellum_ai/metric_definitions/client.rb +159 -0
- data/lib/vellum_ai/ml_models/client.rb +94 -0
- data/lib/vellum_ai/organizations/client.rb +92 -0
- data/lib/vellum_ai/prompts/client.rb +198 -0
- data/lib/vellum_ai/release_reviews/client.rb +102 -0
- data/lib/vellum_ai/sandboxes/client.rb +230 -90
- data/lib/vellum_ai/test_suite_runs/client.rb +188 -101
- data/lib/vellum_ai/test_suites/client.rb +208 -90
- data/lib/vellum_ai/types/ad_hoc_execute_prompt_event.rb +90 -0
- data/lib/vellum_ai/types/ad_hoc_expand_meta.rb +85 -0
- data/lib/vellum_ai/types/ad_hoc_fulfilled_prompt_execution_meta.rb +92 -0
- data/lib/vellum_ai/types/ad_hoc_initiated_prompt_execution_meta.rb +65 -0
- data/lib/vellum_ai/types/ad_hoc_rejected_prompt_execution_meta.rb +66 -0
- data/lib/vellum_ai/types/ad_hoc_streaming_prompt_execution_meta.rb +55 -0
- data/lib/vellum_ai/types/api_node_result.rb +43 -27
- data/lib/vellum_ai/types/api_node_result_data.rb +62 -51
- data/lib/vellum_ai/types/api_request_parent_context.rb +87 -0
- data/lib/vellum_ai/types/{image_enum.rb → api_version_enum.rb} +2 -2
- data/lib/vellum_ai/types/array_chat_message_content.rb +42 -26
- data/lib/vellum_ai/types/array_chat_message_content_item.rb +85 -82
- data/lib/vellum_ai/types/array_chat_message_content_item_request.rb +85 -82
- data/lib/vellum_ai/types/array_chat_message_content_request.rb +42 -26
- data/lib/vellum_ai/types/array_input.rb +73 -0
- data/lib/vellum_ai/types/array_vellum_value.rb +68 -0
- data/lib/vellum_ai/types/array_vellum_value_request.rb +68 -0
- data/lib/vellum_ai/types/audio_chat_message_content.rb +68 -0
- data/lib/vellum_ai/types/audio_chat_message_content_request.rb +68 -0
- data/lib/vellum_ai/types/audio_prompt_block.rb +92 -0
- data/lib/vellum_ai/types/audio_vellum_value.rb +70 -0
- data/lib/vellum_ai/types/audio_vellum_value_request.rb +70 -0
- data/lib/vellum_ai/types/base_output.rb +70 -0
- data/lib/vellum_ai/types/basic_vectorizer_intfloat_multilingual_e_5_large.rb +66 -0
- data/lib/vellum_ai/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.rb +66 -0
- data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.rb +66 -0
- data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.rb +66 -0
- data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.rb +66 -0
- data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.rb +66 -0
- data/lib/vellum_ai/types/build_status_enum.rb +18 -0
- data/lib/vellum_ai/types/chat_history_input.rb +73 -0
- data/lib/vellum_ai/types/chat_history_input_request.rb +46 -28
- data/lib/vellum_ai/types/chat_history_vellum_value.rb +68 -0
- data/lib/vellum_ai/types/chat_history_vellum_value_request.rb +68 -0
- data/lib/vellum_ai/types/chat_message.rb +55 -38
- data/lib/vellum_ai/types/chat_message_content.rb +100 -94
- data/lib/vellum_ai/types/chat_message_content_request.rb +100 -94
- data/lib/vellum_ai/types/chat_message_prompt_block.rb +111 -0
- data/lib/vellum_ai/types/chat_message_request.rb +55 -38
- data/lib/vellum_ai/types/chat_message_role.rb +13 -3
- data/lib/vellum_ai/types/code_execution_node_array_result.rb +50 -30
- data/lib/vellum_ai/types/code_execution_node_chat_history_result.rb +49 -29
- data/lib/vellum_ai/types/code_execution_node_error_result.rb +50 -30
- data/lib/vellum_ai/types/code_execution_node_function_call_result.rb +50 -30
- data/lib/vellum_ai/types/code_execution_node_json_result.rb +45 -27
- data/lib/vellum_ai/types/code_execution_node_number_result.rb +47 -27
- data/lib/vellum_ai/types/code_execution_node_result.rb +43 -27
- data/lib/vellum_ai/types/code_execution_node_result_data.rb +43 -30
- data/lib/vellum_ai/types/code_execution_node_result_output.rb +129 -143
- data/lib/vellum_ai/types/code_execution_node_search_results_result.rb +49 -29
- data/lib/vellum_ai/types/code_execution_node_string_result.rb +47 -27
- data/lib/vellum_ai/types/code_execution_package.rb +61 -0
- data/lib/vellum_ai/types/code_execution_runtime.rb +12 -0
- data/lib/vellum_ai/types/code_executor_input.rb +170 -0
- data/lib/vellum_ai/types/code_executor_response.rb +67 -0
- data/lib/vellum_ai/types/code_executor_secret_input.rb +69 -0
- data/lib/vellum_ai/types/code_resource_definition.rb +62 -0
- data/lib/vellum_ai/types/compile_prompt_deployment_expand_meta_request.rb +76 -0
- data/lib/vellum_ai/types/compile_prompt_meta.rb +72 -0
- data/lib/vellum_ai/types/components_schemas_pdf_search_result_meta_source.rb +6 -0
- data/lib/vellum_ai/types/components_schemas_pdf_search_result_meta_source_request.rb +6 -0
- data/lib/vellum_ai/types/components_schemas_prompt_version_build_config_sandbox.rb +6 -0
- data/lib/vellum_ai/types/condition_combinator.rb +12 -0
- data/lib/vellum_ai/types/conditional_node_result.rb +43 -27
- data/lib/vellum_ai/types/conditional_node_result_data.rb +31 -23
- data/lib/vellum_ai/types/container_image_build_config.rb +55 -0
- data/lib/vellum_ai/types/container_image_container_image_tag.rb +66 -0
- data/lib/vellum_ai/types/container_image_read.rb +141 -0
- data/lib/vellum_ai/types/create_test_suite_test_case_request.rb +89 -0
- data/lib/vellum_ai/types/deployment_history_item.rb +107 -0
- data/lib/vellum_ai/types/deployment_provider_payload_response.rb +54 -24
- data/lib/vellum_ai/types/deployment_provider_payload_response_payload.rb +57 -0
- data/lib/vellum_ai/types/deployment_read.rb +113 -76
- data/lib/vellum_ai/types/deployment_release_tag_deployment_history_item.rb +68 -0
- data/lib/vellum_ai/types/deployment_release_tag_read.rb +92 -0
- data/lib/vellum_ai/types/docker_service_token.rb +68 -0
- data/lib/vellum_ai/types/document_chat_message_content.rb +68 -0
- data/lib/vellum_ai/types/document_chat_message_content_request.rb +68 -0
- data/lib/vellum_ai/types/document_document_to_document_index.rb +76 -43
- data/lib/vellum_ai/types/document_index_chunking.rb +74 -0
- data/lib/vellum_ai/types/document_index_chunking_request.rb +74 -0
- data/lib/vellum_ai/types/document_index_indexing_config.rb +75 -0
- data/lib/vellum_ai/types/document_index_indexing_config_request.rb +75 -0
- data/lib/vellum_ai/types/document_index_read.rb +73 -64
- data/lib/vellum_ai/types/document_processing_state.rb +18 -0
- data/lib/vellum_ai/types/document_prompt_block.rb +92 -0
- data/lib/vellum_ai/types/document_read.rb +91 -83
- data/lib/vellum_ai/types/document_status.rb +1 -1
- data/lib/vellum_ai/types/document_vellum_value.rb +70 -0
- data/lib/vellum_ai/types/document_vellum_value_request.rb +70 -0
- data/lib/vellum_ai/types/enriched_normalized_completion.rb +97 -78
- data/lib/vellum_ai/types/entity_status.rb +9 -3
- data/lib/vellum_ai/types/entity_visibility.rb +16 -0
- data/lib/vellum_ai/types/environment_enum.rb +11 -3
- data/lib/vellum_ai/types/ephemeral_prompt_cache_config.rb +54 -0
- data/lib/vellum_ai/types/ephemeral_prompt_cache_config_type_enum.rb +5 -0
- data/lib/vellum_ai/types/error_input.rb +75 -0
- data/lib/vellum_ai/types/error_vellum_value.rb +70 -0
- data/lib/vellum_ai/types/error_vellum_value_request.rb +70 -0
- data/lib/vellum_ai/types/execute_api_request_bearer_token.rb +57 -0
- data/lib/vellum_ai/types/execute_api_request_body.rb +71 -0
- data/lib/vellum_ai/types/execute_api_request_headers_value.rb +57 -0
- data/lib/vellum_ai/types/execute_api_response.rb +83 -0
- data/lib/vellum_ai/types/execute_api_response_json.rb +56 -0
- data/lib/vellum_ai/types/execute_prompt_event.rb +68 -94
- data/lib/vellum_ai/types/execute_prompt_response.rb +38 -70
- data/lib/vellum_ai/types/execute_workflow_response.rb +54 -38
- data/lib/vellum_ai/types/execute_workflow_workflow_result_event.rb +38 -70
- data/lib/vellum_ai/types/execution_array_vellum_value.rb +55 -32
- data/lib/vellum_ai/types/execution_chat_history_vellum_value.rb +54 -31
- data/lib/vellum_ai/types/execution_error_vellum_value.rb +55 -32
- data/lib/vellum_ai/types/execution_function_call_vellum_value.rb +55 -32
- data/lib/vellum_ai/types/execution_json_vellum_value.rb +50 -29
- data/lib/vellum_ai/types/execution_number_vellum_value.rb +52 -29
- data/lib/vellum_ai/types/execution_search_results_vellum_value.rb +54 -31
- data/lib/vellum_ai/types/execution_string_vellum_value.rb +52 -29
- data/lib/vellum_ai/types/execution_vellum_value.rb +129 -143
- data/lib/vellum_ai/types/external_input_descriptor.rb +86 -0
- data/lib/vellum_ai/types/external_test_case_execution.rb +67 -0
- data/lib/vellum_ai/types/external_test_case_execution_request.rb +67 -0
- data/lib/vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15.rb +52 -0
- data/lib/vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.rb +54 -0
- data/lib/vellum_ai/types/finish_reason_enum.rb +11 -3
- data/lib/vellum_ai/types/folder_entity.rb +122 -0
- data/lib/vellum_ai/types/folder_entity_dataset.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_dataset_data.rb +101 -0
- data/lib/vellum_ai/types/folder_entity_document_index.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_document_index_data.rb +106 -0
- data/lib/vellum_ai/types/folder_entity_folder.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_folder_data.rb +92 -0
- data/lib/vellum_ai/types/folder_entity_prompt_sandbox.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_prompt_sandbox_data.rb +114 -0
- data/lib/vellum_ai/types/folder_entity_test_suite.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_test_suite_data.rb +93 -0
- data/lib/vellum_ai/types/folder_entity_workflow_sandbox.rb +75 -0
- data/lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb +114 -0
- data/lib/vellum_ai/types/fulfilled_ad_hoc_execute_prompt_event.rb +89 -0
- data/lib/vellum_ai/types/fulfilled_execute_prompt_event.rb +60 -37
- data/lib/vellum_ai/types/fulfilled_execute_prompt_response.rb +67 -40
- data/lib/vellum_ai/types/fulfilled_execute_workflow_workflow_result_event.rb +59 -32
- data/lib/vellum_ai/types/fulfilled_prompt_execution_meta.rb +69 -29
- data/lib/vellum_ai/types/fulfilled_workflow_node_result_event.rb +92 -68
- data/lib/vellum_ai/types/function_call.rb +53 -72
- data/lib/vellum_ai/types/function_call_chat_message_content.rb +43 -27
- data/lib/vellum_ai/types/function_call_chat_message_content_request.rb +44 -27
- data/lib/vellum_ai/types/function_call_chat_message_content_value.rb +46 -31
- data/lib/vellum_ai/types/function_call_chat_message_content_value_request.rb +48 -31
- data/lib/vellum_ai/types/function_call_input.rb +75 -0
- data/lib/vellum_ai/types/function_call_prompt_block.rb +99 -0
- data/lib/vellum_ai/types/function_call_request.rb +71 -0
- data/lib/vellum_ai/types/function_call_vellum_value.rb +70 -0
- data/lib/vellum_ai/types/function_call_vellum_value_request.rb +70 -0
- data/lib/vellum_ai/types/function_definition.rb +109 -0
- data/lib/vellum_ai/types/generate_options_request.rb +35 -27
- data/lib/vellum_ai/types/generate_request.rb +52 -34
- data/lib/vellum_ai/types/generate_response.rb +29 -23
- data/lib/vellum_ai/types/generate_result.rb +52 -35
- data/lib/vellum_ai/types/generate_result_data.rb +29 -23
- data/lib/vellum_ai/types/generate_result_error.rb +26 -20
- data/lib/vellum_ai/types/generate_stream_response.rb +30 -24
- data/lib/vellum_ai/types/generate_stream_result.rb +53 -38
- data/lib/vellum_ai/types/generate_stream_result_data.rb +39 -28
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_config.rb +61 -0
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_config_request.rb +62 -0
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004.rb +69 -0
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004_request.rb +69 -0
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.rb +69 -0
- data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002_request.rb +69 -0
- data/lib/vellum_ai/types/hkunlp_instructor_xl_vectorizer.rb +68 -0
- data/lib/vellum_ai/types/hkunlp_instructor_xl_vectorizer_request.rb +68 -0
- data/lib/vellum_ai/types/image_chat_message_content.rb +43 -27
- data/lib/vellum_ai/types/image_chat_message_content_request.rb +43 -27
- data/lib/vellum_ai/types/image_prompt_block.rb +92 -0
- data/lib/vellum_ai/types/image_vellum_value.rb +70 -0
- data/lib/vellum_ai/types/image_vellum_value_request.rb +70 -0
- data/lib/vellum_ai/types/indexing_config_vectorizer.rb +186 -0
- data/lib/vellum_ai/types/indexing_config_vectorizer_request.rb +186 -0
- data/lib/vellum_ai/types/indexing_state_enum.rb +15 -9
- data/lib/vellum_ai/types/initiated_ad_hoc_execute_prompt_event.rb +78 -0
- data/lib/vellum_ai/types/initiated_execute_prompt_event.rb +52 -31
- data/lib/vellum_ai/types/initiated_prompt_execution_meta.rb +55 -44
- data/lib/vellum_ai/types/initiated_workflow_node_result_event.rb +86 -62
- data/lib/vellum_ai/types/instructor_vectorizer_config.rb +69 -0
- data/lib/vellum_ai/types/instructor_vectorizer_config_request.rb +69 -0
- data/lib/vellum_ai/types/invoked_port.rb +51 -0
- data/lib/vellum_ai/types/iteration_state_enum.rb +14 -0
- data/lib/vellum_ai/types/jinja_prompt_block.rb +85 -0
- data/lib/vellum_ai/types/json_input.rb +69 -0
- data/lib/vellum_ai/types/json_input_request.rb +46 -28
- data/lib/vellum_ai/types/json_vellum_value.rb +62 -0
- data/lib/vellum_ai/types/json_vellum_value_request.rb +62 -0
- data/lib/vellum_ai/types/logical_operator.rb +57 -22
- data/lib/vellum_ai/types/logprobs_enum.rb +9 -3
- data/lib/vellum_ai/types/map_node_result.rb +70 -0
- data/lib/vellum_ai/types/map_node_result_data.rb +64 -0
- data/lib/vellum_ai/types/merge_node_result.rb +68 -0
- data/lib/vellum_ai/types/merge_node_result_data.rb +53 -0
- data/lib/vellum_ai/types/metadata_filter_config_request.rb +71 -57
- data/lib/vellum_ai/types/metadata_filter_rule_combinator.rb +9 -3
- data/lib/vellum_ai/types/metadata_filter_rule_request.rb +69 -57
- data/lib/vellum_ai/types/metadata_filters_request.rb +58 -0
- data/lib/vellum_ai/types/method_enum.rb +18 -0
- data/lib/vellum_ai/types/metric_definition_execution.rb +55 -0
- data/lib/vellum_ai/types/metric_definition_history_item.rb +96 -0
- data/lib/vellum_ai/types/metric_definition_input.rb +90 -0
- data/lib/vellum_ai/types/metric_node_result.rb +52 -0
- data/lib/vellum_ai/types/ml_model_read.rb +62 -0
- data/lib/vellum_ai/types/ml_model_usage.rb +98 -0
- data/lib/vellum_ai/types/ml_model_usage_wrapper.rb +67 -0
- data/lib/vellum_ai/types/named_scenario_input_chat_history_variable_value_request.rb +77 -0
- data/lib/vellum_ai/types/named_scenario_input_json_variable_value_request.rb +71 -0
- data/lib/vellum_ai/types/named_scenario_input_request.rb +74 -0
- data/lib/vellum_ai/types/named_scenario_input_string_variable_value_request.rb +73 -0
- data/lib/vellum_ai/types/named_test_case_array_variable_value.rb +75 -0
- data/lib/vellum_ai/types/named_test_case_array_variable_value_request.rb +76 -0
- data/lib/vellum_ai/types/named_test_case_chat_history_variable_value.rb +76 -0
- data/lib/vellum_ai/types/named_test_case_chat_history_variable_value_request.rb +53 -30
- data/lib/vellum_ai/types/named_test_case_error_variable_value.rb +77 -0
- data/lib/vellum_ai/types/named_test_case_error_variable_value_request.rb +52 -30
- data/lib/vellum_ai/types/named_test_case_function_call_variable_value.rb +78 -0
- data/lib/vellum_ai/types/named_test_case_function_call_variable_value_request.rb +79 -0
- data/lib/vellum_ai/types/named_test_case_json_variable_value.rb +69 -0
- data/lib/vellum_ai/types/named_test_case_json_variable_value_request.rb +48 -28
- data/lib/vellum_ai/types/named_test_case_number_variable_value.rb +71 -0
- data/lib/vellum_ai/types/named_test_case_number_variable_value_request.rb +51 -28
- data/lib/vellum_ai/types/named_test_case_search_results_variable_value.rb +77 -0
- data/lib/vellum_ai/types/named_test_case_search_results_variable_value_request.rb +53 -30
- data/lib/vellum_ai/types/named_test_case_string_variable_value.rb +71 -0
- data/lib/vellum_ai/types/named_test_case_string_variable_value_request.rb +51 -28
- data/lib/vellum_ai/types/named_test_case_variable_value.rb +154 -0
- data/lib/vellum_ai/types/named_test_case_variable_value_request.rb +131 -119
- data/lib/vellum_ai/types/new_member_join_behavior_enum.rb +14 -0
- data/lib/vellum_ai/types/node_execution_fulfilled_body.rb +87 -0
- data/lib/vellum_ai/types/node_execution_fulfilled_event.rb +134 -0
- data/lib/vellum_ai/types/node_execution_initiated_body.rb +67 -0
- data/lib/vellum_ai/types/node_execution_initiated_event.rb +134 -0
- data/lib/vellum_ai/types/node_execution_paused_body.rb +57 -0
- data/lib/vellum_ai/types/node_execution_paused_event.rb +134 -0
- data/lib/vellum_ai/types/node_execution_rejected_body.rb +73 -0
- data/lib/vellum_ai/types/node_execution_rejected_event.rb +134 -0
- data/lib/vellum_ai/types/node_execution_resumed_body.rb +57 -0
- data/lib/vellum_ai/types/node_execution_resumed_event.rb +134 -0
- data/lib/vellum_ai/types/node_execution_span.rb +118 -0
- data/lib/vellum_ai/types/node_execution_span_attributes.rb +51 -0
- data/lib/vellum_ai/types/node_execution_streaming_body.rb +73 -0
- data/lib/vellum_ai/types/node_execution_streaming_event.rb +134 -0
- data/lib/vellum_ai/types/node_input_compiled_array_value.rb +55 -33
- data/lib/vellum_ai/types/node_input_compiled_chat_history_value.rb +54 -32
- data/lib/vellum_ai/types/node_input_compiled_error_value.rb +55 -33
- data/lib/vellum_ai/types/node_input_compiled_function_call_value.rb +83 -0
- data/lib/vellum_ai/types/node_input_compiled_json_value.rb +50 -30
- data/lib/vellum_ai/types/node_input_compiled_number_value.rb +52 -30
- data/lib/vellum_ai/types/node_input_compiled_search_results_value.rb +54 -32
- data/lib/vellum_ai/types/node_input_compiled_secret_value.rb +81 -0
- data/lib/vellum_ai/types/node_input_compiled_string_value.rb +52 -30
- data/lib/vellum_ai/types/node_input_variable_compiled_value.rb +146 -144
- data/lib/vellum_ai/types/node_output_compiled_array_value.rb +60 -31
- data/lib/vellum_ai/types/node_output_compiled_chat_history_value.rb +59 -30
- data/lib/vellum_ai/types/node_output_compiled_error_value.rb +59 -30
- data/lib/vellum_ai/types/node_output_compiled_function_call_value.rb +85 -0
- data/lib/vellum_ai/types/node_output_compiled_json_value.rb +57 -28
- data/lib/vellum_ai/types/node_output_compiled_number_value.rb +57 -28
- data/lib/vellum_ai/types/node_output_compiled_search_results_value.rb +59 -30
- data/lib/vellum_ai/types/node_output_compiled_string_value.rb +57 -28
- data/lib/vellum_ai/types/node_output_compiled_value.rb +130 -144
- data/lib/vellum_ai/types/node_parent_context.rb +100 -0
- data/lib/vellum_ai/types/normalized_log_probs.rb +42 -29
- data/lib/vellum_ai/types/normalized_token_log_probs.rb +51 -35
- data/lib/vellum_ai/types/number_input.rb +69 -0
- data/lib/vellum_ai/types/number_vellum_value.rb +64 -0
- data/lib/vellum_ai/types/number_vellum_value_request.rb +64 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_config.rb +54 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_config_request.rb +54 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_large.rb +68 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_large_request.rb +70 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_small.rb +68 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_small_request.rb +70 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002.rb +68 -0
- data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002_request.rb +70 -0
- data/lib/vellum_ai/types/organization_read.rb +78 -0
- data/lib/vellum_ai/types/paginated_container_image_read_list.rb +81 -0
- data/lib/vellum_ai/types/paginated_deployment_release_tag_read_list.rb +82 -0
- data/lib/vellum_ai/types/paginated_document_index_read_list.rb +55 -38
- data/lib/vellum_ai/types/paginated_folder_entity_list.rb +81 -0
- data/lib/vellum_ai/types/paginated_slim_deployment_read_list.rb +55 -38
- data/lib/vellum_ai/types/paginated_slim_document_list.rb +55 -38
- data/lib/vellum_ai/types/paginated_slim_workflow_deployment_list.rb +55 -38
- data/lib/vellum_ai/types/paginated_test_suite_run_execution_list.rb +53 -36
- data/lib/vellum_ai/types/paginated_test_suite_test_case_list.rb +81 -0
- data/lib/vellum_ai/types/paginated_workflow_release_tag_read_list.rb +81 -0
- data/lib/vellum_ai/types/paginated_workflow_sandbox_example_list.rb +81 -0
- data/lib/vellum_ai/types/parent_context.rb +122 -0
- data/lib/vellum_ai/types/pdf_search_result_meta_source.rb +75 -0
- data/lib/vellum_ai/types/pdf_search_result_meta_source_request.rb +75 -0
- data/lib/vellum_ai/types/plain_text_prompt_block.rb +85 -0
- data/lib/vellum_ai/types/price.rb +62 -0
- data/lib/vellum_ai/types/processing_failure_reason_enum.rb +9 -6
- data/lib/vellum_ai/types/prompt_block.rb +154 -0
- data/lib/vellum_ai/types/prompt_block_state.rb +12 -0
- data/lib/vellum_ai/types/prompt_deployment_expand_meta_request.rb +110 -0
- data/lib/vellum_ai/types/prompt_deployment_input_request.rb +53 -82
- data/lib/vellum_ai/types/prompt_deployment_parent_context.rb +143 -0
- data/lib/vellum_ai/types/prompt_deployment_release.rb +149 -0
- data/lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb +53 -0
- data/lib/vellum_ai/types/prompt_deployment_release_prompt_version.rb +68 -0
- data/lib/vellum_ai/types/prompt_exec_config.rb +115 -0
- data/lib/vellum_ai/types/prompt_execution_meta.rb +87 -50
- data/lib/vellum_ai/types/prompt_node_execution_meta.rb +84 -0
- data/lib/vellum_ai/types/prompt_node_result.rb +43 -27
- data/lib/vellum_ai/types/prompt_node_result_data.rb +72 -36
- data/lib/vellum_ai/types/prompt_output.rb +72 -98
- data/lib/vellum_ai/types/prompt_parameters.rb +112 -0
- data/lib/vellum_ai/types/prompt_push_response.rb +61 -0
- data/lib/vellum_ai/types/prompt_request_chat_history_input.rb +72 -0
- data/lib/vellum_ai/types/prompt_request_input.rb +74 -0
- data/lib/vellum_ai/types/prompt_request_json_input.rb +68 -0
- data/lib/vellum_ai/types/prompt_request_string_input.rb +68 -0
- data/lib/vellum_ai/types/prompt_settings.rb +63 -0
- data/lib/vellum_ai/types/prompt_version_build_config_sandbox.rb +75 -0
- data/lib/vellum_ai/types/raw_prompt_execution_overrides_request.rb +45 -30
- data/lib/vellum_ai/types/reducto_chunker_config.rb +54 -0
- data/lib/vellum_ai/types/reducto_chunker_config_request.rb +54 -0
- data/lib/vellum_ai/types/reducto_chunking.rb +70 -0
- data/lib/vellum_ai/types/reducto_chunking_request.rb +70 -0
- data/lib/vellum_ai/types/rejected_ad_hoc_execute_prompt_event.rb +90 -0
- data/lib/vellum_ai/types/rejected_execute_prompt_event.rb +60 -38
- data/lib/vellum_ai/types/rejected_execute_prompt_response.rb +67 -41
- data/lib/vellum_ai/types/rejected_execute_workflow_workflow_result_event.rb +60 -33
- data/lib/vellum_ai/types/rejected_prompt_execution_meta.rb +43 -29
- data/lib/vellum_ai/types/rejected_workflow_node_result_event.rb +86 -62
- data/lib/vellum_ai/types/release_created_by.rb +70 -0
- data/lib/vellum_ai/types/release_environment.rb +68 -0
- data/lib/vellum_ai/types/release_release_tag.rb +66 -0
- data/lib/vellum_ai/types/release_review_reviewer.rb +63 -0
- data/lib/vellum_ai/types/release_review_state.rb +14 -0
- data/lib/vellum_ai/types/release_tag_release.rb +66 -0
- data/lib/vellum_ai/types/release_tag_source.rb +12 -0
- data/lib/vellum_ai/types/replace_test_suite_test_case_request.rb +98 -0
- data/lib/vellum_ai/types/rich_text_child_block.rb +58 -0
- data/lib/vellum_ai/types/rich_text_prompt_block.rb +89 -0
- data/lib/vellum_ai/types/sandbox_scenario.rb +47 -31
- data/lib/vellum_ai/types/scenario_input.rb +57 -53
- data/lib/vellum_ai/types/scenario_input_chat_history_variable_value.rb +76 -0
- data/lib/vellum_ai/types/scenario_input_json_variable_value.rb +69 -0
- data/lib/vellum_ai/types/scenario_input_string_variable_value.rb +71 -0
- data/lib/vellum_ai/types/search_filters_request.rb +44 -31
- data/lib/vellum_ai/types/search_node_result.rb +43 -27
- data/lib/vellum_ai/types/search_node_result_data.rb +54 -41
- data/lib/vellum_ai/types/search_request_options_request.rb +63 -47
- data/lib/vellum_ai/types/search_response.rb +31 -23
- data/lib/vellum_ai/types/search_result.rb +62 -32
- data/lib/vellum_ai/types/search_result_document.rb +55 -34
- data/lib/vellum_ai/types/search_result_document_request.rb +56 -30
- data/lib/vellum_ai/types/search_result_merging_request.rb +30 -22
- data/lib/vellum_ai/types/search_result_meta.rb +60 -0
- data/lib/vellum_ai/types/search_result_meta_request.rb +60 -0
- data/lib/vellum_ai/types/search_result_request.rb +62 -32
- data/lib/vellum_ai/types/search_results_input.rb +73 -0
- data/lib/vellum_ai/types/search_results_vellum_value.rb +68 -0
- data/lib/vellum_ai/types/search_results_vellum_value_request.rb +68 -0
- data/lib/vellum_ai/types/search_weights_request.rb +39 -26
- data/lib/vellum_ai/types/secret_type_enum.rb +16 -0
- data/lib/vellum_ai/types/sentence_chunker_config.rb +64 -0
- data/lib/vellum_ai/types/sentence_chunker_config_request.rb +64 -0
- data/lib/vellum_ai/types/sentence_chunking.rb +70 -0
- data/lib/vellum_ai/types/sentence_chunking_request.rb +70 -0
- data/lib/vellum_ai/types/slim_deployment_read.rb +99 -70
- data/lib/vellum_ai/types/slim_document.rb +102 -85
- data/lib/vellum_ai/types/slim_document_document_to_document_index.rb +96 -0
- data/lib/vellum_ai/types/slim_release_review.rb +87 -0
- data/lib/vellum_ai/types/slim_workflow_deployment.rb +109 -77
- data/lib/vellum_ai/types/slim_workflow_execution_read.rb +162 -0
- data/lib/vellum_ai/types/span_link.rb +75 -0
- data/lib/vellum_ai/types/{chat_history_enum.rb → span_link_type_enum.rb} +2 -2
- data/lib/vellum_ai/types/streaming_ad_hoc_execute_prompt_event.rb +106 -0
- data/lib/vellum_ai/types/streaming_execute_prompt_event.rb +73 -52
- data/lib/vellum_ai/types/streaming_prompt_execution_meta.rb +33 -24
- data/lib/vellum_ai/types/streaming_workflow_node_result_event.rb +93 -69
- data/lib/vellum_ai/types/string_chat_message_content.rb +40 -24
- data/lib/vellum_ai/types/string_chat_message_content_request.rb +40 -24
- data/lib/vellum_ai/types/string_input.rb +69 -0
- data/lib/vellum_ai/types/string_input_request.rb +45 -27
- data/lib/vellum_ai/types/string_vellum_value.rb +64 -0
- data/lib/vellum_ai/types/string_vellum_value_request.rb +64 -0
- data/lib/vellum_ai/types/submit_completion_actual_request.rb +76 -39
- data/lib/vellum_ai/types/submit_workflow_execution_actual_request.rb +53 -82
- data/lib/vellum_ai/types/subworkflow_node_result.rb +51 -21
- data/lib/vellum_ai/types/subworkflow_node_result_data.rb +53 -0
- data/lib/vellum_ai/types/templating_node_array_result.rb +50 -30
- data/lib/vellum_ai/types/templating_node_chat_history_result.rb +49 -29
- data/lib/vellum_ai/types/templating_node_error_result.rb +50 -30
- data/lib/vellum_ai/types/templating_node_function_call_result.rb +50 -30
- data/lib/vellum_ai/types/templating_node_json_result.rb +45 -27
- data/lib/vellum_ai/types/templating_node_number_result.rb +47 -27
- data/lib/vellum_ai/types/templating_node_result.rb +43 -27
- data/lib/vellum_ai/types/templating_node_result_data.rb +30 -24
- data/lib/vellum_ai/types/templating_node_result_output.rb +129 -143
- data/lib/vellum_ai/types/templating_node_search_results_result.rb +49 -29
- data/lib/vellum_ai/types/templating_node_string_result.rb +47 -27
- data/lib/vellum_ai/types/terminal_node_array_result.rb +55 -33
- data/lib/vellum_ai/types/terminal_node_chat_history_result.rb +54 -32
- data/lib/vellum_ai/types/terminal_node_error_result.rb +55 -33
- data/lib/vellum_ai/types/terminal_node_function_call_result.rb +55 -33
- data/lib/vellum_ai/types/terminal_node_json_result.rb +52 -30
- data/lib/vellum_ai/types/terminal_node_number_result.rb +52 -30
- data/lib/vellum_ai/types/terminal_node_result.rb +43 -27
- data/lib/vellum_ai/types/terminal_node_result_data.rb +30 -24
- data/lib/vellum_ai/types/terminal_node_result_output.rb +130 -144
- data/lib/vellum_ai/types/terminal_node_search_results_result.rb +54 -32
- data/lib/vellum_ai/types/terminal_node_string_result.rb +52 -30
- data/lib/vellum_ai/types/test_case_array_variable_value.rb +82 -0
- data/lib/vellum_ai/types/test_case_chat_history_variable_value.rb +57 -29
- data/lib/vellum_ai/types/test_case_error_variable_value.rb +58 -30
- data/lib/vellum_ai/types/test_case_function_call_variable_value.rb +84 -0
- data/lib/vellum_ai/types/test_case_json_variable_value.rb +53 -27
- data/lib/vellum_ai/types/test_case_number_variable_value.rb +55 -27
- data/lib/vellum_ai/types/test_case_search_results_variable_value.rb +57 -29
- data/lib/vellum_ai/types/test_case_string_variable_value.rb +55 -27
- data/lib/vellum_ai/types/test_case_variable_value.rb +131 -119
- data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config.rb +55 -31
- data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data.rb +43 -26
- data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data_request.rb +43 -26
- data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_request.rb +55 -31
- data/lib/vellum_ai/types/test_suite_run_exec_config.rb +86 -70
- data/lib/vellum_ai/types/test_suite_run_exec_config_request.rb +118 -70
- data/lib/vellum_ai/types/test_suite_run_execution.rb +51 -37
- data/lib/vellum_ai/types/test_suite_run_execution_array_output.rb +83 -0
- data/lib/vellum_ai/types/test_suite_run_execution_chat_history_output.rb +60 -30
- data/lib/vellum_ai/types/test_suite_run_execution_error_output.rb +59 -30
- data/lib/vellum_ai/types/test_suite_run_execution_function_call_output.rb +87 -0
- data/lib/vellum_ai/types/test_suite_run_execution_json_output.rb +55 -28
- data/lib/vellum_ai/types/test_suite_run_execution_metric_definition.rb +71 -0
- data/lib/vellum_ai/types/test_suite_run_execution_metric_result.rb +60 -27
- data/lib/vellum_ai/types/test_suite_run_execution_number_output.rb +57 -28
- data/lib/vellum_ai/types/test_suite_run_execution_output.rb +131 -119
- data/lib/vellum_ai/types/test_suite_run_execution_search_results_output.rb +61 -30
- data/lib/vellum_ai/types/test_suite_run_execution_string_output.rb +57 -28
- data/lib/vellum_ai/types/test_suite_run_external_exec_config.rb +80 -0
- data/lib/vellum_ai/types/test_suite_run_external_exec_config_data.rb +57 -0
- data/lib/vellum_ai/types/test_suite_run_external_exec_config_data_request.rb +59 -0
- data/lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb +81 -0
- data/lib/vellum_ai/types/test_suite_run_metric_array_output.rb +75 -0
- data/lib/vellum_ai/types/test_suite_run_metric_error_output.rb +48 -30
- data/lib/vellum_ai/types/test_suite_run_metric_json_output.rb +69 -0
- data/lib/vellum_ai/types/test_suite_run_metric_number_output.rb +49 -29
- data/lib/vellum_ai/types/test_suite_run_metric_output.rb +86 -70
- data/lib/vellum_ai/types/test_suite_run_metric_string_output.rb +71 -0
- data/lib/vellum_ai/types/test_suite_run_progress.rb +61 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_exec_config_data_request.rb +65 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_exec_config_request.rb +81 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config.rb +82 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_data.rb +65 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_data_request.rb +65 -0
- data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb +82 -0
- data/lib/vellum_ai/types/test_suite_run_read.rb +89 -60
- data/lib/vellum_ai/types/test_suite_run_state.rb +15 -9
- data/lib/vellum_ai/types/test_suite_run_test_suite.rb +41 -28
- data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config.rb +55 -31
- data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_data.rb +43 -26
- data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_data_request.rb +43 -26
- data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb +55 -31
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_exec_config_data_request.rb +53 -0
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_exec_config_request.rb +81 -0
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config.rb +82 -0
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb +67 -0
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data_request.rb +67 -0
- data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_request.rb +82 -0
- data/lib/vellum_ai/types/test_suite_test_case.rb +63 -40
- data/lib/vellum_ai/types/test_suite_test_case_bulk_operation_request.rb +91 -0
- data/lib/vellum_ai/types/test_suite_test_case_bulk_result.rb +90 -0
- data/lib/vellum_ai/types/test_suite_test_case_create_bulk_operation_request.rb +79 -0
- data/lib/vellum_ai/types/test_suite_test_case_created_bulk_result.rb +75 -0
- data/lib/vellum_ai/types/test_suite_test_case_created_bulk_result_data.rb +53 -0
- data/lib/vellum_ai/types/test_suite_test_case_delete_bulk_operation_data_request.rb +53 -0
- data/lib/vellum_ai/types/test_suite_test_case_delete_bulk_operation_request.rb +79 -0
- data/lib/vellum_ai/types/test_suite_test_case_deleted_bulk_result.rb +77 -0
- data/lib/vellum_ai/types/test_suite_test_case_deleted_bulk_result_data.rb +53 -0
- data/lib/vellum_ai/types/test_suite_test_case_rejected_bulk_result.rb +73 -0
- data/lib/vellum_ai/types/test_suite_test_case_replace_bulk_operation_request.rb +79 -0
- data/lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result.rb +77 -0
- data/lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result_data.rb +54 -0
- data/lib/vellum_ai/types/test_suite_test_case_upsert_bulk_operation_request.rb +79 -0
- data/lib/vellum_ai/types/token_overlapping_window_chunker_config.rb +64 -0
- data/lib/vellum_ai/types/token_overlapping_window_chunker_config_request.rb +66 -0
- data/lib/vellum_ai/types/token_overlapping_window_chunking.rb +70 -0
- data/lib/vellum_ai/types/token_overlapping_window_chunking_request.rb +71 -0
- data/lib/vellum_ai/types/{json_enum.rb → unit_enum.rb} +2 -2
- data/lib/vellum_ai/types/upload_document_response.rb +26 -20
- data/lib/vellum_ai/types/upsert_test_suite_test_case_request.rb +103 -0
- data/lib/vellum_ai/types/variable_prompt_block.rb +85 -0
- data/lib/vellum_ai/types/vellum_audio.rb +63 -0
- data/lib/vellum_ai/types/vellum_audio_request.rb +63 -0
- data/lib/vellum_ai/types/vellum_code_resource_definition.rb +68 -0
- data/lib/vellum_ai/types/vellum_document.rb +63 -0
- data/lib/vellum_ai/types/vellum_document_request.rb +63 -0
- data/lib/vellum_ai/types/vellum_error.rb +36 -25
- data/lib/vellum_ai/types/vellum_error_code_enum.rb +17 -8
- data/lib/vellum_ai/types/vellum_error_request.rb +36 -25
- data/lib/vellum_ai/types/vellum_image.rb +40 -27
- data/lib/vellum_ai/types/vellum_image_request.rb +40 -27
- data/lib/vellum_ai/types/vellum_node_execution_event.rb +122 -0
- data/lib/vellum_ai/types/vellum_sdk_error.rb +62 -0
- data/lib/vellum_ai/types/vellum_sdk_error_code_enum.rb +32 -0
- data/lib/vellum_ai/types/vellum_secret.rb +51 -0
- data/lib/vellum_ai/types/vellum_span.rb +58 -0
- data/lib/vellum_ai/types/vellum_value.rb +202 -0
- data/lib/vellum_ai/types/vellum_value_logical_condition_group_request.rb +84 -0
- data/lib/vellum_ai/types/vellum_value_logical_condition_request.rb +88 -0
- data/lib/vellum_ai/types/vellum_value_logical_expression_request.rb +58 -0
- data/lib/vellum_ai/types/vellum_value_request.rb +202 -0
- data/lib/vellum_ai/types/vellum_variable.rb +77 -29
- data/lib/vellum_ai/types/vellum_variable_extensions.rb +54 -0
- data/lib/vellum_ai/types/vellum_variable_type.rb +29 -13
- data/lib/vellum_ai/types/vellum_workflow_execution_event.rb +138 -0
- data/lib/vellum_ai/types/workflow_deployment_event_executions_response.rb +67 -0
- data/lib/vellum_ai/types/workflow_deployment_history_item.rb +117 -0
- data/lib/vellum_ai/types/workflow_deployment_parent_context.rb +143 -0
- data/lib/vellum_ai/types/workflow_deployment_read.rb +120 -77
- data/lib/vellum_ai/types/workflow_deployment_release.rb +149 -0
- data/lib/vellum_ai/types/workflow_deployment_release_workflow_deployment.rb +53 -0
- data/lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb +77 -0
- data/lib/vellum_ai/types/workflow_error.rb +58 -0
- data/lib/vellum_ai/types/workflow_event_error.rb +36 -25
- data/lib/vellum_ai/types/workflow_event_execution_read.rb +173 -0
- data/lib/vellum_ai/types/workflow_execution_actual.rb +88 -0
- data/lib/vellum_ai/types/workflow_execution_actual_chat_history_request.rb +87 -50
- data/lib/vellum_ai/types/workflow_execution_actual_json_request.rb +83 -48
- data/lib/vellum_ai/types/workflow_execution_actual_string_request.rb +82 -47
- data/lib/vellum_ai/types/workflow_execution_event_error_code.rb +25 -12
- data/lib/vellum_ai/types/workflow_execution_event_type.rb +9 -3
- data/lib/vellum_ai/types/workflow_execution_fulfilled_body.rb +67 -0
- data/lib/vellum_ai/types/workflow_execution_fulfilled_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_initiated_body.rb +67 -0
- data/lib/vellum_ai/types/workflow_execution_initiated_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_node_result_event.rb +62 -39
- data/lib/vellum_ai/types/workflow_execution_paused_body.rb +71 -0
- data/lib/vellum_ai/types/workflow_execution_paused_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_rejected_body.rb +73 -0
- data/lib/vellum_ai/types/workflow_execution_rejected_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_resumed_body.rb +57 -0
- data/lib/vellum_ai/types/workflow_execution_resumed_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_snapshotted_body.rb +67 -0
- data/lib/vellum_ai/types/workflow_execution_snapshotted_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_span.rb +118 -0
- data/lib/vellum_ai/types/workflow_execution_span_attributes.rb +51 -0
- data/lib/vellum_ai/types/workflow_execution_streaming_body.rb +73 -0
- data/lib/vellum_ai/types/workflow_execution_streaming_event.rb +134 -0
- data/lib/vellum_ai/types/workflow_execution_usage_calculation_error.rb +63 -0
- data/lib/vellum_ai/types/workflow_execution_usage_calculation_error_code_enum.rb +16 -0
- data/lib/vellum_ai/types/workflow_execution_usage_result.rb +84 -0
- data/lib/vellum_ai/types/workflow_execution_view_online_eval_metric_result.rb +74 -0
- data/lib/vellum_ai/types/workflow_execution_workflow_result_event.rb +62 -39
- data/lib/vellum_ai/types/workflow_expand_meta_request.rb +74 -0
- data/lib/vellum_ai/types/workflow_initialization_error.rb +62 -0
- data/lib/vellum_ai/types/workflow_node_result_data.rb +177 -143
- data/lib/vellum_ai/types/workflow_node_result_event.rb +68 -94
- data/lib/vellum_ai/types/workflow_node_result_event_state.rb +13 -8
- data/lib/vellum_ai/types/workflow_output.rb +144 -155
- data/lib/vellum_ai/types/workflow_output_array.rb +55 -33
- data/lib/vellum_ai/types/workflow_output_chat_history.rb +54 -32
- data/lib/vellum_ai/types/workflow_output_error.rb +55 -33
- data/lib/vellum_ai/types/workflow_output_function_call.rb +55 -33
- data/lib/vellum_ai/types/workflow_output_image.rb +55 -33
- data/lib/vellum_ai/types/workflow_output_json.rb +50 -30
- data/lib/vellum_ai/types/workflow_output_number.rb +52 -30
- data/lib/vellum_ai/types/workflow_output_search_results.rb +54 -32
- data/lib/vellum_ai/types/workflow_output_string.rb +52 -30
- data/lib/vellum_ai/types/workflow_parent_context.rb +100 -0
- data/lib/vellum_ai/types/workflow_push_deployment_config_request.rb +77 -0
- data/lib/vellum_ai/types/workflow_push_response.rb +70 -0
- data/lib/vellum_ai/types/workflow_release_tag_read.rb +92 -0
- data/lib/vellum_ai/types/workflow_release_tag_workflow_deployment_history_item.rb +68 -0
- data/lib/vellum_ai/types/workflow_request_chat_history_input_request.rb +47 -28
- data/lib/vellum_ai/types/workflow_request_input_request.rb +68 -94
- data/lib/vellum_ai/types/workflow_request_json_input_request.rb +45 -27
- data/lib/vellum_ai/types/workflow_request_number_input_request.rb +44 -26
- data/lib/vellum_ai/types/workflow_request_string_input_request.rb +44 -26
- data/lib/vellum_ai/types/workflow_result_event.rb +86 -68
- data/lib/vellum_ai/types/workflow_result_event_output_data.rb +129 -143
- data/lib/vellum_ai/types/workflow_result_event_output_data_array.rb +76 -53
- data/lib/vellum_ai/types/workflow_result_event_output_data_chat_history.rb +77 -52
- data/lib/vellum_ai/types/workflow_result_event_output_data_error.rb +76 -53
- data/lib/vellum_ai/types/workflow_result_event_output_data_function_call.rb +78 -53
- data/lib/vellum_ai/types/workflow_result_event_output_data_json.rb +72 -49
- data/lib/vellum_ai/types/workflow_result_event_output_data_number.rb +72 -49
- data/lib/vellum_ai/types/workflow_result_event_output_data_search_results.rb +77 -52
- data/lib/vellum_ai/types/workflow_result_event_output_data_string.rb +71 -48
- data/lib/vellum_ai/types/workflow_sandbox_example.rb +77 -0
- data/lib/vellum_ai/types/workflow_sandbox_parent_context.rb +108 -0
- data/lib/vellum_ai/types/workflow_stream_event.rb +38 -70
- data/lib/vellum_ai/types/workspace_read.rb +80 -0
- data/lib/vellum_ai/types/workspace_secret_read.rb +88 -0
- data/lib/vellum_ai/workflow_deployments/client.rb +534 -66
- data/lib/vellum_ai/workflow_deployments/types/list_workflow_release_tags_request_source.rb +12 -0
- data/lib/vellum_ai/workflow_deployments/types/workflow_deployments_list_request_status.rb +7 -3
- data/lib/vellum_ai/workflow_sandboxes/client.rb +183 -0
- data/lib/vellum_ai/workflow_sandboxes/types/list_workflow_sandbox_examples_request_tag.rb +12 -0
- data/lib/vellum_ai/workflows/client.rb +169 -0
- data/lib/vellum_ai/workspace_secrets/client.rb +159 -0
- data/lib/vellum_ai/workspaces/client.rb +92 -0
- data/lib/vellum_ai.rb +786 -392
- metadata +434 -96
- data/lib/vellum_ai/model_versions/client.rb +0 -61
- data/lib/vellum_ai/registered_prompts/client.rb +0 -154
- data/lib/vellum_ai/types/array_enum.rb +0 -5
- data/lib/vellum_ai/types/array_variable_value_item.rb +0 -168
- data/lib/vellum_ai/types/block_type_enum.rb +0 -11
- data/lib/vellum_ai/types/chat_history_variable_value.rb +0 -49
- data/lib/vellum_ai/types/error_enum.rb +0 -5
- data/lib/vellum_ai/types/error_variable_value.rb +0 -51
- data/lib/vellum_ai/types/execute_prompt_api_error_response.rb +0 -45
- data/lib/vellum_ai/types/execute_workflow_error_response.rb +0 -45
- data/lib/vellum_ai/types/execute_workflow_stream_error_response.rb +0 -45
- data/lib/vellum_ai/types/fulfilled_enum.rb +0 -5
- data/lib/vellum_ai/types/fulfilled_function_call.rb +0 -56
- data/lib/vellum_ai/types/function_call_enum.rb +0 -5
- data/lib/vellum_ai/types/function_call_variable_value.rb +0 -51
- data/lib/vellum_ai/types/generate_error_response.rb +0 -45
- data/lib/vellum_ai/types/image_variable_value.rb +0 -52
- data/lib/vellum_ai/types/initiated_enum.rb +0 -5
- data/lib/vellum_ai/types/json_variable_value.rb +0 -45
- data/lib/vellum_ai/types/model_version_build_config.rb +0 -66
- data/lib/vellum_ai/types/model_version_exec_config.rb +0 -90
- data/lib/vellum_ai/types/model_version_exec_config_parameters.rb +0 -98
- data/lib/vellum_ai/types/model_version_read.rb +0 -133
- data/lib/vellum_ai/types/model_version_read_status_enum.rb +0 -11
- data/lib/vellum_ai/types/model_version_sandbox_snapshot.rb +0 -61
- data/lib/vellum_ai/types/node_input_compiled_function_call.rb +0 -61
- data/lib/vellum_ai/types/node_output_compiled_function_value.rb +0 -56
- data/lib/vellum_ai/types/number_enum.rb +0 -5
- data/lib/vellum_ai/types/number_variable_value.rb +0 -45
- data/lib/vellum_ai/types/processing_state_enum.rb +0 -11
- data/lib/vellum_ai/types/prompt_deployment_expand_meta_request_request.rb +0 -74
- data/lib/vellum_ai/types/prompt_template_block.rb +0 -62
- data/lib/vellum_ai/types/prompt_template_block_data.rb +0 -54
- data/lib/vellum_ai/types/prompt_template_block_data_request.rb +0 -54
- data/lib/vellum_ai/types/prompt_template_block_properties.rb +0 -110
- data/lib/vellum_ai/types/prompt_template_block_properties_request.rb +0 -110
- data/lib/vellum_ai/types/prompt_template_block_request.rb +0 -62
- data/lib/vellum_ai/types/provider_enum.rb +0 -20
- data/lib/vellum_ai/types/register_prompt_error_response.rb +0 -45
- data/lib/vellum_ai/types/register_prompt_model_parameters_request.rb +0 -98
- data/lib/vellum_ai/types/register_prompt_prompt.rb +0 -50
- data/lib/vellum_ai/types/register_prompt_prompt_info_request.rb +0 -60
- data/lib/vellum_ai/types/register_prompt_response.rb +0 -110
- data/lib/vellum_ai/types/registered_prompt_deployment.rb +0 -55
- data/lib/vellum_ai/types/registered_prompt_input_variable_request.rb +0 -56
- data/lib/vellum_ai/types/registered_prompt_model_version.rb +0 -50
- data/lib/vellum_ai/types/registered_prompt_sandbox.rb +0 -50
- data/lib/vellum_ai/types/registered_prompt_sandbox_snapshot.rb +0 -45
- data/lib/vellum_ai/types/rejected_enum.rb +0 -5
- data/lib/vellum_ai/types/rejected_function_call.rb +0 -62
- data/lib/vellum_ai/types/scenario_input_request.rb +0 -70
- data/lib/vellum_ai/types/scenario_input_type_enum.rb +0 -6
- data/lib/vellum_ai/types/search_error_response.rb +0 -45
- data/lib/vellum_ai/types/search_results_enum.rb +0 -5
- data/lib/vellum_ai/types/search_results_variable_value.rb +0 -49
- data/lib/vellum_ai/types/streaming_enum.rb +0 -5
- data/lib/vellum_ai/types/string_enum.rb +0 -5
- data/lib/vellum_ai/types/string_variable_value.rb +0 -45
- data/lib/vellum_ai/types/submit_completion_actuals_error_response.rb +0 -45
- data/lib/vellum_ai/types/subworkflow_enum.rb +0 -5
- data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_type_enum.rb +0 -5
- data/lib/vellum_ai/types/test_suite_run_metric_error_output_type_enum.rb +0 -5
- data/lib/vellum_ai/types/test_suite_run_metric_number_output_type_enum.rb +0 -5
- data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_type_enum.rb +0 -5
- data/lib/vellum_ai/types/upload_document_error_response.rb +0 -45
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "sentence_chunker_config_request"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# Sentence chunking
|
8
|
+
class SentenceChunkingRequest
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :chunker_name
|
11
|
+
# @return [Vellum::SentenceChunkerConfigRequest]
|
12
|
+
attr_reader :chunker_config
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param chunker_name [String]
|
22
|
+
# @param chunker_config [Vellum::SentenceChunkerConfigRequest]
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Vellum::SentenceChunkingRequest]
|
25
|
+
def initialize(chunker_name:, chunker_config: OMIT, additional_properties: nil)
|
26
|
+
@chunker_name = chunker_name
|
27
|
+
@chunker_config = chunker_config if chunker_config != OMIT
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "chunker_name": chunker_name, "chunker_config": chunker_config }.reject do | _k, v |
|
30
|
+
v == OMIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
# Deserialize a JSON object to an instance of SentenceChunkingRequest
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Vellum::SentenceChunkingRequest]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
chunker_name = parsed_json["chunker_name"]
|
41
|
+
unless parsed_json["chunker_config"].nil?
|
42
|
+
chunker_config = parsed_json["chunker_config"].to_json
|
43
|
+
chunker_config = Vellum::SentenceChunkerConfigRequest.from_json(json_object: chunker_config)
|
44
|
+
else
|
45
|
+
chunker_config = nil
|
46
|
+
end
|
47
|
+
new(
|
48
|
+
chunker_name: chunker_name,
|
49
|
+
chunker_config: chunker_config,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
# Serialize an instance of SentenceChunkingRequest to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.chunker_name.is_a?(String) != false || raise("Passed value for field obj.chunker_name is not the expected type, validation failed.")
|
67
|
+
obj.chunker_config.nil? || Vellum::SentenceChunkerConfigRequest.validate_raw(obj: obj.chunker_config)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -1,109 +1,138 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require "date"
|
4
3
|
require_relative "entity_status"
|
5
4
|
require_relative "environment_enum"
|
5
|
+
require "date"
|
6
6
|
require_relative "vellum_variable"
|
7
|
+
require "ostruct"
|
7
8
|
require "json"
|
8
9
|
|
9
10
|
module Vellum
|
10
11
|
class SlimDeploymentRead
|
11
|
-
|
12
|
-
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :id
|
14
|
+
# @return [DateTime]
|
15
|
+
attr_reader :created
|
16
|
+
# @return [String] A human-readable label for the deployment
|
17
|
+
attr_reader :label
|
18
|
+
# @return [String] A name that uniquely identifies this deployment within its workspace
|
19
|
+
attr_reader :name
|
20
|
+
# @return [Vellum::EntityStatus] The current status of the deployment
|
21
|
+
# * `ACTIVE` - Active
|
22
|
+
# * `ARCHIVED` - Archived
|
23
|
+
attr_reader :status
|
24
|
+
# @return [Vellum::EnvironmentEnum] The environment this deployment is used in
|
25
|
+
# * `DEVELOPMENT` - Development
|
26
|
+
# * `STAGING` - Staging
|
27
|
+
# * `PRODUCTION` - Production
|
28
|
+
attr_reader :environment
|
29
|
+
# @return [DateTime]
|
30
|
+
attr_reader :last_deployed_on
|
31
|
+
# @return [Array<Vellum::VellumVariable>]
|
32
|
+
attr_reader :input_variables
|
33
|
+
# @return [String] A human-readable description of the deployment
|
34
|
+
attr_reader :description
|
35
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
attr_reader :additional_properties
|
37
|
+
# @return [Object]
|
38
|
+
attr_reader :_field_set
|
39
|
+
protected :_field_set
|
40
|
+
|
41
|
+
OMIT = Object.new
|
13
42
|
|
14
|
-
# @param id [String]
|
15
|
-
# @param created [DateTime]
|
43
|
+
# @param id [String]
|
44
|
+
# @param created [DateTime]
|
16
45
|
# @param label [String] A human-readable label for the deployment
|
17
46
|
# @param name [String] A name that uniquely identifies this deployment within its workspace
|
18
|
-
# @param status [
|
19
|
-
|
20
|
-
|
21
|
-
# @param environment [
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
# @param last_deployed_on [DateTime]
|
26
|
-
# @param input_variables [Array<VellumVariable>]
|
47
|
+
# @param status [Vellum::EntityStatus] The current status of the deployment
|
48
|
+
# * `ACTIVE` - Active
|
49
|
+
# * `ARCHIVED` - Archived
|
50
|
+
# @param environment [Vellum::EnvironmentEnum] The environment this deployment is used in
|
51
|
+
# * `DEVELOPMENT` - Development
|
52
|
+
# * `STAGING` - Staging
|
53
|
+
# * `PRODUCTION` - Production
|
54
|
+
# @param last_deployed_on [DateTime]
|
55
|
+
# @param input_variables [Array<Vellum::VellumVariable>]
|
56
|
+
# @param description [String] A human-readable description of the deployment
|
27
57
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
-
# @return [SlimDeploymentRead]
|
29
|
-
def initialize(id:, created:, label:, name:, last_deployed_on:, input_variables:,
|
30
|
-
additional_properties: nil)
|
31
|
-
# @type [String]
|
58
|
+
# @return [Vellum::SlimDeploymentRead]
|
59
|
+
def initialize(id:, created:, label:, name:, status: OMIT, environment: OMIT, last_deployed_on:, input_variables:, description: OMIT, additional_properties: nil)
|
32
60
|
@id = id
|
33
|
-
# @type [DateTime]
|
34
61
|
@created = created
|
35
|
-
# @type [String] A human-readable label for the deployment
|
36
62
|
@label = label
|
37
|
-
# @type [String] A name that uniquely identifies this deployment within its workspace
|
38
63
|
@name = name
|
39
|
-
|
40
|
-
|
41
|
-
# - `ARCHIVED` - Archived
|
42
|
-
@status = status
|
43
|
-
# @type [ENVIRONMENT_ENUM] The environment this deployment is used in
|
44
|
-
# - `DEVELOPMENT` - Development
|
45
|
-
# - `STAGING` - Staging
|
46
|
-
# - `PRODUCTION` - Production
|
47
|
-
@environment = environment
|
48
|
-
# @type [DateTime]
|
64
|
+
@status = status if status != OMIT
|
65
|
+
@environment = environment if environment != OMIT
|
49
66
|
@last_deployed_on = last_deployed_on
|
50
|
-
# @type [Array<VellumVariable>]
|
51
67
|
@input_variables = input_variables
|
52
|
-
|
68
|
+
@description = description if description != OMIT
|
53
69
|
@additional_properties = additional_properties
|
70
|
+
@_field_set = { "id": id, "created": created, "label": label, "name": name, "status": status, "environment": environment, "last_deployed_on": last_deployed_on, "input_variables": input_variables, "description": description }.reject do | _k, v |
|
71
|
+
v == OMIT
|
72
|
+
end
|
54
73
|
end
|
55
|
-
|
56
|
-
# Deserialize a JSON object to an instance of SlimDeploymentRead
|
74
|
+
# Deserialize a JSON object to an instance of SlimDeploymentRead
|
57
75
|
#
|
58
|
-
# @param json_object [
|
59
|
-
# @return [SlimDeploymentRead]
|
76
|
+
# @param json_object [String]
|
77
|
+
# @return [Vellum::SlimDeploymentRead]
|
60
78
|
def self.from_json(json_object:)
|
61
79
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
80
|
parsed_json = JSON.parse(json_object)
|
63
|
-
id =
|
64
|
-
created =
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
81
|
+
id = parsed_json["id"]
|
82
|
+
created = unless parsed_json["created"].nil?
|
83
|
+
DateTime.parse(parsed_json["created"])
|
84
|
+
else
|
85
|
+
nil
|
86
|
+
end
|
87
|
+
label = parsed_json["label"]
|
88
|
+
name = parsed_json["name"]
|
89
|
+
status = parsed_json["status"]
|
90
|
+
environment = parsed_json["environment"]
|
91
|
+
last_deployed_on = unless parsed_json["last_deployed_on"].nil?
|
92
|
+
DateTime.parse(parsed_json["last_deployed_on"])
|
93
|
+
else
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
input_variables = parsed_json["input_variables"]&.map do | item |
|
97
|
+
item = item.to_json
|
98
|
+
Vellum::VellumVariable.from_json(json_object: item)
|
99
|
+
end
|
100
|
+
description = parsed_json["description"]
|
101
|
+
new(
|
102
|
+
id: id,
|
103
|
+
created: created,
|
104
|
+
label: label,
|
105
|
+
name: name,
|
106
|
+
status: status,
|
107
|
+
environment: environment,
|
108
|
+
last_deployed_on: last_deployed_on,
|
109
|
+
input_variables: input_variables,
|
110
|
+
description: description,
|
111
|
+
additional_properties: struct
|
112
|
+
)
|
76
113
|
end
|
77
|
-
|
78
|
-
# Serialize an instance of SlimDeploymentRead to a JSON object
|
114
|
+
# Serialize an instance of SlimDeploymentRead to a JSON object
|
79
115
|
#
|
80
|
-
# @return [
|
81
|
-
def to_json
|
82
|
-
|
83
|
-
"id": @id,
|
84
|
-
"created": @created,
|
85
|
-
"label": @label,
|
86
|
-
"name": @name,
|
87
|
-
"status": ENTITY_STATUS[@status] || @status,
|
88
|
-
"environment": ENVIRONMENT_ENUM[@environment] || @environment,
|
89
|
-
"last_deployed_on": @last_deployed_on,
|
90
|
-
"input_variables": @input_variables
|
91
|
-
}.to_json
|
116
|
+
# @return [String]
|
117
|
+
def to_json
|
118
|
+
@_field_set&.to_json
|
92
119
|
end
|
93
|
-
|
94
|
-
|
120
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
121
|
+
# hash and check each fields type against the current object's property
|
122
|
+
# definitions.
|
95
123
|
#
|
96
|
-
# @param obj [Object]
|
124
|
+
# @param obj [Object]
|
97
125
|
# @return [Void]
|
98
126
|
def self.validate_raw(obj:)
|
99
127
|
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
100
128
|
obj.created.is_a?(DateTime) != false || raise("Passed value for field obj.created is not the expected type, validation failed.")
|
101
129
|
obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
102
130
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
103
|
-
obj.status&.is_a?(
|
104
|
-
obj.environment&.is_a?(
|
131
|
+
obj.status&.is_a?(Vellum::EntityStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
132
|
+
obj.environment&.is_a?(Vellum::EnvironmentEnum) != false || raise("Passed value for field obj.environment is not the expected type, validation failed.")
|
105
133
|
obj.last_deployed_on.is_a?(DateTime) != false || raise("Passed value for field obj.last_deployed_on is not the expected type, validation failed.")
|
106
134
|
obj.input_variables.is_a?(Array) != false || raise("Passed value for field obj.input_variables is not the expected type, validation failed.")
|
135
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
107
136
|
end
|
108
137
|
end
|
109
|
-
end
|
138
|
+
end
|
@@ -1,126 +1,143 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require "date"
|
4
|
-
require_relative "
|
3
|
+
require_relative "document_processing_state"
|
5
4
|
require_relative "processing_failure_reason_enum"
|
6
5
|
require_relative "document_status"
|
7
|
-
require_relative "
|
6
|
+
require_relative "slim_document_document_to_document_index"
|
7
|
+
require "ostruct"
|
8
8
|
require "json"
|
9
9
|
|
10
10
|
module Vellum
|
11
11
|
class SlimDocument
|
12
|
-
|
13
|
-
|
12
|
+
# @return [String] Vellum-generated ID that uniquely identifies this document.
|
13
|
+
attr_reader :id
|
14
|
+
# @return [String] The external ID that was originally provided when uploading the document.
|
15
|
+
attr_reader :external_id
|
16
|
+
# @return [DateTime] A timestamp representing when this document was most recently uploaded.
|
17
|
+
attr_reader :last_uploaded_at
|
18
|
+
# @return [String] Human-friendly name for this document.
|
19
|
+
attr_reader :label
|
20
|
+
# @return [Vellum::DocumentProcessingState]
|
21
|
+
attr_reader :processing_state
|
22
|
+
# @return [Vellum::ProcessingFailureReasonEnum] An enum value representing why the document could not be processed. Is null
|
23
|
+
# unless processing_state is FAILED.
|
24
|
+
# * `EXCEEDED_CHARACTER_LIMIT` - Exceeded Character Limit
|
25
|
+
# * `INVALID_FILE` - Invalid File
|
26
|
+
attr_reader :processing_failure_reason
|
27
|
+
# @return [Vellum::DOCUMENT_STATUS] The document's current status.
|
28
|
+
# * `ACTIVE` - Active
|
29
|
+
attr_reader :status
|
30
|
+
# @return [Array<String>] A list of keywords associated with this document. Originally provided when
|
31
|
+
# uploading the document.
|
32
|
+
attr_reader :keywords
|
33
|
+
# @return [Hash{String => Object}] A previously supplied JSON object containing metadata that can be filtered on
|
34
|
+
# when searching.
|
35
|
+
attr_reader :metadata
|
36
|
+
# @return [Array<Vellum::SlimDocumentDocumentToDocumentIndex>]
|
37
|
+
attr_reader :document_to_document_indexes
|
38
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
attr_reader :additional_properties
|
40
|
+
# @return [Object]
|
41
|
+
attr_reader :_field_set
|
42
|
+
protected :_field_set
|
43
|
+
|
44
|
+
OMIT = Object.new
|
14
45
|
|
15
46
|
# @param id [String] Vellum-generated ID that uniquely identifies this document.
|
16
47
|
# @param external_id [String] The external ID that was originally provided when uploading the document.
|
17
48
|
# @param last_uploaded_at [DateTime] A timestamp representing when this document was most recently uploaded.
|
18
49
|
# @param label [String] Human-friendly name for this document.
|
19
|
-
# @param processing_state [
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
# @param
|
25
|
-
|
26
|
-
#
|
27
|
-
|
28
|
-
#
|
29
|
-
|
30
|
-
# @param
|
31
|
-
# @param document_to_document_indexes [Array<DocumentDocumentToDocumentIndex>]
|
50
|
+
# @param processing_state [Vellum::DocumentProcessingState]
|
51
|
+
# @param processing_failure_reason [Vellum::ProcessingFailureReasonEnum] An enum value representing why the document could not be processed. Is null
|
52
|
+
# unless processing_state is FAILED.
|
53
|
+
# * `EXCEEDED_CHARACTER_LIMIT` - Exceeded Character Limit
|
54
|
+
# * `INVALID_FILE` - Invalid File
|
55
|
+
# @param status [Vellum::DOCUMENT_STATUS] The document's current status.
|
56
|
+
# * `ACTIVE` - Active
|
57
|
+
# @param keywords [Array<String>] A list of keywords associated with this document. Originally provided when
|
58
|
+
# uploading the document.
|
59
|
+
# @param metadata [Hash{String => Object}] A previously supplied JSON object containing metadata that can be filtered on
|
60
|
+
# when searching.
|
61
|
+
# @param document_to_document_indexes [Array<Vellum::SlimDocumentDocumentToDocumentIndex>]
|
32
62
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
-
# @return [SlimDocument]
|
34
|
-
def initialize(id:, last_uploaded_at:, label:,
|
35
|
-
processing_failure_reason: nil, status: nil, keywords: nil, metadata: nil, additional_properties: nil)
|
36
|
-
# @type [String] Vellum-generated ID that uniquely identifies this document.
|
63
|
+
# @return [Vellum::SlimDocument]
|
64
|
+
def initialize(id:, external_id: OMIT, last_uploaded_at:, label:, processing_state:, processing_failure_reason: OMIT, status: OMIT, keywords: OMIT, metadata: OMIT, document_to_document_indexes:, additional_properties: nil)
|
37
65
|
@id = id
|
38
|
-
|
39
|
-
@external_id = external_id
|
40
|
-
# @type [DateTime] A timestamp representing when this document was most recently uploaded.
|
66
|
+
@external_id = external_id if external_id != OMIT
|
41
67
|
@last_uploaded_at = last_uploaded_at
|
42
|
-
# @type [String] Human-friendly name for this document.
|
43
68
|
@label = label
|
44
|
-
# @type [PROCESSING_STATE_ENUM] An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle.
|
45
|
-
# - `QUEUED` - Queued
|
46
|
-
# - `PROCESSING` - Processing
|
47
|
-
# - `PROCESSED` - Processed
|
48
|
-
# - `FAILED` - Failed
|
49
69
|
@processing_state = processing_state
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
@
|
54
|
-
# @type [DOCUMENT_STATUS] The document's current status.
|
55
|
-
# - `ACTIVE` - Active
|
56
|
-
@status = status
|
57
|
-
# @type [Array<String>] A list of keywords associated with this document. Originally provided when uploading the document.
|
58
|
-
@keywords = keywords
|
59
|
-
# @type [Hash{String => String}] A previously supplied JSON object containing metadata that can be filtered on when searching.
|
60
|
-
@metadata = metadata
|
61
|
-
# @type [Array<DocumentDocumentToDocumentIndex>]
|
70
|
+
@processing_failure_reason = processing_failure_reason if processing_failure_reason != OMIT
|
71
|
+
@status = status if status != OMIT
|
72
|
+
@keywords = keywords if keywords != OMIT
|
73
|
+
@metadata = metadata if metadata != OMIT
|
62
74
|
@document_to_document_indexes = document_to_document_indexes
|
63
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
64
75
|
@additional_properties = additional_properties
|
76
|
+
@_field_set = { "id": id, "external_id": external_id, "last_uploaded_at": last_uploaded_at, "label": label, "processing_state": processing_state, "processing_failure_reason": processing_failure_reason, "status": status, "keywords": keywords, "metadata": metadata, "document_to_document_indexes": document_to_document_indexes }.reject do | _k, v |
|
77
|
+
v == OMIT
|
78
|
+
end
|
65
79
|
end
|
66
|
-
|
67
|
-
# Deserialize a JSON object to an instance of SlimDocument
|
80
|
+
# Deserialize a JSON object to an instance of SlimDocument
|
68
81
|
#
|
69
|
-
# @param json_object [
|
70
|
-
# @return [SlimDocument]
|
82
|
+
# @param json_object [String]
|
83
|
+
# @return [Vellum::SlimDocument]
|
71
84
|
def self.from_json(json_object:)
|
72
85
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
73
86
|
parsed_json = JSON.parse(json_object)
|
74
|
-
id =
|
75
|
-
external_id =
|
76
|
-
last_uploaded_at =
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
87
|
+
id = parsed_json["id"]
|
88
|
+
external_id = parsed_json["external_id"]
|
89
|
+
last_uploaded_at = unless parsed_json["last_uploaded_at"].nil?
|
90
|
+
DateTime.parse(parsed_json["last_uploaded_at"])
|
91
|
+
else
|
92
|
+
nil
|
93
|
+
end
|
94
|
+
label = parsed_json["label"]
|
95
|
+
processing_state = parsed_json["processing_state"]
|
96
|
+
processing_failure_reason = parsed_json["processing_failure_reason"]
|
97
|
+
status = parsed_json["status"]
|
98
|
+
keywords = parsed_json["keywords"]
|
99
|
+
metadata = parsed_json["metadata"]
|
100
|
+
document_to_document_indexes = parsed_json["document_to_document_indexes"]&.map do | item |
|
101
|
+
item = item.to_json
|
102
|
+
Vellum::SlimDocumentDocumentToDocumentIndex.from_json(json_object: item)
|
103
|
+
end
|
104
|
+
new(
|
105
|
+
id: id,
|
106
|
+
external_id: external_id,
|
107
|
+
last_uploaded_at: last_uploaded_at,
|
108
|
+
label: label,
|
109
|
+
processing_state: processing_state,
|
110
|
+
processing_failure_reason: processing_failure_reason,
|
111
|
+
status: status,
|
112
|
+
keywords: keywords,
|
113
|
+
metadata: metadata,
|
114
|
+
document_to_document_indexes: document_to_document_indexes,
|
115
|
+
additional_properties: struct
|
116
|
+
)
|
89
117
|
end
|
90
|
-
|
91
|
-
# Serialize an instance of SlimDocument to a JSON object
|
118
|
+
# Serialize an instance of SlimDocument to a JSON object
|
92
119
|
#
|
93
|
-
# @return [
|
94
|
-
def to_json
|
95
|
-
|
96
|
-
"id": @id,
|
97
|
-
"external_id": @external_id,
|
98
|
-
"last_uploaded_at": @last_uploaded_at,
|
99
|
-
"label": @label,
|
100
|
-
"processing_state": PROCESSING_STATE_ENUM[@processing_state] || @processing_state,
|
101
|
-
"processing_failure_reason": PROCESSING_FAILURE_REASON_ENUM[@processing_failure_reason] || @processing_failure_reason,
|
102
|
-
"status": @status,
|
103
|
-
"keywords": @keywords,
|
104
|
-
"metadata": @metadata,
|
105
|
-
"document_to_document_indexes": @document_to_document_indexes
|
106
|
-
}.to_json
|
120
|
+
# @return [String]
|
121
|
+
def to_json
|
122
|
+
@_field_set&.to_json
|
107
123
|
end
|
108
|
-
|
109
|
-
|
124
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
125
|
+
# hash and check each fields type against the current object's property
|
126
|
+
# definitions.
|
110
127
|
#
|
111
|
-
# @param obj [Object]
|
128
|
+
# @param obj [Object]
|
112
129
|
# @return [Void]
|
113
130
|
def self.validate_raw(obj:)
|
114
131
|
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
115
132
|
obj.external_id&.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
|
116
133
|
obj.last_uploaded_at.is_a?(DateTime) != false || raise("Passed value for field obj.last_uploaded_at is not the expected type, validation failed.")
|
117
134
|
obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
118
|
-
obj.processing_state
|
119
|
-
obj.processing_failure_reason&.is_a?(
|
135
|
+
obj.processing_state.is_a?(Vellum::DocumentProcessingState) != false || raise("Passed value for field obj.processing_state is not the expected type, validation failed.")
|
136
|
+
obj.processing_failure_reason&.is_a?(Vellum::ProcessingFailureReasonEnum) != false || raise("Passed value for field obj.processing_failure_reason is not the expected type, validation failed.")
|
120
137
|
obj.status&.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
121
138
|
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
122
139
|
obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
123
140
|
obj.document_to_document_indexes.is_a?(Array) != false || raise("Passed value for field obj.document_to_document_indexes is not the expected type, validation failed.")
|
124
141
|
end
|
125
142
|
end
|
126
|
-
end
|
143
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "indexing_state_enum"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# A slim representation of the link between a Document and a Document Index it's a
|
8
|
+
# member of.
|
9
|
+
class SlimDocumentDocumentToDocumentIndex
|
10
|
+
# @return [String] Vellum-generated ID that uniquely identifies this link.
|
11
|
+
attr_reader :id
|
12
|
+
# @return [String] Vellum-generated ID that uniquely identifies the environment index this document
|
13
|
+
# is included in.
|
14
|
+
attr_reader :environment_document_index_id
|
15
|
+
# @return [String] Vellum-generated ID that uniquely identifies the index this document is included
|
16
|
+
# in.
|
17
|
+
attr_reader :document_index_id
|
18
|
+
# @return [Vellum::IndexingStateEnum] An enum value representing where this document is along its indexing lifecycle
|
19
|
+
# for this index.
|
20
|
+
# * `AWAITING_PROCESSING` - Awaiting Processing
|
21
|
+
# * `QUEUED` - Queued
|
22
|
+
# * `INDEXING` - Indexing
|
23
|
+
# * `INDEXED` - Indexed
|
24
|
+
# * `FAILED` - Failed
|
25
|
+
attr_reader :indexing_state
|
26
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
attr_reader :additional_properties
|
28
|
+
# @return [Object]
|
29
|
+
attr_reader :_field_set
|
30
|
+
protected :_field_set
|
31
|
+
|
32
|
+
OMIT = Object.new
|
33
|
+
|
34
|
+
# @param id [String] Vellum-generated ID that uniquely identifies this link.
|
35
|
+
# @param environment_document_index_id [String] Vellum-generated ID that uniquely identifies the environment index this document
|
36
|
+
# is included in.
|
37
|
+
# @param document_index_id [String] Vellum-generated ID that uniquely identifies the index this document is included
|
38
|
+
# in.
|
39
|
+
# @param indexing_state [Vellum::IndexingStateEnum] An enum value representing where this document is along its indexing lifecycle
|
40
|
+
# for this index.
|
41
|
+
# * `AWAITING_PROCESSING` - Awaiting Processing
|
42
|
+
# * `QUEUED` - Queued
|
43
|
+
# * `INDEXING` - Indexing
|
44
|
+
# * `INDEXED` - Indexed
|
45
|
+
# * `FAILED` - Failed
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [Vellum::SlimDocumentDocumentToDocumentIndex]
|
48
|
+
def initialize(id:, environment_document_index_id:, document_index_id:, indexing_state: OMIT, additional_properties: nil)
|
49
|
+
@id = id
|
50
|
+
@environment_document_index_id = environment_document_index_id
|
51
|
+
@document_index_id = document_index_id
|
52
|
+
@indexing_state = indexing_state if indexing_state != OMIT
|
53
|
+
@additional_properties = additional_properties
|
54
|
+
@_field_set = { "id": id, "environment_document_index_id": environment_document_index_id, "document_index_id": document_index_id, "indexing_state": indexing_state }.reject do | _k, v |
|
55
|
+
v == OMIT
|
56
|
+
end
|
57
|
+
end
|
58
|
+
# Deserialize a JSON object to an instance of SlimDocumentDocumentToDocumentIndex
|
59
|
+
#
|
60
|
+
# @param json_object [String]
|
61
|
+
# @return [Vellum::SlimDocumentDocumentToDocumentIndex]
|
62
|
+
def self.from_json(json_object:)
|
63
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
64
|
+
parsed_json = JSON.parse(json_object)
|
65
|
+
id = parsed_json["id"]
|
66
|
+
environment_document_index_id = parsed_json["environment_document_index_id"]
|
67
|
+
document_index_id = parsed_json["document_index_id"]
|
68
|
+
indexing_state = parsed_json["indexing_state"]
|
69
|
+
new(
|
70
|
+
id: id,
|
71
|
+
environment_document_index_id: environment_document_index_id,
|
72
|
+
document_index_id: document_index_id,
|
73
|
+
indexing_state: indexing_state,
|
74
|
+
additional_properties: struct
|
75
|
+
)
|
76
|
+
end
|
77
|
+
# Serialize an instance of SlimDocumentDocumentToDocumentIndex to a JSON object
|
78
|
+
#
|
79
|
+
# @return [String]
|
80
|
+
def to_json
|
81
|
+
@_field_set&.to_json
|
82
|
+
end
|
83
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
84
|
+
# hash and check each fields type against the current object's property
|
85
|
+
# definitions.
|
86
|
+
#
|
87
|
+
# @param obj [Object]
|
88
|
+
# @return [Void]
|
89
|
+
def self.validate_raw(obj:)
|
90
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
91
|
+
obj.environment_document_index_id.is_a?(String) != false || raise("Passed value for field obj.environment_document_index_id is not the expected type, validation failed.")
|
92
|
+
obj.document_index_id.is_a?(String) != false || raise("Passed value for field obj.document_index_id is not the expected type, validation failed.")
|
93
|
+
obj.indexing_state&.is_a?(Vellum::IndexingStateEnum) != false || raise("Passed value for field obj.indexing_state is not the expected type, validation failed.")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|