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.
Files changed (691) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/lib/core/file_utilities.rb +14 -13
  4. data/lib/environment.rb +4 -6
  5. data/lib/requests.rb +141 -59
  6. data/lib/types_export.rb +392 -110
  7. data/lib/vellum_ai/ad_hoc/client.rb +179 -0
  8. data/lib/vellum_ai/container_images/client.rb +289 -0
  9. data/lib/vellum_ai/deployments/client.rb +581 -111
  10. data/lib/vellum_ai/deployments/types/deployments_list_request_status.rb +7 -3
  11. data/lib/vellum_ai/deployments/types/list_deployment_release_tags_request_source.rb +12 -0
  12. data/lib/vellum_ai/document_indexes/client.rb +517 -261
  13. data/lib/vellum_ai/document_indexes/types/document_indexes_list_request_status.rb +7 -3
  14. data/lib/vellum_ai/documents/client.rb +337 -186
  15. data/lib/vellum_ai/folder_entities/client.rb +165 -33
  16. data/lib/vellum_ai/folder_entities/types/folder_entities_list_request_entity_status.rb +12 -0
  17. data/lib/vellum_ai/metric_definitions/client.rb +159 -0
  18. data/lib/vellum_ai/ml_models/client.rb +94 -0
  19. data/lib/vellum_ai/organizations/client.rb +92 -0
  20. data/lib/vellum_ai/prompts/client.rb +198 -0
  21. data/lib/vellum_ai/release_reviews/client.rb +102 -0
  22. data/lib/vellum_ai/sandboxes/client.rb +230 -90
  23. data/lib/vellum_ai/test_suite_runs/client.rb +188 -101
  24. data/lib/vellum_ai/test_suites/client.rb +208 -90
  25. data/lib/vellum_ai/types/ad_hoc_execute_prompt_event.rb +90 -0
  26. data/lib/vellum_ai/types/ad_hoc_expand_meta.rb +85 -0
  27. data/lib/vellum_ai/types/ad_hoc_fulfilled_prompt_execution_meta.rb +92 -0
  28. data/lib/vellum_ai/types/ad_hoc_initiated_prompt_execution_meta.rb +65 -0
  29. data/lib/vellum_ai/types/ad_hoc_rejected_prompt_execution_meta.rb +66 -0
  30. data/lib/vellum_ai/types/ad_hoc_streaming_prompt_execution_meta.rb +55 -0
  31. data/lib/vellum_ai/types/api_node_result.rb +43 -27
  32. data/lib/vellum_ai/types/api_node_result_data.rb +62 -51
  33. data/lib/vellum_ai/types/api_request_parent_context.rb +87 -0
  34. data/lib/vellum_ai/types/{image_enum.rb → api_version_enum.rb} +2 -2
  35. data/lib/vellum_ai/types/array_chat_message_content.rb +42 -26
  36. data/lib/vellum_ai/types/array_chat_message_content_item.rb +85 -82
  37. data/lib/vellum_ai/types/array_chat_message_content_item_request.rb +85 -82
  38. data/lib/vellum_ai/types/array_chat_message_content_request.rb +42 -26
  39. data/lib/vellum_ai/types/array_input.rb +73 -0
  40. data/lib/vellum_ai/types/array_vellum_value.rb +68 -0
  41. data/lib/vellum_ai/types/array_vellum_value_request.rb +68 -0
  42. data/lib/vellum_ai/types/audio_chat_message_content.rb +68 -0
  43. data/lib/vellum_ai/types/audio_chat_message_content_request.rb +68 -0
  44. data/lib/vellum_ai/types/audio_prompt_block.rb +92 -0
  45. data/lib/vellum_ai/types/audio_vellum_value.rb +70 -0
  46. data/lib/vellum_ai/types/audio_vellum_value_request.rb +70 -0
  47. data/lib/vellum_ai/types/base_output.rb +70 -0
  48. data/lib/vellum_ai/types/basic_vectorizer_intfloat_multilingual_e_5_large.rb +66 -0
  49. data/lib/vellum_ai/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.rb +66 -0
  50. data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.rb +66 -0
  51. data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.rb +66 -0
  52. data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.rb +66 -0
  53. data/lib/vellum_ai/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.rb +66 -0
  54. data/lib/vellum_ai/types/build_status_enum.rb +18 -0
  55. data/lib/vellum_ai/types/chat_history_input.rb +73 -0
  56. data/lib/vellum_ai/types/chat_history_input_request.rb +46 -28
  57. data/lib/vellum_ai/types/chat_history_vellum_value.rb +68 -0
  58. data/lib/vellum_ai/types/chat_history_vellum_value_request.rb +68 -0
  59. data/lib/vellum_ai/types/chat_message.rb +55 -38
  60. data/lib/vellum_ai/types/chat_message_content.rb +100 -94
  61. data/lib/vellum_ai/types/chat_message_content_request.rb +100 -94
  62. data/lib/vellum_ai/types/chat_message_prompt_block.rb +111 -0
  63. data/lib/vellum_ai/types/chat_message_request.rb +55 -38
  64. data/lib/vellum_ai/types/chat_message_role.rb +13 -3
  65. data/lib/vellum_ai/types/code_execution_node_array_result.rb +50 -30
  66. data/lib/vellum_ai/types/code_execution_node_chat_history_result.rb +49 -29
  67. data/lib/vellum_ai/types/code_execution_node_error_result.rb +50 -30
  68. data/lib/vellum_ai/types/code_execution_node_function_call_result.rb +50 -30
  69. data/lib/vellum_ai/types/code_execution_node_json_result.rb +45 -27
  70. data/lib/vellum_ai/types/code_execution_node_number_result.rb +47 -27
  71. data/lib/vellum_ai/types/code_execution_node_result.rb +43 -27
  72. data/lib/vellum_ai/types/code_execution_node_result_data.rb +43 -30
  73. data/lib/vellum_ai/types/code_execution_node_result_output.rb +129 -143
  74. data/lib/vellum_ai/types/code_execution_node_search_results_result.rb +49 -29
  75. data/lib/vellum_ai/types/code_execution_node_string_result.rb +47 -27
  76. data/lib/vellum_ai/types/code_execution_package.rb +61 -0
  77. data/lib/vellum_ai/types/code_execution_runtime.rb +12 -0
  78. data/lib/vellum_ai/types/code_executor_input.rb +170 -0
  79. data/lib/vellum_ai/types/code_executor_response.rb +67 -0
  80. data/lib/vellum_ai/types/code_executor_secret_input.rb +69 -0
  81. data/lib/vellum_ai/types/code_resource_definition.rb +62 -0
  82. data/lib/vellum_ai/types/compile_prompt_deployment_expand_meta_request.rb +76 -0
  83. data/lib/vellum_ai/types/compile_prompt_meta.rb +72 -0
  84. data/lib/vellum_ai/types/components_schemas_pdf_search_result_meta_source.rb +6 -0
  85. data/lib/vellum_ai/types/components_schemas_pdf_search_result_meta_source_request.rb +6 -0
  86. data/lib/vellum_ai/types/components_schemas_prompt_version_build_config_sandbox.rb +6 -0
  87. data/lib/vellum_ai/types/condition_combinator.rb +12 -0
  88. data/lib/vellum_ai/types/conditional_node_result.rb +43 -27
  89. data/lib/vellum_ai/types/conditional_node_result_data.rb +31 -23
  90. data/lib/vellum_ai/types/container_image_build_config.rb +55 -0
  91. data/lib/vellum_ai/types/container_image_container_image_tag.rb +66 -0
  92. data/lib/vellum_ai/types/container_image_read.rb +141 -0
  93. data/lib/vellum_ai/types/create_test_suite_test_case_request.rb +89 -0
  94. data/lib/vellum_ai/types/deployment_history_item.rb +107 -0
  95. data/lib/vellum_ai/types/deployment_provider_payload_response.rb +54 -24
  96. data/lib/vellum_ai/types/deployment_provider_payload_response_payload.rb +57 -0
  97. data/lib/vellum_ai/types/deployment_read.rb +113 -76
  98. data/lib/vellum_ai/types/deployment_release_tag_deployment_history_item.rb +68 -0
  99. data/lib/vellum_ai/types/deployment_release_tag_read.rb +92 -0
  100. data/lib/vellum_ai/types/docker_service_token.rb +68 -0
  101. data/lib/vellum_ai/types/document_chat_message_content.rb +68 -0
  102. data/lib/vellum_ai/types/document_chat_message_content_request.rb +68 -0
  103. data/lib/vellum_ai/types/document_document_to_document_index.rb +76 -43
  104. data/lib/vellum_ai/types/document_index_chunking.rb +74 -0
  105. data/lib/vellum_ai/types/document_index_chunking_request.rb +74 -0
  106. data/lib/vellum_ai/types/document_index_indexing_config.rb +75 -0
  107. data/lib/vellum_ai/types/document_index_indexing_config_request.rb +75 -0
  108. data/lib/vellum_ai/types/document_index_read.rb +73 -64
  109. data/lib/vellum_ai/types/document_processing_state.rb +18 -0
  110. data/lib/vellum_ai/types/document_prompt_block.rb +92 -0
  111. data/lib/vellum_ai/types/document_read.rb +91 -83
  112. data/lib/vellum_ai/types/document_status.rb +1 -1
  113. data/lib/vellum_ai/types/document_vellum_value.rb +70 -0
  114. data/lib/vellum_ai/types/document_vellum_value_request.rb +70 -0
  115. data/lib/vellum_ai/types/enriched_normalized_completion.rb +97 -78
  116. data/lib/vellum_ai/types/entity_status.rb +9 -3
  117. data/lib/vellum_ai/types/entity_visibility.rb +16 -0
  118. data/lib/vellum_ai/types/environment_enum.rb +11 -3
  119. data/lib/vellum_ai/types/ephemeral_prompt_cache_config.rb +54 -0
  120. data/lib/vellum_ai/types/ephemeral_prompt_cache_config_type_enum.rb +5 -0
  121. data/lib/vellum_ai/types/error_input.rb +75 -0
  122. data/lib/vellum_ai/types/error_vellum_value.rb +70 -0
  123. data/lib/vellum_ai/types/error_vellum_value_request.rb +70 -0
  124. data/lib/vellum_ai/types/execute_api_request_bearer_token.rb +57 -0
  125. data/lib/vellum_ai/types/execute_api_request_body.rb +71 -0
  126. data/lib/vellum_ai/types/execute_api_request_headers_value.rb +57 -0
  127. data/lib/vellum_ai/types/execute_api_response.rb +83 -0
  128. data/lib/vellum_ai/types/execute_api_response_json.rb +56 -0
  129. data/lib/vellum_ai/types/execute_prompt_event.rb +68 -94
  130. data/lib/vellum_ai/types/execute_prompt_response.rb +38 -70
  131. data/lib/vellum_ai/types/execute_workflow_response.rb +54 -38
  132. data/lib/vellum_ai/types/execute_workflow_workflow_result_event.rb +38 -70
  133. data/lib/vellum_ai/types/execution_array_vellum_value.rb +55 -32
  134. data/lib/vellum_ai/types/execution_chat_history_vellum_value.rb +54 -31
  135. data/lib/vellum_ai/types/execution_error_vellum_value.rb +55 -32
  136. data/lib/vellum_ai/types/execution_function_call_vellum_value.rb +55 -32
  137. data/lib/vellum_ai/types/execution_json_vellum_value.rb +50 -29
  138. data/lib/vellum_ai/types/execution_number_vellum_value.rb +52 -29
  139. data/lib/vellum_ai/types/execution_search_results_vellum_value.rb +54 -31
  140. data/lib/vellum_ai/types/execution_string_vellum_value.rb +52 -29
  141. data/lib/vellum_ai/types/execution_vellum_value.rb +129 -143
  142. data/lib/vellum_ai/types/external_input_descriptor.rb +86 -0
  143. data/lib/vellum_ai/types/external_test_case_execution.rb +67 -0
  144. data/lib/vellum_ai/types/external_test_case_execution_request.rb +67 -0
  145. data/lib/vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15.rb +52 -0
  146. data/lib/vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.rb +54 -0
  147. data/lib/vellum_ai/types/finish_reason_enum.rb +11 -3
  148. data/lib/vellum_ai/types/folder_entity.rb +122 -0
  149. data/lib/vellum_ai/types/folder_entity_dataset.rb +75 -0
  150. data/lib/vellum_ai/types/folder_entity_dataset_data.rb +101 -0
  151. data/lib/vellum_ai/types/folder_entity_document_index.rb +75 -0
  152. data/lib/vellum_ai/types/folder_entity_document_index_data.rb +106 -0
  153. data/lib/vellum_ai/types/folder_entity_folder.rb +75 -0
  154. data/lib/vellum_ai/types/folder_entity_folder_data.rb +92 -0
  155. data/lib/vellum_ai/types/folder_entity_prompt_sandbox.rb +75 -0
  156. data/lib/vellum_ai/types/folder_entity_prompt_sandbox_data.rb +114 -0
  157. data/lib/vellum_ai/types/folder_entity_test_suite.rb +75 -0
  158. data/lib/vellum_ai/types/folder_entity_test_suite_data.rb +93 -0
  159. data/lib/vellum_ai/types/folder_entity_workflow_sandbox.rb +75 -0
  160. data/lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb +114 -0
  161. data/lib/vellum_ai/types/fulfilled_ad_hoc_execute_prompt_event.rb +89 -0
  162. data/lib/vellum_ai/types/fulfilled_execute_prompt_event.rb +60 -37
  163. data/lib/vellum_ai/types/fulfilled_execute_prompt_response.rb +67 -40
  164. data/lib/vellum_ai/types/fulfilled_execute_workflow_workflow_result_event.rb +59 -32
  165. data/lib/vellum_ai/types/fulfilled_prompt_execution_meta.rb +69 -29
  166. data/lib/vellum_ai/types/fulfilled_workflow_node_result_event.rb +92 -68
  167. data/lib/vellum_ai/types/function_call.rb +53 -72
  168. data/lib/vellum_ai/types/function_call_chat_message_content.rb +43 -27
  169. data/lib/vellum_ai/types/function_call_chat_message_content_request.rb +44 -27
  170. data/lib/vellum_ai/types/function_call_chat_message_content_value.rb +46 -31
  171. data/lib/vellum_ai/types/function_call_chat_message_content_value_request.rb +48 -31
  172. data/lib/vellum_ai/types/function_call_input.rb +75 -0
  173. data/lib/vellum_ai/types/function_call_prompt_block.rb +99 -0
  174. data/lib/vellum_ai/types/function_call_request.rb +71 -0
  175. data/lib/vellum_ai/types/function_call_vellum_value.rb +70 -0
  176. data/lib/vellum_ai/types/function_call_vellum_value_request.rb +70 -0
  177. data/lib/vellum_ai/types/function_definition.rb +109 -0
  178. data/lib/vellum_ai/types/generate_options_request.rb +35 -27
  179. data/lib/vellum_ai/types/generate_request.rb +52 -34
  180. data/lib/vellum_ai/types/generate_response.rb +29 -23
  181. data/lib/vellum_ai/types/generate_result.rb +52 -35
  182. data/lib/vellum_ai/types/generate_result_data.rb +29 -23
  183. data/lib/vellum_ai/types/generate_result_error.rb +26 -20
  184. data/lib/vellum_ai/types/generate_stream_response.rb +30 -24
  185. data/lib/vellum_ai/types/generate_stream_result.rb +53 -38
  186. data/lib/vellum_ai/types/generate_stream_result_data.rb +39 -28
  187. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_config.rb +61 -0
  188. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_config_request.rb +62 -0
  189. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004.rb +69 -0
  190. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004_request.rb +69 -0
  191. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.rb +69 -0
  192. data/lib/vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002_request.rb +69 -0
  193. data/lib/vellum_ai/types/hkunlp_instructor_xl_vectorizer.rb +68 -0
  194. data/lib/vellum_ai/types/hkunlp_instructor_xl_vectorizer_request.rb +68 -0
  195. data/lib/vellum_ai/types/image_chat_message_content.rb +43 -27
  196. data/lib/vellum_ai/types/image_chat_message_content_request.rb +43 -27
  197. data/lib/vellum_ai/types/image_prompt_block.rb +92 -0
  198. data/lib/vellum_ai/types/image_vellum_value.rb +70 -0
  199. data/lib/vellum_ai/types/image_vellum_value_request.rb +70 -0
  200. data/lib/vellum_ai/types/indexing_config_vectorizer.rb +186 -0
  201. data/lib/vellum_ai/types/indexing_config_vectorizer_request.rb +186 -0
  202. data/lib/vellum_ai/types/indexing_state_enum.rb +15 -9
  203. data/lib/vellum_ai/types/initiated_ad_hoc_execute_prompt_event.rb +78 -0
  204. data/lib/vellum_ai/types/initiated_execute_prompt_event.rb +52 -31
  205. data/lib/vellum_ai/types/initiated_prompt_execution_meta.rb +55 -44
  206. data/lib/vellum_ai/types/initiated_workflow_node_result_event.rb +86 -62
  207. data/lib/vellum_ai/types/instructor_vectorizer_config.rb +69 -0
  208. data/lib/vellum_ai/types/instructor_vectorizer_config_request.rb +69 -0
  209. data/lib/vellum_ai/types/invoked_port.rb +51 -0
  210. data/lib/vellum_ai/types/iteration_state_enum.rb +14 -0
  211. data/lib/vellum_ai/types/jinja_prompt_block.rb +85 -0
  212. data/lib/vellum_ai/types/json_input.rb +69 -0
  213. data/lib/vellum_ai/types/json_input_request.rb +46 -28
  214. data/lib/vellum_ai/types/json_vellum_value.rb +62 -0
  215. data/lib/vellum_ai/types/json_vellum_value_request.rb +62 -0
  216. data/lib/vellum_ai/types/logical_operator.rb +57 -22
  217. data/lib/vellum_ai/types/logprobs_enum.rb +9 -3
  218. data/lib/vellum_ai/types/map_node_result.rb +70 -0
  219. data/lib/vellum_ai/types/map_node_result_data.rb +64 -0
  220. data/lib/vellum_ai/types/merge_node_result.rb +68 -0
  221. data/lib/vellum_ai/types/merge_node_result_data.rb +53 -0
  222. data/lib/vellum_ai/types/metadata_filter_config_request.rb +71 -57
  223. data/lib/vellum_ai/types/metadata_filter_rule_combinator.rb +9 -3
  224. data/lib/vellum_ai/types/metadata_filter_rule_request.rb +69 -57
  225. data/lib/vellum_ai/types/metadata_filters_request.rb +58 -0
  226. data/lib/vellum_ai/types/method_enum.rb +18 -0
  227. data/lib/vellum_ai/types/metric_definition_execution.rb +55 -0
  228. data/lib/vellum_ai/types/metric_definition_history_item.rb +96 -0
  229. data/lib/vellum_ai/types/metric_definition_input.rb +90 -0
  230. data/lib/vellum_ai/types/metric_node_result.rb +52 -0
  231. data/lib/vellum_ai/types/ml_model_read.rb +62 -0
  232. data/lib/vellum_ai/types/ml_model_usage.rb +98 -0
  233. data/lib/vellum_ai/types/ml_model_usage_wrapper.rb +67 -0
  234. data/lib/vellum_ai/types/named_scenario_input_chat_history_variable_value_request.rb +77 -0
  235. data/lib/vellum_ai/types/named_scenario_input_json_variable_value_request.rb +71 -0
  236. data/lib/vellum_ai/types/named_scenario_input_request.rb +74 -0
  237. data/lib/vellum_ai/types/named_scenario_input_string_variable_value_request.rb +73 -0
  238. data/lib/vellum_ai/types/named_test_case_array_variable_value.rb +75 -0
  239. data/lib/vellum_ai/types/named_test_case_array_variable_value_request.rb +76 -0
  240. data/lib/vellum_ai/types/named_test_case_chat_history_variable_value.rb +76 -0
  241. data/lib/vellum_ai/types/named_test_case_chat_history_variable_value_request.rb +53 -30
  242. data/lib/vellum_ai/types/named_test_case_error_variable_value.rb +77 -0
  243. data/lib/vellum_ai/types/named_test_case_error_variable_value_request.rb +52 -30
  244. data/lib/vellum_ai/types/named_test_case_function_call_variable_value.rb +78 -0
  245. data/lib/vellum_ai/types/named_test_case_function_call_variable_value_request.rb +79 -0
  246. data/lib/vellum_ai/types/named_test_case_json_variable_value.rb +69 -0
  247. data/lib/vellum_ai/types/named_test_case_json_variable_value_request.rb +48 -28
  248. data/lib/vellum_ai/types/named_test_case_number_variable_value.rb +71 -0
  249. data/lib/vellum_ai/types/named_test_case_number_variable_value_request.rb +51 -28
  250. data/lib/vellum_ai/types/named_test_case_search_results_variable_value.rb +77 -0
  251. data/lib/vellum_ai/types/named_test_case_search_results_variable_value_request.rb +53 -30
  252. data/lib/vellum_ai/types/named_test_case_string_variable_value.rb +71 -0
  253. data/lib/vellum_ai/types/named_test_case_string_variable_value_request.rb +51 -28
  254. data/lib/vellum_ai/types/named_test_case_variable_value.rb +154 -0
  255. data/lib/vellum_ai/types/named_test_case_variable_value_request.rb +131 -119
  256. data/lib/vellum_ai/types/new_member_join_behavior_enum.rb +14 -0
  257. data/lib/vellum_ai/types/node_execution_fulfilled_body.rb +87 -0
  258. data/lib/vellum_ai/types/node_execution_fulfilled_event.rb +134 -0
  259. data/lib/vellum_ai/types/node_execution_initiated_body.rb +67 -0
  260. data/lib/vellum_ai/types/node_execution_initiated_event.rb +134 -0
  261. data/lib/vellum_ai/types/node_execution_paused_body.rb +57 -0
  262. data/lib/vellum_ai/types/node_execution_paused_event.rb +134 -0
  263. data/lib/vellum_ai/types/node_execution_rejected_body.rb +73 -0
  264. data/lib/vellum_ai/types/node_execution_rejected_event.rb +134 -0
  265. data/lib/vellum_ai/types/node_execution_resumed_body.rb +57 -0
  266. data/lib/vellum_ai/types/node_execution_resumed_event.rb +134 -0
  267. data/lib/vellum_ai/types/node_execution_span.rb +118 -0
  268. data/lib/vellum_ai/types/node_execution_span_attributes.rb +51 -0
  269. data/lib/vellum_ai/types/node_execution_streaming_body.rb +73 -0
  270. data/lib/vellum_ai/types/node_execution_streaming_event.rb +134 -0
  271. data/lib/vellum_ai/types/node_input_compiled_array_value.rb +55 -33
  272. data/lib/vellum_ai/types/node_input_compiled_chat_history_value.rb +54 -32
  273. data/lib/vellum_ai/types/node_input_compiled_error_value.rb +55 -33
  274. data/lib/vellum_ai/types/node_input_compiled_function_call_value.rb +83 -0
  275. data/lib/vellum_ai/types/node_input_compiled_json_value.rb +50 -30
  276. data/lib/vellum_ai/types/node_input_compiled_number_value.rb +52 -30
  277. data/lib/vellum_ai/types/node_input_compiled_search_results_value.rb +54 -32
  278. data/lib/vellum_ai/types/node_input_compiled_secret_value.rb +81 -0
  279. data/lib/vellum_ai/types/node_input_compiled_string_value.rb +52 -30
  280. data/lib/vellum_ai/types/node_input_variable_compiled_value.rb +146 -144
  281. data/lib/vellum_ai/types/node_output_compiled_array_value.rb +60 -31
  282. data/lib/vellum_ai/types/node_output_compiled_chat_history_value.rb +59 -30
  283. data/lib/vellum_ai/types/node_output_compiled_error_value.rb +59 -30
  284. data/lib/vellum_ai/types/node_output_compiled_function_call_value.rb +85 -0
  285. data/lib/vellum_ai/types/node_output_compiled_json_value.rb +57 -28
  286. data/lib/vellum_ai/types/node_output_compiled_number_value.rb +57 -28
  287. data/lib/vellum_ai/types/node_output_compiled_search_results_value.rb +59 -30
  288. data/lib/vellum_ai/types/node_output_compiled_string_value.rb +57 -28
  289. data/lib/vellum_ai/types/node_output_compiled_value.rb +130 -144
  290. data/lib/vellum_ai/types/node_parent_context.rb +100 -0
  291. data/lib/vellum_ai/types/normalized_log_probs.rb +42 -29
  292. data/lib/vellum_ai/types/normalized_token_log_probs.rb +51 -35
  293. data/lib/vellum_ai/types/number_input.rb +69 -0
  294. data/lib/vellum_ai/types/number_vellum_value.rb +64 -0
  295. data/lib/vellum_ai/types/number_vellum_value_request.rb +64 -0
  296. data/lib/vellum_ai/types/open_ai_vectorizer_config.rb +54 -0
  297. data/lib/vellum_ai/types/open_ai_vectorizer_config_request.rb +54 -0
  298. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_large.rb +68 -0
  299. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_large_request.rb +70 -0
  300. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_small.rb +68 -0
  301. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_3_small_request.rb +70 -0
  302. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002.rb +68 -0
  303. data/lib/vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002_request.rb +70 -0
  304. data/lib/vellum_ai/types/organization_read.rb +78 -0
  305. data/lib/vellum_ai/types/paginated_container_image_read_list.rb +81 -0
  306. data/lib/vellum_ai/types/paginated_deployment_release_tag_read_list.rb +82 -0
  307. data/lib/vellum_ai/types/paginated_document_index_read_list.rb +55 -38
  308. data/lib/vellum_ai/types/paginated_folder_entity_list.rb +81 -0
  309. data/lib/vellum_ai/types/paginated_slim_deployment_read_list.rb +55 -38
  310. data/lib/vellum_ai/types/paginated_slim_document_list.rb +55 -38
  311. data/lib/vellum_ai/types/paginated_slim_workflow_deployment_list.rb +55 -38
  312. data/lib/vellum_ai/types/paginated_test_suite_run_execution_list.rb +53 -36
  313. data/lib/vellum_ai/types/paginated_test_suite_test_case_list.rb +81 -0
  314. data/lib/vellum_ai/types/paginated_workflow_release_tag_read_list.rb +81 -0
  315. data/lib/vellum_ai/types/paginated_workflow_sandbox_example_list.rb +81 -0
  316. data/lib/vellum_ai/types/parent_context.rb +122 -0
  317. data/lib/vellum_ai/types/pdf_search_result_meta_source.rb +75 -0
  318. data/lib/vellum_ai/types/pdf_search_result_meta_source_request.rb +75 -0
  319. data/lib/vellum_ai/types/plain_text_prompt_block.rb +85 -0
  320. data/lib/vellum_ai/types/price.rb +62 -0
  321. data/lib/vellum_ai/types/processing_failure_reason_enum.rb +9 -6
  322. data/lib/vellum_ai/types/prompt_block.rb +154 -0
  323. data/lib/vellum_ai/types/prompt_block_state.rb +12 -0
  324. data/lib/vellum_ai/types/prompt_deployment_expand_meta_request.rb +110 -0
  325. data/lib/vellum_ai/types/prompt_deployment_input_request.rb +53 -82
  326. data/lib/vellum_ai/types/prompt_deployment_parent_context.rb +143 -0
  327. data/lib/vellum_ai/types/prompt_deployment_release.rb +149 -0
  328. data/lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb +53 -0
  329. data/lib/vellum_ai/types/prompt_deployment_release_prompt_version.rb +68 -0
  330. data/lib/vellum_ai/types/prompt_exec_config.rb +115 -0
  331. data/lib/vellum_ai/types/prompt_execution_meta.rb +87 -50
  332. data/lib/vellum_ai/types/prompt_node_execution_meta.rb +84 -0
  333. data/lib/vellum_ai/types/prompt_node_result.rb +43 -27
  334. data/lib/vellum_ai/types/prompt_node_result_data.rb +72 -36
  335. data/lib/vellum_ai/types/prompt_output.rb +72 -98
  336. data/lib/vellum_ai/types/prompt_parameters.rb +112 -0
  337. data/lib/vellum_ai/types/prompt_push_response.rb +61 -0
  338. data/lib/vellum_ai/types/prompt_request_chat_history_input.rb +72 -0
  339. data/lib/vellum_ai/types/prompt_request_input.rb +74 -0
  340. data/lib/vellum_ai/types/prompt_request_json_input.rb +68 -0
  341. data/lib/vellum_ai/types/prompt_request_string_input.rb +68 -0
  342. data/lib/vellum_ai/types/prompt_settings.rb +63 -0
  343. data/lib/vellum_ai/types/prompt_version_build_config_sandbox.rb +75 -0
  344. data/lib/vellum_ai/types/raw_prompt_execution_overrides_request.rb +45 -30
  345. data/lib/vellum_ai/types/reducto_chunker_config.rb +54 -0
  346. data/lib/vellum_ai/types/reducto_chunker_config_request.rb +54 -0
  347. data/lib/vellum_ai/types/reducto_chunking.rb +70 -0
  348. data/lib/vellum_ai/types/reducto_chunking_request.rb +70 -0
  349. data/lib/vellum_ai/types/rejected_ad_hoc_execute_prompt_event.rb +90 -0
  350. data/lib/vellum_ai/types/rejected_execute_prompt_event.rb +60 -38
  351. data/lib/vellum_ai/types/rejected_execute_prompt_response.rb +67 -41
  352. data/lib/vellum_ai/types/rejected_execute_workflow_workflow_result_event.rb +60 -33
  353. data/lib/vellum_ai/types/rejected_prompt_execution_meta.rb +43 -29
  354. data/lib/vellum_ai/types/rejected_workflow_node_result_event.rb +86 -62
  355. data/lib/vellum_ai/types/release_created_by.rb +70 -0
  356. data/lib/vellum_ai/types/release_environment.rb +68 -0
  357. data/lib/vellum_ai/types/release_release_tag.rb +66 -0
  358. data/lib/vellum_ai/types/release_review_reviewer.rb +63 -0
  359. data/lib/vellum_ai/types/release_review_state.rb +14 -0
  360. data/lib/vellum_ai/types/release_tag_release.rb +66 -0
  361. data/lib/vellum_ai/types/release_tag_source.rb +12 -0
  362. data/lib/vellum_ai/types/replace_test_suite_test_case_request.rb +98 -0
  363. data/lib/vellum_ai/types/rich_text_child_block.rb +58 -0
  364. data/lib/vellum_ai/types/rich_text_prompt_block.rb +89 -0
  365. data/lib/vellum_ai/types/sandbox_scenario.rb +47 -31
  366. data/lib/vellum_ai/types/scenario_input.rb +57 -53
  367. data/lib/vellum_ai/types/scenario_input_chat_history_variable_value.rb +76 -0
  368. data/lib/vellum_ai/types/scenario_input_json_variable_value.rb +69 -0
  369. data/lib/vellum_ai/types/scenario_input_string_variable_value.rb +71 -0
  370. data/lib/vellum_ai/types/search_filters_request.rb +44 -31
  371. data/lib/vellum_ai/types/search_node_result.rb +43 -27
  372. data/lib/vellum_ai/types/search_node_result_data.rb +54 -41
  373. data/lib/vellum_ai/types/search_request_options_request.rb +63 -47
  374. data/lib/vellum_ai/types/search_response.rb +31 -23
  375. data/lib/vellum_ai/types/search_result.rb +62 -32
  376. data/lib/vellum_ai/types/search_result_document.rb +55 -34
  377. data/lib/vellum_ai/types/search_result_document_request.rb +56 -30
  378. data/lib/vellum_ai/types/search_result_merging_request.rb +30 -22
  379. data/lib/vellum_ai/types/search_result_meta.rb +60 -0
  380. data/lib/vellum_ai/types/search_result_meta_request.rb +60 -0
  381. data/lib/vellum_ai/types/search_result_request.rb +62 -32
  382. data/lib/vellum_ai/types/search_results_input.rb +73 -0
  383. data/lib/vellum_ai/types/search_results_vellum_value.rb +68 -0
  384. data/lib/vellum_ai/types/search_results_vellum_value_request.rb +68 -0
  385. data/lib/vellum_ai/types/search_weights_request.rb +39 -26
  386. data/lib/vellum_ai/types/secret_type_enum.rb +16 -0
  387. data/lib/vellum_ai/types/sentence_chunker_config.rb +64 -0
  388. data/lib/vellum_ai/types/sentence_chunker_config_request.rb +64 -0
  389. data/lib/vellum_ai/types/sentence_chunking.rb +70 -0
  390. data/lib/vellum_ai/types/sentence_chunking_request.rb +70 -0
  391. data/lib/vellum_ai/types/slim_deployment_read.rb +99 -70
  392. data/lib/vellum_ai/types/slim_document.rb +102 -85
  393. data/lib/vellum_ai/types/slim_document_document_to_document_index.rb +96 -0
  394. data/lib/vellum_ai/types/slim_release_review.rb +87 -0
  395. data/lib/vellum_ai/types/slim_workflow_deployment.rb +109 -77
  396. data/lib/vellum_ai/types/slim_workflow_execution_read.rb +162 -0
  397. data/lib/vellum_ai/types/span_link.rb +75 -0
  398. data/lib/vellum_ai/types/{chat_history_enum.rb → span_link_type_enum.rb} +2 -2
  399. data/lib/vellum_ai/types/streaming_ad_hoc_execute_prompt_event.rb +106 -0
  400. data/lib/vellum_ai/types/streaming_execute_prompt_event.rb +73 -52
  401. data/lib/vellum_ai/types/streaming_prompt_execution_meta.rb +33 -24
  402. data/lib/vellum_ai/types/streaming_workflow_node_result_event.rb +93 -69
  403. data/lib/vellum_ai/types/string_chat_message_content.rb +40 -24
  404. data/lib/vellum_ai/types/string_chat_message_content_request.rb +40 -24
  405. data/lib/vellum_ai/types/string_input.rb +69 -0
  406. data/lib/vellum_ai/types/string_input_request.rb +45 -27
  407. data/lib/vellum_ai/types/string_vellum_value.rb +64 -0
  408. data/lib/vellum_ai/types/string_vellum_value_request.rb +64 -0
  409. data/lib/vellum_ai/types/submit_completion_actual_request.rb +76 -39
  410. data/lib/vellum_ai/types/submit_workflow_execution_actual_request.rb +53 -82
  411. data/lib/vellum_ai/types/subworkflow_node_result.rb +51 -21
  412. data/lib/vellum_ai/types/subworkflow_node_result_data.rb +53 -0
  413. data/lib/vellum_ai/types/templating_node_array_result.rb +50 -30
  414. data/lib/vellum_ai/types/templating_node_chat_history_result.rb +49 -29
  415. data/lib/vellum_ai/types/templating_node_error_result.rb +50 -30
  416. data/lib/vellum_ai/types/templating_node_function_call_result.rb +50 -30
  417. data/lib/vellum_ai/types/templating_node_json_result.rb +45 -27
  418. data/lib/vellum_ai/types/templating_node_number_result.rb +47 -27
  419. data/lib/vellum_ai/types/templating_node_result.rb +43 -27
  420. data/lib/vellum_ai/types/templating_node_result_data.rb +30 -24
  421. data/lib/vellum_ai/types/templating_node_result_output.rb +129 -143
  422. data/lib/vellum_ai/types/templating_node_search_results_result.rb +49 -29
  423. data/lib/vellum_ai/types/templating_node_string_result.rb +47 -27
  424. data/lib/vellum_ai/types/terminal_node_array_result.rb +55 -33
  425. data/lib/vellum_ai/types/terminal_node_chat_history_result.rb +54 -32
  426. data/lib/vellum_ai/types/terminal_node_error_result.rb +55 -33
  427. data/lib/vellum_ai/types/terminal_node_function_call_result.rb +55 -33
  428. data/lib/vellum_ai/types/terminal_node_json_result.rb +52 -30
  429. data/lib/vellum_ai/types/terminal_node_number_result.rb +52 -30
  430. data/lib/vellum_ai/types/terminal_node_result.rb +43 -27
  431. data/lib/vellum_ai/types/terminal_node_result_data.rb +30 -24
  432. data/lib/vellum_ai/types/terminal_node_result_output.rb +130 -144
  433. data/lib/vellum_ai/types/terminal_node_search_results_result.rb +54 -32
  434. data/lib/vellum_ai/types/terminal_node_string_result.rb +52 -30
  435. data/lib/vellum_ai/types/test_case_array_variable_value.rb +82 -0
  436. data/lib/vellum_ai/types/test_case_chat_history_variable_value.rb +57 -29
  437. data/lib/vellum_ai/types/test_case_error_variable_value.rb +58 -30
  438. data/lib/vellum_ai/types/test_case_function_call_variable_value.rb +84 -0
  439. data/lib/vellum_ai/types/test_case_json_variable_value.rb +53 -27
  440. data/lib/vellum_ai/types/test_case_number_variable_value.rb +55 -27
  441. data/lib/vellum_ai/types/test_case_search_results_variable_value.rb +57 -29
  442. data/lib/vellum_ai/types/test_case_string_variable_value.rb +55 -27
  443. data/lib/vellum_ai/types/test_case_variable_value.rb +131 -119
  444. data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config.rb +55 -31
  445. data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data.rb +43 -26
  446. data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data_request.rb +43 -26
  447. data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_request.rb +55 -31
  448. data/lib/vellum_ai/types/test_suite_run_exec_config.rb +86 -70
  449. data/lib/vellum_ai/types/test_suite_run_exec_config_request.rb +118 -70
  450. data/lib/vellum_ai/types/test_suite_run_execution.rb +51 -37
  451. data/lib/vellum_ai/types/test_suite_run_execution_array_output.rb +83 -0
  452. data/lib/vellum_ai/types/test_suite_run_execution_chat_history_output.rb +60 -30
  453. data/lib/vellum_ai/types/test_suite_run_execution_error_output.rb +59 -30
  454. data/lib/vellum_ai/types/test_suite_run_execution_function_call_output.rb +87 -0
  455. data/lib/vellum_ai/types/test_suite_run_execution_json_output.rb +55 -28
  456. data/lib/vellum_ai/types/test_suite_run_execution_metric_definition.rb +71 -0
  457. data/lib/vellum_ai/types/test_suite_run_execution_metric_result.rb +60 -27
  458. data/lib/vellum_ai/types/test_suite_run_execution_number_output.rb +57 -28
  459. data/lib/vellum_ai/types/test_suite_run_execution_output.rb +131 -119
  460. data/lib/vellum_ai/types/test_suite_run_execution_search_results_output.rb +61 -30
  461. data/lib/vellum_ai/types/test_suite_run_execution_string_output.rb +57 -28
  462. data/lib/vellum_ai/types/test_suite_run_external_exec_config.rb +80 -0
  463. data/lib/vellum_ai/types/test_suite_run_external_exec_config_data.rb +57 -0
  464. data/lib/vellum_ai/types/test_suite_run_external_exec_config_data_request.rb +59 -0
  465. data/lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb +81 -0
  466. data/lib/vellum_ai/types/test_suite_run_metric_array_output.rb +75 -0
  467. data/lib/vellum_ai/types/test_suite_run_metric_error_output.rb +48 -30
  468. data/lib/vellum_ai/types/test_suite_run_metric_json_output.rb +69 -0
  469. data/lib/vellum_ai/types/test_suite_run_metric_number_output.rb +49 -29
  470. data/lib/vellum_ai/types/test_suite_run_metric_output.rb +86 -70
  471. data/lib/vellum_ai/types/test_suite_run_metric_string_output.rb +71 -0
  472. data/lib/vellum_ai/types/test_suite_run_progress.rb +61 -0
  473. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_exec_config_data_request.rb +65 -0
  474. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_exec_config_request.rb +81 -0
  475. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config.rb +82 -0
  476. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_data.rb +65 -0
  477. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_data_request.rb +65 -0
  478. data/lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb +82 -0
  479. data/lib/vellum_ai/types/test_suite_run_read.rb +89 -60
  480. data/lib/vellum_ai/types/test_suite_run_state.rb +15 -9
  481. data/lib/vellum_ai/types/test_suite_run_test_suite.rb +41 -28
  482. data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config.rb +55 -31
  483. data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_data.rb +43 -26
  484. data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_data_request.rb +43 -26
  485. data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb +55 -31
  486. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_exec_config_data_request.rb +53 -0
  487. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_exec_config_request.rb +81 -0
  488. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config.rb +82 -0
  489. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb +67 -0
  490. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data_request.rb +67 -0
  491. data/lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_request.rb +82 -0
  492. data/lib/vellum_ai/types/test_suite_test_case.rb +63 -40
  493. data/lib/vellum_ai/types/test_suite_test_case_bulk_operation_request.rb +91 -0
  494. data/lib/vellum_ai/types/test_suite_test_case_bulk_result.rb +90 -0
  495. data/lib/vellum_ai/types/test_suite_test_case_create_bulk_operation_request.rb +79 -0
  496. data/lib/vellum_ai/types/test_suite_test_case_created_bulk_result.rb +75 -0
  497. data/lib/vellum_ai/types/test_suite_test_case_created_bulk_result_data.rb +53 -0
  498. data/lib/vellum_ai/types/test_suite_test_case_delete_bulk_operation_data_request.rb +53 -0
  499. data/lib/vellum_ai/types/test_suite_test_case_delete_bulk_operation_request.rb +79 -0
  500. data/lib/vellum_ai/types/test_suite_test_case_deleted_bulk_result.rb +77 -0
  501. data/lib/vellum_ai/types/test_suite_test_case_deleted_bulk_result_data.rb +53 -0
  502. data/lib/vellum_ai/types/test_suite_test_case_rejected_bulk_result.rb +73 -0
  503. data/lib/vellum_ai/types/test_suite_test_case_replace_bulk_operation_request.rb +79 -0
  504. data/lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result.rb +77 -0
  505. data/lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result_data.rb +54 -0
  506. data/lib/vellum_ai/types/test_suite_test_case_upsert_bulk_operation_request.rb +79 -0
  507. data/lib/vellum_ai/types/token_overlapping_window_chunker_config.rb +64 -0
  508. data/lib/vellum_ai/types/token_overlapping_window_chunker_config_request.rb +66 -0
  509. data/lib/vellum_ai/types/token_overlapping_window_chunking.rb +70 -0
  510. data/lib/vellum_ai/types/token_overlapping_window_chunking_request.rb +71 -0
  511. data/lib/vellum_ai/types/{json_enum.rb → unit_enum.rb} +2 -2
  512. data/lib/vellum_ai/types/upload_document_response.rb +26 -20
  513. data/lib/vellum_ai/types/upsert_test_suite_test_case_request.rb +103 -0
  514. data/lib/vellum_ai/types/variable_prompt_block.rb +85 -0
  515. data/lib/vellum_ai/types/vellum_audio.rb +63 -0
  516. data/lib/vellum_ai/types/vellum_audio_request.rb +63 -0
  517. data/lib/vellum_ai/types/vellum_code_resource_definition.rb +68 -0
  518. data/lib/vellum_ai/types/vellum_document.rb +63 -0
  519. data/lib/vellum_ai/types/vellum_document_request.rb +63 -0
  520. data/lib/vellum_ai/types/vellum_error.rb +36 -25
  521. data/lib/vellum_ai/types/vellum_error_code_enum.rb +17 -8
  522. data/lib/vellum_ai/types/vellum_error_request.rb +36 -25
  523. data/lib/vellum_ai/types/vellum_image.rb +40 -27
  524. data/lib/vellum_ai/types/vellum_image_request.rb +40 -27
  525. data/lib/vellum_ai/types/vellum_node_execution_event.rb +122 -0
  526. data/lib/vellum_ai/types/vellum_sdk_error.rb +62 -0
  527. data/lib/vellum_ai/types/vellum_sdk_error_code_enum.rb +32 -0
  528. data/lib/vellum_ai/types/vellum_secret.rb +51 -0
  529. data/lib/vellum_ai/types/vellum_span.rb +58 -0
  530. data/lib/vellum_ai/types/vellum_value.rb +202 -0
  531. data/lib/vellum_ai/types/vellum_value_logical_condition_group_request.rb +84 -0
  532. data/lib/vellum_ai/types/vellum_value_logical_condition_request.rb +88 -0
  533. data/lib/vellum_ai/types/vellum_value_logical_expression_request.rb +58 -0
  534. data/lib/vellum_ai/types/vellum_value_request.rb +202 -0
  535. data/lib/vellum_ai/types/vellum_variable.rb +77 -29
  536. data/lib/vellum_ai/types/vellum_variable_extensions.rb +54 -0
  537. data/lib/vellum_ai/types/vellum_variable_type.rb +29 -13
  538. data/lib/vellum_ai/types/vellum_workflow_execution_event.rb +138 -0
  539. data/lib/vellum_ai/types/workflow_deployment_event_executions_response.rb +67 -0
  540. data/lib/vellum_ai/types/workflow_deployment_history_item.rb +117 -0
  541. data/lib/vellum_ai/types/workflow_deployment_parent_context.rb +143 -0
  542. data/lib/vellum_ai/types/workflow_deployment_read.rb +120 -77
  543. data/lib/vellum_ai/types/workflow_deployment_release.rb +149 -0
  544. data/lib/vellum_ai/types/workflow_deployment_release_workflow_deployment.rb +53 -0
  545. data/lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb +77 -0
  546. data/lib/vellum_ai/types/workflow_error.rb +58 -0
  547. data/lib/vellum_ai/types/workflow_event_error.rb +36 -25
  548. data/lib/vellum_ai/types/workflow_event_execution_read.rb +173 -0
  549. data/lib/vellum_ai/types/workflow_execution_actual.rb +88 -0
  550. data/lib/vellum_ai/types/workflow_execution_actual_chat_history_request.rb +87 -50
  551. data/lib/vellum_ai/types/workflow_execution_actual_json_request.rb +83 -48
  552. data/lib/vellum_ai/types/workflow_execution_actual_string_request.rb +82 -47
  553. data/lib/vellum_ai/types/workflow_execution_event_error_code.rb +25 -12
  554. data/lib/vellum_ai/types/workflow_execution_event_type.rb +9 -3
  555. data/lib/vellum_ai/types/workflow_execution_fulfilled_body.rb +67 -0
  556. data/lib/vellum_ai/types/workflow_execution_fulfilled_event.rb +134 -0
  557. data/lib/vellum_ai/types/workflow_execution_initiated_body.rb +67 -0
  558. data/lib/vellum_ai/types/workflow_execution_initiated_event.rb +134 -0
  559. data/lib/vellum_ai/types/workflow_execution_node_result_event.rb +62 -39
  560. data/lib/vellum_ai/types/workflow_execution_paused_body.rb +71 -0
  561. data/lib/vellum_ai/types/workflow_execution_paused_event.rb +134 -0
  562. data/lib/vellum_ai/types/workflow_execution_rejected_body.rb +73 -0
  563. data/lib/vellum_ai/types/workflow_execution_rejected_event.rb +134 -0
  564. data/lib/vellum_ai/types/workflow_execution_resumed_body.rb +57 -0
  565. data/lib/vellum_ai/types/workflow_execution_resumed_event.rb +134 -0
  566. data/lib/vellum_ai/types/workflow_execution_snapshotted_body.rb +67 -0
  567. data/lib/vellum_ai/types/workflow_execution_snapshotted_event.rb +134 -0
  568. data/lib/vellum_ai/types/workflow_execution_span.rb +118 -0
  569. data/lib/vellum_ai/types/workflow_execution_span_attributes.rb +51 -0
  570. data/lib/vellum_ai/types/workflow_execution_streaming_body.rb +73 -0
  571. data/lib/vellum_ai/types/workflow_execution_streaming_event.rb +134 -0
  572. data/lib/vellum_ai/types/workflow_execution_usage_calculation_error.rb +63 -0
  573. data/lib/vellum_ai/types/workflow_execution_usage_calculation_error_code_enum.rb +16 -0
  574. data/lib/vellum_ai/types/workflow_execution_usage_result.rb +84 -0
  575. data/lib/vellum_ai/types/workflow_execution_view_online_eval_metric_result.rb +74 -0
  576. data/lib/vellum_ai/types/workflow_execution_workflow_result_event.rb +62 -39
  577. data/lib/vellum_ai/types/workflow_expand_meta_request.rb +74 -0
  578. data/lib/vellum_ai/types/workflow_initialization_error.rb +62 -0
  579. data/lib/vellum_ai/types/workflow_node_result_data.rb +177 -143
  580. data/lib/vellum_ai/types/workflow_node_result_event.rb +68 -94
  581. data/lib/vellum_ai/types/workflow_node_result_event_state.rb +13 -8
  582. data/lib/vellum_ai/types/workflow_output.rb +144 -155
  583. data/lib/vellum_ai/types/workflow_output_array.rb +55 -33
  584. data/lib/vellum_ai/types/workflow_output_chat_history.rb +54 -32
  585. data/lib/vellum_ai/types/workflow_output_error.rb +55 -33
  586. data/lib/vellum_ai/types/workflow_output_function_call.rb +55 -33
  587. data/lib/vellum_ai/types/workflow_output_image.rb +55 -33
  588. data/lib/vellum_ai/types/workflow_output_json.rb +50 -30
  589. data/lib/vellum_ai/types/workflow_output_number.rb +52 -30
  590. data/lib/vellum_ai/types/workflow_output_search_results.rb +54 -32
  591. data/lib/vellum_ai/types/workflow_output_string.rb +52 -30
  592. data/lib/vellum_ai/types/workflow_parent_context.rb +100 -0
  593. data/lib/vellum_ai/types/workflow_push_deployment_config_request.rb +77 -0
  594. data/lib/vellum_ai/types/workflow_push_response.rb +70 -0
  595. data/lib/vellum_ai/types/workflow_release_tag_read.rb +92 -0
  596. data/lib/vellum_ai/types/workflow_release_tag_workflow_deployment_history_item.rb +68 -0
  597. data/lib/vellum_ai/types/workflow_request_chat_history_input_request.rb +47 -28
  598. data/lib/vellum_ai/types/workflow_request_input_request.rb +68 -94
  599. data/lib/vellum_ai/types/workflow_request_json_input_request.rb +45 -27
  600. data/lib/vellum_ai/types/workflow_request_number_input_request.rb +44 -26
  601. data/lib/vellum_ai/types/workflow_request_string_input_request.rb +44 -26
  602. data/lib/vellum_ai/types/workflow_result_event.rb +86 -68
  603. data/lib/vellum_ai/types/workflow_result_event_output_data.rb +129 -143
  604. data/lib/vellum_ai/types/workflow_result_event_output_data_array.rb +76 -53
  605. data/lib/vellum_ai/types/workflow_result_event_output_data_chat_history.rb +77 -52
  606. data/lib/vellum_ai/types/workflow_result_event_output_data_error.rb +76 -53
  607. data/lib/vellum_ai/types/workflow_result_event_output_data_function_call.rb +78 -53
  608. data/lib/vellum_ai/types/workflow_result_event_output_data_json.rb +72 -49
  609. data/lib/vellum_ai/types/workflow_result_event_output_data_number.rb +72 -49
  610. data/lib/vellum_ai/types/workflow_result_event_output_data_search_results.rb +77 -52
  611. data/lib/vellum_ai/types/workflow_result_event_output_data_string.rb +71 -48
  612. data/lib/vellum_ai/types/workflow_sandbox_example.rb +77 -0
  613. data/lib/vellum_ai/types/workflow_sandbox_parent_context.rb +108 -0
  614. data/lib/vellum_ai/types/workflow_stream_event.rb +38 -70
  615. data/lib/vellum_ai/types/workspace_read.rb +80 -0
  616. data/lib/vellum_ai/types/workspace_secret_read.rb +88 -0
  617. data/lib/vellum_ai/workflow_deployments/client.rb +534 -66
  618. data/lib/vellum_ai/workflow_deployments/types/list_workflow_release_tags_request_source.rb +12 -0
  619. data/lib/vellum_ai/workflow_deployments/types/workflow_deployments_list_request_status.rb +7 -3
  620. data/lib/vellum_ai/workflow_sandboxes/client.rb +183 -0
  621. data/lib/vellum_ai/workflow_sandboxes/types/list_workflow_sandbox_examples_request_tag.rb +12 -0
  622. data/lib/vellum_ai/workflows/client.rb +169 -0
  623. data/lib/vellum_ai/workspace_secrets/client.rb +159 -0
  624. data/lib/vellum_ai/workspaces/client.rb +92 -0
  625. data/lib/vellum_ai.rb +786 -392
  626. metadata +434 -96
  627. data/lib/vellum_ai/model_versions/client.rb +0 -61
  628. data/lib/vellum_ai/registered_prompts/client.rb +0 -154
  629. data/lib/vellum_ai/types/array_enum.rb +0 -5
  630. data/lib/vellum_ai/types/array_variable_value_item.rb +0 -168
  631. data/lib/vellum_ai/types/block_type_enum.rb +0 -11
  632. data/lib/vellum_ai/types/chat_history_variable_value.rb +0 -49
  633. data/lib/vellum_ai/types/error_enum.rb +0 -5
  634. data/lib/vellum_ai/types/error_variable_value.rb +0 -51
  635. data/lib/vellum_ai/types/execute_prompt_api_error_response.rb +0 -45
  636. data/lib/vellum_ai/types/execute_workflow_error_response.rb +0 -45
  637. data/lib/vellum_ai/types/execute_workflow_stream_error_response.rb +0 -45
  638. data/lib/vellum_ai/types/fulfilled_enum.rb +0 -5
  639. data/lib/vellum_ai/types/fulfilled_function_call.rb +0 -56
  640. data/lib/vellum_ai/types/function_call_enum.rb +0 -5
  641. data/lib/vellum_ai/types/function_call_variable_value.rb +0 -51
  642. data/lib/vellum_ai/types/generate_error_response.rb +0 -45
  643. data/lib/vellum_ai/types/image_variable_value.rb +0 -52
  644. data/lib/vellum_ai/types/initiated_enum.rb +0 -5
  645. data/lib/vellum_ai/types/json_variable_value.rb +0 -45
  646. data/lib/vellum_ai/types/model_version_build_config.rb +0 -66
  647. data/lib/vellum_ai/types/model_version_exec_config.rb +0 -90
  648. data/lib/vellum_ai/types/model_version_exec_config_parameters.rb +0 -98
  649. data/lib/vellum_ai/types/model_version_read.rb +0 -133
  650. data/lib/vellum_ai/types/model_version_read_status_enum.rb +0 -11
  651. data/lib/vellum_ai/types/model_version_sandbox_snapshot.rb +0 -61
  652. data/lib/vellum_ai/types/node_input_compiled_function_call.rb +0 -61
  653. data/lib/vellum_ai/types/node_output_compiled_function_value.rb +0 -56
  654. data/lib/vellum_ai/types/number_enum.rb +0 -5
  655. data/lib/vellum_ai/types/number_variable_value.rb +0 -45
  656. data/lib/vellum_ai/types/processing_state_enum.rb +0 -11
  657. data/lib/vellum_ai/types/prompt_deployment_expand_meta_request_request.rb +0 -74
  658. data/lib/vellum_ai/types/prompt_template_block.rb +0 -62
  659. data/lib/vellum_ai/types/prompt_template_block_data.rb +0 -54
  660. data/lib/vellum_ai/types/prompt_template_block_data_request.rb +0 -54
  661. data/lib/vellum_ai/types/prompt_template_block_properties.rb +0 -110
  662. data/lib/vellum_ai/types/prompt_template_block_properties_request.rb +0 -110
  663. data/lib/vellum_ai/types/prompt_template_block_request.rb +0 -62
  664. data/lib/vellum_ai/types/provider_enum.rb +0 -20
  665. data/lib/vellum_ai/types/register_prompt_error_response.rb +0 -45
  666. data/lib/vellum_ai/types/register_prompt_model_parameters_request.rb +0 -98
  667. data/lib/vellum_ai/types/register_prompt_prompt.rb +0 -50
  668. data/lib/vellum_ai/types/register_prompt_prompt_info_request.rb +0 -60
  669. data/lib/vellum_ai/types/register_prompt_response.rb +0 -110
  670. data/lib/vellum_ai/types/registered_prompt_deployment.rb +0 -55
  671. data/lib/vellum_ai/types/registered_prompt_input_variable_request.rb +0 -56
  672. data/lib/vellum_ai/types/registered_prompt_model_version.rb +0 -50
  673. data/lib/vellum_ai/types/registered_prompt_sandbox.rb +0 -50
  674. data/lib/vellum_ai/types/registered_prompt_sandbox_snapshot.rb +0 -45
  675. data/lib/vellum_ai/types/rejected_enum.rb +0 -5
  676. data/lib/vellum_ai/types/rejected_function_call.rb +0 -62
  677. data/lib/vellum_ai/types/scenario_input_request.rb +0 -70
  678. data/lib/vellum_ai/types/scenario_input_type_enum.rb +0 -6
  679. data/lib/vellum_ai/types/search_error_response.rb +0 -45
  680. data/lib/vellum_ai/types/search_results_enum.rb +0 -5
  681. data/lib/vellum_ai/types/search_results_variable_value.rb +0 -49
  682. data/lib/vellum_ai/types/streaming_enum.rb +0 -5
  683. data/lib/vellum_ai/types/string_enum.rb +0 -5
  684. data/lib/vellum_ai/types/string_variable_value.rb +0 -45
  685. data/lib/vellum_ai/types/submit_completion_actuals_error_response.rb +0 -45
  686. data/lib/vellum_ai/types/subworkflow_enum.rb +0 -5
  687. data/lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_type_enum.rb +0 -5
  688. data/lib/vellum_ai/types/test_suite_run_metric_error_output_type_enum.rb +0 -5
  689. data/lib/vellum_ai/types/test_suite_run_metric_number_output_type_enum.rb +0 -5
  690. data/lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_type_enum.rb +0 -5
  691. data/lib/vellum_ai/types/upload_document_error_response.rb +0 -45
@@ -2,7 +2,11 @@
2
2
 
3
3
  module Vellum
4
4
  module WorkflowDeployments
5
- # @type [WORKFLOW_DEPLOYMENTS_LIST_REQUEST_STATUS]
6
- WORKFLOW_DEPLOYMENTS_LIST_REQUEST_STATUS = { active: "ACTIVE", archived: "ARCHIVED" }.freeze
5
+ class WorkflowDeploymentsListRequestStatus
6
+
7
+ ACTIVE = "ACTIVE"
8
+ ARCHIVED = "ARCHIVED"
9
+
10
+ end
7
11
  end
8
- end
12
+ end
@@ -0,0 +1,183 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../requests"
3
+ require_relative "../types/workflow_deployment_read"
4
+ require_relative "types/list_workflow_sandbox_examples_request_tag"
5
+ require_relative "../types/paginated_workflow_sandbox_example_list"
6
+ require "async"
7
+ require "async"
8
+ require_relative "../../requests"
9
+
10
+ module Vellum
11
+ class WorkflowSandboxesClient
12
+ # @return [Vellum::RequestClient]
13
+ attr_reader :request_client
14
+
15
+
16
+ # @param request_client [Vellum::RequestClient]
17
+ # @return [Vellum::WorkflowSandboxesClient]
18
+ def initialize(request_client:)
19
+ @request_client = request_client
20
+ end
21
+ # @param id [String] A UUID string identifying this workflow sandbox.
22
+ # @param workflow_id [String] An ID identifying the Workflow you'd like to deploy.
23
+ # @param workflow_deployment_id [String] The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot
24
+ # specify both this and workflow_deployment_name. Leave null to create a new
25
+ # Workflow Deployment.
26
+ # @param workflow_deployment_name [String] The unique name of the Workflow Deployment you'd like to either create or
27
+ # update. Cannot specify both this and workflow_deployment_id. If provided and
28
+ # matches an existing Workflow Deployment, that Workflow Deployment will be
29
+ # updated. Otherwise, a new Prompt Deployment will be created.
30
+ # @param label [String] In the event that a new Workflow Deployment is created, this will be the label
31
+ # it's given.
32
+ # @param release_tags [Array<String>] Optionally provide the release tags that you'd like to be associated with the
33
+ # latest release of the created/updated Prompt Deployment.
34
+ # @param release_description [String] Optionally provide a description that details what's new in this Release.
35
+ # @param request_options [Vellum::RequestOptions]
36
+ # @return [Vellum::WorkflowDeploymentRead]
37
+ # @example
38
+ # api = Vellum::Client.new(
39
+ # base_url: "https://api.example.com",
40
+ # environment: Vellum::Environment::PRODUCTION,
41
+ # api_key: "YOUR_API_KEY"
42
+ # )
43
+ # api.workflow_sandboxes.deploy_workflow(id: "id", workflow_id: "workflow_id")
44
+ def deploy_workflow(id:, workflow_id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil)
45
+ response = @request_client.conn.post do | req |
46
+ unless request_options&.timeout_in_seconds.nil?
47
+ req.options.timeout = request_options.timeout_in_seconds
48
+ end
49
+ unless request_options&.api_key.nil?
50
+ req.headers["X-API-KEY"] = request_options.api_key
51
+ end
52
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
53
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
54
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
55
+ end
56
+ req.body = { **(request_options&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: release_tags, release_description: release_description }.compact
57
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/workflows/#{workflow_id}/deploy"
58
+ end
59
+ Vellum::WorkflowDeploymentRead.from_json(json_object: response.body)
60
+ end
61
+ # List Workflow Sandbox examples that were previously cloned into the User's
62
+ # Workspace
63
+ #
64
+ # @param limit [Integer] Number of results to return per page.
65
+ # @param offset [Integer] The initial index from which to return the results.
66
+ # @param ordering [String] Which field to use when ordering the results.
67
+ # @param tag [Vellum::WorkflowSandboxes::ListWorkflowSandboxExamplesRequestTag]
68
+ # @param request_options [Vellum::RequestOptions]
69
+ # @return [Vellum::PaginatedWorkflowSandboxExampleList]
70
+ # @example
71
+ # api = Vellum::Client.new(
72
+ # base_url: "https://api.example.com",
73
+ # environment: Vellum::Environment::PRODUCTION,
74
+ # api_key: "YOUR_API_KEY"
75
+ # )
76
+ # api.workflow_sandboxes.list_workflow_sandbox_examples
77
+ def list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil)
78
+ response = @request_client.conn.get do | req |
79
+ unless request_options&.timeout_in_seconds.nil?
80
+ req.options.timeout = request_options.timeout_in_seconds
81
+ end
82
+ unless request_options&.api_key.nil?
83
+ req.headers["X-API-KEY"] = request_options.api_key
84
+ end
85
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
86
+ req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit, "offset": offset, "ordering": ordering, "tag": tag }.compact
87
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
88
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
89
+ end
90
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/examples"
91
+ end
92
+ Vellum::PaginatedWorkflowSandboxExampleList.from_json(json_object: response.body)
93
+ end
94
+ end
95
+ class AsyncWorkflowSandboxesClient
96
+ # @return [Vellum::AsyncRequestClient]
97
+ attr_reader :request_client
98
+
99
+
100
+ # @param request_client [Vellum::RequestClient]
101
+ # @return [Vellum::AsyncWorkflowSandboxesClient]
102
+ def initialize(request_client:)
103
+ @request_client = request_client
104
+ end
105
+ # @param id [String] A UUID string identifying this workflow sandbox.
106
+ # @param workflow_id [String] An ID identifying the Workflow you'd like to deploy.
107
+ # @param workflow_deployment_id [String] The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot
108
+ # specify both this and workflow_deployment_name. Leave null to create a new
109
+ # Workflow Deployment.
110
+ # @param workflow_deployment_name [String] The unique name of the Workflow Deployment you'd like to either create or
111
+ # update. Cannot specify both this and workflow_deployment_id. If provided and
112
+ # matches an existing Workflow Deployment, that Workflow Deployment will be
113
+ # updated. Otherwise, a new Prompt Deployment will be created.
114
+ # @param label [String] In the event that a new Workflow Deployment is created, this will be the label
115
+ # it's given.
116
+ # @param release_tags [Array<String>] Optionally provide the release tags that you'd like to be associated with the
117
+ # latest release of the created/updated Prompt Deployment.
118
+ # @param release_description [String] Optionally provide a description that details what's new in this Release.
119
+ # @param request_options [Vellum::RequestOptions]
120
+ # @return [Vellum::WorkflowDeploymentRead]
121
+ # @example
122
+ # api = Vellum::Client.new(
123
+ # base_url: "https://api.example.com",
124
+ # environment: Vellum::Environment::PRODUCTION,
125
+ # api_key: "YOUR_API_KEY"
126
+ # )
127
+ # api.workflow_sandboxes.deploy_workflow(id: "id", workflow_id: "workflow_id")
128
+ def deploy_workflow(id:, workflow_id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil)
129
+ Async do
130
+ response = @request_client.conn.post do | req |
131
+ unless request_options&.timeout_in_seconds.nil?
132
+ req.options.timeout = request_options.timeout_in_seconds
133
+ end
134
+ unless request_options&.api_key.nil?
135
+ req.headers["X-API-KEY"] = request_options.api_key
136
+ end
137
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
138
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
139
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
140
+ end
141
+ req.body = { **(request_options&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: release_tags, release_description: release_description }.compact
142
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/workflows/#{workflow_id}/deploy"
143
+ end
144
+ Vellum::WorkflowDeploymentRead.from_json(json_object: response.body)
145
+ end
146
+ end
147
+ # List Workflow Sandbox examples that were previously cloned into the User's
148
+ # Workspace
149
+ #
150
+ # @param limit [Integer] Number of results to return per page.
151
+ # @param offset [Integer] The initial index from which to return the results.
152
+ # @param ordering [String] Which field to use when ordering the results.
153
+ # @param tag [Vellum::WorkflowSandboxes::ListWorkflowSandboxExamplesRequestTag]
154
+ # @param request_options [Vellum::RequestOptions]
155
+ # @return [Vellum::PaginatedWorkflowSandboxExampleList]
156
+ # @example
157
+ # api = Vellum::Client.new(
158
+ # base_url: "https://api.example.com",
159
+ # environment: Vellum::Environment::PRODUCTION,
160
+ # api_key: "YOUR_API_KEY"
161
+ # )
162
+ # api.workflow_sandboxes.list_workflow_sandbox_examples
163
+ def list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil)
164
+ Async do
165
+ response = @request_client.conn.get do | req |
166
+ unless request_options&.timeout_in_seconds.nil?
167
+ req.options.timeout = request_options.timeout_in_seconds
168
+ end
169
+ unless request_options&.api_key.nil?
170
+ req.headers["X-API-KEY"] = request_options.api_key
171
+ end
172
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
173
+ req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit, "offset": offset, "ordering": ordering, "tag": tag }.compact
174
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
175
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
176
+ end
177
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/examples"
178
+ end
179
+ Vellum::PaginatedWorkflowSandboxExampleList.from_json(json_object: response.body)
180
+ end
181
+ end
182
+ end
183
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ module WorkflowSandboxes
5
+ class ListWorkflowSandboxExamplesRequestTag
6
+
7
+ ONBOARDING = "ONBOARDING"
8
+ TEMPLATES = "TEMPLATES"
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,169 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../requests"
3
+ require_relative "../types/workflow_push_deployment_config_request"
4
+ require_relative "../types/workflow_push_response"
5
+ require_relative "../../core/file_utilities"
6
+ require "async"
7
+ require "async"
8
+ require_relative "../../requests"
9
+
10
+ module Vellum
11
+ class WorkflowsClient
12
+ # @return [Vellum::RequestClient]
13
+ attr_reader :request_client
14
+
15
+
16
+ # @param request_client [Vellum::RequestClient]
17
+ # @return [Vellum::WorkflowsClient]
18
+ def initialize(request_client:)
19
+ @request_client = request_client
20
+ end
21
+ # @param id [String] The ID of the Workflow to pull from
22
+ # @param exclude_code [Boolean]
23
+ # @param include_json [Boolean]
24
+ # @param include_sandbox [Boolean]
25
+ # @param strict [Boolean]
26
+ # @param request_options [Vellum::RequestOptions]
27
+ # @yield on_data[chunk, overall_received_bytes, env] Leverage the Faraday on_data callback which
28
+ # will receive tuples of strings, the sum of characters received so far, and the
29
+ # response environment. The latter will allow access to the response status,
30
+ # headers and reason, as well as the request info.
31
+ # @return [Void]
32
+ def pull(id:, exclude_code: nil, include_json: nil, include_sandbox: nil, strict: nil, request_options: nil, &on_data)
33
+ response = @request_client.conn.get do | req |
34
+ unless request_options&.timeout_in_seconds.nil?
35
+ req.options.timeout = request_options.timeout_in_seconds
36
+ end
37
+ unless request_options&.api_key.nil?
38
+ req.headers["X-API-KEY"] = request_options.api_key
39
+ end
40
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
41
+ req.options.on_data = on_data
42
+ req.params = { **(request_options&.additional_query_parameters || {}), "exclude_code": exclude_code, "include_json": include_json, "include_sandbox": include_sandbox, "strict": strict }.compact
43
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
44
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
45
+ end
46
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/#{id}/pull"
47
+ end
48
+ end
49
+ # @param exec_config [String] The execution configuration of the workflow.
50
+ # @param workflow_sandbox_id [String]
51
+ # @param deployment_config [Hash] Request of type Vellum::WorkflowPushDeploymentConfigRequest, as a Hash
52
+ # * :label (String)
53
+ # * :name (String)
54
+ # * :description (String)
55
+ # * :release_tags (Array<String>)
56
+ # @param artifact [String, IO]
57
+ # @param dry_run [Boolean]
58
+ # @param strict [Boolean]
59
+ # @param request_options [Vellum::RequestOptions]
60
+ # @return [Vellum::WorkflowPushResponse]
61
+ # @example
62
+ # api = Vellum::Client.new(
63
+ # base_url: "https://api.example.com",
64
+ # environment: Vellum::Environment::PRODUCTION,
65
+ # api_key: "YOUR_API_KEY"
66
+ # )
67
+ # api.workflows.push(artifact: my_file.txt)
68
+ def push(exec_config:, workflow_sandbox_id: nil, deployment_config: nil, artifact: nil, dry_run: nil, strict: nil, request_options: nil)
69
+ response = @request_client.conn.post do | req |
70
+ unless request_options&.timeout_in_seconds.nil?
71
+ req.options.timeout = request_options.timeout_in_seconds
72
+ end
73
+ unless request_options&.api_key.nil?
74
+ req.headers["X-API-KEY"] = request_options.api_key
75
+ end
76
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
77
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
78
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
79
+ end
80
+ req.body = { **(request_options&.additional_body_parameters || {}), exec_config: exec_config, workflow_sandbox_id: workflow_sandbox_id, deployment_config: deployment_config, artifact: unless artifact.nil?
81
+ Vellum::FileUtilities.as_faraday_multipart(file_like: artifact)
82
+ end, dry_run: dry_run, strict: strict }.compact
83
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/push"
84
+ end
85
+ Vellum::WorkflowPushResponse.from_json(json_object: response.body)
86
+ end
87
+ end
88
+ class AsyncWorkflowsClient
89
+ # @return [Vellum::AsyncRequestClient]
90
+ attr_reader :request_client
91
+
92
+
93
+ # @param request_client [Vellum::RequestClient]
94
+ # @return [Vellum::AsyncWorkflowsClient]
95
+ def initialize(request_client:)
96
+ @request_client = request_client
97
+ end
98
+ # @param id [String] The ID of the Workflow to pull from
99
+ # @param exclude_code [Boolean]
100
+ # @param include_json [Boolean]
101
+ # @param include_sandbox [Boolean]
102
+ # @param strict [Boolean]
103
+ # @param request_options [Vellum::RequestOptions]
104
+ # @yield on_data[chunk, overall_received_bytes, env] Leverage the Faraday on_data callback which
105
+ # will receive tuples of strings, the sum of characters received so far, and the
106
+ # response environment. The latter will allow access to the response status,
107
+ # headers and reason, as well as the request info.
108
+ # @return [Void]
109
+ def pull(id:, exclude_code: nil, include_json: nil, include_sandbox: nil, strict: nil, request_options: nil, &on_data)
110
+ Async do
111
+ response = @request_client.conn.get do | req |
112
+ unless request_options&.timeout_in_seconds.nil?
113
+ req.options.timeout = request_options.timeout_in_seconds
114
+ end
115
+ unless request_options&.api_key.nil?
116
+ req.headers["X-API-KEY"] = request_options.api_key
117
+ end
118
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
119
+ req.options.on_data = on_data
120
+ req.params = { **(request_options&.additional_query_parameters || {}), "exclude_code": exclude_code, "include_json": include_json, "include_sandbox": include_sandbox, "strict": strict }.compact
121
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
122
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
123
+ end
124
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/#{id}/pull"
125
+ end
126
+ end
127
+ end
128
+ # @param exec_config [String] The execution configuration of the workflow.
129
+ # @param workflow_sandbox_id [String]
130
+ # @param deployment_config [Hash] Request of type Vellum::WorkflowPushDeploymentConfigRequest, as a Hash
131
+ # * :label (String)
132
+ # * :name (String)
133
+ # * :description (String)
134
+ # * :release_tags (Array<String>)
135
+ # @param artifact [String, IO]
136
+ # @param dry_run [Boolean]
137
+ # @param strict [Boolean]
138
+ # @param request_options [Vellum::RequestOptions]
139
+ # @return [Vellum::WorkflowPushResponse]
140
+ # @example
141
+ # api = Vellum::Client.new(
142
+ # base_url: "https://api.example.com",
143
+ # environment: Vellum::Environment::PRODUCTION,
144
+ # api_key: "YOUR_API_KEY"
145
+ # )
146
+ # api.workflows.push(artifact: my_file.txt)
147
+ def push(exec_config:, workflow_sandbox_id: nil, deployment_config: nil, artifact: nil, dry_run: nil, strict: nil, request_options: nil)
148
+ Async do
149
+ response = @request_client.conn.post do | req |
150
+ unless request_options&.timeout_in_seconds.nil?
151
+ req.options.timeout = request_options.timeout_in_seconds
152
+ end
153
+ unless request_options&.api_key.nil?
154
+ req.headers["X-API-KEY"] = request_options.api_key
155
+ end
156
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
157
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
158
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
159
+ end
160
+ req.body = { **(request_options&.additional_body_parameters || {}), exec_config: exec_config, workflow_sandbox_id: workflow_sandbox_id, deployment_config: deployment_config, artifact: unless artifact.nil?
161
+ Vellum::FileUtilities.as_faraday_multipart(file_like: artifact)
162
+ end, dry_run: dry_run, strict: strict }.compact
163
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/push"
164
+ end
165
+ Vellum::WorkflowPushResponse.from_json(json_object: response.body)
166
+ end
167
+ end
168
+ end
169
+ end
@@ -0,0 +1,159 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../requests"
3
+ require_relative "../types/workspace_secret_read"
4
+ require "async"
5
+ require "async"
6
+ require_relative "../../requests"
7
+
8
+ module Vellum
9
+ class WorkspaceSecretsClient
10
+ # @return [Vellum::RequestClient]
11
+ attr_reader :request_client
12
+
13
+
14
+ # @param request_client [Vellum::RequestClient]
15
+ # @return [Vellum::WorkspaceSecretsClient]
16
+ def initialize(request_client:)
17
+ @request_client = request_client
18
+ end
19
+ # Used to retrieve a Workspace Secret given its ID or name.
20
+ #
21
+ # @param id [String] Either the Workspace Secret's ID or its unique name
22
+ # @param request_options [Vellum::RequestOptions]
23
+ # @return [Vellum::WorkspaceSecretRead]
24
+ # @example
25
+ # api = Vellum::Client.new(
26
+ # base_url: "https://api.example.com",
27
+ # environment: Vellum::Environment::PRODUCTION,
28
+ # api_key: "YOUR_API_KEY"
29
+ # )
30
+ # api.workspace_secrets.retrieve(id: "id")
31
+ def retrieve(id:, request_options: nil)
32
+ response = @request_client.conn.get do | req |
33
+ unless request_options&.timeout_in_seconds.nil?
34
+ req.options.timeout = request_options.timeout_in_seconds
35
+ end
36
+ unless request_options&.api_key.nil?
37
+ req.headers["X-API-KEY"] = request_options.api_key
38
+ end
39
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
40
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
41
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
42
+ end
43
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
44
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
45
+ end
46
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspace-secrets/#{id}"
47
+ end
48
+ Vellum::WorkspaceSecretRead.from_json(json_object: response.body)
49
+ end
50
+ # Used to update a Workspace Secret given its ID or name.
51
+ #
52
+ # @param id [String] Either the Workspace Secret's ID or its unique name
53
+ # @param label [String]
54
+ # @param value [String]
55
+ # @param request_options [Vellum::RequestOptions]
56
+ # @return [Vellum::WorkspaceSecretRead]
57
+ # @example
58
+ # api = Vellum::Client.new(
59
+ # base_url: "https://api.example.com",
60
+ # environment: Vellum::Environment::PRODUCTION,
61
+ # api_key: "YOUR_API_KEY"
62
+ # )
63
+ # api.workspace_secrets.partial_update(id: "id")
64
+ def partial_update(id:, label: nil, value: nil, request_options: nil)
65
+ response = @request_client.conn.patch do | req |
66
+ unless request_options&.timeout_in_seconds.nil?
67
+ req.options.timeout = request_options.timeout_in_seconds
68
+ end
69
+ unless request_options&.api_key.nil?
70
+ req.headers["X-API-KEY"] = request_options.api_key
71
+ end
72
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
73
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
74
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
75
+ end
76
+ req.body = { **(request_options&.additional_body_parameters || {}), label: label, value: value }.compact
77
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspace-secrets/#{id}"
78
+ end
79
+ Vellum::WorkspaceSecretRead.from_json(json_object: response.body)
80
+ end
81
+ end
82
+ class AsyncWorkspaceSecretsClient
83
+ # @return [Vellum::AsyncRequestClient]
84
+ attr_reader :request_client
85
+
86
+
87
+ # @param request_client [Vellum::RequestClient]
88
+ # @return [Vellum::AsyncWorkspaceSecretsClient]
89
+ def initialize(request_client:)
90
+ @request_client = request_client
91
+ end
92
+ # Used to retrieve a Workspace Secret given its ID or name.
93
+ #
94
+ # @param id [String] Either the Workspace Secret's ID or its unique name
95
+ # @param request_options [Vellum::RequestOptions]
96
+ # @return [Vellum::WorkspaceSecretRead]
97
+ # @example
98
+ # api = Vellum::Client.new(
99
+ # base_url: "https://api.example.com",
100
+ # environment: Vellum::Environment::PRODUCTION,
101
+ # api_key: "YOUR_API_KEY"
102
+ # )
103
+ # api.workspace_secrets.retrieve(id: "id")
104
+ def retrieve(id:, request_options: nil)
105
+ Async do
106
+ response = @request_client.conn.get do | req |
107
+ unless request_options&.timeout_in_seconds.nil?
108
+ req.options.timeout = request_options.timeout_in_seconds
109
+ end
110
+ unless request_options&.api_key.nil?
111
+ req.headers["X-API-KEY"] = request_options.api_key
112
+ end
113
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
114
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
115
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
116
+ end
117
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
118
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
119
+ end
120
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspace-secrets/#{id}"
121
+ end
122
+ Vellum::WorkspaceSecretRead.from_json(json_object: response.body)
123
+ end
124
+ end
125
+ # Used to update a Workspace Secret given its ID or name.
126
+ #
127
+ # @param id [String] Either the Workspace Secret's ID or its unique name
128
+ # @param label [String]
129
+ # @param value [String]
130
+ # @param request_options [Vellum::RequestOptions]
131
+ # @return [Vellum::WorkspaceSecretRead]
132
+ # @example
133
+ # api = Vellum::Client.new(
134
+ # base_url: "https://api.example.com",
135
+ # environment: Vellum::Environment::PRODUCTION,
136
+ # api_key: "YOUR_API_KEY"
137
+ # )
138
+ # api.workspace_secrets.partial_update(id: "id")
139
+ def partial_update(id:, label: nil, value: nil, request_options: nil)
140
+ Async do
141
+ response = @request_client.conn.patch do | req |
142
+ unless request_options&.timeout_in_seconds.nil?
143
+ req.options.timeout = request_options.timeout_in_seconds
144
+ end
145
+ unless request_options&.api_key.nil?
146
+ req.headers["X-API-KEY"] = request_options.api_key
147
+ end
148
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
149
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
150
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
151
+ end
152
+ req.body = { **(request_options&.additional_body_parameters || {}), label: label, value: value }.compact
153
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspace-secrets/#{id}"
154
+ end
155
+ Vellum::WorkspaceSecretRead.from_json(json_object: response.body)
156
+ end
157
+ end
158
+ end
159
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../requests"
3
+ require_relative "../types/workspace_read"
4
+ require "async"
5
+ require_relative "../../requests"
6
+
7
+ module Vellum
8
+ class WorkspacesClient
9
+ # @return [Vellum::RequestClient]
10
+ attr_reader :request_client
11
+
12
+
13
+ # @param request_client [Vellum::RequestClient]
14
+ # @return [Vellum::WorkspacesClient]
15
+ def initialize(request_client:)
16
+ @request_client = request_client
17
+ end
18
+ # Retrieves information about the active Workspace
19
+ #
20
+ # @param request_options [Vellum::RequestOptions]
21
+ # @return [Vellum::WorkspaceRead]
22
+ # @example
23
+ # api = Vellum::Client.new(
24
+ # base_url: "https://api.example.com",
25
+ # environment: Vellum::Environment::PRODUCTION,
26
+ # api_key: "YOUR_API_KEY"
27
+ # )
28
+ # api.workspaces.workspace_identity
29
+ def workspace_identity(request_options: nil)
30
+ response = @request_client.conn.get do | req |
31
+ unless request_options&.timeout_in_seconds.nil?
32
+ req.options.timeout = request_options.timeout_in_seconds
33
+ end
34
+ unless request_options&.api_key.nil?
35
+ req.headers["X-API-KEY"] = request_options.api_key
36
+ end
37
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
38
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
39
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
40
+ end
41
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
42
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
43
+ end
44
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspaces/identity"
45
+ end
46
+ Vellum::WorkspaceRead.from_json(json_object: response.body)
47
+ end
48
+ end
49
+ class AsyncWorkspacesClient
50
+ # @return [Vellum::AsyncRequestClient]
51
+ attr_reader :request_client
52
+
53
+
54
+ # @param request_client [Vellum::RequestClient]
55
+ # @return [Vellum::AsyncWorkspacesClient]
56
+ def initialize(request_client:)
57
+ @request_client = request_client
58
+ end
59
+ # Retrieves information about the active Workspace
60
+ #
61
+ # @param request_options [Vellum::RequestOptions]
62
+ # @return [Vellum::WorkspaceRead]
63
+ # @example
64
+ # api = Vellum::Client.new(
65
+ # base_url: "https://api.example.com",
66
+ # environment: Vellum::Environment::PRODUCTION,
67
+ # api_key: "YOUR_API_KEY"
68
+ # )
69
+ # api.workspaces.workspace_identity
70
+ def workspace_identity(request_options: nil)
71
+ Async do
72
+ response = @request_client.conn.get do | req |
73
+ unless request_options&.timeout_in_seconds.nil?
74
+ req.options.timeout = request_options.timeout_in_seconds
75
+ end
76
+ unless request_options&.api_key.nil?
77
+ req.headers["X-API-KEY"] = request_options.api_key
78
+ end
79
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
80
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
81
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
82
+ end
83
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
84
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
85
+ end
86
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workspaces/identity"
87
+ end
88
+ Vellum::WorkspaceRead.from_json(json_object: response.body)
89
+ end
90
+ end
91
+ end
92
+ end