vellum-ai 0.7.3__py3-none-any.whl → 0.7.5__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (483) hide show
  1. vellum/__init__.py +142 -94
  2. vellum/client.py +1051 -1097
  3. vellum/core/__init__.py +4 -1
  4. vellum/core/client_wrapper.py +7 -3
  5. vellum/core/http_client.py +365 -20
  6. vellum/core/jsonable_encoder.py +3 -0
  7. vellum/core/pydantic_utilities.py +16 -0
  8. vellum/core/query_encoder.py +33 -0
  9. vellum/core/remove_none_from_dict.py +2 -2
  10. vellum/core/request_options.py +2 -2
  11. vellum/resources/__init__.py +2 -0
  12. vellum/resources/deployments/client.py +349 -377
  13. vellum/resources/document_indexes/client.py +542 -610
  14. vellum/resources/documents/client.py +327 -399
  15. vellum/resources/folder_entities/client.py +56 -72
  16. vellum/{types/map_enum.py → resources/ml_models/__init__.py} +0 -3
  17. vellum/resources/ml_models/client.py +837 -0
  18. vellum/resources/sandboxes/client.py +204 -242
  19. vellum/resources/test_suite_runs/client.py +183 -213
  20. vellum/resources/test_suites/client.py +307 -311
  21. vellum/resources/workflow_deployments/client.py +230 -268
  22. vellum/resources/workflow_sandboxes/client.py +82 -96
  23. vellum/terraform/_jsii/vellum-ai_vellum@0.0.0.jsii.tgz +0 -0
  24. vellum/terraform/data_vellum_document_index/__init__.py +10 -10
  25. vellum/terraform/document_index/__init__.py +17 -17
  26. vellum/terraform/provider/__init__.py +57 -12
  27. vellum/terraform/versions.json +1 -1
  28. vellum/types/__init__.py +148 -96
  29. vellum/types/api_node_result.py +7 -3
  30. vellum/types/api_node_result_data.py +7 -3
  31. vellum/types/array_chat_message_content.py +7 -3
  32. vellum/types/array_chat_message_content_item.py +53 -12
  33. vellum/types/array_chat_message_content_item_request.py +53 -12
  34. vellum/types/array_chat_message_content_request.py +7 -3
  35. vellum/types/array_parameter_config.py +50 -0
  36. vellum/types/array_parameter_config_request.py +50 -0
  37. vellum/types/array_variable_value_item.py +102 -24
  38. vellum/types/array_vellum_value_item.py +102 -24
  39. vellum/types/array_vellum_value_item_request.py +102 -24
  40. vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +7 -3
  41. vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +7 -3
  42. vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +7 -3
  43. vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +7 -3
  44. vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +7 -3
  45. vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +7 -3
  46. vellum/types/boolean_parameter_config.py +35 -0
  47. vellum/types/boolean_parameter_config_request.py +35 -0
  48. vellum/types/chat_history_input_request.py +7 -3
  49. vellum/types/chat_message.py +7 -3
  50. vellum/types/chat_message_content.py +70 -16
  51. vellum/types/chat_message_content_request.py +70 -16
  52. vellum/types/chat_message_request.py +7 -3
  53. vellum/types/code_execution_node_array_result.py +7 -3
  54. vellum/types/code_execution_node_chat_history_result.py +7 -3
  55. vellum/types/code_execution_node_error_result.py +7 -3
  56. vellum/types/code_execution_node_function_call_result.py +7 -3
  57. vellum/types/code_execution_node_json_result.py +7 -3
  58. vellum/types/code_execution_node_number_result.py +7 -3
  59. vellum/types/code_execution_node_result.py +7 -3
  60. vellum/types/code_execution_node_result_data.py +7 -3
  61. vellum/types/code_execution_node_result_output.py +144 -32
  62. vellum/types/code_execution_node_search_results_result.py +7 -3
  63. vellum/types/code_execution_node_string_result.py +7 -3
  64. vellum/types/compile_prompt_deployment_expand_meta_request.py +7 -3
  65. vellum/types/compile_prompt_meta.py +7 -3
  66. vellum/types/conditional_node_result.py +7 -3
  67. vellum/types/conditional_node_result_data.py +7 -3
  68. vellum/types/const_parameter_config.py +35 -0
  69. vellum/types/const_parameter_config_request.py +35 -0
  70. vellum/types/create_test_suite_test_case_request.py +7 -3
  71. vellum/types/deployment_provider_payload_response.py +7 -3
  72. vellum/types/deployment_read.py +12 -3
  73. vellum/types/deployment_release_tag_deployment_history_item.py +7 -3
  74. vellum/types/deployment_release_tag_read.py +7 -3
  75. vellum/types/document_document_to_document_index.py +7 -3
  76. vellum/types/document_index_chunking.py +54 -12
  77. vellum/types/document_index_chunking_request.py +54 -12
  78. vellum/types/document_index_indexing_config.py +7 -3
  79. vellum/types/document_index_indexing_config_request.py +7 -3
  80. vellum/types/document_index_read.py +7 -3
  81. vellum/types/document_read.py +7 -3
  82. vellum/types/enriched_normalized_completion.py +7 -3
  83. vellum/types/error_variable_value.py +7 -3
  84. vellum/types/error_vellum_value.py +7 -3
  85. vellum/types/error_vellum_value_request.py +7 -3
  86. vellum/types/execute_prompt_event.py +82 -16
  87. vellum/types/execute_prompt_response.py +44 -8
  88. vellum/types/execute_workflow_response.py +7 -3
  89. vellum/types/execute_workflow_workflow_result_event.py +41 -8
  90. vellum/types/execution_array_vellum_value.py +7 -3
  91. vellum/types/execution_chat_history_vellum_value.py +7 -3
  92. vellum/types/execution_error_vellum_value.py +7 -3
  93. vellum/types/execution_function_call_vellum_value.py +7 -3
  94. vellum/types/execution_json_vellum_value.py +7 -3
  95. vellum/types/execution_number_vellum_value.py +7 -3
  96. vellum/types/execution_search_results_vellum_value.py +7 -3
  97. vellum/types/execution_string_vellum_value.py +7 -3
  98. vellum/types/execution_vellum_value.py +152 -32
  99. vellum/types/external_test_case_execution.py +7 -3
  100. vellum/types/external_test_case_execution_request.py +7 -3
  101. vellum/types/fulfilled_execute_prompt_event.py +7 -3
  102. vellum/types/fulfilled_execute_prompt_response.py +7 -3
  103. vellum/types/fulfilled_execute_workflow_workflow_result_event.py +7 -3
  104. vellum/types/fulfilled_prompt_execution_meta.py +7 -3
  105. vellum/types/fulfilled_workflow_node_result_event.py +7 -3
  106. vellum/types/function_call.py +7 -3
  107. vellum/types/function_call_chat_message_content.py +7 -3
  108. vellum/types/function_call_chat_message_content_request.py +7 -3
  109. vellum/types/function_call_chat_message_content_value.py +7 -3
  110. vellum/types/function_call_chat_message_content_value_request.py +7 -3
  111. vellum/types/function_call_request.py +7 -3
  112. vellum/types/function_call_variable_value.py +7 -3
  113. vellum/types/function_call_vellum_value.py +7 -3
  114. vellum/types/function_call_vellum_value_request.py +7 -3
  115. vellum/types/generate_options_request.py +7 -3
  116. vellum/types/generate_request.py +7 -3
  117. vellum/types/generate_result.py +7 -3
  118. vellum/types/generate_result_data.py +7 -3
  119. vellum/types/generate_result_error.py +7 -3
  120. vellum/types/generate_stream_response.py +7 -3
  121. vellum/types/generate_stream_result.py +7 -3
  122. vellum/types/generate_stream_result_data.py +7 -3
  123. vellum/types/hkunlp_instructor_xl_vectorizer.py +7 -3
  124. vellum/types/hkunlp_instructor_xl_vectorizer_request.py +7 -3
  125. vellum/types/hosted_by_enum.py +26 -0
  126. vellum/types/hugging_face_tokenizer_config.py +34 -0
  127. vellum/types/hugging_face_tokenizer_config_request.py +34 -0
  128. vellum/types/image_chat_message_content.py +7 -3
  129. vellum/types/image_chat_message_content_request.py +7 -3
  130. vellum/types/image_variable_value.py +7 -3
  131. vellum/types/image_vellum_value.py +7 -3
  132. vellum/types/image_vellum_value_request.py +7 -3
  133. vellum/types/indexing_config_vectorizer.py +117 -36
  134. vellum/types/indexing_config_vectorizer_request.py +117 -36
  135. vellum/types/initiated_execute_prompt_event.py +7 -3
  136. vellum/types/initiated_prompt_execution_meta.py +7 -3
  137. vellum/types/initiated_workflow_node_result_event.py +7 -3
  138. vellum/types/instructor_vectorizer_config.py +7 -3
  139. vellum/types/instructor_vectorizer_config_request.py +7 -3
  140. vellum/types/integer_parameter_config.py +39 -0
  141. vellum/types/integer_parameter_config_request.py +39 -0
  142. vellum/types/json_input_request.py +7 -3
  143. vellum/types/json_variable_value.py +7 -3
  144. vellum/types/json_vellum_value.py +7 -3
  145. vellum/types/json_vellum_value_request.py +7 -3
  146. vellum/types/map_node_result.py +7 -3
  147. vellum/types/map_node_result_data.py +7 -3
  148. vellum/types/merge_node_result.py +7 -3
  149. vellum/types/merge_node_result_data.py +7 -3
  150. vellum/types/metadata_filter_config_request.py +7 -3
  151. vellum/types/metadata_filter_rule_request.py +7 -3
  152. vellum/types/metric_node_result.py +7 -3
  153. vellum/types/{execute_workflow_stream_error_response.py → ml_model_build_config.py} +9 -8
  154. vellum/types/{execute_prompt_api_error_response.py → ml_model_build_config_request.py} +9 -8
  155. vellum/types/ml_model_developer.py +27 -0
  156. vellum/types/ml_model_developer_enum_value_label.py +31 -0
  157. vellum/types/ml_model_display_config_labelled.py +33 -0
  158. vellum/types/ml_model_display_config_request.py +33 -0
  159. vellum/types/ml_model_display_tag.py +7 -0
  160. vellum/types/ml_model_display_tag_enum_value_label.py +31 -0
  161. vellum/types/ml_model_exec_config.py +40 -0
  162. vellum/types/ml_model_exec_config_request.py +40 -0
  163. vellum/types/ml_model_family.py +29 -0
  164. vellum/types/ml_model_family_enum_value_label.py +31 -0
  165. vellum/types/ml_model_feature.py +18 -0
  166. vellum/types/ml_model_parameter_config.py +42 -0
  167. vellum/types/ml_model_parameter_config_request.py +42 -0
  168. vellum/types/ml_model_read.py +108 -0
  169. vellum/types/ml_model_request_authorization_config.py +30 -0
  170. vellum/types/ml_model_request_authorization_config_request.py +30 -0
  171. vellum/types/ml_model_request_authorization_config_type_enum.py +5 -0
  172. vellum/types/ml_model_request_config.py +32 -0
  173. vellum/types/ml_model_request_config_request.py +32 -0
  174. vellum/types/ml_model_response_config.py +31 -0
  175. vellum/types/ml_model_response_config_request.py +31 -0
  176. vellum/types/ml_model_tokenizer_config.py +59 -0
  177. vellum/types/ml_model_tokenizer_config_request.py +61 -0
  178. vellum/types/ml_model_usage.py +7 -3
  179. vellum/types/named_scenario_input_chat_history_variable_value_request.py +7 -3
  180. vellum/types/named_scenario_input_request.py +38 -8
  181. vellum/types/named_scenario_input_string_variable_value_request.py +7 -3
  182. vellum/types/named_test_case_array_variable_value.py +7 -3
  183. vellum/types/named_test_case_array_variable_value_request.py +7 -3
  184. vellum/types/named_test_case_chat_history_variable_value.py +7 -3
  185. vellum/types/named_test_case_chat_history_variable_value_request.py +7 -3
  186. vellum/types/named_test_case_error_variable_value.py +7 -3
  187. vellum/types/named_test_case_error_variable_value_request.py +7 -3
  188. vellum/types/named_test_case_function_call_variable_value.py +7 -3
  189. vellum/types/named_test_case_function_call_variable_value_request.py +7 -3
  190. vellum/types/named_test_case_json_variable_value.py +7 -3
  191. vellum/types/named_test_case_json_variable_value_request.py +7 -3
  192. vellum/types/named_test_case_number_variable_value.py +7 -3
  193. vellum/types/named_test_case_number_variable_value_request.py +7 -3
  194. vellum/types/named_test_case_search_results_variable_value.py +7 -3
  195. vellum/types/named_test_case_search_results_variable_value_request.py +7 -3
  196. vellum/types/named_test_case_string_variable_value.py +7 -3
  197. vellum/types/named_test_case_string_variable_value_request.py +7 -3
  198. vellum/types/named_test_case_variable_value.py +144 -32
  199. vellum/types/named_test_case_variable_value_request.py +144 -32
  200. vellum/types/node_input_compiled_array_value.py +7 -3
  201. vellum/types/node_input_compiled_chat_history_value.py +7 -3
  202. vellum/types/node_input_compiled_error_value.py +7 -3
  203. vellum/types/node_input_compiled_function_call.py +7 -3
  204. vellum/types/node_input_compiled_json_value.py +7 -3
  205. vellum/types/node_input_compiled_number_value.py +7 -3
  206. vellum/types/node_input_compiled_search_results_value.py +7 -3
  207. vellum/types/node_input_compiled_string_value.py +7 -3
  208. vellum/types/node_input_variable_compiled_value.py +152 -32
  209. vellum/types/node_output_compiled_array_value.py +7 -3
  210. vellum/types/node_output_compiled_chat_history_value.py +7 -3
  211. vellum/types/node_output_compiled_error_value.py +7 -3
  212. vellum/types/node_output_compiled_function_call_value.py +7 -3
  213. vellum/types/node_output_compiled_json_value.py +7 -3
  214. vellum/types/node_output_compiled_number_value.py +7 -3
  215. vellum/types/node_output_compiled_search_results_value.py +7 -3
  216. vellum/types/node_output_compiled_string_value.py +7 -3
  217. vellum/types/node_output_compiled_value.py +153 -32
  218. vellum/types/normalized_log_probs.py +7 -3
  219. vellum/types/normalized_token_log_probs.py +7 -3
  220. vellum/types/number_parameter_config.py +40 -0
  221. vellum/types/number_parameter_config_request.py +40 -0
  222. vellum/types/number_variable_value.py +7 -3
  223. vellum/types/number_vellum_value.py +7 -3
  224. vellum/types/number_vellum_value_request.py +7 -3
  225. vellum/types/object_parameter_config.py +49 -0
  226. vellum/types/object_parameter_config_request.py +49 -0
  227. vellum/types/one_of_parameter_config.py +44 -0
  228. vellum/types/one_of_parameter_config_request.py +44 -0
  229. vellum/types/open_ai_vectorizer_config.py +7 -3
  230. vellum/types/open_ai_vectorizer_config_request.py +7 -3
  231. vellum/types/open_ai_vectorizer_text_embedding_3_large.py +7 -3
  232. vellum/types/open_ai_vectorizer_text_embedding_3_large_request.py +7 -3
  233. vellum/types/open_ai_vectorizer_text_embedding_3_small.py +7 -3
  234. vellum/types/open_ai_vectorizer_text_embedding_3_small_request.py +7 -3
  235. vellum/types/open_ai_vectorizer_text_embedding_ada_002.py +7 -3
  236. vellum/types/open_ai_vectorizer_text_embedding_ada_002_request.py +7 -3
  237. vellum/types/paginated_document_index_read_list.py +7 -3
  238. vellum/types/paginated_ml_model_read_list.py +33 -0
  239. vellum/types/paginated_slim_deployment_read_list.py +7 -3
  240. vellum/types/paginated_slim_document_list.py +7 -3
  241. vellum/types/paginated_slim_workflow_deployment_list.py +7 -3
  242. vellum/types/paginated_test_suite_run_execution_list.py +7 -3
  243. vellum/types/paginated_test_suite_test_case_list.py +7 -3
  244. vellum/types/parameter_config.py +251 -0
  245. vellum/types/parameter_config_request.py +251 -0
  246. vellum/types/pdf_search_result_meta_source.py +7 -3
  247. vellum/types/pdf_search_result_meta_source_request.py +7 -3
  248. vellum/types/prompt_deployment_expand_meta_request_request.py +7 -3
  249. vellum/types/prompt_deployment_input_request.py +55 -12
  250. vellum/types/prompt_execution_meta.py +7 -3
  251. vellum/types/prompt_node_execution_meta.py +7 -3
  252. vellum/types/prompt_node_result.py +7 -3
  253. vellum/types/prompt_node_result_data.py +7 -3
  254. vellum/types/prompt_output.py +69 -16
  255. vellum/types/raw_prompt_execution_overrides_request.py +7 -3
  256. vellum/types/reducto_chunker_config.py +7 -3
  257. vellum/types/reducto_chunker_config_request.py +7 -3
  258. vellum/types/reducto_chunking.py +7 -3
  259. vellum/types/reducto_chunking_request.py +7 -3
  260. vellum/types/rejected_execute_prompt_event.py +7 -3
  261. vellum/types/rejected_execute_prompt_response.py +7 -3
  262. vellum/types/rejected_execute_workflow_workflow_result_event.py +7 -3
  263. vellum/types/rejected_prompt_execution_meta.py +7 -3
  264. vellum/types/rejected_workflow_node_result_event.py +7 -3
  265. vellum/types/replace_test_suite_test_case_request.py +7 -3
  266. vellum/types/sandbox_scenario.py +7 -3
  267. vellum/types/scenario_input.py +38 -8
  268. vellum/types/scenario_input_chat_history_variable_value.py +7 -3
  269. vellum/types/scenario_input_string_variable_value.py +7 -3
  270. vellum/types/search_filters_request.py +7 -3
  271. vellum/types/search_node_result.py +7 -3
  272. vellum/types/search_node_result_data.py +7 -3
  273. vellum/types/search_request_options_request.py +7 -3
  274. vellum/types/search_response.py +7 -3
  275. vellum/types/search_result.py +7 -3
  276. vellum/types/search_result_document.py +7 -3
  277. vellum/types/search_result_document_request.py +7 -3
  278. vellum/types/search_result_merging_request.py +7 -3
  279. vellum/types/search_result_meta.py +7 -3
  280. vellum/types/search_result_meta_request.py +7 -3
  281. vellum/types/search_result_meta_source.py +21 -5
  282. vellum/types/search_result_meta_source_request.py +21 -5
  283. vellum/types/search_result_request.py +7 -3
  284. vellum/types/search_weights_request.py +7 -3
  285. vellum/types/sentence_chunker_config.py +7 -3
  286. vellum/types/sentence_chunker_config_request.py +7 -3
  287. vellum/types/sentence_chunking.py +7 -3
  288. vellum/types/sentence_chunking_request.py +7 -3
  289. vellum/types/slim_deployment_read.py +11 -3
  290. vellum/types/slim_document.py +7 -3
  291. vellum/types/slim_workflow_deployment.py +12 -3
  292. vellum/types/streaming_execute_prompt_event.py +7 -3
  293. vellum/types/streaming_prompt_execution_meta.py +7 -3
  294. vellum/types/streaming_workflow_node_result_event.py +7 -3
  295. vellum/types/string_chat_message_content.py +7 -3
  296. vellum/types/string_chat_message_content_request.py +7 -3
  297. vellum/types/string_input_request.py +7 -3
  298. vellum/types/string_parameter_config.py +39 -0
  299. vellum/types/string_parameter_config_request.py +39 -0
  300. vellum/types/string_variable_value.py +7 -3
  301. vellum/types/string_vellum_value.py +7 -3
  302. vellum/types/string_vellum_value_request.py +7 -3
  303. vellum/types/submit_completion_actual_request.py +7 -3
  304. vellum/types/submit_workflow_execution_actual_request.py +67 -12
  305. vellum/types/subworkflow_node_result.py +7 -3
  306. vellum/types/subworkflow_node_result_data.py +7 -3
  307. vellum/types/templating_node_array_result.py +7 -3
  308. vellum/types/templating_node_chat_history_result.py +7 -3
  309. vellum/types/templating_node_error_result.py +7 -3
  310. vellum/types/templating_node_function_call_result.py +7 -3
  311. vellum/types/templating_node_json_result.py +7 -3
  312. vellum/types/templating_node_number_result.py +7 -3
  313. vellum/types/templating_node_result.py +7 -3
  314. vellum/types/templating_node_result_data.py +7 -3
  315. vellum/types/templating_node_result_output.py +144 -32
  316. vellum/types/templating_node_search_results_result.py +7 -3
  317. vellum/types/templating_node_string_result.py +7 -3
  318. vellum/types/terminal_node_array_result.py +7 -3
  319. vellum/types/terminal_node_chat_history_result.py +7 -3
  320. vellum/types/terminal_node_error_result.py +7 -3
  321. vellum/types/terminal_node_function_call_result.py +7 -3
  322. vellum/types/terminal_node_json_result.py +7 -3
  323. vellum/types/terminal_node_number_result.py +7 -3
  324. vellum/types/terminal_node_result.py +7 -3
  325. vellum/types/terminal_node_result_data.py +7 -3
  326. vellum/types/terminal_node_result_output.py +152 -32
  327. vellum/types/terminal_node_search_results_result.py +7 -3
  328. vellum/types/terminal_node_string_result.py +7 -3
  329. vellum/types/test_case_array_variable_value.py +7 -3
  330. vellum/types/test_case_chat_history_variable_value.py +7 -3
  331. vellum/types/test_case_error_variable_value.py +7 -3
  332. vellum/types/test_case_function_call_variable_value.py +7 -3
  333. vellum/types/test_case_json_variable_value.py +8 -4
  334. vellum/types/test_case_number_variable_value.py +7 -3
  335. vellum/types/test_case_search_results_variable_value.py +7 -3
  336. vellum/types/test_case_string_variable_value.py +7 -3
  337. vellum/types/test_case_variable_value.py +152 -32
  338. vellum/types/test_suite_run_deployment_release_tag_exec_config.py +7 -3
  339. vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +7 -3
  340. vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +7 -3
  341. vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +7 -3
  342. vellum/types/test_suite_run_exec_config.py +57 -12
  343. vellum/types/test_suite_run_exec_config_request.py +61 -12
  344. vellum/types/test_suite_run_execution.py +7 -3
  345. vellum/types/test_suite_run_execution_array_output.py +7 -3
  346. vellum/types/test_suite_run_execution_chat_history_output.py +7 -3
  347. vellum/types/test_suite_run_execution_error_output.py +7 -3
  348. vellum/types/test_suite_run_execution_function_call_output.py +7 -3
  349. vellum/types/test_suite_run_execution_json_output.py +7 -3
  350. vellum/types/test_suite_run_execution_metric_definition.py +7 -3
  351. vellum/types/test_suite_run_execution_metric_result.py +7 -3
  352. vellum/types/test_suite_run_execution_number_output.py +7 -3
  353. vellum/types/test_suite_run_execution_output.py +152 -32
  354. vellum/types/test_suite_run_execution_search_results_output.py +7 -3
  355. vellum/types/test_suite_run_execution_string_output.py +7 -3
  356. vellum/types/test_suite_run_external_exec_config.py +7 -3
  357. vellum/types/test_suite_run_external_exec_config_data.py +7 -3
  358. vellum/types/test_suite_run_external_exec_config_data_request.py +7 -3
  359. vellum/types/test_suite_run_external_exec_config_request.py +7 -3
  360. vellum/types/test_suite_run_metric_error_output.py +7 -3
  361. vellum/types/test_suite_run_metric_number_output.py +7 -3
  362. vellum/types/test_suite_run_metric_output.py +55 -12
  363. vellum/types/test_suite_run_metric_string_output.py +7 -3
  364. vellum/types/test_suite_run_read.py +7 -3
  365. vellum/types/test_suite_run_test_suite.py +7 -3
  366. vellum/types/test_suite_run_workflow_release_tag_exec_config.py +7 -3
  367. vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +7 -3
  368. vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +7 -3
  369. vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +7 -3
  370. vellum/types/test_suite_test_case.py +7 -3
  371. vellum/types/test_suite_test_case_bulk_operation_request.py +75 -16
  372. vellum/types/test_suite_test_case_bulk_result.py +74 -16
  373. vellum/types/test_suite_test_case_create_bulk_operation_request.py +7 -3
  374. vellum/types/test_suite_test_case_created_bulk_result.py +7 -3
  375. vellum/types/test_suite_test_case_created_bulk_result_data.py +7 -3
  376. vellum/types/test_suite_test_case_delete_bulk_operation_data_request.py +7 -3
  377. vellum/types/test_suite_test_case_delete_bulk_operation_request.py +7 -3
  378. vellum/types/test_suite_test_case_deleted_bulk_result.py +7 -3
  379. vellum/types/test_suite_test_case_deleted_bulk_result_data.py +7 -3
  380. vellum/types/test_suite_test_case_rejected_bulk_result.py +7 -3
  381. vellum/types/test_suite_test_case_replace_bulk_operation_request.py +7 -3
  382. vellum/types/test_suite_test_case_replaced_bulk_result.py +7 -3
  383. vellum/types/test_suite_test_case_replaced_bulk_result_data.py +7 -3
  384. vellum/types/test_suite_test_case_upsert_bulk_operation_request.py +7 -3
  385. vellum/types/{execute_workflow_error_response.py → tik_token_tokenizer_config.py} +11 -6
  386. vellum/types/{generate_error_response.py → tik_token_tokenizer_config_request.py} +11 -6
  387. vellum/types/token_overlapping_window_chunker_config.py +7 -3
  388. vellum/types/token_overlapping_window_chunker_config_request.py +7 -3
  389. vellum/types/token_overlapping_window_chunking.py +7 -3
  390. vellum/types/token_overlapping_window_chunking_request.py +7 -3
  391. vellum/types/upload_document_response.py +7 -3
  392. vellum/types/upsert_test_suite_test_case_request.py +7 -3
  393. vellum/types/vellum_error.py +7 -3
  394. vellum/types/vellum_error_request.py +7 -3
  395. vellum/types/vellum_image.py +7 -3
  396. vellum/types/vellum_image_request.py +7 -3
  397. vellum/types/vellum_variable.py +7 -3
  398. vellum/types/visibility_enum.py +5 -0
  399. vellum/types/workflow_deployment_read.py +12 -3
  400. vellum/types/workflow_event_error.py +7 -3
  401. vellum/types/workflow_execution_actual_chat_history_request.py +7 -3
  402. vellum/types/workflow_execution_actual_json_request.py +7 -3
  403. vellum/types/workflow_execution_actual_string_request.py +7 -3
  404. vellum/types/workflow_execution_node_result_event.py +7 -3
  405. vellum/types/workflow_execution_workflow_result_event.py +7 -3
  406. vellum/types/workflow_expand_meta_request.py +7 -3
  407. vellum/types/workflow_node_result_data.py +189 -45
  408. vellum/types/workflow_node_result_event.py +101 -20
  409. vellum/types/workflow_output.py +171 -36
  410. vellum/types/workflow_output_array.py +7 -3
  411. vellum/types/workflow_output_chat_history.py +7 -3
  412. vellum/types/workflow_output_error.py +7 -3
  413. vellum/types/workflow_output_function_call.py +7 -3
  414. vellum/types/workflow_output_image.py +7 -3
  415. vellum/types/workflow_output_json.py +7 -3
  416. vellum/types/workflow_output_number.py +7 -3
  417. vellum/types/workflow_output_search_results.py +7 -3
  418. vellum/types/workflow_output_string.py +7 -3
  419. vellum/types/workflow_release_tag_read.py +7 -3
  420. vellum/types/workflow_release_tag_workflow_deployment_history_item.py +7 -3
  421. vellum/types/workflow_request_chat_history_input_request.py +7 -3
  422. vellum/types/workflow_request_input_request.py +72 -16
  423. vellum/types/workflow_request_json_input_request.py +7 -3
  424. vellum/types/workflow_request_number_input_request.py +7 -3
  425. vellum/types/workflow_request_string_input_request.py +7 -3
  426. vellum/types/workflow_result_event.py +7 -3
  427. vellum/types/workflow_result_event_output_data.py +178 -33
  428. vellum/types/workflow_result_event_output_data_array.py +7 -3
  429. vellum/types/workflow_result_event_output_data_chat_history.py +7 -3
  430. vellum/types/workflow_result_event_output_data_error.py +7 -3
  431. vellum/types/workflow_result_event_output_data_function_call.py +7 -3
  432. vellum/types/workflow_result_event_output_data_json.py +7 -3
  433. vellum/types/workflow_result_event_output_data_number.py +7 -3
  434. vellum/types/workflow_result_event_output_data_search_results.py +7 -3
  435. vellum/types/workflow_result_event_output_data_string.py +7 -3
  436. vellum/types/workflow_stream_event.py +43 -8
  437. {vellum_ai-0.7.3.dist-info → vellum_ai-0.7.5.dist-info}/METADATA +13 -1
  438. vellum_ai-0.7.5.dist-info/RECORD +502 -0
  439. vellum/types/array_enum.py +0 -5
  440. vellum/types/chat_history_enum.py +0 -5
  441. vellum/types/create_enum.py +0 -5
  442. vellum/types/created_enum.py +0 -5
  443. vellum/types/delete_enum.py +0 -5
  444. vellum/types/deleted_enum.py +0 -5
  445. vellum/types/error_enum.py +0 -5
  446. vellum/types/function_call_enum.py +0 -5
  447. vellum/types/hkunlp_instructor_xl_enum.py +0 -5
  448. vellum/types/image_enum.py +0 -5
  449. vellum/types/initiated_enum.py +0 -5
  450. vellum/types/intfloat_multilingual_e_5_large_enum.py +0 -5
  451. vellum/types/json_enum.py +0 -5
  452. vellum/types/merge_enum.py +0 -5
  453. vellum/types/metric_enum.py +0 -5
  454. vellum/types/number_enum.py +0 -5
  455. vellum/types/pdf_enum.py +0 -5
  456. vellum/types/reducto_chunker_enum.py +0 -5
  457. vellum/types/rejected_enum.py +0 -5
  458. vellum/types/replace_enum.py +0 -5
  459. vellum/types/replaced_enum.py +0 -5
  460. vellum/types/search_error_response.py +0 -28
  461. vellum/types/search_results_enum.py +0 -5
  462. vellum/types/sentence_chunker_enum.py +0 -5
  463. vellum/types/sentence_transformers_multi_qa_mpnet_base_cos_v_1_enum.py +0 -5
  464. vellum/types/sentence_transformers_multi_qa_mpnet_base_dot_v_1_enum.py +0 -5
  465. vellum/types/streaming_enum.py +0 -5
  466. vellum/types/string_enum.py +0 -5
  467. vellum/types/submit_completion_actuals_error_response.py +0 -25
  468. vellum/types/subworkflow_enum.py +0 -5
  469. vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +0 -5
  470. vellum/types/test_suite_run_external_exec_config_type_enum.py +0 -5
  471. vellum/types/test_suite_run_metric_error_output_type_enum.py +0 -5
  472. vellum/types/test_suite_run_metric_number_output_type_enum.py +0 -5
  473. vellum/types/test_suite_run_metric_string_output_type_enum.py +0 -5
  474. vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +0 -5
  475. vellum/types/text_embedding_3_large_enum.py +0 -5
  476. vellum/types/text_embedding_3_small_enum.py +0 -5
  477. vellum/types/text_embedding_ada_002_enum.py +0 -5
  478. vellum/types/token_overlapping_window_chunker_enum.py +0 -5
  479. vellum/types/upload_document_error_response.py +0 -25
  480. vellum/types/upsert_enum.py +0 -5
  481. vellum_ai-0.7.3.dist-info/RECORD +0 -496
  482. {vellum_ai-0.7.3.dist-info → vellum_ai-0.7.5.dist-info}/LICENSE +0 -0
  483. {vellum_ai-0.7.3.dist-info → vellum_ai-0.7.5.dist-info}/WHEEL +0 -0
@@ -1,14 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
- import urllib.parse
5
4
  from json.decoder import JSONDecodeError
6
5
 
7
6
  from ...core.api_error import ApiError
8
7
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
8
  from ...core.jsonable_encoder import jsonable_encoder
10
9
  from ...core.pydantic_utilities import pydantic_v1
11
- from ...core.remove_none_from_dict import remove_none_from_dict
12
10
  from ...core.request_options import RequestOptions
13
11
  from ...types.deployment_read import DeploymentRead
14
12
  from ...types.named_scenario_input_request import NamedScenarioInputRequest
@@ -25,7 +23,7 @@ class SandboxesClient:
25
23
  def deploy_prompt(
26
24
  self,
27
25
  id: str,
28
- prompt_id: str,
26
+ prompt_variant_id: str,
29
27
  *,
30
28
  prompt_deployment_id: typing.Optional[str] = OMIT,
31
29
  prompt_deployment_name: typing.Optional[str] = OMIT,
@@ -34,21 +32,36 @@ class SandboxesClient:
34
32
  request_options: typing.Optional[RequestOptions] = None,
35
33
  ) -> DeploymentRead:
36
34
  """
37
- Parameters:
38
- - id: str. A UUID string identifying this sandbox.
35
+ Parameters
36
+ ----------
37
+ id : str
38
+ A UUID string identifying this sandbox.
39
39
 
40
- - prompt_id: str. An ID identifying the Prompt you'd like to deploy.
40
+ prompt_variant_id : str
41
+ An ID identifying the Prompt you'd like to deploy.
41
42
 
42
- - prompt_deployment_id: typing.Optional[str]. The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
43
+ prompt_deployment_id : typing.Optional[str]
44
+ The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
43
45
 
44
- - prompt_deployment_name: typing.Optional[str]. The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
46
+ prompt_deployment_name : typing.Optional[str]
47
+ The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
45
48
 
46
- - label: typing.Optional[str]. In the event that a new Prompt Deployment is created, this will be the label it's given.
49
+ label : typing.Optional[str]
50
+ In the event that a new Prompt Deployment is created, this will be the label it's given.
47
51
 
48
- - release_tags: typing.Optional[typing.Sequence[str]]. Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
52
+ release_tags : typing.Optional[typing.Sequence[str]]
53
+ Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
49
54
 
50
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
51
- ---
55
+ request_options : typing.Optional[RequestOptions]
56
+ Request-specific configuration.
57
+
58
+ Returns
59
+ -------
60
+ DeploymentRead
61
+
62
+
63
+ Examples
64
+ --------
52
65
  from vellum.client import Vellum
53
66
 
54
67
  client = Vellum(
@@ -56,50 +69,25 @@ class SandboxesClient:
56
69
  )
57
70
  client.sandboxes.deploy_prompt(
58
71
  id="id",
59
- prompt_id="prompt_id",
72
+ prompt_variant_id="prompt_variant_id",
60
73
  )
61
74
  """
62
- _request: typing.Dict[str, typing.Any] = {}
63
- if prompt_deployment_id is not OMIT:
64
- _request["prompt_deployment_id"] = prompt_deployment_id
65
- if prompt_deployment_name is not OMIT:
66
- _request["prompt_deployment_name"] = prompt_deployment_name
67
- if label is not OMIT:
68
- _request["label"] = label
69
- if release_tags is not OMIT:
70
- _request["release_tags"] = release_tags
71
75
  _response = self._client_wrapper.httpx_client.request(
76
+ f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_variant_id)}/deploy",
77
+ base_url=self._client_wrapper.get_environment().default,
72
78
  method="POST",
73
- url=urllib.parse.urljoin(
74
- f"{self._client_wrapper.get_environment().default}/",
75
- f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_id)}/deploy",
76
- ),
77
- params=jsonable_encoder(
78
- request_options.get("additional_query_parameters") if request_options is not None else None
79
- ),
80
- json=jsonable_encoder(_request)
81
- if request_options is None or request_options.get("additional_body_parameters") is None
82
- else {
83
- **jsonable_encoder(_request),
84
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
79
+ json={
80
+ "prompt_deployment_id": prompt_deployment_id,
81
+ "prompt_deployment_name": prompt_deployment_name,
82
+ "label": label,
83
+ "release_tags": release_tags,
85
84
  },
86
- headers=jsonable_encoder(
87
- remove_none_from_dict(
88
- {
89
- **self._client_wrapper.get_headers(),
90
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
91
- }
92
- )
93
- ),
94
- timeout=request_options.get("timeout_in_seconds")
95
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
96
- else self._client_wrapper.get_timeout(),
97
- retries=0,
98
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
85
+ request_options=request_options,
86
+ omit=OMIT,
99
87
  )
100
- if 200 <= _response.status_code < 300:
101
- return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
102
88
  try:
89
+ if 200 <= _response.status_code < 300:
90
+ return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
103
91
  _response_json = _response.json()
104
92
  except JSONDecodeError:
105
93
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -109,8 +97,8 @@ class SandboxesClient:
109
97
  self,
110
98
  id: str,
111
99
  *,
112
- label: typing.Optional[str] = OMIT,
113
100
  inputs: typing.Sequence[NamedScenarioInputRequest],
101
+ label: typing.Optional[str] = OMIT,
114
102
  scenario_id: typing.Optional[str] = OMIT,
115
103
  request_options: typing.Optional[RequestOptions] = None,
116
104
  ) -> SandboxScenario:
@@ -123,17 +111,29 @@ class SandboxesClient:
123
111
  Note that a full replacement of the scenario is performed, so any fields not provided will be removed
124
112
  or overwritten with default values.
125
113
 
126
- Parameters:
127
- - id: str. A UUID string identifying this sandbox.
114
+ Parameters
115
+ ----------
116
+ id : str
117
+ A UUID string identifying this sandbox.
118
+
119
+ inputs : typing.Sequence[NamedScenarioInputRequest]
120
+ The inputs for the scenario
128
121
 
129
- - label: typing.Optional[str].
122
+ label : typing.Optional[str]
130
123
 
131
- - inputs: typing.Sequence[NamedScenarioInputRequest]. The inputs for the scenario
124
+ scenario_id : typing.Optional[str]
125
+ The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
132
126
 
133
- - scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
127
+ request_options : typing.Optional[RequestOptions]
128
+ Request-specific configuration.
134
129
 
135
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
136
- ---
130
+ Returns
131
+ -------
132
+ SandboxScenario
133
+
134
+
135
+ Examples
136
+ --------
137
137
  from vellum.client import Vellum
138
138
 
139
139
  client = Vellum(
@@ -145,42 +145,17 @@ class SandboxesClient:
145
145
  inputs=[],
146
146
  )
147
147
  """
148
- _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
149
- if label is not OMIT:
150
- _request["label"] = label
151
- if scenario_id is not OMIT:
152
- _request["scenario_id"] = scenario_id
153
148
  _response = self._client_wrapper.httpx_client.request(
149
+ f"v1/sandboxes/{jsonable_encoder(id)}/scenarios",
150
+ base_url=self._client_wrapper.get_environment().default,
154
151
  method="POST",
155
- url=urllib.parse.urljoin(
156
- f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{jsonable_encoder(id)}/scenarios"
157
- ),
158
- params=jsonable_encoder(
159
- request_options.get("additional_query_parameters") if request_options is not None else None
160
- ),
161
- json=jsonable_encoder(_request)
162
- if request_options is None or request_options.get("additional_body_parameters") is None
163
- else {
164
- **jsonable_encoder(_request),
165
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
166
- },
167
- headers=jsonable_encoder(
168
- remove_none_from_dict(
169
- {
170
- **self._client_wrapper.get_headers(),
171
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
172
- }
173
- )
174
- ),
175
- timeout=request_options.get("timeout_in_seconds")
176
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
177
- else self._client_wrapper.get_timeout(),
178
- retries=0,
179
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
152
+ json={"label": label, "inputs": inputs, "scenario_id": scenario_id},
153
+ request_options=request_options,
154
+ omit=OMIT,
180
155
  )
181
- if 200 <= _response.status_code < 300:
182
- return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
183
156
  try:
157
+ if 200 <= _response.status_code < 300:
158
+ return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
184
159
  _response_json = _response.json()
185
160
  except JSONDecodeError:
186
161
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -192,13 +167,23 @@ class SandboxesClient:
192
167
  """
193
168
  Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
194
169
 
195
- Parameters:
196
- - id: str. A UUID string identifying this sandbox.
170
+ Parameters
171
+ ----------
172
+ id : str
173
+ A UUID string identifying this sandbox.
197
174
 
198
- - scenario_id: str. An id identifying the scenario that you'd like to delete
175
+ scenario_id : str
176
+ An id identifying the scenario that you'd like to delete
199
177
 
200
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
201
- ---
178
+ request_options : typing.Optional[RequestOptions]
179
+ Request-specific configuration.
180
+
181
+ Returns
182
+ -------
183
+ None
184
+
185
+ Examples
186
+ --------
202
187
  from vellum.client import Vellum
203
188
 
204
189
  client = Vellum(
@@ -210,31 +195,14 @@ class SandboxesClient:
210
195
  )
211
196
  """
212
197
  _response = self._client_wrapper.httpx_client.request(
198
+ f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
199
+ base_url=self._client_wrapper.get_environment().default,
213
200
  method="DELETE",
214
- url=urllib.parse.urljoin(
215
- f"{self._client_wrapper.get_environment().default}/",
216
- f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
217
- ),
218
- params=jsonable_encoder(
219
- request_options.get("additional_query_parameters") if request_options is not None else None
220
- ),
221
- headers=jsonable_encoder(
222
- remove_none_from_dict(
223
- {
224
- **self._client_wrapper.get_headers(),
225
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
226
- }
227
- )
228
- ),
229
- timeout=request_options.get("timeout_in_seconds")
230
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
231
- else self._client_wrapper.get_timeout(),
232
- retries=0,
233
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
201
+ request_options=request_options,
234
202
  )
235
- if 200 <= _response.status_code < 300:
236
- return
237
203
  try:
204
+ if 200 <= _response.status_code < 300:
205
+ return
238
206
  _response_json = _response.json()
239
207
  except JSONDecodeError:
240
208
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +216,7 @@ class AsyncSandboxesClient:
248
216
  async def deploy_prompt(
249
217
  self,
250
218
  id: str,
251
- prompt_id: str,
219
+ prompt_variant_id: str,
252
220
  *,
253
221
  prompt_deployment_id: typing.Optional[str] = OMIT,
254
222
  prompt_deployment_name: typing.Optional[str] = OMIT,
@@ -257,72 +225,70 @@ class AsyncSandboxesClient:
257
225
  request_options: typing.Optional[RequestOptions] = None,
258
226
  ) -> DeploymentRead:
259
227
  """
260
- Parameters:
261
- - id: str. A UUID string identifying this sandbox.
228
+ Parameters
229
+ ----------
230
+ id : str
231
+ A UUID string identifying this sandbox.
232
+
233
+ prompt_variant_id : str
234
+ An ID identifying the Prompt you'd like to deploy.
262
235
 
263
- - prompt_id: str. An ID identifying the Prompt you'd like to deploy.
236
+ prompt_deployment_id : typing.Optional[str]
237
+ The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
264
238
 
265
- - prompt_deployment_id: typing.Optional[str]. The Vellum-generated ID of the Prompt Deployment you'd like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.
239
+ prompt_deployment_name : typing.Optional[str]
240
+ The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
266
241
 
267
- - prompt_deployment_name: typing.Optional[str]. The unique name of the Prompt Deployment you'd like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
242
+ label : typing.Optional[str]
243
+ In the event that a new Prompt Deployment is created, this will be the label it's given.
268
244
 
269
- - label: typing.Optional[str]. In the event that a new Prompt Deployment is created, this will be the label it's given.
245
+ release_tags : typing.Optional[typing.Sequence[str]]
246
+ Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
270
247
 
271
- - release_tags: typing.Optional[typing.Sequence[str]]. Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
248
+ request_options : typing.Optional[RequestOptions]
249
+ Request-specific configuration.
250
+
251
+ Returns
252
+ -------
253
+ DeploymentRead
254
+
255
+
256
+ Examples
257
+ --------
258
+ import asyncio
272
259
 
273
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
274
- ---
275
260
  from vellum.client import AsyncVellum
276
261
 
277
262
  client = AsyncVellum(
278
263
  api_key="YOUR_API_KEY",
279
264
  )
280
- await client.sandboxes.deploy_prompt(
281
- id="id",
282
- prompt_id="prompt_id",
283
- )
265
+
266
+
267
+ async def main() -> None:
268
+ await client.sandboxes.deploy_prompt(
269
+ id="id",
270
+ prompt_variant_id="prompt_variant_id",
271
+ )
272
+
273
+
274
+ asyncio.run(main())
284
275
  """
285
- _request: typing.Dict[str, typing.Any] = {}
286
- if prompt_deployment_id is not OMIT:
287
- _request["prompt_deployment_id"] = prompt_deployment_id
288
- if prompt_deployment_name is not OMIT:
289
- _request["prompt_deployment_name"] = prompt_deployment_name
290
- if label is not OMIT:
291
- _request["label"] = label
292
- if release_tags is not OMIT:
293
- _request["release_tags"] = release_tags
294
276
  _response = await self._client_wrapper.httpx_client.request(
277
+ f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_variant_id)}/deploy",
278
+ base_url=self._client_wrapper.get_environment().default,
295
279
  method="POST",
296
- url=urllib.parse.urljoin(
297
- f"{self._client_wrapper.get_environment().default}/",
298
- f"v1/sandboxes/{jsonable_encoder(id)}/prompts/{jsonable_encoder(prompt_id)}/deploy",
299
- ),
300
- params=jsonable_encoder(
301
- request_options.get("additional_query_parameters") if request_options is not None else None
302
- ),
303
- json=jsonable_encoder(_request)
304
- if request_options is None or request_options.get("additional_body_parameters") is None
305
- else {
306
- **jsonable_encoder(_request),
307
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
280
+ json={
281
+ "prompt_deployment_id": prompt_deployment_id,
282
+ "prompt_deployment_name": prompt_deployment_name,
283
+ "label": label,
284
+ "release_tags": release_tags,
308
285
  },
309
- headers=jsonable_encoder(
310
- remove_none_from_dict(
311
- {
312
- **self._client_wrapper.get_headers(),
313
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
314
- }
315
- )
316
- ),
317
- timeout=request_options.get("timeout_in_seconds")
318
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
319
- else self._client_wrapper.get_timeout(),
320
- retries=0,
321
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
286
+ request_options=request_options,
287
+ omit=OMIT,
322
288
  )
323
- if 200 <= _response.status_code < 300:
324
- return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
325
289
  try:
290
+ if 200 <= _response.status_code < 300:
291
+ return pydantic_v1.parse_obj_as(DeploymentRead, _response.json()) # type: ignore
326
292
  _response_json = _response.json()
327
293
  except JSONDecodeError:
328
294
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -332,8 +298,8 @@ class AsyncSandboxesClient:
332
298
  self,
333
299
  id: str,
334
300
  *,
335
- label: typing.Optional[str] = OMIT,
336
301
  inputs: typing.Sequence[NamedScenarioInputRequest],
302
+ label: typing.Optional[str] = OMIT,
337
303
  scenario_id: typing.Optional[str] = OMIT,
338
304
  request_options: typing.Optional[RequestOptions] = None,
339
305
  ) -> SandboxScenario:
@@ -346,64 +312,59 @@ class AsyncSandboxesClient:
346
312
  Note that a full replacement of the scenario is performed, so any fields not provided will be removed
347
313
  or overwritten with default values.
348
314
 
349
- Parameters:
350
- - id: str. A UUID string identifying this sandbox.
315
+ Parameters
316
+ ----------
317
+ id : str
318
+ A UUID string identifying this sandbox.
351
319
 
352
- - label: typing.Optional[str].
320
+ inputs : typing.Sequence[NamedScenarioInputRequest]
321
+ The inputs for the scenario
353
322
 
354
- - inputs: typing.Sequence[NamedScenarioInputRequest]. The inputs for the scenario
323
+ label : typing.Optional[str]
355
324
 
356
- - scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
325
+ scenario_id : typing.Optional[str]
326
+ The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
327
+
328
+ request_options : typing.Optional[RequestOptions]
329
+ Request-specific configuration.
330
+
331
+ Returns
332
+ -------
333
+ SandboxScenario
334
+
335
+
336
+ Examples
337
+ --------
338
+ import asyncio
357
339
 
358
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
359
- ---
360
340
  from vellum.client import AsyncVellum
361
341
 
362
342
  client = AsyncVellum(
363
343
  api_key="YOUR_API_KEY",
364
344
  )
365
- await client.sandboxes.upsert_sandbox_scenario(
366
- id="id",
367
- label="Scenario 1",
368
- inputs=[],
369
- )
345
+
346
+
347
+ async def main() -> None:
348
+ await client.sandboxes.upsert_sandbox_scenario(
349
+ id="id",
350
+ label="Scenario 1",
351
+ inputs=[],
352
+ )
353
+
354
+
355
+ asyncio.run(main())
370
356
  """
371
- _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
372
- if label is not OMIT:
373
- _request["label"] = label
374
- if scenario_id is not OMIT:
375
- _request["scenario_id"] = scenario_id
376
357
  _response = await self._client_wrapper.httpx_client.request(
358
+ f"v1/sandboxes/{jsonable_encoder(id)}/scenarios",
359
+ base_url=self._client_wrapper.get_environment().default,
377
360
  method="POST",
378
- url=urllib.parse.urljoin(
379
- f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{jsonable_encoder(id)}/scenarios"
380
- ),
381
- params=jsonable_encoder(
382
- request_options.get("additional_query_parameters") if request_options is not None else None
383
- ),
384
- json=jsonable_encoder(_request)
385
- if request_options is None or request_options.get("additional_body_parameters") is None
386
- else {
387
- **jsonable_encoder(_request),
388
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
389
- },
390
- headers=jsonable_encoder(
391
- remove_none_from_dict(
392
- {
393
- **self._client_wrapper.get_headers(),
394
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
395
- }
396
- )
397
- ),
398
- timeout=request_options.get("timeout_in_seconds")
399
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
400
- else self._client_wrapper.get_timeout(),
401
- retries=0,
402
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
361
+ json={"label": label, "inputs": inputs, "scenario_id": scenario_id},
362
+ request_options=request_options,
363
+ omit=OMIT,
403
364
  )
404
- if 200 <= _response.status_code < 300:
405
- return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
406
365
  try:
366
+ if 200 <= _response.status_code < 300:
367
+ return pydantic_v1.parse_obj_as(SandboxScenario, _response.json()) # type: ignore
407
368
  _response_json = _response.json()
408
369
  except JSONDecodeError:
409
370
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -415,49 +376,50 @@ class AsyncSandboxesClient:
415
376
  """
416
377
  Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
417
378
 
418
- Parameters:
419
- - id: str. A UUID string identifying this sandbox.
379
+ Parameters
380
+ ----------
381
+ id : str
382
+ A UUID string identifying this sandbox.
383
+
384
+ scenario_id : str
385
+ An id identifying the scenario that you'd like to delete
386
+
387
+ request_options : typing.Optional[RequestOptions]
388
+ Request-specific configuration.
420
389
 
421
- - scenario_id: str. An id identifying the scenario that you'd like to delete
390
+ Returns
391
+ -------
392
+ None
393
+
394
+ Examples
395
+ --------
396
+ import asyncio
422
397
 
423
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
424
- ---
425
398
  from vellum.client import AsyncVellum
426
399
 
427
400
  client = AsyncVellum(
428
401
  api_key="YOUR_API_KEY",
429
402
  )
430
- await client.sandboxes.delete_sandbox_scenario(
431
- id="id",
432
- scenario_id="scenario_id",
433
- )
403
+
404
+
405
+ async def main() -> None:
406
+ await client.sandboxes.delete_sandbox_scenario(
407
+ id="id",
408
+ scenario_id="scenario_id",
409
+ )
410
+
411
+
412
+ asyncio.run(main())
434
413
  """
435
414
  _response = await self._client_wrapper.httpx_client.request(
415
+ f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
416
+ base_url=self._client_wrapper.get_environment().default,
436
417
  method="DELETE",
437
- url=urllib.parse.urljoin(
438
- f"{self._client_wrapper.get_environment().default}/",
439
- f"v1/sandboxes/{jsonable_encoder(id)}/scenarios/{jsonable_encoder(scenario_id)}",
440
- ),
441
- params=jsonable_encoder(
442
- request_options.get("additional_query_parameters") if request_options is not None else None
443
- ),
444
- headers=jsonable_encoder(
445
- remove_none_from_dict(
446
- {
447
- **self._client_wrapper.get_headers(),
448
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
449
- }
450
- )
451
- ),
452
- timeout=request_options.get("timeout_in_seconds")
453
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
454
- else self._client_wrapper.get_timeout(),
455
- retries=0,
456
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
418
+ request_options=request_options,
457
419
  )
458
- if 200 <= _response.status_code < 300:
459
- return
460
420
  try:
421
+ if 200 <= _response.status_code < 300:
422
+ return
461
423
  _response_json = _response.json()
462
424
  except JSONDecodeError:
463
425
  raise ApiError(status_code=_response.status_code, body=_response.text)