vellum_ai 0.3.4

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 (269) hide show
  1. checksums.yaml +7 -0
  2. data/lib/core/file_utilities.rb +26 -0
  3. data/lib/environment.rb +11 -0
  4. data/lib/gemconfig.rb +14 -0
  5. data/lib/requests.rb +88 -0
  6. data/lib/types_export.rb +255 -0
  7. data/lib/vellum_ai/deployments/client.rb +157 -0
  8. data/lib/vellum_ai/deployments/types/deployments_list_request_status.rb +8 -0
  9. data/lib/vellum_ai/document_indexes/client.rb +135 -0
  10. data/lib/vellum_ai/documents/client.rb +245 -0
  11. data/lib/vellum_ai/model_versions/client.rb +61 -0
  12. data/lib/vellum_ai/registered_prompts/client.rb +154 -0
  13. data/lib/vellum_ai/sandboxes/client.rb +132 -0
  14. data/lib/vellum_ai/test_suites/client.rb +130 -0
  15. data/lib/vellum_ai/types/api_node_result.rb +52 -0
  16. data/lib/vellum_ai/types/api_node_result_data.rb +80 -0
  17. data/lib/vellum_ai/types/array_chat_message_content.rb +50 -0
  18. data/lib/vellum_ai/types/array_chat_message_content_item.rb +103 -0
  19. data/lib/vellum_ai/types/array_chat_message_content_item_request.rb +103 -0
  20. data/lib/vellum_ai/types/array_chat_message_content_request.rb +50 -0
  21. data/lib/vellum_ai/types/block_type_enum.rb +11 -0
  22. data/lib/vellum_ai/types/chat_history_enum.rb +5 -0
  23. data/lib/vellum_ai/types/chat_history_input_request.rb +55 -0
  24. data/lib/vellum_ai/types/chat_message.rb +62 -0
  25. data/lib/vellum_ai/types/chat_message_content.rb +116 -0
  26. data/lib/vellum_ai/types/chat_message_content_request.rb +116 -0
  27. data/lib/vellum_ai/types/chat_message_request.rb +62 -0
  28. data/lib/vellum_ai/types/chat_message_role.rb +6 -0
  29. data/lib/vellum_ai/types/code_execution_node_chat_history_result.rb +54 -0
  30. data/lib/vellum_ai/types/code_execution_node_error_result.rb +56 -0
  31. data/lib/vellum_ai/types/code_execution_node_json_result.rb +50 -0
  32. data/lib/vellum_ai/types/code_execution_node_number_result.rb +50 -0
  33. data/lib/vellum_ai/types/code_execution_node_result.rb +52 -0
  34. data/lib/vellum_ai/types/code_execution_node_result_data.rb +51 -0
  35. data/lib/vellum_ai/types/code_execution_node_result_output.rb +142 -0
  36. data/lib/vellum_ai/types/code_execution_node_search_results_result.rb +54 -0
  37. data/lib/vellum_ai/types/code_execution_node_string_result.rb +50 -0
  38. data/lib/vellum_ai/types/conditional_node_result.rb +52 -0
  39. data/lib/vellum_ai/types/conditional_node_result_data.rb +45 -0
  40. data/lib/vellum_ai/types/deployment_provider_payload_response.rb +45 -0
  41. data/lib/vellum_ai/types/deployment_read.rb +115 -0
  42. data/lib/vellum_ai/types/document_document_to_document_index.rb +70 -0
  43. data/lib/vellum_ai/types/document_index_read.rb +98 -0
  44. data/lib/vellum_ai/types/document_read.rb +121 -0
  45. data/lib/vellum_ai/types/document_status.rb +5 -0
  46. data/lib/vellum_ai/types/enriched_normalized_completion.rb +118 -0
  47. data/lib/vellum_ai/types/entity_status.rb +6 -0
  48. data/lib/vellum_ai/types/environment_enum.rb +6 -0
  49. data/lib/vellum_ai/types/error_enum.rb +5 -0
  50. data/lib/vellum_ai/types/error_variable_value.rb +51 -0
  51. data/lib/vellum_ai/types/execute_prompt_api_error_response.rb +45 -0
  52. data/lib/vellum_ai/types/execute_prompt_event.rb +116 -0
  53. data/lib/vellum_ai/types/execute_prompt_response.rb +90 -0
  54. data/lib/vellum_ai/types/execute_workflow_error_response.rb +45 -0
  55. data/lib/vellum_ai/types/execute_workflow_response.rb +67 -0
  56. data/lib/vellum_ai/types/execute_workflow_stream_error_response.rb +45 -0
  57. data/lib/vellum_ai/types/execute_workflow_workflow_result_event.rb +90 -0
  58. data/lib/vellum_ai/types/finish_reason_enum.rb +6 -0
  59. data/lib/vellum_ai/types/fulfilled_enum.rb +5 -0
  60. data/lib/vellum_ai/types/fulfilled_execute_prompt_event.rb +66 -0
  61. data/lib/vellum_ai/types/fulfilled_execute_prompt_response.rb +71 -0
  62. data/lib/vellum_ai/types/fulfilled_execute_workflow_workflow_result_event.rb +61 -0
  63. data/lib/vellum_ai/types/fulfilled_function_call.rb +56 -0
  64. data/lib/vellum_ai/types/fulfilled_prompt_execution_meta.rb +52 -0
  65. data/lib/vellum_ai/types/fulfilled_workflow_node_result_event.rb +90 -0
  66. data/lib/vellum_ai/types/function_call.rb +90 -0
  67. data/lib/vellum_ai/types/function_call_chat_message_content.rb +52 -0
  68. data/lib/vellum_ai/types/function_call_chat_message_content_request.rb +52 -0
  69. data/lib/vellum_ai/types/function_call_chat_message_content_value.rb +56 -0
  70. data/lib/vellum_ai/types/function_call_chat_message_content_value_request.rb +56 -0
  71. data/lib/vellum_ai/types/function_call_enum.rb +5 -0
  72. data/lib/vellum_ai/types/function_call_variable_value.rb +51 -0
  73. data/lib/vellum_ai/types/generate_error_response.rb +45 -0
  74. data/lib/vellum_ai/types/generate_options_request.rb +50 -0
  75. data/lib/vellum_ai/types/generate_request.rb +60 -0
  76. data/lib/vellum_ai/types/generate_response.rb +49 -0
  77. data/lib/vellum_ai/types/generate_result.rb +62 -0
  78. data/lib/vellum_ai/types/generate_result_data.rb +49 -0
  79. data/lib/vellum_ai/types/generate_result_error.rb +45 -0
  80. data/lib/vellum_ai/types/generate_stream_response.rb +51 -0
  81. data/lib/vellum_ai/types/generate_stream_result.rb +67 -0
  82. data/lib/vellum_ai/types/generate_stream_result_data.rb +56 -0
  83. data/lib/vellum_ai/types/image_chat_message_content.rb +52 -0
  84. data/lib/vellum_ai/types/image_chat_message_content_request.rb +52 -0
  85. data/lib/vellum_ai/types/image_enum.rb +5 -0
  86. data/lib/vellum_ai/types/indexing_state_enum.rb +12 -0
  87. data/lib/vellum_ai/types/initiated_enum.rb +5 -0
  88. data/lib/vellum_ai/types/initiated_execute_prompt_event.rb +57 -0
  89. data/lib/vellum_ai/types/initiated_prompt_execution_meta.rb +68 -0
  90. data/lib/vellum_ai/types/initiated_workflow_node_result_event.rb +90 -0
  91. data/lib/vellum_ai/types/json_enum.rb +5 -0
  92. data/lib/vellum_ai/types/json_input_request.rb +51 -0
  93. data/lib/vellum_ai/types/json_variable_value.rb +45 -0
  94. data/lib/vellum_ai/types/logical_operator.rb +25 -0
  95. data/lib/vellum_ai/types/logprobs_enum.rb +6 -0
  96. data/lib/vellum_ai/types/metadata_filter_config_request.rb +85 -0
  97. data/lib/vellum_ai/types/metadata_filter_rule_combinator.rb +6 -0
  98. data/lib/vellum_ai/types/metadata_filter_rule_request.rb +84 -0
  99. data/lib/vellum_ai/types/model_version_build_config.rb +66 -0
  100. data/lib/vellum_ai/types/model_version_exec_config.rb +90 -0
  101. data/lib/vellum_ai/types/model_version_exec_config_parameters.rb +98 -0
  102. data/lib/vellum_ai/types/model_version_read.rb +133 -0
  103. data/lib/vellum_ai/types/model_version_read_status_enum.rb +11 -0
  104. data/lib/vellum_ai/types/model_version_sandbox_snapshot.rb +61 -0
  105. data/lib/vellum_ai/types/named_test_case_chat_history_variable_value_request.rb +54 -0
  106. data/lib/vellum_ai/types/named_test_case_error_variable_value_request.rb +56 -0
  107. data/lib/vellum_ai/types/named_test_case_json_variable_value_request.rb +50 -0
  108. data/lib/vellum_ai/types/named_test_case_number_variable_value_request.rb +50 -0
  109. data/lib/vellum_ai/types/named_test_case_search_results_variable_value_request.rb +54 -0
  110. data/lib/vellum_ai/types/named_test_case_string_variable_value_request.rb +50 -0
  111. data/lib/vellum_ai/types/named_test_case_variable_value_request.rb +142 -0
  112. data/lib/vellum_ai/types/node_input_compiled_chat_history_value.rb +59 -0
  113. data/lib/vellum_ai/types/node_input_compiled_error_value.rb +61 -0
  114. data/lib/vellum_ai/types/node_input_compiled_json_value.rb +55 -0
  115. data/lib/vellum_ai/types/node_input_compiled_number_value.rb +55 -0
  116. data/lib/vellum_ai/types/node_input_compiled_search_results_value.rb +59 -0
  117. data/lib/vellum_ai/types/node_input_compiled_string_value.rb +55 -0
  118. data/lib/vellum_ai/types/node_input_variable_compiled_value.rb +142 -0
  119. data/lib/vellum_ai/types/node_output_compiled_chat_history_value.rb +54 -0
  120. data/lib/vellum_ai/types/node_output_compiled_error_value.rb +56 -0
  121. data/lib/vellum_ai/types/node_output_compiled_json_value.rb +50 -0
  122. data/lib/vellum_ai/types/node_output_compiled_number_value.rb +50 -0
  123. data/lib/vellum_ai/types/node_output_compiled_search_results_value.rb +54 -0
  124. data/lib/vellum_ai/types/node_output_compiled_string_value.rb +50 -0
  125. data/lib/vellum_ai/types/node_output_compiled_value.rb +142 -0
  126. data/lib/vellum_ai/types/normalized_log_probs.rb +54 -0
  127. data/lib/vellum_ai/types/normalized_token_log_probs.rb +61 -0
  128. data/lib/vellum_ai/types/number_enum.rb +5 -0
  129. data/lib/vellum_ai/types/paginated_slim_deployment_read_list.rb +64 -0
  130. data/lib/vellum_ai/types/paginated_slim_document_list.rb +64 -0
  131. data/lib/vellum_ai/types/paginated_slim_workflow_deployment_list.rb +64 -0
  132. data/lib/vellum_ai/types/processing_failure_reason_enum.rb +9 -0
  133. data/lib/vellum_ai/types/processing_state_enum.rb +11 -0
  134. data/lib/vellum_ai/types/prompt_deployment_expand_meta_request_request.rb +74 -0
  135. data/lib/vellum_ai/types/prompt_deployment_input_request.rb +103 -0
  136. data/lib/vellum_ai/types/prompt_execution_meta.rb +76 -0
  137. data/lib/vellum_ai/types/prompt_node_result.rb +52 -0
  138. data/lib/vellum_ai/types/prompt_node_result_data.rb +55 -0
  139. data/lib/vellum_ai/types/prompt_output.rb +116 -0
  140. data/lib/vellum_ai/types/prompt_template_block.rb +62 -0
  141. data/lib/vellum_ai/types/prompt_template_block_data.rb +54 -0
  142. data/lib/vellum_ai/types/prompt_template_block_data_request.rb +54 -0
  143. data/lib/vellum_ai/types/prompt_template_block_properties.rb +104 -0
  144. data/lib/vellum_ai/types/prompt_template_block_properties_request.rb +104 -0
  145. data/lib/vellum_ai/types/prompt_template_block_request.rb +62 -0
  146. data/lib/vellum_ai/types/provider_enum.rb +20 -0
  147. data/lib/vellum_ai/types/raw_prompt_execution_overrides_request.rb +55 -0
  148. data/lib/vellum_ai/types/register_prompt_error_response.rb +45 -0
  149. data/lib/vellum_ai/types/register_prompt_model_parameters_request.rb +98 -0
  150. data/lib/vellum_ai/types/register_prompt_prompt.rb +50 -0
  151. data/lib/vellum_ai/types/register_prompt_prompt_info_request.rb +60 -0
  152. data/lib/vellum_ai/types/register_prompt_response.rb +110 -0
  153. data/lib/vellum_ai/types/registered_prompt_deployment.rb +55 -0
  154. data/lib/vellum_ai/types/registered_prompt_input_variable_request.rb +56 -0
  155. data/lib/vellum_ai/types/registered_prompt_model_version.rb +50 -0
  156. data/lib/vellum_ai/types/registered_prompt_sandbox.rb +50 -0
  157. data/lib/vellum_ai/types/registered_prompt_sandbox_snapshot.rb +45 -0
  158. data/lib/vellum_ai/types/rejected_enum.rb +5 -0
  159. data/lib/vellum_ai/types/rejected_execute_prompt_event.rb +68 -0
  160. data/lib/vellum_ai/types/rejected_execute_prompt_response.rb +73 -0
  161. data/lib/vellum_ai/types/rejected_execute_workflow_workflow_result_event.rb +63 -0
  162. data/lib/vellum_ai/types/rejected_function_call.rb +62 -0
  163. data/lib/vellum_ai/types/rejected_prompt_execution_meta.rb +52 -0
  164. data/lib/vellum_ai/types/rejected_workflow_node_result_event.rb +92 -0
  165. data/lib/vellum_ai/types/sandbox_scenario.rb +59 -0
  166. data/lib/vellum_ai/types/scenario_input.rb +70 -0
  167. data/lib/vellum_ai/types/scenario_input_request.rb +70 -0
  168. data/lib/vellum_ai/types/scenario_input_type_enum.rb +6 -0
  169. data/lib/vellum_ai/types/search_error_response.rb +45 -0
  170. data/lib/vellum_ai/types/search_filters_request.rb +56 -0
  171. data/lib/vellum_ai/types/search_node_result.rb +52 -0
  172. data/lib/vellum_ai/types/search_node_result_data.rb +70 -0
  173. data/lib/vellum_ai/types/search_request_options_request.rb +79 -0
  174. data/lib/vellum_ai/types/search_response.rb +49 -0
  175. data/lib/vellum_ai/types/search_result.rb +66 -0
  176. data/lib/vellum_ai/types/search_result_document.rb +60 -0
  177. data/lib/vellum_ai/types/search_result_document_request.rb +55 -0
  178. data/lib/vellum_ai/types/search_result_merging_request.rb +45 -0
  179. data/lib/vellum_ai/types/search_result_request.rb +66 -0
  180. data/lib/vellum_ai/types/search_results_enum.rb +5 -0
  181. data/lib/vellum_ai/types/search_weights_request.rb +50 -0
  182. data/lib/vellum_ai/types/slim_deployment_read.rb +109 -0
  183. data/lib/vellum_ai/types/slim_document.rb +126 -0
  184. data/lib/vellum_ai/types/slim_workflow_deployment.rb +118 -0
  185. data/lib/vellum_ai/types/streaming_enum.rb +5 -0
  186. data/lib/vellum_ai/types/streaming_execute_prompt_event.rb +85 -0
  187. data/lib/vellum_ai/types/streaming_prompt_execution_meta.rb +46 -0
  188. data/lib/vellum_ai/types/streaming_workflow_node_result_event.rb +99 -0
  189. data/lib/vellum_ai/types/string_chat_message_content.rb +46 -0
  190. data/lib/vellum_ai/types/string_chat_message_content_request.rb +46 -0
  191. data/lib/vellum_ai/types/string_enum.rb +5 -0
  192. data/lib/vellum_ai/types/string_input_request.rb +51 -0
  193. data/lib/vellum_ai/types/string_variable_value.rb +45 -0
  194. data/lib/vellum_ai/types/submit_completion_actual_request.rb +67 -0
  195. data/lib/vellum_ai/types/submit_completion_actuals_error_response.rb +45 -0
  196. data/lib/vellum_ai/types/submit_workflow_execution_actual_request.rb +103 -0
  197. data/lib/vellum_ai/types/templating_node_chat_history_result.rb +54 -0
  198. data/lib/vellum_ai/types/templating_node_error_result.rb +56 -0
  199. data/lib/vellum_ai/types/templating_node_json_result.rb +50 -0
  200. data/lib/vellum_ai/types/templating_node_number_result.rb +50 -0
  201. data/lib/vellum_ai/types/templating_node_result.rb +52 -0
  202. data/lib/vellum_ai/types/templating_node_result_data.rb +51 -0
  203. data/lib/vellum_ai/types/templating_node_result_output.rb +142 -0
  204. data/lib/vellum_ai/types/templating_node_search_results_result.rb +54 -0
  205. data/lib/vellum_ai/types/templating_node_string_result.rb +50 -0
  206. data/lib/vellum_ai/types/terminal_node_chat_history_result.rb +59 -0
  207. data/lib/vellum_ai/types/terminal_node_error_result.rb +61 -0
  208. data/lib/vellum_ai/types/terminal_node_json_result.rb +55 -0
  209. data/lib/vellum_ai/types/terminal_node_number_result.rb +55 -0
  210. data/lib/vellum_ai/types/terminal_node_result.rb +52 -0
  211. data/lib/vellum_ai/types/terminal_node_result_data.rb +51 -0
  212. data/lib/vellum_ai/types/terminal_node_result_output.rb +142 -0
  213. data/lib/vellum_ai/types/terminal_node_search_results_result.rb +59 -0
  214. data/lib/vellum_ai/types/terminal_node_string_result.rb +55 -0
  215. data/lib/vellum_ai/types/test_case_chat_history_variable_value.rb +54 -0
  216. data/lib/vellum_ai/types/test_case_error_variable_value.rb +56 -0
  217. data/lib/vellum_ai/types/test_case_json_variable_value.rb +50 -0
  218. data/lib/vellum_ai/types/test_case_number_variable_value.rb +50 -0
  219. data/lib/vellum_ai/types/test_case_search_results_variable_value.rb +54 -0
  220. data/lib/vellum_ai/types/test_case_string_variable_value.rb +50 -0
  221. data/lib/vellum_ai/types/test_case_variable_value.rb +142 -0
  222. data/lib/vellum_ai/types/test_suite_test_case.rb +68 -0
  223. data/lib/vellum_ai/types/upload_document_error_response.rb +45 -0
  224. data/lib/vellum_ai/types/upload_document_response.rb +45 -0
  225. data/lib/vellum_ai/types/vellum_error.rb +51 -0
  226. data/lib/vellum_ai/types/vellum_error_code_enum.rb +10 -0
  227. data/lib/vellum_ai/types/vellum_error_request.rb +51 -0
  228. data/lib/vellum_ai/types/vellum_image.rb +50 -0
  229. data/lib/vellum_ai/types/vellum_image_request.rb +50 -0
  230. data/lib/vellum_ai/types/vellum_variable.rb +56 -0
  231. data/lib/vellum_ai/types/vellum_variable_type.rb +16 -0
  232. data/lib/vellum_ai/types/workflow_event_error.rb +51 -0
  233. data/lib/vellum_ai/types/workflow_execution_actual_chat_history_request.rb +77 -0
  234. data/lib/vellum_ai/types/workflow_execution_actual_json_request.rb +73 -0
  235. data/lib/vellum_ai/types/workflow_execution_actual_string_request.rb +73 -0
  236. data/lib/vellum_ai/types/workflow_execution_event_error_code.rb +13 -0
  237. data/lib/vellum_ai/types/workflow_execution_event_type.rb +6 -0
  238. data/lib/vellum_ai/types/workflow_execution_node_result_event.rb +68 -0
  239. data/lib/vellum_ai/types/workflow_execution_workflow_result_event.rb +68 -0
  240. data/lib/vellum_ai/types/workflow_node_result_data.rb +155 -0
  241. data/lib/vellum_ai/types/workflow_node_result_event.rb +116 -0
  242. data/lib/vellum_ai/types/workflow_node_result_event_state.rb +11 -0
  243. data/lib/vellum_ai/types/workflow_output.rb +168 -0
  244. data/lib/vellum_ai/types/workflow_output_chat_history.rb +60 -0
  245. data/lib/vellum_ai/types/workflow_output_error.rb +62 -0
  246. data/lib/vellum_ai/types/workflow_output_function_call.rb +62 -0
  247. data/lib/vellum_ai/types/workflow_output_image.rb +62 -0
  248. data/lib/vellum_ai/types/workflow_output_json.rb +56 -0
  249. data/lib/vellum_ai/types/workflow_output_number.rb +56 -0
  250. data/lib/vellum_ai/types/workflow_output_search_results.rb +60 -0
  251. data/lib/vellum_ai/types/workflow_output_string.rb +56 -0
  252. data/lib/vellum_ai/types/workflow_request_chat_history_input_request.rb +54 -0
  253. data/lib/vellum_ai/types/workflow_request_input_request.rb +116 -0
  254. data/lib/vellum_ai/types/workflow_request_json_input_request.rb +50 -0
  255. data/lib/vellum_ai/types/workflow_request_number_input_request.rb +50 -0
  256. data/lib/vellum_ai/types/workflow_request_string_input_request.rb +50 -0
  257. data/lib/vellum_ai/types/workflow_result_event.rb +95 -0
  258. data/lib/vellum_ai/types/workflow_result_event_output_data.rb +142 -0
  259. data/lib/vellum_ai/types/workflow_result_event_output_data_chat_history.rb +83 -0
  260. data/lib/vellum_ai/types/workflow_result_event_output_data_error.rb +85 -0
  261. data/lib/vellum_ai/types/workflow_result_event_output_data_json.rb +79 -0
  262. data/lib/vellum_ai/types/workflow_result_event_output_data_number.rb +79 -0
  263. data/lib/vellum_ai/types/workflow_result_event_output_data_search_results.rb +83 -0
  264. data/lib/vellum_ai/types/workflow_result_event_output_data_string.rb +79 -0
  265. data/lib/vellum_ai/types/workflow_stream_event.rb +90 -0
  266. data/lib/vellum_ai/workflow_deployments/client.rb +82 -0
  267. data/lib/vellum_ai/workflow_deployments/types/workflow_deployments_list_request_status.rb +8 -0
  268. data/lib/vellum_ai.rb +476 -0
  269. metadata +381 -0
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ JSON_ENUM = String
5
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Vellum
6
+ # A user input representing a JSON object
7
+ class JsonInputRequest
8
+ attr_reader :name, :value, :additional_properties
9
+
10
+ # @param name [String] The variable's name, as defined in the deployment.
11
+ # @param value [Hash{String => String}]
12
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
13
+ # @return [JsonInputRequest]
14
+ def initialize(name:, value:, additional_properties: nil)
15
+ # @type [String] The variable's name, as defined in the deployment.
16
+ @name = name
17
+ # @type [Hash{String => String}]
18
+ @value = value
19
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
20
+ @additional_properties = additional_properties
21
+ end
22
+
23
+ # Deserialize a JSON object to an instance of JsonInputRequest
24
+ #
25
+ # @param json_object [JSON]
26
+ # @return [JsonInputRequest]
27
+ def self.from_json(json_object:)
28
+ struct = JSON.parse(json_object, object_class: OpenStruct)
29
+ JSON.parse(json_object)
30
+ name = struct.name
31
+ value = struct.value
32
+ new(name: name, value: value, additional_properties: struct)
33
+ end
34
+
35
+ # Serialize an instance of JsonInputRequest to a JSON object
36
+ #
37
+ # @return [JSON]
38
+ def to_json(*_args)
39
+ { "name": @name, "value": @value }.to_json
40
+ end
41
+
42
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
43
+ #
44
+ # @param obj [Object]
45
+ # @return [Void]
46
+ def self.validate_raw(obj:)
47
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
48
+ obj.value.is_a?(Hash) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Vellum
6
+ class JsonVariableValue
7
+ attr_reader :value, :additional_properties
8
+
9
+ # @param value [Hash{String => String}]
10
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
11
+ # @return [JsonVariableValue]
12
+ def initialize(value: nil, additional_properties: nil)
13
+ # @type [Hash{String => String}]
14
+ @value = value
15
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
16
+ @additional_properties = additional_properties
17
+ end
18
+
19
+ # Deserialize a JSON object to an instance of JsonVariableValue
20
+ #
21
+ # @param json_object [JSON]
22
+ # @return [JsonVariableValue]
23
+ def self.from_json(json_object:)
24
+ struct = JSON.parse(json_object, object_class: OpenStruct)
25
+ JSON.parse(json_object)
26
+ value = struct.value
27
+ new(value: value, additional_properties: struct)
28
+ end
29
+
30
+ # Serialize an instance of JsonVariableValue to a JSON object
31
+ #
32
+ # @return [JSON]
33
+ def to_json(*_args)
34
+ { "value": @value }.to_json
35
+ end
36
+
37
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
38
+ #
39
+ # @param obj [Object]
40
+ # @return [Void]
41
+ def self.validate_raw(obj:)
42
+ obj.value&.is_a?(Hash) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ # @type [LOGICAL_OPERATOR]
5
+ LOGICAL_OPERATOR = {
6
+ equals: "=",
7
+ does_not_equal: "!=",
8
+ less_than: "<",
9
+ greater_than: ">",
10
+ less_than_or_equal_to: "<=",
11
+ greater_than_or_equal_to: ">=",
12
+ contains: "contains",
13
+ begins_with: "beginsWith",
14
+ ends_with: "endsWith",
15
+ does_not_contain: "doesNotContain",
16
+ does_not_begin_with: "doesNotBeginWith",
17
+ does_not_end_with: "doesNotEndWith",
18
+ null: "null",
19
+ not_null: "notNull",
20
+ in_: "in",
21
+ not_in: "notIn",
22
+ between: "between",
23
+ not_between: "notBetween"
24
+ }.freeze
25
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ # @type [LOGPROBS_ENUM]
5
+ LOGPROBS_ENUM = { all: "ALL", none: "NONE" }.freeze
6
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "metadata_filter_rule_combinator"
4
+ require_relative "metadata_filter_rule_request"
5
+ require_relative "logical_operator"
6
+ require "json"
7
+
8
+ module Vellum
9
+ class MetadataFilterConfigRequest
10
+ attr_reader :combinator, :negated, :rules, :field, :operator, :value, :additional_properties
11
+
12
+ # @param combinator [METADATA_FILTER_RULE_COMBINATOR]
13
+ # @param negated [Boolean]
14
+ # @param rules [Array<MetadataFilterRuleRequest>]
15
+ # @param field [String]
16
+ # @param operator [LOGICAL_OPERATOR]
17
+ # @param value [String]
18
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
+ # @return [MetadataFilterConfigRequest]
20
+ def initialize(combinator: nil, negated: nil, rules: nil, field: nil, operator: nil, value: nil,
21
+ additional_properties: nil)
22
+ # @type [METADATA_FILTER_RULE_COMBINATOR]
23
+ @combinator = combinator
24
+ # @type [Boolean]
25
+ @negated = negated
26
+ # @type [Array<MetadataFilterRuleRequest>]
27
+ @rules = rules
28
+ # @type [String]
29
+ @field = field
30
+ # @type [LOGICAL_OPERATOR]
31
+ @operator = operator
32
+ # @type [String]
33
+ @value = value
34
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
35
+ @additional_properties = additional_properties
36
+ end
37
+
38
+ # Deserialize a JSON object to an instance of MetadataFilterConfigRequest
39
+ #
40
+ # @param json_object [JSON]
41
+ # @return [MetadataFilterConfigRequest]
42
+ def self.from_json(json_object:)
43
+ struct = JSON.parse(json_object, object_class: OpenStruct)
44
+ parsed_json = JSON.parse(json_object)
45
+ combinator = METADATA_FILTER_RULE_COMBINATOR.key(parsed_json["combinator"]) || parsed_json["combinator"]
46
+ negated = struct.negated
47
+ rules = parsed_json["rules"].map do |v|
48
+ v = v.to_json
49
+ MetadataFilterRuleRequest.from_json(json_object: v)
50
+ end
51
+ field = struct.field
52
+ operator = LOGICAL_OPERATOR.key(parsed_json["operator"]) || parsed_json["operator"]
53
+ value = struct.value
54
+ new(combinator: combinator, negated: negated, rules: rules, field: field, operator: operator, value: value,
55
+ additional_properties: struct)
56
+ end
57
+
58
+ # Serialize an instance of MetadataFilterConfigRequest to a JSON object
59
+ #
60
+ # @return [JSON]
61
+ def to_json(*_args)
62
+ {
63
+ "combinator": METADATA_FILTER_RULE_COMBINATOR[@combinator] || @combinator,
64
+ "negated": @negated,
65
+ "rules": @rules,
66
+ "field": @field,
67
+ "operator": LOGICAL_OPERATOR[@operator] || @operator,
68
+ "value": @value
69
+ }.to_json
70
+ end
71
+
72
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
73
+ #
74
+ # @param obj [Object]
75
+ # @return [Void]
76
+ def self.validate_raw(obj:)
77
+ obj.combinator&.is_a?(METADATA_FILTER_RULE_COMBINATOR) != false || raise("Passed value for field obj.combinator is not the expected type, validation failed.")
78
+ obj.negated&.is_a?(Boolean) != false || raise("Passed value for field obj.negated is not the expected type, validation failed.")
79
+ obj.rules&.is_a?(Array) != false || raise("Passed value for field obj.rules is not the expected type, validation failed.")
80
+ obj.field&.is_a?(String) != false || raise("Passed value for field obj.field is not the expected type, validation failed.")
81
+ obj.operator&.is_a?(LOGICAL_OPERATOR) != false || raise("Passed value for field obj.operator is not the expected type, validation failed.")
82
+ obj.value&.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ # @type [METADATA_FILTER_RULE_COMBINATOR]
5
+ METADATA_FILTER_RULE_COMBINATOR = { and_: "and", or_: "or" }.freeze
6
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "metadata_filter_rule_combinator"
4
+ require_relative "logical_operator"
5
+ require "json"
6
+
7
+ module Vellum
8
+ class MetadataFilterRuleRequest
9
+ attr_reader :combinator, :negated, :rules, :field, :operator, :value, :additional_properties
10
+
11
+ # @param combinator [METADATA_FILTER_RULE_COMBINATOR]
12
+ # @param negated [Boolean]
13
+ # @param rules [Array<MetadataFilterRuleRequest>]
14
+ # @param field [String]
15
+ # @param operator [LOGICAL_OPERATOR]
16
+ # @param value [String]
17
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
18
+ # @return [MetadataFilterRuleRequest]
19
+ def initialize(combinator: nil, negated: nil, rules: nil, field: nil, operator: nil, value: nil,
20
+ additional_properties: nil)
21
+ # @type [METADATA_FILTER_RULE_COMBINATOR]
22
+ @combinator = combinator
23
+ # @type [Boolean]
24
+ @negated = negated
25
+ # @type [Array<MetadataFilterRuleRequest>]
26
+ @rules = rules
27
+ # @type [String]
28
+ @field = field
29
+ # @type [LOGICAL_OPERATOR]
30
+ @operator = operator
31
+ # @type [String]
32
+ @value = value
33
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
34
+ @additional_properties = additional_properties
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of MetadataFilterRuleRequest
38
+ #
39
+ # @param json_object [JSON]
40
+ # @return [MetadataFilterRuleRequest]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ parsed_json = JSON.parse(json_object)
44
+ combinator = METADATA_FILTER_RULE_COMBINATOR.key(parsed_json["combinator"]) || parsed_json["combinator"]
45
+ negated = struct.negated
46
+ rules = parsed_json["rules"].map do |v|
47
+ v = v.to_json
48
+ MetadataFilterRuleRequest.from_json(json_object: v)
49
+ end
50
+ field = struct.field
51
+ operator = LOGICAL_OPERATOR.key(parsed_json["operator"]) || parsed_json["operator"]
52
+ value = struct.value
53
+ new(combinator: combinator, negated: negated, rules: rules, field: field, operator: operator, value: value,
54
+ additional_properties: struct)
55
+ end
56
+
57
+ # Serialize an instance of MetadataFilterRuleRequest to a JSON object
58
+ #
59
+ # @return [JSON]
60
+ def to_json(*_args)
61
+ {
62
+ "combinator": METADATA_FILTER_RULE_COMBINATOR[@combinator] || @combinator,
63
+ "negated": @negated,
64
+ "rules": @rules,
65
+ "field": @field,
66
+ "operator": LOGICAL_OPERATOR[@operator] || @operator,
67
+ "value": @value
68
+ }.to_json
69
+ end
70
+
71
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
72
+ #
73
+ # @param obj [Object]
74
+ # @return [Void]
75
+ def self.validate_raw(obj:)
76
+ obj.combinator&.is_a?(METADATA_FILTER_RULE_COMBINATOR) != false || raise("Passed value for field obj.combinator is not the expected type, validation failed.")
77
+ obj.negated&.is_a?(Boolean) != false || raise("Passed value for field obj.negated is not the expected type, validation failed.")
78
+ obj.rules&.is_a?(Array) != false || raise("Passed value for field obj.rules is not the expected type, validation failed.")
79
+ obj.field&.is_a?(String) != false || raise("Passed value for field obj.field is not the expected type, validation failed.")
80
+ obj.operator&.is_a?(LOGICAL_OPERATOR) != false || raise("Passed value for field obj.operator is not the expected type, validation failed.")
81
+ obj.value&.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "model_version_sandbox_snapshot"
4
+ require "json"
5
+
6
+ module Vellum
7
+ class ModelVersionBuildConfig
8
+ attr_reader :base_model, :sandbox_snapshot, :prompt_version_id, :additional_properties
9
+
10
+ # @param base_model [String] The name of the base model used to create this model version, as identified by the LLM provider.
11
+ # @param sandbox_snapshot [ModelVersionSandboxSnapshot] Information about the sandbox snapshot that was used to create this model version, if applicable.
12
+ # @param prompt_version_id [String]
13
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
14
+ # @return [ModelVersionBuildConfig]
15
+ def initialize(base_model:, sandbox_snapshot: nil, prompt_version_id: nil, additional_properties: nil)
16
+ # @type [String] The name of the base model used to create this model version, as identified by the LLM provider.
17
+ @base_model = base_model
18
+ # @type [ModelVersionSandboxSnapshot] Information about the sandbox snapshot that was used to create this model version, if applicable.
19
+ @sandbox_snapshot = sandbox_snapshot
20
+ # @type [String]
21
+ @prompt_version_id = prompt_version_id
22
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
23
+ @additional_properties = additional_properties
24
+ end
25
+
26
+ # Deserialize a JSON object to an instance of ModelVersionBuildConfig
27
+ #
28
+ # @param json_object [JSON]
29
+ # @return [ModelVersionBuildConfig]
30
+ def self.from_json(json_object:)
31
+ struct = JSON.parse(json_object, object_class: OpenStruct)
32
+ parsed_json = JSON.parse(json_object)
33
+ base_model = struct.base_model
34
+ if parsed_json["sandbox_snapshot"].nil?
35
+ sandbox_snapshot = nil
36
+ else
37
+ sandbox_snapshot = parsed_json["sandbox_snapshot"].to_json
38
+ sandbox_snapshot = ModelVersionSandboxSnapshot.from_json(json_object: sandbox_snapshot)
39
+ end
40
+ prompt_version_id = struct.prompt_version_id
41
+ new(base_model: base_model, sandbox_snapshot: sandbox_snapshot, prompt_version_id: prompt_version_id,
42
+ additional_properties: struct)
43
+ end
44
+
45
+ # Serialize an instance of ModelVersionBuildConfig to a JSON object
46
+ #
47
+ # @return [JSON]
48
+ def to_json(*_args)
49
+ {
50
+ "base_model": @base_model,
51
+ "sandbox_snapshot": @sandbox_snapshot,
52
+ "prompt_version_id": @prompt_version_id
53
+ }.to_json
54
+ end
55
+
56
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
57
+ #
58
+ # @param obj [Object]
59
+ # @return [Void]
60
+ def self.validate_raw(obj:)
61
+ obj.base_model.is_a?(String) != false || raise("Passed value for field obj.base_model is not the expected type, validation failed.")
62
+ obj.sandbox_snapshot.nil? || ModelVersionSandboxSnapshot.validate_raw(obj: obj.sandbox_snapshot)
63
+ obj.prompt_version_id&.is_a?(String) != false || raise("Passed value for field obj.prompt_version_id is not the expected type, validation failed.")
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "model_version_exec_config_parameters"
4
+ require_relative "vellum_variable"
5
+ require_relative "prompt_template_block_data"
6
+ require "json"
7
+
8
+ module Vellum
9
+ class ModelVersionExecConfig
10
+ attr_reader :parameters, :input_variables, :prompt_template, :prompt_block_data, :prompt_syntax_version,
11
+ :additional_properties
12
+
13
+ # @param parameters [ModelVersionExecConfigParameters] The generation parameters that are passed to the LLM provider at runtime.
14
+ # @param input_variables [Array<VellumVariable>] Input variables specified in the prompt template.
15
+ # @param prompt_template [String] The template used to generate prompts for this model version.
16
+ # @param prompt_block_data [PromptTemplateBlockData]
17
+ # @param prompt_syntax_version [Integer]
18
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
+ # @return [ModelVersionExecConfig]
20
+ def initialize(parameters:, input_variables:, prompt_template: nil, prompt_block_data: nil,
21
+ prompt_syntax_version: nil, additional_properties: nil)
22
+ # @type [ModelVersionExecConfigParameters] The generation parameters that are passed to the LLM provider at runtime.
23
+ @parameters = parameters
24
+ # @type [Array<VellumVariable>] Input variables specified in the prompt template.
25
+ @input_variables = input_variables
26
+ # @type [String] The template used to generate prompts for this model version.
27
+ @prompt_template = prompt_template
28
+ # @type [PromptTemplateBlockData]
29
+ @prompt_block_data = prompt_block_data
30
+ # @type [Integer]
31
+ @prompt_syntax_version = prompt_syntax_version
32
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
33
+ @additional_properties = additional_properties
34
+ end
35
+
36
+ # Deserialize a JSON object to an instance of ModelVersionExecConfig
37
+ #
38
+ # @param json_object [JSON]
39
+ # @return [ModelVersionExecConfig]
40
+ def self.from_json(json_object:)
41
+ struct = JSON.parse(json_object, object_class: OpenStruct)
42
+ parsed_json = JSON.parse(json_object)
43
+ if parsed_json["parameters"].nil?
44
+ parameters = nil
45
+ else
46
+ parameters = parsed_json["parameters"].to_json
47
+ parameters = ModelVersionExecConfigParameters.from_json(json_object: parameters)
48
+ end
49
+ input_variables = parsed_json["input_variables"].map do |v|
50
+ v = v.to_json
51
+ VellumVariable.from_json(json_object: v)
52
+ end
53
+ prompt_template = struct.prompt_template
54
+ if parsed_json["prompt_block_data"].nil?
55
+ prompt_block_data = nil
56
+ else
57
+ prompt_block_data = parsed_json["prompt_block_data"].to_json
58
+ prompt_block_data = PromptTemplateBlockData.from_json(json_object: prompt_block_data)
59
+ end
60
+ prompt_syntax_version = struct.prompt_syntax_version
61
+ new(parameters: parameters, input_variables: input_variables, prompt_template: prompt_template,
62
+ prompt_block_data: prompt_block_data, prompt_syntax_version: prompt_syntax_version, additional_properties: struct)
63
+ end
64
+
65
+ # Serialize an instance of ModelVersionExecConfig to a JSON object
66
+ #
67
+ # @return [JSON]
68
+ def to_json(*_args)
69
+ {
70
+ "parameters": @parameters,
71
+ "input_variables": @input_variables,
72
+ "prompt_template": @prompt_template,
73
+ "prompt_block_data": @prompt_block_data,
74
+ "prompt_syntax_version": @prompt_syntax_version
75
+ }.to_json
76
+ end
77
+
78
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
79
+ #
80
+ # @param obj [Object]
81
+ # @return [Void]
82
+ def self.validate_raw(obj:)
83
+ ModelVersionExecConfigParameters.validate_raw(obj: obj.parameters)
84
+ obj.input_variables.is_a?(Array) != false || raise("Passed value for field obj.input_variables is not the expected type, validation failed.")
85
+ obj.prompt_template&.is_a?(String) != false || raise("Passed value for field obj.prompt_template is not the expected type, validation failed.")
86
+ obj.prompt_block_data.nil? || PromptTemplateBlockData.validate_raw(obj: obj.prompt_block_data)
87
+ obj.prompt_syntax_version&.is_a?(Integer) != false || raise("Passed value for field obj.prompt_syntax_version is not the expected type, validation failed.")
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Vellum
6
+ class ModelVersionExecConfigParameters
7
+ attr_reader :temperature, :max_tokens, :top_p, :frequency_penalty, :presence_penalty, :logit_bias, :stop, :top_k,
8
+ :custom_parameters, :additional_properties
9
+
10
+ # @param temperature [Float]
11
+ # @param max_tokens [Integer]
12
+ # @param top_p [Float]
13
+ # @param frequency_penalty [Float]
14
+ # @param presence_penalty [Float]
15
+ # @param logit_bias [Hash{String => String}]
16
+ # @param stop [Array<String>]
17
+ # @param top_k [Float]
18
+ # @param custom_parameters [Hash{String => String}]
19
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
20
+ # @return [ModelVersionExecConfigParameters]
21
+ def initialize(top_p:, frequency_penalty:, presence_penalty:, temperature: nil, max_tokens: nil, logit_bias: nil,
22
+ stop: nil, top_k: nil, custom_parameters: nil, additional_properties: nil)
23
+ # @type [Float]
24
+ @temperature = temperature
25
+ # @type [Integer]
26
+ @max_tokens = max_tokens
27
+ # @type [Float]
28
+ @top_p = top_p
29
+ # @type [Float]
30
+ @frequency_penalty = frequency_penalty
31
+ # @type [Float]
32
+ @presence_penalty = presence_penalty
33
+ # @type [Hash{String => String}]
34
+ @logit_bias = logit_bias
35
+ # @type [Array<String>]
36
+ @stop = stop
37
+ # @type [Float]
38
+ @top_k = top_k
39
+ # @type [Hash{String => String}]
40
+ @custom_parameters = custom_parameters
41
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
42
+ @additional_properties = additional_properties
43
+ end
44
+
45
+ # Deserialize a JSON object to an instance of ModelVersionExecConfigParameters
46
+ #
47
+ # @param json_object [JSON]
48
+ # @return [ModelVersionExecConfigParameters]
49
+ def self.from_json(json_object:)
50
+ struct = JSON.parse(json_object, object_class: OpenStruct)
51
+ JSON.parse(json_object)
52
+ temperature = struct.temperature
53
+ max_tokens = struct.max_tokens
54
+ top_p = struct.top_p
55
+ frequency_penalty = struct.frequency_penalty
56
+ presence_penalty = struct.presence_penalty
57
+ logit_bias = struct.logit_bias
58
+ stop = struct.stop
59
+ top_k = struct.top_k
60
+ custom_parameters = struct.custom_parameters
61
+ new(temperature: temperature, max_tokens: max_tokens, top_p: top_p, frequency_penalty: frequency_penalty,
62
+ presence_penalty: presence_penalty, logit_bias: logit_bias, stop: stop, top_k: top_k, custom_parameters: custom_parameters, additional_properties: struct)
63
+ end
64
+
65
+ # Serialize an instance of ModelVersionExecConfigParameters to a JSON object
66
+ #
67
+ # @return [JSON]
68
+ def to_json(*_args)
69
+ {
70
+ "temperature": @temperature,
71
+ "max_tokens": @max_tokens,
72
+ "top_p": @top_p,
73
+ "frequency_penalty": @frequency_penalty,
74
+ "presence_penalty": @presence_penalty,
75
+ "logit_bias": @logit_bias,
76
+ "stop": @stop,
77
+ "top_k": @top_k,
78
+ "custom_parameters": @custom_parameters
79
+ }.to_json
80
+ end
81
+
82
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
83
+ #
84
+ # @param obj [Object]
85
+ # @return [Void]
86
+ def self.validate_raw(obj:)
87
+ obj.temperature&.is_a?(Float) != false || raise("Passed value for field obj.temperature is not the expected type, validation failed.")
88
+ obj.max_tokens&.is_a?(Integer) != false || raise("Passed value for field obj.max_tokens is not the expected type, validation failed.")
89
+ obj.top_p.is_a?(Float) != false || raise("Passed value for field obj.top_p is not the expected type, validation failed.")
90
+ obj.frequency_penalty.is_a?(Float) != false || raise("Passed value for field obj.frequency_penalty is not the expected type, validation failed.")
91
+ obj.presence_penalty.is_a?(Float) != false || raise("Passed value for field obj.presence_penalty is not the expected type, validation failed.")
92
+ obj.logit_bias&.is_a?(Hash) != false || raise("Passed value for field obj.logit_bias is not the expected type, validation failed.")
93
+ obj.stop&.is_a?(Array) != false || raise("Passed value for field obj.stop is not the expected type, validation failed.")
94
+ obj.top_k&.is_a?(Float) != false || raise("Passed value for field obj.top_k is not the expected type, validation failed.")
95
+ obj.custom_parameters&.is_a?(Hash) != false || raise("Passed value for field obj.custom_parameters is not the expected type, validation failed.")
96
+ end
97
+ end
98
+ end