vellum-ai 0.3.14__py3-none-any.whl → 0.3.16__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. vellum/__init__.py +22 -0
  2. vellum/client.py +846 -100
  3. vellum/core/__init__.py +8 -0
  4. vellum/core/client_wrapper.py +27 -8
  5. vellum/core/file.py +38 -0
  6. vellum/core/http_client.py +130 -0
  7. vellum/core/jsonable_encoder.py +2 -2
  8. vellum/core/request_options.py +32 -0
  9. vellum/resources/deployments/client.py +161 -24
  10. vellum/resources/document_indexes/client.py +337 -80
  11. vellum/resources/documents/client.py +278 -58
  12. vellum/resources/folder_entities/client.py +60 -10
  13. vellum/resources/model_versions/client.py +48 -8
  14. vellum/resources/registered_prompts/client.py +52 -6
  15. vellum/resources/sandboxes/client.py +108 -26
  16. vellum/resources/test_suite_runs/client.py +221 -38
  17. vellum/resources/test_suites/client.py +110 -24
  18. vellum/resources/workflow_deployments/client.py +110 -14
  19. vellum/types/__init__.py +20 -0
  20. vellum/types/api_node_result.py +1 -0
  21. vellum/types/api_node_result_data.py +4 -2
  22. vellum/types/array_chat_message_content.py +1 -0
  23. vellum/types/array_chat_message_content_item.py +6 -5
  24. vellum/types/array_chat_message_content_item_request.py +6 -5
  25. vellum/types/array_chat_message_content_request.py +1 -0
  26. vellum/types/array_enum.py +2 -2
  27. vellum/types/array_variable_value_item.py +16 -10
  28. vellum/types/chat_history_enum.py +2 -2
  29. vellum/types/chat_history_input_request.py +6 -1
  30. vellum/types/chat_history_variable_value.py +2 -1
  31. vellum/types/chat_message.py +7 -5
  32. vellum/types/chat_message_content.py +8 -6
  33. vellum/types/chat_message_content_request.py +8 -6
  34. vellum/types/chat_message_request.py +7 -5
  35. vellum/types/code_execution_node_array_result.py +31 -0
  36. vellum/types/code_execution_node_chat_history_result.py +2 -1
  37. vellum/types/code_execution_node_error_result.py +2 -1
  38. vellum/types/code_execution_node_function_call_result.py +31 -0
  39. vellum/types/code_execution_node_json_result.py +2 -1
  40. vellum/types/code_execution_node_number_result.py +2 -1
  41. vellum/types/code_execution_node_result.py +1 -0
  42. vellum/types/code_execution_node_result_data.py +2 -1
  43. vellum/types/code_execution_node_result_output.py +36 -8
  44. vellum/types/code_execution_node_search_results_result.py +2 -1
  45. vellum/types/code_execution_node_string_result.py +2 -1
  46. vellum/types/conditional_node_result.py +1 -0
  47. vellum/types/conditional_node_result_data.py +2 -1
  48. vellum/types/deployment_provider_payload_response.py +1 -0
  49. vellum/types/deployment_read.py +32 -17
  50. vellum/types/document_document_to_document_index.py +21 -15
  51. vellum/types/document_index_read.py +32 -19
  52. vellum/types/document_read.py +34 -24
  53. vellum/types/document_status.py +2 -2
  54. vellum/types/enriched_normalized_completion.py +36 -19
  55. vellum/types/error_enum.py +2 -2
  56. vellum/types/error_variable_value.py +2 -1
  57. vellum/types/execute_prompt_api_error_response.py +5 -1
  58. vellum/types/execute_prompt_event.py +8 -6
  59. vellum/types/execute_prompt_response.py +4 -4
  60. vellum/types/execute_workflow_error_response.py +5 -1
  61. vellum/types/execute_workflow_response.py +3 -2
  62. vellum/types/execute_workflow_stream_error_response.py +5 -1
  63. vellum/types/execute_workflow_workflow_result_event.py +4 -4
  64. vellum/types/execution_array_vellum_value.py +7 -2
  65. vellum/types/execution_chat_history_vellum_value.py +7 -2
  66. vellum/types/execution_error_vellum_value.py +7 -2
  67. vellum/types/execution_function_call_vellum_value.py +7 -2
  68. vellum/types/execution_json_vellum_value.py +7 -2
  69. vellum/types/execution_number_vellum_value.py +7 -2
  70. vellum/types/execution_search_results_vellum_value.py +7 -2
  71. vellum/types/execution_string_vellum_value.py +7 -2
  72. vellum/types/execution_vellum_value.py +16 -10
  73. vellum/types/fulfilled_enum.py +2 -2
  74. vellum/types/fulfilled_execute_prompt_event.py +2 -1
  75. vellum/types/fulfilled_execute_prompt_response.py +12 -5
  76. vellum/types/fulfilled_execute_workflow_workflow_result_event.py +1 -0
  77. vellum/types/fulfilled_function_call.py +2 -1
  78. vellum/types/fulfilled_prompt_execution_meta.py +3 -2
  79. vellum/types/fulfilled_workflow_node_result_event.py +6 -5
  80. vellum/types/function_call.py +4 -4
  81. vellum/types/function_call_chat_message_content.py +1 -0
  82. vellum/types/function_call_chat_message_content_request.py +1 -0
  83. vellum/types/function_call_chat_message_content_value.py +2 -1
  84. vellum/types/function_call_chat_message_content_value_request.py +2 -1
  85. vellum/types/function_call_enum.py +2 -2
  86. vellum/types/function_call_variable_value.py +1 -0
  87. vellum/types/generate_error_response.py +5 -1
  88. vellum/types/generate_options_request.py +8 -5
  89. vellum/types/generate_request.py +15 -9
  90. vellum/types/generate_result.py +10 -6
  91. vellum/types/generate_result_data.py +5 -3
  92. vellum/types/generate_result_error.py +5 -1
  93. vellum/types/generate_stream_response.py +1 -0
  94. vellum/types/generate_stream_result.py +3 -2
  95. vellum/types/generate_stream_result_data.py +1 -0
  96. vellum/types/image_chat_message_content.py +1 -0
  97. vellum/types/image_chat_message_content_request.py +1 -0
  98. vellum/types/image_enum.py +2 -2
  99. vellum/types/image_variable_value.py +2 -1
  100. vellum/types/initiated_enum.py +2 -2
  101. vellum/types/initiated_execute_prompt_event.py +2 -1
  102. vellum/types/initiated_prompt_execution_meta.py +5 -4
  103. vellum/types/initiated_workflow_node_result_event.py +5 -4
  104. vellum/types/json_enum.py +2 -2
  105. vellum/types/json_input_request.py +6 -1
  106. vellum/types/json_variable_value.py +2 -1
  107. vellum/types/logprobs_enum.py +2 -2
  108. vellum/types/metadata_filter_config_request.py +7 -6
  109. vellum/types/metadata_filter_rule_request.py +7 -6
  110. vellum/types/model_version_build_config.py +12 -7
  111. vellum/types/model_version_exec_config.py +18 -11
  112. vellum/types/model_version_exec_config_parameters.py +7 -6
  113. vellum/types/model_version_read.py +51 -32
  114. vellum/types/model_version_sandbox_snapshot.py +17 -4
  115. vellum/types/named_test_case_chat_history_variable_value_request.py +2 -1
  116. vellum/types/named_test_case_error_variable_value_request.py +2 -1
  117. vellum/types/named_test_case_json_variable_value_request.py +2 -1
  118. vellum/types/named_test_case_number_variable_value_request.py +2 -1
  119. vellum/types/named_test_case_search_results_variable_value_request.py +2 -1
  120. vellum/types/named_test_case_string_variable_value_request.py +2 -1
  121. vellum/types/named_test_case_variable_value_request.py +12 -8
  122. vellum/types/node_input_compiled_array_value.py +2 -1
  123. vellum/types/node_input_compiled_chat_history_value.py +2 -1
  124. vellum/types/node_input_compiled_error_value.py +2 -1
  125. vellum/types/node_input_compiled_function_call.py +32 -0
  126. vellum/types/node_input_compiled_json_value.py +2 -1
  127. vellum/types/node_input_compiled_number_value.py +2 -1
  128. vellum/types/node_input_compiled_search_results_value.py +2 -1
  129. vellum/types/node_input_compiled_string_value.py +2 -1
  130. vellum/types/node_input_variable_compiled_value.py +26 -9
  131. vellum/types/node_output_compiled_array_value.py +2 -1
  132. vellum/types/node_output_compiled_chat_history_value.py +2 -1
  133. vellum/types/node_output_compiled_error_value.py +2 -1
  134. vellum/types/node_output_compiled_function_value.py +2 -1
  135. vellum/types/node_output_compiled_json_value.py +2 -1
  136. vellum/types/node_output_compiled_number_value.py +2 -1
  137. vellum/types/node_output_compiled_search_results_value.py +2 -1
  138. vellum/types/node_output_compiled_string_value.py +2 -1
  139. vellum/types/node_output_compiled_value.py +16 -10
  140. vellum/types/normalized_log_probs.py +2 -1
  141. vellum/types/normalized_token_log_probs.py +3 -2
  142. vellum/types/number_enum.py +2 -2
  143. vellum/types/number_variable_value.py +2 -1
  144. vellum/types/paginated_document_index_read_list.py +5 -4
  145. vellum/types/paginated_slim_deployment_read_list.py +5 -4
  146. vellum/types/paginated_slim_document_list.py +5 -4
  147. vellum/types/paginated_slim_workflow_deployment_list.py +5 -4
  148. vellum/types/paginated_test_suite_run_execution_list.py +5 -4
  149. vellum/types/prompt_deployment_expand_meta_request_request.py +25 -15
  150. vellum/types/prompt_deployment_input_request.py +6 -5
  151. vellum/types/prompt_execution_meta.py +6 -5
  152. vellum/types/prompt_node_result.py +1 -0
  153. vellum/types/prompt_node_result_data.py +4 -3
  154. vellum/types/prompt_output.py +8 -6
  155. vellum/types/prompt_template_block.py +1 -0
  156. vellum/types/prompt_template_block_data.py +1 -0
  157. vellum/types/prompt_template_block_data_request.py +1 -0
  158. vellum/types/prompt_template_block_properties.py +11 -10
  159. vellum/types/prompt_template_block_properties_request.py +11 -10
  160. vellum/types/prompt_template_block_request.py +1 -0
  161. vellum/types/raw_prompt_execution_overrides_request.py +11 -5
  162. vellum/types/register_prompt_error_response.py +5 -1
  163. vellum/types/register_prompt_model_parameters_request.py +5 -4
  164. vellum/types/register_prompt_prompt.py +10 -2
  165. vellum/types/register_prompt_prompt_info_request.py +5 -3
  166. vellum/types/register_prompt_response.py +30 -10
  167. vellum/types/registered_prompt_deployment.py +15 -3
  168. vellum/types/registered_prompt_input_variable_request.py +3 -2
  169. vellum/types/registered_prompt_model_version.py +10 -2
  170. vellum/types/registered_prompt_sandbox.py +10 -2
  171. vellum/types/registered_prompt_sandbox_snapshot.py +5 -1
  172. vellum/types/rejected_enum.py +2 -2
  173. vellum/types/rejected_execute_prompt_event.py +2 -1
  174. vellum/types/rejected_execute_prompt_response.py +12 -5
  175. vellum/types/rejected_execute_workflow_workflow_result_event.py +1 -0
  176. vellum/types/rejected_function_call.py +2 -1
  177. vellum/types/rejected_prompt_execution_meta.py +3 -2
  178. vellum/types/rejected_workflow_node_result_event.py +4 -3
  179. vellum/types/sandbox_scenario.py +11 -3
  180. vellum/types/scenario_input.py +4 -3
  181. vellum/types/scenario_input_request.py +4 -3
  182. vellum/types/search_error_response.py +5 -1
  183. vellum/types/search_filters_request.py +10 -6
  184. vellum/types/search_node_result.py +1 -0
  185. vellum/types/search_node_result_data.py +7 -4
  186. vellum/types/search_request_options_request.py +20 -8
  187. vellum/types/search_response.py +5 -3
  188. vellum/types/search_result.py +15 -5
  189. vellum/types/search_result_document.py +20 -8
  190. vellum/types/search_result_document_request.py +15 -7
  191. vellum/types/search_result_merging_request.py +5 -1
  192. vellum/types/search_result_request.py +15 -5
  193. vellum/types/search_results_enum.py +2 -2
  194. vellum/types/search_results_variable_value.py +2 -1
  195. vellum/types/search_weights_request.py +10 -4
  196. vellum/types/slim_deployment_read.py +28 -14
  197. vellum/types/slim_document.py +56 -35
  198. vellum/types/slim_workflow_deployment.py +37 -24
  199. vellum/types/streaming_enum.py +2 -2
  200. vellum/types/streaming_execute_prompt_event.py +6 -4
  201. vellum/types/streaming_prompt_execution_meta.py +2 -1
  202. vellum/types/streaming_workflow_node_result_event.py +6 -5
  203. vellum/types/string_chat_message_content.py +1 -0
  204. vellum/types/string_chat_message_content_request.py +1 -0
  205. vellum/types/string_enum.py +2 -2
  206. vellum/types/string_input_request.py +6 -1
  207. vellum/types/string_variable_value.py +2 -1
  208. vellum/types/submit_completion_actual_request.py +25 -13
  209. vellum/types/submit_completion_actuals_error_response.py +1 -0
  210. vellum/types/submit_workflow_execution_actual_request.py +6 -5
  211. vellum/types/subworkflow_enum.py +2 -2
  212. vellum/types/subworkflow_node_result.py +1 -0
  213. vellum/types/templating_node_array_result.py +31 -0
  214. vellum/types/templating_node_chat_history_result.py +2 -1
  215. vellum/types/templating_node_error_result.py +2 -1
  216. vellum/types/templating_node_function_call_result.py +31 -0
  217. vellum/types/templating_node_json_result.py +2 -1
  218. vellum/types/templating_node_number_result.py +2 -1
  219. vellum/types/templating_node_result.py +1 -0
  220. vellum/types/templating_node_result_data.py +1 -0
  221. vellum/types/templating_node_result_output.py +36 -8
  222. vellum/types/templating_node_search_results_result.py +2 -1
  223. vellum/types/templating_node_string_result.py +2 -1
  224. vellum/types/terminal_node_array_result.py +8 -3
  225. vellum/types/terminal_node_chat_history_result.py +8 -3
  226. vellum/types/terminal_node_error_result.py +8 -3
  227. vellum/types/terminal_node_function_call_result.py +8 -3
  228. vellum/types/terminal_node_json_result.py +8 -3
  229. vellum/types/terminal_node_number_result.py +8 -3
  230. vellum/types/terminal_node_result.py +1 -0
  231. vellum/types/terminal_node_result_data.py +1 -0
  232. vellum/types/terminal_node_result_output.py +16 -10
  233. vellum/types/terminal_node_search_results_result.py +8 -3
  234. vellum/types/terminal_node_string_result.py +8 -3
  235. vellum/types/test_case_chat_history_variable_value.py +2 -1
  236. vellum/types/test_case_error_variable_value.py +2 -1
  237. vellum/types/test_case_json_variable_value.py +2 -1
  238. vellum/types/test_case_number_variable_value.py +2 -1
  239. vellum/types/test_case_search_results_variable_value.py +2 -1
  240. vellum/types/test_case_string_variable_value.py +2 -1
  241. vellum/types/test_case_variable_value.py +12 -8
  242. vellum/types/test_suite_run_deployment_release_tag_exec_config.py +5 -3
  243. vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +10 -4
  244. vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +10 -4
  245. vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +5 -3
  246. vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +2 -2
  247. vellum/types/test_suite_run_exec_config.py +4 -4
  248. vellum/types/test_suite_run_exec_config_request.py +4 -4
  249. vellum/types/test_suite_run_execution.py +1 -0
  250. vellum/types/test_suite_run_execution_chat_history_output.py +2 -1
  251. vellum/types/test_suite_run_execution_error_output.py +2 -1
  252. vellum/types/test_suite_run_execution_json_output.py +2 -1
  253. vellum/types/test_suite_run_execution_metric_result.py +1 -0
  254. vellum/types/test_suite_run_execution_number_output.py +2 -1
  255. vellum/types/test_suite_run_execution_output.py +12 -8
  256. vellum/types/test_suite_run_execution_search_results_output.py +2 -1
  257. vellum/types/test_suite_run_execution_string_output.py +2 -1
  258. vellum/types/test_suite_run_metric_error_output.py +1 -0
  259. vellum/types/test_suite_run_metric_error_output_type_enum.py +2 -2
  260. vellum/types/test_suite_run_metric_number_output.py +1 -0
  261. vellum/types/test_suite_run_metric_number_output_type_enum.py +2 -2
  262. vellum/types/test_suite_run_metric_output.py +4 -4
  263. vellum/types/test_suite_run_read.py +16 -14
  264. vellum/types/test_suite_run_test_suite.py +1 -0
  265. vellum/types/test_suite_run_workflow_release_tag_exec_config.py +5 -3
  266. vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +10 -6
  267. vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +10 -6
  268. vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +5 -3
  269. vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +2 -2
  270. vellum/types/test_suite_test_case.py +3 -2
  271. vellum/types/upload_document_error_response.py +1 -0
  272. vellum/types/upload_document_response.py +5 -1
  273. vellum/types/vellum_error.py +1 -0
  274. vellum/types/vellum_error_request.py +1 -0
  275. vellum/types/vellum_image.py +2 -1
  276. vellum/types/vellum_image_request.py +2 -1
  277. vellum/types/vellum_variable.py +1 -0
  278. vellum/types/workflow_deployment_read.py +37 -24
  279. vellum/types/workflow_event_error.py +1 -0
  280. vellum/types/workflow_execution_actual_chat_history_request.py +25 -15
  281. vellum/types/workflow_execution_actual_json_request.py +25 -15
  282. vellum/types/workflow_execution_actual_string_request.py +25 -15
  283. vellum/types/workflow_execution_node_result_event.py +3 -2
  284. vellum/types/workflow_execution_workflow_result_event.py +3 -2
  285. vellum/types/workflow_node_result_data.py +16 -10
  286. vellum/types/workflow_node_result_event.py +8 -6
  287. vellum/types/workflow_output.py +18 -11
  288. vellum/types/workflow_output_array.py +7 -2
  289. vellum/types/workflow_output_chat_history.py +7 -2
  290. vellum/types/workflow_output_error.py +7 -2
  291. vellum/types/workflow_output_function_call.py +7 -2
  292. vellum/types/workflow_output_image.py +7 -2
  293. vellum/types/workflow_output_json.py +7 -2
  294. vellum/types/workflow_output_number.py +7 -2
  295. vellum/types/workflow_output_search_results.py +7 -2
  296. vellum/types/workflow_output_string.py +7 -2
  297. vellum/types/workflow_request_chat_history_input_request.py +6 -1
  298. vellum/types/workflow_request_input_request.py +8 -6
  299. vellum/types/workflow_request_json_input_request.py +6 -1
  300. vellum/types/workflow_request_number_input_request.py +6 -1
  301. vellum/types/workflow_request_string_input_request.py +6 -1
  302. vellum/types/workflow_result_event.py +5 -4
  303. vellum/types/workflow_result_event_output_data.py +16 -10
  304. vellum/types/workflow_result_event_output_data_array.py +8 -5
  305. vellum/types/workflow_result_event_output_data_chat_history.py +8 -5
  306. vellum/types/workflow_result_event_output_data_error.py +8 -5
  307. vellum/types/workflow_result_event_output_data_function_call.py +8 -5
  308. vellum/types/workflow_result_event_output_data_json.py +8 -5
  309. vellum/types/workflow_result_event_output_data_number.py +8 -5
  310. vellum/types/workflow_result_event_output_data_search_results.py +8 -5
  311. vellum/types/workflow_result_event_output_data_string.py +11 -7
  312. vellum/types/workflow_stream_event.py +4 -4
  313. vellum/version.py +4 -0
  314. {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.16.dist-info}/METADATA +5 -4
  315. vellum_ai-0.3.16.dist-info/RECORD +365 -0
  316. vellum_ai-0.3.14.dist-info/RECORD +0 -356
  317. {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.16.dist-info}/LICENSE +0 -0
  318. {vellum_ai-0.3.14.dist-info → vellum_ai-0.3.16.dist-info}/WHEEL +0 -0
@@ -8,6 +8,7 @@ from ...core.api_error import ApiError
8
8
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.jsonable_encoder import jsonable_encoder
10
10
  from ...core.remove_none_from_dict import remove_none_from_dict
11
+ from ...core.request_options import RequestOptions
11
12
  from ...types.document_index_read import DocumentIndexRead
12
13
  from ...types.entity_status import EntityStatus
13
14
  from ...types.environment_enum import EnvironmentEnum
@@ -34,6 +35,7 @@ class DocumentIndexesClient:
34
35
  offset: typing.Optional[int] = None,
35
36
  ordering: typing.Optional[str] = None,
36
37
  status: typing.Optional[DocumentIndexesListRequestStatus] = None,
38
+ request_options: typing.Optional[RequestOptions] = None,
37
39
  ) -> PaginatedDocumentIndexReadList:
38
40
  """
39
41
  Used to retrieve a list of Document Indexes.
@@ -48,7 +50,9 @@ class DocumentIndexesClient:
48
50
  - status: typing.Optional[DocumentIndexesListRequestStatus]. The current status of the document index
49
51
 
50
52
  - `ACTIVE` - Active
51
- - `ARCHIVED` - Archived---
53
+ - `ARCHIVED` - Archived
54
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
55
+ ---
52
56
  from vellum.client import Vellum
53
57
 
54
58
  client = Vellum(
@@ -59,9 +63,34 @@ class DocumentIndexesClient:
59
63
  _response = self._client_wrapper.httpx_client.request(
60
64
  "GET",
61
65
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/document-indexes"),
62
- params=remove_none_from_dict({"limit": limit, "offset": offset, "ordering": ordering, "status": status}),
63
- headers=self._client_wrapper.get_headers(),
64
- timeout=None,
66
+ params=jsonable_encoder(
67
+ remove_none_from_dict(
68
+ {
69
+ "limit": limit,
70
+ "offset": offset,
71
+ "ordering": ordering,
72
+ "status": status,
73
+ **(
74
+ request_options.get("additional_query_parameters", {})
75
+ if request_options is not None
76
+ else {}
77
+ ),
78
+ }
79
+ )
80
+ ),
81
+ headers=jsonable_encoder(
82
+ remove_none_from_dict(
83
+ {
84
+ **self._client_wrapper.get_headers(),
85
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
86
+ }
87
+ )
88
+ ),
89
+ timeout=request_options.get("timeout_in_seconds")
90
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
91
+ else self._client_wrapper.get_timeout(),
92
+ retries=0,
93
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
65
94
  )
66
95
  if 200 <= _response.status_code < 300:
67
96
  return pydantic.parse_obj_as(PaginatedDocumentIndexReadList, _response.json()) # type: ignore
@@ -80,6 +109,7 @@ class DocumentIndexesClient:
80
109
  environment: typing.Optional[EnvironmentEnum] = OMIT,
81
110
  indexing_config: typing.Dict[str, typing.Any],
82
111
  copy_documents_from_index_id: typing.Optional[str] = OMIT,
112
+ request_options: typing.Optional[RequestOptions] = None,
83
113
  ) -> DocumentIndexRead:
84
114
  """
85
115
  Creates a new document index.
@@ -101,6 +131,8 @@ class DocumentIndexesClient:
101
131
  - indexing_config: typing.Dict[str, typing.Any]. Configuration representing how documents should be indexed
102
132
 
103
133
  - copy_documents_from_index_id: typing.Optional[str]. Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index
134
+
135
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
104
136
  ---
105
137
  from vellum.client import Vellum
106
138
 
@@ -112,25 +144,19 @@ class DocumentIndexesClient:
112
144
  name="my-document-index",
113
145
  indexing_config={
114
146
  "chunking": {
115
- "unknown": {
116
- "chunker_name": "sentence-chunker",
117
- "chunker_config": {
118
- "character_limit": 1000,
119
- "min_overlap_ratio": 0.5,
120
- },
147
+ "chunker_name": "sentence-chunker",
148
+ "chunker_config": {
149
+ "character_limit": 1000,
150
+ "min_overlap_ratio": 0.5,
121
151
  },
122
- "type": "unknown",
123
152
  },
124
153
  "vectorizer": {
125
- "unknown": {
126
- "model_name": "hkunlp/instructor-xl",
127
- "config": {
128
- "instruction_domain": "",
129
- "instruction_document_text_type": "plain_text",
130
- "instruction_query_text_type": "plain_text",
131
- },
154
+ "model_name": "hkunlp/instructor-xl",
155
+ "config": {
156
+ "instruction_domain": "",
157
+ "instruction_document_text_type": "plain_text",
158
+ "instruction_query_text_type": "plain_text",
132
159
  },
133
- "type": "unknown",
134
160
  },
135
161
  },
136
162
  )
@@ -145,9 +171,28 @@ class DocumentIndexesClient:
145
171
  _response = self._client_wrapper.httpx_client.request(
146
172
  "POST",
147
173
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/document-indexes"),
148
- json=jsonable_encoder(_request),
149
- headers=self._client_wrapper.get_headers(),
150
- timeout=None,
174
+ params=jsonable_encoder(
175
+ request_options.get("additional_query_parameters") if request_options is not None else None
176
+ ),
177
+ json=jsonable_encoder(_request)
178
+ if request_options is None or request_options.get("additional_body_parameters") is None
179
+ else {
180
+ **jsonable_encoder(_request),
181
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
182
+ },
183
+ headers=jsonable_encoder(
184
+ remove_none_from_dict(
185
+ {
186
+ **self._client_wrapper.get_headers(),
187
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
188
+ }
189
+ )
190
+ ),
191
+ timeout=request_options.get("timeout_in_seconds")
192
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
193
+ else self._client_wrapper.get_timeout(),
194
+ retries=0,
195
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
151
196
  )
152
197
  if 200 <= _response.status_code < 300:
153
198
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -157,12 +202,14 @@ class DocumentIndexesClient:
157
202
  raise ApiError(status_code=_response.status_code, body=_response.text)
158
203
  raise ApiError(status_code=_response.status_code, body=_response_json)
159
204
 
160
- def retrieve(self, id: str) -> DocumentIndexRead:
205
+ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DocumentIndexRead:
161
206
  """
162
207
  Used to retrieve a Document Index given its ID or name.
163
208
 
164
209
  Parameters:
165
210
  - id: str. Either the Document Index's ID or its unique name
211
+
212
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
166
213
  ---
167
214
  from vellum.client import Vellum
168
215
 
@@ -175,9 +222,25 @@ class DocumentIndexesClient:
175
222
  """
176
223
  _response = self._client_wrapper.httpx_client.request(
177
224
  "GET",
178
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
179
- headers=self._client_wrapper.get_headers(),
180
- timeout=None,
225
+ urllib.parse.urljoin(
226
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
227
+ ),
228
+ params=jsonable_encoder(
229
+ request_options.get("additional_query_parameters") if request_options is not None else None
230
+ ),
231
+ headers=jsonable_encoder(
232
+ remove_none_from_dict(
233
+ {
234
+ **self._client_wrapper.get_headers(),
235
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
236
+ }
237
+ )
238
+ ),
239
+ timeout=request_options.get("timeout_in_seconds")
240
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
241
+ else self._client_wrapper.get_timeout(),
242
+ retries=0,
243
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
181
244
  )
182
245
  if 200 <= _response.status_code < 300:
183
246
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -194,6 +257,7 @@ class DocumentIndexesClient:
194
257
  label: str,
195
258
  status: typing.Optional[EntityStatus] = OMIT,
196
259
  environment: typing.Optional[EnvironmentEnum] = OMIT,
260
+ request_options: typing.Optional[RequestOptions] = None,
197
261
  ) -> DocumentIndexRead:
198
262
  """
199
263
  Used to fully update a Document Index given its ID.
@@ -211,7 +275,9 @@ class DocumentIndexesClient:
211
275
 
212
276
  * `DEVELOPMENT` - Development
213
277
  * `STAGING` - Staging
214
- * `PRODUCTION` - Production---
278
+ * `PRODUCTION` - Production
279
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
280
+ ---
215
281
  from vellum.client import Vellum
216
282
 
217
283
  client = Vellum(
@@ -229,10 +295,31 @@ class DocumentIndexesClient:
229
295
  _request["environment"] = environment
230
296
  _response = self._client_wrapper.httpx_client.request(
231
297
  "PUT",
232
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
233
- json=jsonable_encoder(_request),
234
- headers=self._client_wrapper.get_headers(),
235
- timeout=None,
298
+ urllib.parse.urljoin(
299
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
300
+ ),
301
+ params=jsonable_encoder(
302
+ request_options.get("additional_query_parameters") if request_options is not None else None
303
+ ),
304
+ json=jsonable_encoder(_request)
305
+ if request_options is None or request_options.get("additional_body_parameters") is None
306
+ else {
307
+ **jsonable_encoder(_request),
308
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
309
+ },
310
+ headers=jsonable_encoder(
311
+ remove_none_from_dict(
312
+ {
313
+ **self._client_wrapper.get_headers(),
314
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
315
+ }
316
+ )
317
+ ),
318
+ timeout=request_options.get("timeout_in_seconds")
319
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
320
+ else self._client_wrapper.get_timeout(),
321
+ retries=0,
322
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
236
323
  )
237
324
  if 200 <= _response.status_code < 300:
238
325
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -242,12 +329,14 @@ class DocumentIndexesClient:
242
329
  raise ApiError(status_code=_response.status_code, body=_response.text)
243
330
  raise ApiError(status_code=_response.status_code, body=_response_json)
244
331
 
245
- def destroy(self, id: str) -> None:
332
+ def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
246
333
  """
247
334
  Used to delete a Document Index given its ID.
248
335
 
249
336
  Parameters:
250
337
  - id: str. A UUID string identifying this document index.
338
+
339
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
251
340
  ---
252
341
  from vellum.client import Vellum
253
342
 
@@ -260,9 +349,25 @@ class DocumentIndexesClient:
260
349
  """
261
350
  _response = self._client_wrapper.httpx_client.request(
262
351
  "DELETE",
263
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
264
- headers=self._client_wrapper.get_headers(),
265
- timeout=None,
352
+ urllib.parse.urljoin(
353
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
354
+ ),
355
+ params=jsonable_encoder(
356
+ request_options.get("additional_query_parameters") if request_options is not None else None
357
+ ),
358
+ headers=jsonable_encoder(
359
+ remove_none_from_dict(
360
+ {
361
+ **self._client_wrapper.get_headers(),
362
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
363
+ }
364
+ )
365
+ ),
366
+ timeout=request_options.get("timeout_in_seconds")
367
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
368
+ else self._client_wrapper.get_timeout(),
369
+ retries=0,
370
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
266
371
  )
267
372
  if 200 <= _response.status_code < 300:
268
373
  return
@@ -279,6 +384,7 @@ class DocumentIndexesClient:
279
384
  label: typing.Optional[str] = OMIT,
280
385
  status: typing.Optional[EntityStatus] = OMIT,
281
386
  environment: typing.Optional[EnvironmentEnum] = OMIT,
387
+ request_options: typing.Optional[RequestOptions] = None,
282
388
  ) -> DocumentIndexRead:
283
389
  """
284
390
  Used to partial update a Document Index given its ID.
@@ -296,7 +402,9 @@ class DocumentIndexesClient:
296
402
 
297
403
  * `DEVELOPMENT` - Development
298
404
  * `STAGING` - Staging
299
- * `PRODUCTION` - Production---
405
+ * `PRODUCTION` - Production
406
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
407
+ ---
300
408
  from vellum.client import Vellum
301
409
 
302
410
  client = Vellum(
@@ -315,10 +423,31 @@ class DocumentIndexesClient:
315
423
  _request["environment"] = environment
316
424
  _response = self._client_wrapper.httpx_client.request(
317
425
  "PATCH",
318
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
319
- json=jsonable_encoder(_request),
320
- headers=self._client_wrapper.get_headers(),
321
- timeout=None,
426
+ urllib.parse.urljoin(
427
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
428
+ ),
429
+ params=jsonable_encoder(
430
+ request_options.get("additional_query_parameters") if request_options is not None else None
431
+ ),
432
+ json=jsonable_encoder(_request)
433
+ if request_options is None or request_options.get("additional_body_parameters") is None
434
+ else {
435
+ **jsonable_encoder(_request),
436
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
437
+ },
438
+ headers=jsonable_encoder(
439
+ remove_none_from_dict(
440
+ {
441
+ **self._client_wrapper.get_headers(),
442
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
443
+ }
444
+ )
445
+ ),
446
+ timeout=request_options.get("timeout_in_seconds")
447
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
448
+ else self._client_wrapper.get_timeout(),
449
+ retries=0,
450
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
322
451
  )
323
452
  if 200 <= _response.status_code < 300:
324
453
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -340,6 +469,7 @@ class AsyncDocumentIndexesClient:
340
469
  offset: typing.Optional[int] = None,
341
470
  ordering: typing.Optional[str] = None,
342
471
  status: typing.Optional[DocumentIndexesListRequestStatus] = None,
472
+ request_options: typing.Optional[RequestOptions] = None,
343
473
  ) -> PaginatedDocumentIndexReadList:
344
474
  """
345
475
  Used to retrieve a list of Document Indexes.
@@ -354,7 +484,9 @@ class AsyncDocumentIndexesClient:
354
484
  - status: typing.Optional[DocumentIndexesListRequestStatus]. The current status of the document index
355
485
 
356
486
  - `ACTIVE` - Active
357
- - `ARCHIVED` - Archived---
487
+ - `ARCHIVED` - Archived
488
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
489
+ ---
358
490
  from vellum.client import AsyncVellum
359
491
 
360
492
  client = AsyncVellum(
@@ -365,9 +497,34 @@ class AsyncDocumentIndexesClient:
365
497
  _response = await self._client_wrapper.httpx_client.request(
366
498
  "GET",
367
499
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/document-indexes"),
368
- params=remove_none_from_dict({"limit": limit, "offset": offset, "ordering": ordering, "status": status}),
369
- headers=self._client_wrapper.get_headers(),
370
- timeout=None,
500
+ params=jsonable_encoder(
501
+ remove_none_from_dict(
502
+ {
503
+ "limit": limit,
504
+ "offset": offset,
505
+ "ordering": ordering,
506
+ "status": status,
507
+ **(
508
+ request_options.get("additional_query_parameters", {})
509
+ if request_options is not None
510
+ else {}
511
+ ),
512
+ }
513
+ )
514
+ ),
515
+ headers=jsonable_encoder(
516
+ remove_none_from_dict(
517
+ {
518
+ **self._client_wrapper.get_headers(),
519
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
520
+ }
521
+ )
522
+ ),
523
+ timeout=request_options.get("timeout_in_seconds")
524
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
525
+ else self._client_wrapper.get_timeout(),
526
+ retries=0,
527
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
371
528
  )
372
529
  if 200 <= _response.status_code < 300:
373
530
  return pydantic.parse_obj_as(PaginatedDocumentIndexReadList, _response.json()) # type: ignore
@@ -386,6 +543,7 @@ class AsyncDocumentIndexesClient:
386
543
  environment: typing.Optional[EnvironmentEnum] = OMIT,
387
544
  indexing_config: typing.Dict[str, typing.Any],
388
545
  copy_documents_from_index_id: typing.Optional[str] = OMIT,
546
+ request_options: typing.Optional[RequestOptions] = None,
389
547
  ) -> DocumentIndexRead:
390
548
  """
391
549
  Creates a new document index.
@@ -407,6 +565,8 @@ class AsyncDocumentIndexesClient:
407
565
  - indexing_config: typing.Dict[str, typing.Any]. Configuration representing how documents should be indexed
408
566
 
409
567
  - copy_documents_from_index_id: typing.Optional[str]. Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index
568
+
569
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
410
570
  ---
411
571
  from vellum.client import AsyncVellum
412
572
 
@@ -418,25 +578,19 @@ class AsyncDocumentIndexesClient:
418
578
  name="my-document-index",
419
579
  indexing_config={
420
580
  "chunking": {
421
- "unknown": {
422
- "chunker_name": "sentence-chunker",
423
- "chunker_config": {
424
- "character_limit": 1000,
425
- "min_overlap_ratio": 0.5,
426
- },
581
+ "chunker_name": "sentence-chunker",
582
+ "chunker_config": {
583
+ "character_limit": 1000,
584
+ "min_overlap_ratio": 0.5,
427
585
  },
428
- "type": "unknown",
429
586
  },
430
587
  "vectorizer": {
431
- "unknown": {
432
- "model_name": "hkunlp/instructor-xl",
433
- "config": {
434
- "instruction_domain": "",
435
- "instruction_document_text_type": "plain_text",
436
- "instruction_query_text_type": "plain_text",
437
- },
588
+ "model_name": "hkunlp/instructor-xl",
589
+ "config": {
590
+ "instruction_domain": "",
591
+ "instruction_document_text_type": "plain_text",
592
+ "instruction_query_text_type": "plain_text",
438
593
  },
439
- "type": "unknown",
440
594
  },
441
595
  },
442
596
  )
@@ -451,9 +605,28 @@ class AsyncDocumentIndexesClient:
451
605
  _response = await self._client_wrapper.httpx_client.request(
452
606
  "POST",
453
607
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/document-indexes"),
454
- json=jsonable_encoder(_request),
455
- headers=self._client_wrapper.get_headers(),
456
- timeout=None,
608
+ params=jsonable_encoder(
609
+ request_options.get("additional_query_parameters") if request_options is not None else None
610
+ ),
611
+ json=jsonable_encoder(_request)
612
+ if request_options is None or request_options.get("additional_body_parameters") is None
613
+ else {
614
+ **jsonable_encoder(_request),
615
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
616
+ },
617
+ headers=jsonable_encoder(
618
+ remove_none_from_dict(
619
+ {
620
+ **self._client_wrapper.get_headers(),
621
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
622
+ }
623
+ )
624
+ ),
625
+ timeout=request_options.get("timeout_in_seconds")
626
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
627
+ else self._client_wrapper.get_timeout(),
628
+ retries=0,
629
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
457
630
  )
458
631
  if 200 <= _response.status_code < 300:
459
632
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -463,12 +636,14 @@ class AsyncDocumentIndexesClient:
463
636
  raise ApiError(status_code=_response.status_code, body=_response.text)
464
637
  raise ApiError(status_code=_response.status_code, body=_response_json)
465
638
 
466
- async def retrieve(self, id: str) -> DocumentIndexRead:
639
+ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DocumentIndexRead:
467
640
  """
468
641
  Used to retrieve a Document Index given its ID or name.
469
642
 
470
643
  Parameters:
471
644
  - id: str. Either the Document Index's ID or its unique name
645
+
646
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
472
647
  ---
473
648
  from vellum.client import AsyncVellum
474
649
 
@@ -481,9 +656,25 @@ class AsyncDocumentIndexesClient:
481
656
  """
482
657
  _response = await self._client_wrapper.httpx_client.request(
483
658
  "GET",
484
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
485
- headers=self._client_wrapper.get_headers(),
486
- timeout=None,
659
+ urllib.parse.urljoin(
660
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
661
+ ),
662
+ params=jsonable_encoder(
663
+ request_options.get("additional_query_parameters") if request_options is not None else None
664
+ ),
665
+ headers=jsonable_encoder(
666
+ remove_none_from_dict(
667
+ {
668
+ **self._client_wrapper.get_headers(),
669
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
670
+ }
671
+ )
672
+ ),
673
+ timeout=request_options.get("timeout_in_seconds")
674
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
675
+ else self._client_wrapper.get_timeout(),
676
+ retries=0,
677
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
487
678
  )
488
679
  if 200 <= _response.status_code < 300:
489
680
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -500,6 +691,7 @@ class AsyncDocumentIndexesClient:
500
691
  label: str,
501
692
  status: typing.Optional[EntityStatus] = OMIT,
502
693
  environment: typing.Optional[EnvironmentEnum] = OMIT,
694
+ request_options: typing.Optional[RequestOptions] = None,
503
695
  ) -> DocumentIndexRead:
504
696
  """
505
697
  Used to fully update a Document Index given its ID.
@@ -517,7 +709,9 @@ class AsyncDocumentIndexesClient:
517
709
 
518
710
  * `DEVELOPMENT` - Development
519
711
  * `STAGING` - Staging
520
- * `PRODUCTION` - Production---
712
+ * `PRODUCTION` - Production
713
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
714
+ ---
521
715
  from vellum.client import AsyncVellum
522
716
 
523
717
  client = AsyncVellum(
@@ -535,10 +729,31 @@ class AsyncDocumentIndexesClient:
535
729
  _request["environment"] = environment
536
730
  _response = await self._client_wrapper.httpx_client.request(
537
731
  "PUT",
538
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
539
- json=jsonable_encoder(_request),
540
- headers=self._client_wrapper.get_headers(),
541
- timeout=None,
732
+ urllib.parse.urljoin(
733
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
734
+ ),
735
+ params=jsonable_encoder(
736
+ request_options.get("additional_query_parameters") if request_options is not None else None
737
+ ),
738
+ json=jsonable_encoder(_request)
739
+ if request_options is None or request_options.get("additional_body_parameters") is None
740
+ else {
741
+ **jsonable_encoder(_request),
742
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
743
+ },
744
+ headers=jsonable_encoder(
745
+ remove_none_from_dict(
746
+ {
747
+ **self._client_wrapper.get_headers(),
748
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
749
+ }
750
+ )
751
+ ),
752
+ timeout=request_options.get("timeout_in_seconds")
753
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
754
+ else self._client_wrapper.get_timeout(),
755
+ retries=0,
756
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
542
757
  )
543
758
  if 200 <= _response.status_code < 300:
544
759
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore
@@ -548,12 +763,14 @@ class AsyncDocumentIndexesClient:
548
763
  raise ApiError(status_code=_response.status_code, body=_response.text)
549
764
  raise ApiError(status_code=_response.status_code, body=_response_json)
550
765
 
551
- async def destroy(self, id: str) -> None:
766
+ async def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
552
767
  """
553
768
  Used to delete a Document Index given its ID.
554
769
 
555
770
  Parameters:
556
771
  - id: str. A UUID string identifying this document index.
772
+
773
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
557
774
  ---
558
775
  from vellum.client import AsyncVellum
559
776
 
@@ -566,9 +783,25 @@ class AsyncDocumentIndexesClient:
566
783
  """
567
784
  _response = await self._client_wrapper.httpx_client.request(
568
785
  "DELETE",
569
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
570
- headers=self._client_wrapper.get_headers(),
571
- timeout=None,
786
+ urllib.parse.urljoin(
787
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
788
+ ),
789
+ params=jsonable_encoder(
790
+ request_options.get("additional_query_parameters") if request_options is not None else None
791
+ ),
792
+ headers=jsonable_encoder(
793
+ remove_none_from_dict(
794
+ {
795
+ **self._client_wrapper.get_headers(),
796
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
797
+ }
798
+ )
799
+ ),
800
+ timeout=request_options.get("timeout_in_seconds")
801
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
802
+ else self._client_wrapper.get_timeout(),
803
+ retries=0,
804
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
572
805
  )
573
806
  if 200 <= _response.status_code < 300:
574
807
  return
@@ -585,6 +818,7 @@ class AsyncDocumentIndexesClient:
585
818
  label: typing.Optional[str] = OMIT,
586
819
  status: typing.Optional[EntityStatus] = OMIT,
587
820
  environment: typing.Optional[EnvironmentEnum] = OMIT,
821
+ request_options: typing.Optional[RequestOptions] = None,
588
822
  ) -> DocumentIndexRead:
589
823
  """
590
824
  Used to partial update a Document Index given its ID.
@@ -602,7 +836,9 @@ class AsyncDocumentIndexesClient:
602
836
 
603
837
  * `DEVELOPMENT` - Development
604
838
  * `STAGING` - Staging
605
- * `PRODUCTION` - Production---
839
+ * `PRODUCTION` - Production
840
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
841
+ ---
606
842
  from vellum.client import AsyncVellum
607
843
 
608
844
  client = AsyncVellum(
@@ -621,10 +857,31 @@ class AsyncDocumentIndexesClient:
621
857
  _request["environment"] = environment
622
858
  _response = await self._client_wrapper.httpx_client.request(
623
859
  "PATCH",
624
- urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{id}"),
625
- json=jsonable_encoder(_request),
626
- headers=self._client_wrapper.get_headers(),
627
- timeout=None,
860
+ urllib.parse.urljoin(
861
+ f"{self._client_wrapper.get_environment().default}/", f"v1/document-indexes/{jsonable_encoder(id)}"
862
+ ),
863
+ params=jsonable_encoder(
864
+ request_options.get("additional_query_parameters") if request_options is not None else None
865
+ ),
866
+ json=jsonable_encoder(_request)
867
+ if request_options is None or request_options.get("additional_body_parameters") is None
868
+ else {
869
+ **jsonable_encoder(_request),
870
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
871
+ },
872
+ headers=jsonable_encoder(
873
+ remove_none_from_dict(
874
+ {
875
+ **self._client_wrapper.get_headers(),
876
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
877
+ }
878
+ )
879
+ ),
880
+ timeout=request_options.get("timeout_in_seconds")
881
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
882
+ else self._client_wrapper.get_timeout(),
883
+ retries=0,
884
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
628
885
  )
629
886
  if 200 <= _response.status_code < 300:
630
887
  return pydantic.parse_obj_as(DocumentIndexRead, _response.json()) # type: ignore