vellum_ai 0.3.14 → 0.14.74
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 +396 -109
- 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 +194 -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 +74 -0
- 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 +76 -0
- 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 +131 -119
- 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 -131
- 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 +55 -38
- 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 +74 -0
- 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 +76 -0
- 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 +131 -119
- 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 +438 -95
- 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_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
@@ -1,50 +1,58 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "logprobs_enum"
|
3
|
+
require "ostruct"
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Vellum
|
7
7
|
class GenerateOptionsRequest
|
8
|
-
|
8
|
+
# @return [Vellum::LogprobsEnum] Which logprobs to include, if any. Defaults to NONE.
|
9
|
+
# * `ALL` - ALL
|
10
|
+
# * `NONE` - NONE
|
11
|
+
attr_reader :logprobs
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
+
attr_reader :additional_properties
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :_field_set
|
16
|
+
protected :_field_set
|
17
|
+
|
18
|
+
OMIT = Object.new
|
9
19
|
|
10
|
-
# @param logprobs [
|
11
|
-
|
12
|
-
|
20
|
+
# @param logprobs [Vellum::LogprobsEnum] Which logprobs to include, if any. Defaults to NONE.
|
21
|
+
# * `ALL` - ALL
|
22
|
+
# * `NONE` - NONE
|
13
23
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
-
# @return [GenerateOptionsRequest]
|
15
|
-
def initialize(logprobs:
|
16
|
-
|
17
|
-
# - `ALL` - ALL
|
18
|
-
# - `NONE` - NONE
|
19
|
-
@logprobs = logprobs
|
20
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Vellum::GenerateOptionsRequest]
|
25
|
+
def initialize(logprobs: OMIT, additional_properties: nil)
|
26
|
+
@logprobs = logprobs if logprobs != OMIT
|
21
27
|
@additional_properties = additional_properties
|
28
|
+
@_field_set = { "logprobs": logprobs }.reject do | _k, v |
|
29
|
+
v == OMIT
|
30
|
+
end
|
22
31
|
end
|
23
|
-
|
24
|
-
# Deserialize a JSON object to an instance of GenerateOptionsRequest
|
32
|
+
# Deserialize a JSON object to an instance of GenerateOptionsRequest
|
25
33
|
#
|
26
|
-
# @param json_object [
|
27
|
-
# @return [GenerateOptionsRequest]
|
34
|
+
# @param json_object [String]
|
35
|
+
# @return [Vellum::GenerateOptionsRequest]
|
28
36
|
def self.from_json(json_object:)
|
29
37
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
30
38
|
parsed_json = JSON.parse(json_object)
|
31
|
-
logprobs =
|
39
|
+
logprobs = parsed_json["logprobs"]
|
32
40
|
new(logprobs: logprobs, additional_properties: struct)
|
33
41
|
end
|
34
|
-
|
35
|
-
# Serialize an instance of GenerateOptionsRequest to a JSON object
|
42
|
+
# Serialize an instance of GenerateOptionsRequest to a JSON object
|
36
43
|
#
|
37
|
-
# @return [
|
38
|
-
def to_json
|
39
|
-
|
44
|
+
# @return [String]
|
45
|
+
def to_json
|
46
|
+
@_field_set&.to_json
|
40
47
|
end
|
41
|
-
|
42
|
-
|
48
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
49
|
+
# hash and check each fields type against the current object's property
|
50
|
+
# definitions.
|
43
51
|
#
|
44
|
-
# @param obj [Object]
|
52
|
+
# @param obj [Object]
|
45
53
|
# @return [Void]
|
46
54
|
def self.validate_raw(obj:)
|
47
|
-
obj.logprobs&.is_a?(
|
55
|
+
obj.logprobs&.is_a?(Vellum::LogprobsEnum) != false || raise("Passed value for field obj.logprobs is not the expected type, validation failed.")
|
48
56
|
end
|
49
57
|
end
|
50
|
-
end
|
58
|
+
end
|
@@ -1,55 +1,73 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "chat_message_request"
|
3
|
+
require "ostruct"
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Vellum
|
7
7
|
class GenerateRequest
|
8
|
-
|
8
|
+
# @return [Hash{String => Object}] Key/value pairs for each template variable defined in the deployment's prompt.
|
9
|
+
attr_reader :input_values
|
10
|
+
# @return [Array<Vellum::ChatMessageRequest>] Optionally provide a list of chat messages that'll be used in place of the
|
11
|
+
# special chat_history variable, if included in the prompt.
|
12
|
+
attr_reader :chat_history
|
13
|
+
# @return [Array<String>] Optionally include a unique identifier for each generation, as represented
|
14
|
+
# outside of Vellum. Note that this should generally be a list of length one.
|
15
|
+
attr_reader :external_ids
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
9
23
|
|
10
|
-
# @param input_values [Hash{String =>
|
11
|
-
# @param chat_history [Array<ChatMessageRequest>] Optionally provide a list of chat messages that'll be used in place of the
|
12
|
-
|
24
|
+
# @param input_values [Hash{String => Object}] Key/value pairs for each template variable defined in the deployment's prompt.
|
25
|
+
# @param chat_history [Array<Vellum::ChatMessageRequest>] Optionally provide a list of chat messages that'll be used in place of the
|
26
|
+
# special chat_history variable, if included in the prompt.
|
27
|
+
# @param external_ids [Array<String>] Optionally include a unique identifier for each generation, as represented
|
28
|
+
# outside of Vellum. Note that this should generally be a list of length one.
|
13
29
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
-
# @return [GenerateRequest]
|
15
|
-
def initialize(input_values:, chat_history:
|
16
|
-
# @type [Hash{String => String}] Key/value pairs for each template variable defined in the deployment's prompt.
|
30
|
+
# @return [Vellum::GenerateRequest]
|
31
|
+
def initialize(input_values:, chat_history: OMIT, external_ids: OMIT, additional_properties: nil)
|
17
32
|
@input_values = input_values
|
18
|
-
|
19
|
-
@
|
20
|
-
# @type [Array<String>] Optionally include a unique identifier for each generation, as represented outside of Vellum. Note that this should generally be a list of length one.
|
21
|
-
@external_ids = external_ids
|
22
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
@chat_history = chat_history if chat_history != OMIT
|
34
|
+
@external_ids = external_ids if external_ids != OMIT
|
23
35
|
@additional_properties = additional_properties
|
36
|
+
@_field_set = { "input_values": input_values, "chat_history": chat_history, "external_ids": external_ids }.reject do | _k, v |
|
37
|
+
v == OMIT
|
38
|
+
end
|
24
39
|
end
|
25
|
-
|
26
|
-
# Deserialize a JSON object to an instance of GenerateRequest
|
40
|
+
# Deserialize a JSON object to an instance of GenerateRequest
|
27
41
|
#
|
28
|
-
# @param json_object [
|
29
|
-
# @return [GenerateRequest]
|
42
|
+
# @param json_object [String]
|
43
|
+
# @return [Vellum::GenerateRequest]
|
30
44
|
def self.from_json(json_object:)
|
31
45
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
46
|
parsed_json = JSON.parse(json_object)
|
33
|
-
input_values =
|
34
|
-
chat_history = parsed_json["chat_history"]
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
external_ids =
|
39
|
-
new(
|
40
|
-
|
47
|
+
input_values = parsed_json["input_values"]
|
48
|
+
chat_history = parsed_json["chat_history"]&.map do | item |
|
49
|
+
item = item.to_json
|
50
|
+
Vellum::ChatMessageRequest.from_json(json_object: item)
|
51
|
+
end
|
52
|
+
external_ids = parsed_json["external_ids"]
|
53
|
+
new(
|
54
|
+
input_values: input_values,
|
55
|
+
chat_history: chat_history,
|
56
|
+
external_ids: external_ids,
|
57
|
+
additional_properties: struct
|
58
|
+
)
|
41
59
|
end
|
42
|
-
|
43
|
-
# Serialize an instance of GenerateRequest to a JSON object
|
60
|
+
# Serialize an instance of GenerateRequest to a JSON object
|
44
61
|
#
|
45
|
-
# @return [
|
46
|
-
def to_json
|
47
|
-
|
62
|
+
# @return [String]
|
63
|
+
def to_json
|
64
|
+
@_field_set&.to_json
|
48
65
|
end
|
49
|
-
|
50
|
-
|
66
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
67
|
+
# hash and check each fields type against the current object's property
|
68
|
+
# definitions.
|
51
69
|
#
|
52
|
-
# @param obj [Object]
|
70
|
+
# @param obj [Object]
|
53
71
|
# @return [Void]
|
54
72
|
def self.validate_raw(obj:)
|
55
73
|
obj.input_values.is_a?(Hash) != false || raise("Passed value for field obj.input_values is not the expected type, validation failed.")
|
@@ -57,4 +75,4 @@ module Vellum
|
|
57
75
|
obj.external_ids&.is_a?(Array) != false || raise("Passed value for field obj.external_ids is not the expected type, validation failed.")
|
58
76
|
end
|
59
77
|
end
|
60
|
-
end
|
78
|
+
end
|
@@ -1,49 +1,55 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "generate_result"
|
3
|
+
require "ostruct"
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Vellum
|
7
7
|
class GenerateResponse
|
8
|
-
|
8
|
+
# @return [Array<Vellum::GenerateResult>] The results of each generation request.
|
9
|
+
attr_reader :results
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
9
17
|
|
10
|
-
# @param results [Array<GenerateResult>] The results of each generation request.
|
18
|
+
# @param results [Array<Vellum::GenerateResult>] The results of each generation request.
|
11
19
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
-
# @return [GenerateResponse]
|
20
|
+
# @return [Vellum::GenerateResponse]
|
13
21
|
def initialize(results:, additional_properties: nil)
|
14
|
-
# @type [Array<GenerateResult>] The results of each generation request.
|
15
22
|
@results = results
|
16
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
17
23
|
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "results": results }
|
18
25
|
end
|
19
|
-
|
20
|
-
# Deserialize a JSON object to an instance of GenerateResponse
|
26
|
+
# Deserialize a JSON object to an instance of GenerateResponse
|
21
27
|
#
|
22
|
-
# @param json_object [
|
23
|
-
# @return [GenerateResponse]
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [Vellum::GenerateResponse]
|
24
30
|
def self.from_json(json_object:)
|
25
31
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
26
32
|
parsed_json = JSON.parse(json_object)
|
27
|
-
results = parsed_json["results"]
|
28
|
-
|
29
|
-
|
30
|
-
|
33
|
+
results = parsed_json["results"]&.map do | item |
|
34
|
+
item = item.to_json
|
35
|
+
Vellum::GenerateResult.from_json(json_object: item)
|
36
|
+
end
|
31
37
|
new(results: results, additional_properties: struct)
|
32
38
|
end
|
33
|
-
|
34
|
-
# Serialize an instance of GenerateResponse to a JSON object
|
39
|
+
# Serialize an instance of GenerateResponse to a JSON object
|
35
40
|
#
|
36
|
-
# @return [
|
37
|
-
def to_json
|
38
|
-
|
41
|
+
# @return [String]
|
42
|
+
def to_json
|
43
|
+
@_field_set&.to_json
|
39
44
|
end
|
40
|
-
|
41
|
-
|
45
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
46
|
+
# hash and check each fields type against the current object's property
|
47
|
+
# definitions.
|
42
48
|
#
|
43
|
-
# @param obj [Object]
|
49
|
+
# @param obj [Object]
|
44
50
|
# @return [Void]
|
45
51
|
def self.validate_raw(obj:)
|
46
52
|
obj.results.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
|
47
53
|
end
|
48
54
|
end
|
49
|
-
end
|
55
|
+
end
|
@@ -1,62 +1,79 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "generate_result_data"
|
4
3
|
require_relative "generate_result_error"
|
4
|
+
require "ostruct"
|
5
5
|
require "json"
|
6
6
|
|
7
7
|
module Vellum
|
8
8
|
class GenerateResult
|
9
|
-
|
9
|
+
# @return [Vellum::GenerateResultData] An object containing the resulting generation. This key will be absent if the
|
10
|
+
# LLM provider experienced an error.
|
11
|
+
attr_reader :data
|
12
|
+
# @return [Vellum::GenerateResultError] An object containing details about the error that occurred. This key will be
|
13
|
+
# absent if the LLM provider did not experience an error.
|
14
|
+
attr_reader :error
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
10
22
|
|
11
|
-
# @param data [GenerateResultData] An object containing the resulting generation. This key will be absent if the
|
12
|
-
|
23
|
+
# @param data [Vellum::GenerateResultData] An object containing the resulting generation. This key will be absent if the
|
24
|
+
# LLM provider experienced an error.
|
25
|
+
# @param error [Vellum::GenerateResultError] An object containing details about the error that occurred. This key will be
|
26
|
+
# absent if the LLM provider did not experience an error.
|
13
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
-
# @return [GenerateResult]
|
15
|
-
def initialize(data:
|
16
|
-
|
17
|
-
@
|
18
|
-
# @type [GenerateResultError] An object containing details about the error that occurred. This key will be absent if the LLM provider did not experience an error.
|
19
|
-
@error = error
|
20
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Vellum::GenerateResult]
|
29
|
+
def initialize(data: OMIT, error: OMIT, additional_properties: nil)
|
30
|
+
@data = data if data != OMIT
|
31
|
+
@error = error if error != OMIT
|
21
32
|
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "data": data, "error": error }.reject do | _k, v |
|
34
|
+
v == OMIT
|
35
|
+
end
|
22
36
|
end
|
23
|
-
|
24
|
-
# Deserialize a JSON object to an instance of GenerateResult
|
37
|
+
# Deserialize a JSON object to an instance of GenerateResult
|
25
38
|
#
|
26
|
-
# @param json_object [
|
27
|
-
# @return [GenerateResult]
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Vellum::GenerateResult]
|
28
41
|
def self.from_json(json_object:)
|
29
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
30
43
|
parsed_json = JSON.parse(json_object)
|
31
|
-
|
32
|
-
data = nil
|
33
|
-
else
|
44
|
+
unless parsed_json["data"].nil?
|
34
45
|
data = parsed_json["data"].to_json
|
35
|
-
data = GenerateResultData.from_json(json_object: data)
|
36
|
-
end
|
37
|
-
if parsed_json["error"].nil?
|
38
|
-
error = nil
|
46
|
+
data = Vellum::GenerateResultData.from_json(json_object: data)
|
39
47
|
else
|
48
|
+
data = nil
|
49
|
+
end
|
50
|
+
unless parsed_json["error"].nil?
|
40
51
|
error = parsed_json["error"].to_json
|
41
|
-
error = GenerateResultError.from_json(json_object: error)
|
52
|
+
error = Vellum::GenerateResultError.from_json(json_object: error)
|
53
|
+
else
|
54
|
+
error = nil
|
42
55
|
end
|
43
|
-
new(
|
56
|
+
new(
|
57
|
+
data: data,
|
58
|
+
error: error,
|
59
|
+
additional_properties: struct
|
60
|
+
)
|
44
61
|
end
|
45
|
-
|
46
|
-
# Serialize an instance of GenerateResult to a JSON object
|
62
|
+
# Serialize an instance of GenerateResult to a JSON object
|
47
63
|
#
|
48
|
-
# @return [
|
49
|
-
def to_json
|
50
|
-
|
64
|
+
# @return [String]
|
65
|
+
def to_json
|
66
|
+
@_field_set&.to_json
|
51
67
|
end
|
52
|
-
|
53
|
-
|
68
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
69
|
+
# hash and check each fields type against the current object's property
|
70
|
+
# definitions.
|
54
71
|
#
|
55
|
-
# @param obj [Object]
|
72
|
+
# @param obj [Object]
|
56
73
|
# @return [Void]
|
57
74
|
def self.validate_raw(obj:)
|
58
|
-
obj.data.nil? || GenerateResultData.validate_raw(obj: obj.data)
|
59
|
-
obj.error.nil? || GenerateResultError.validate_raw(obj: obj.error)
|
75
|
+
obj.data.nil? || Vellum::GenerateResultData.validate_raw(obj: obj.data)
|
76
|
+
obj.error.nil? || Vellum::GenerateResultError.validate_raw(obj: obj.error)
|
60
77
|
end
|
61
78
|
end
|
62
|
-
end
|
79
|
+
end
|
@@ -1,49 +1,55 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "enriched_normalized_completion"
|
3
|
+
require "ostruct"
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Vellum
|
7
7
|
class GenerateResultData
|
8
|
-
|
8
|
+
# @return [Array<Vellum::EnrichedNormalizedCompletion>] The generated completions. This will generally be a list of length one.
|
9
|
+
attr_reader :completions
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
9
17
|
|
10
|
-
# @param completions [Array<EnrichedNormalizedCompletion>] The generated completions. This will generally be a list of length one.
|
18
|
+
# @param completions [Array<Vellum::EnrichedNormalizedCompletion>] The generated completions. This will generally be a list of length one.
|
11
19
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
-
# @return [GenerateResultData]
|
20
|
+
# @return [Vellum::GenerateResultData]
|
13
21
|
def initialize(completions:, additional_properties: nil)
|
14
|
-
# @type [Array<EnrichedNormalizedCompletion>] The generated completions. This will generally be a list of length one.
|
15
22
|
@completions = completions
|
16
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
17
23
|
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "completions": completions }
|
18
25
|
end
|
19
|
-
|
20
|
-
# Deserialize a JSON object to an instance of GenerateResultData
|
26
|
+
# Deserialize a JSON object to an instance of GenerateResultData
|
21
27
|
#
|
22
|
-
# @param json_object [
|
23
|
-
# @return [GenerateResultData]
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [Vellum::GenerateResultData]
|
24
30
|
def self.from_json(json_object:)
|
25
31
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
26
32
|
parsed_json = JSON.parse(json_object)
|
27
|
-
completions = parsed_json["completions"]
|
28
|
-
|
29
|
-
|
30
|
-
|
33
|
+
completions = parsed_json["completions"]&.map do | item |
|
34
|
+
item = item.to_json
|
35
|
+
Vellum::EnrichedNormalizedCompletion.from_json(json_object: item)
|
36
|
+
end
|
31
37
|
new(completions: completions, additional_properties: struct)
|
32
38
|
end
|
33
|
-
|
34
|
-
# Serialize an instance of GenerateResultData to a JSON object
|
39
|
+
# Serialize an instance of GenerateResultData to a JSON object
|
35
40
|
#
|
36
|
-
# @return [
|
37
|
-
def to_json
|
38
|
-
|
41
|
+
# @return [String]
|
42
|
+
def to_json
|
43
|
+
@_field_set&.to_json
|
39
44
|
end
|
40
|
-
|
41
|
-
|
45
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
46
|
+
# hash and check each fields type against the current object's property
|
47
|
+
# definitions.
|
42
48
|
#
|
43
|
-
# @param obj [Object]
|
49
|
+
# @param obj [Object]
|
44
50
|
# @return [Void]
|
45
51
|
def self.validate_raw(obj:)
|
46
52
|
obj.completions.is_a?(Array) != false || raise("Passed value for field obj.completions is not the expected type, validation failed.")
|
47
53
|
end
|
48
54
|
end
|
49
|
-
end
|
55
|
+
end
|
@@ -1,45 +1,51 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
require "ostruct"
|
3
3
|
require "json"
|
4
4
|
|
5
5
|
module Vellum
|
6
6
|
class GenerateResultError
|
7
|
-
|
7
|
+
# @return [String] The error message returned by the LLM provider.
|
8
|
+
attr_reader :message
|
9
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
10
|
+
attr_reader :additional_properties
|
11
|
+
# @return [Object]
|
12
|
+
attr_reader :_field_set
|
13
|
+
protected :_field_set
|
14
|
+
|
15
|
+
OMIT = Object.new
|
8
16
|
|
9
17
|
# @param message [String] The error message returned by the LLM provider.
|
10
18
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
-
# @return [GenerateResultError]
|
19
|
+
# @return [Vellum::GenerateResultError]
|
12
20
|
def initialize(message:, additional_properties: nil)
|
13
|
-
# @type [String] The error message returned by the LLM provider.
|
14
21
|
@message = message
|
15
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
16
22
|
@additional_properties = additional_properties
|
23
|
+
@_field_set = { "message": message }
|
17
24
|
end
|
18
|
-
|
19
|
-
# Deserialize a JSON object to an instance of GenerateResultError
|
25
|
+
# Deserialize a JSON object to an instance of GenerateResultError
|
20
26
|
#
|
21
|
-
# @param json_object [
|
22
|
-
# @return [GenerateResultError]
|
27
|
+
# @param json_object [String]
|
28
|
+
# @return [Vellum::GenerateResultError]
|
23
29
|
def self.from_json(json_object:)
|
24
30
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
25
|
-
JSON.parse(json_object)
|
26
|
-
message =
|
31
|
+
parsed_json = JSON.parse(json_object)
|
32
|
+
message = parsed_json["message"]
|
27
33
|
new(message: message, additional_properties: struct)
|
28
34
|
end
|
29
|
-
|
30
|
-
# Serialize an instance of GenerateResultError to a JSON object
|
35
|
+
# Serialize an instance of GenerateResultError to a JSON object
|
31
36
|
#
|
32
|
-
# @return [
|
33
|
-
def to_json
|
34
|
-
|
37
|
+
# @return [String]
|
38
|
+
def to_json
|
39
|
+
@_field_set&.to_json
|
35
40
|
end
|
36
|
-
|
37
|
-
|
41
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
42
|
+
# hash and check each fields type against the current object's property
|
43
|
+
# definitions.
|
38
44
|
#
|
39
|
-
# @param obj [Object]
|
45
|
+
# @param obj [Object]
|
40
46
|
# @return [Void]
|
41
47
|
def self.validate_raw(obj:)
|
42
48
|
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
43
49
|
end
|
44
50
|
end
|
45
|
-
end
|
51
|
+
end
|
@@ -1,51 +1,57 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require_relative "generate_stream_result"
|
3
|
+
require "ostruct"
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Vellum
|
7
7
|
class GenerateStreamResponse
|
8
|
-
|
8
|
+
# @return [Vellum::GenerateStreamResult]
|
9
|
+
attr_reader :delta
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
9
17
|
|
10
|
-
# @param delta [GenerateStreamResult]
|
18
|
+
# @param delta [Vellum::GenerateStreamResult]
|
11
19
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
-
# @return [GenerateStreamResponse]
|
20
|
+
# @return [Vellum::GenerateStreamResponse]
|
13
21
|
def initialize(delta:, additional_properties: nil)
|
14
|
-
# @type [GenerateStreamResult]
|
15
22
|
@delta = delta
|
16
|
-
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
17
23
|
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "delta": delta }
|
18
25
|
end
|
19
|
-
|
20
|
-
# Deserialize a JSON object to an instance of GenerateStreamResponse
|
26
|
+
# Deserialize a JSON object to an instance of GenerateStreamResponse
|
21
27
|
#
|
22
|
-
# @param json_object [
|
23
|
-
# @return [GenerateStreamResponse]
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [Vellum::GenerateStreamResponse]
|
24
30
|
def self.from_json(json_object:)
|
25
31
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
26
32
|
parsed_json = JSON.parse(json_object)
|
27
|
-
|
28
|
-
delta = nil
|
29
|
-
else
|
33
|
+
unless parsed_json["delta"].nil?
|
30
34
|
delta = parsed_json["delta"].to_json
|
31
|
-
delta = GenerateStreamResult.from_json(json_object: delta)
|
35
|
+
delta = Vellum::GenerateStreamResult.from_json(json_object: delta)
|
36
|
+
else
|
37
|
+
delta = nil
|
32
38
|
end
|
33
39
|
new(delta: delta, additional_properties: struct)
|
34
40
|
end
|
35
|
-
|
36
|
-
# Serialize an instance of GenerateStreamResponse to a JSON object
|
41
|
+
# Serialize an instance of GenerateStreamResponse to a JSON object
|
37
42
|
#
|
38
|
-
# @return [
|
39
|
-
def to_json
|
40
|
-
|
43
|
+
# @return [String]
|
44
|
+
def to_json
|
45
|
+
@_field_set&.to_json
|
41
46
|
end
|
42
|
-
|
43
|
-
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
44
50
|
#
|
45
|
-
# @param obj [Object]
|
51
|
+
# @param obj [Object]
|
46
52
|
# @return [Void]
|
47
53
|
def self.validate_raw(obj:)
|
48
|
-
GenerateStreamResult.validate_raw(obj: obj.delta)
|
54
|
+
Vellum::GenerateStreamResult.validate_raw(obj: obj.delta)
|
49
55
|
end
|
50
56
|
end
|
51
|
-
end
|
57
|
+
end
|