vellum-ai 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/Client.d.ts +38 -0
  2. package/Client.js +260 -36
  3. package/api/client/requests/ExecutePromptRequest.d.ts +20 -0
  4. package/api/client/requests/ExecutePromptRequest.js +5 -0
  5. package/api/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
  6. package/api/client/requests/ExecutePromptStreamRequest.js +5 -0
  7. package/api/client/requests/GenerateBodyRequest.d.ts +11 -0
  8. package/api/client/requests/SubmitCompletionActualsRequest.d.ts +6 -0
  9. package/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +6 -0
  10. package/api/client/requests/index.d.ts +2 -0
  11. package/api/errors/ForbiddenError.d.ts +1 -2
  12. package/api/resources/deployments/client/Client.js +2 -2
  13. package/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +6 -0
  14. package/api/resources/documentIndexes/client/Client.js +2 -2
  15. package/api/resources/documents/client/Client.d.ts +3 -0
  16. package/api/resources/documents/client/Client.js +7 -5
  17. package/api/resources/documents/client/requests/DocumentsListRequest.d.ts +4 -0
  18. package/api/resources/modelVersions/client/Client.js +1 -1
  19. package/api/resources/registeredPrompts/client/Client.js +1 -1
  20. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -0
  21. package/api/resources/sandboxes/client/Client.d.ts +3 -0
  22. package/api/resources/sandboxes/client/Client.js +5 -2
  23. package/api/resources/testSuites/client/Client.d.ts +8 -0
  24. package/api/resources/testSuites/client/Client.js +10 -2
  25. package/api/resources/testSuites/client/requests/UpsertTestSuiteTestCaseRequest.d.ts +7 -0
  26. package/api/types/BlockTypeEnum.d.ts +4 -4
  27. package/api/types/ChatMessageRole.d.ts +4 -4
  28. package/api/types/DeploymentRead.d.ts +6 -6
  29. package/api/types/DeploymentStatus.d.ts +3 -3
  30. package/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
  31. package/api/types/DocumentIndexRead.d.ts +5 -5
  32. package/api/types/DocumentIndexStatus.d.ts +2 -2
  33. package/api/types/DocumentRead.d.ts +5 -5
  34. package/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
  35. package/api/types/EnvironmentEnum.d.ts +3 -3
  36. package/api/types/ErrorVariableValue.d.ts +7 -0
  37. package/api/types/ErrorVariableValue.js +5 -0
  38. package/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
  39. package/api/types/ExecutePromptApiErrorResponse.js +5 -0
  40. package/api/types/ExecutePromptEvent.d.ts +19 -0
  41. package/api/types/ExecutePromptEvent.js +5 -0
  42. package/api/types/ExecutePromptResponse.d.ts +13 -0
  43. package/api/types/ExecutePromptResponse.js +5 -0
  44. package/api/types/FinishReasonEnum.d.ts +3 -3
  45. package/api/types/FulfilledEnum.d.ts +4 -0
  46. package/api/types/FulfilledEnum.js +5 -0
  47. package/api/types/FulfilledExecutePromptEvent.d.ts +12 -0
  48. package/api/types/FulfilledExecutePromptEvent.js +5 -0
  49. package/api/types/FulfilledExecutePromptResponse.d.ts +15 -0
  50. package/api/types/FulfilledExecutePromptResponse.js +5 -0
  51. package/api/types/FulfilledPromptExecutionMeta.d.ts +11 -0
  52. package/api/types/FulfilledPromptExecutionMeta.js +5 -0
  53. package/api/types/GenerateOptionsRequest.d.ts +2 -2
  54. package/api/types/IndexingStateEnum.d.ts +5 -5
  55. package/api/types/InitiatedEnum.d.ts +4 -0
  56. package/api/types/InitiatedEnum.js +5 -0
  57. package/api/types/InitiatedExecutePromptEvent.d.ts +11 -0
  58. package/api/types/InitiatedExecutePromptEvent.js +5 -0
  59. package/api/types/InitiatedPromptExecutionMeta.d.ts +12 -0
  60. package/api/types/InitiatedPromptExecutionMeta.js +5 -0
  61. package/api/types/JsonVariableValue.d.ts +6 -0
  62. package/api/types/JsonVariableValue.js +5 -0
  63. package/api/types/LogicalOperator.d.ts +18 -18
  64. package/api/types/LogprobsEnum.d.ts +2 -2
  65. package/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
  66. package/api/types/ModelVersionRead.d.ts +13 -12
  67. package/api/types/ModelVersionReadStatusEnum.d.ts +4 -4
  68. package/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
  69. package/api/types/ProcessingStateEnum.d.ts +4 -4
  70. package/api/types/PromptDeploymentExpandMetaRequestRequest.d.ts +15 -0
  71. package/api/types/PromptDeploymentExpandMetaRequestRequest.js +5 -0
  72. package/api/types/PromptExecutionMeta.d.ts +14 -0
  73. package/api/types/PromptExecutionMeta.js +5 -0
  74. package/api/types/PromptOutput.d.ts +16 -0
  75. package/api/types/PromptOutput.js +5 -0
  76. package/api/types/ProviderEnum.d.ts +15 -13
  77. package/api/types/ProviderEnum.js +1 -0
  78. package/api/types/RawPromptExecutionOverridesRequest.d.ts +10 -0
  79. package/api/types/RawPromptExecutionOverridesRequest.js +5 -0
  80. package/api/types/RejectedEnum.d.ts +4 -0
  81. package/api/types/RejectedEnum.js +5 -0
  82. package/api/types/RejectedExecutePromptEvent.d.ts +12 -0
  83. package/api/types/RejectedExecutePromptEvent.js +5 -0
  84. package/api/types/RejectedExecutePromptResponse.d.ts +15 -0
  85. package/api/types/RejectedExecutePromptResponse.js +5 -0
  86. package/api/types/RejectedPromptExecutionMeta.d.ts +11 -0
  87. package/api/types/RejectedPromptExecutionMeta.js +5 -0
  88. package/api/types/ScenarioInputTypeEnum.d.ts +2 -2
  89. package/api/types/SlimDocument.d.ts +7 -7
  90. package/api/types/StreamingEnum.d.ts +4 -0
  91. package/api/types/StreamingEnum.js +5 -0
  92. package/api/types/StreamingExecutePromptEvent.d.ts +15 -0
  93. package/api/types/StreamingExecutePromptEvent.js +5 -0
  94. package/api/types/StreamingPromptExecutionMeta.d.ts +9 -0
  95. package/api/types/StreamingPromptExecutionMeta.js +5 -0
  96. package/api/types/StringVariableValue.d.ts +6 -0
  97. package/api/types/StringVariableValue.js +5 -0
  98. package/api/types/VellumErrorCodeEnum.d.ts +3 -3
  99. package/api/types/VellumVariableType.d.ts +9 -7
  100. package/api/types/VellumVariableType.js +1 -0
  101. package/api/types/WorkflowExecutionEventErrorCode.d.ts +6 -6
  102. package/api/types/WorkflowExecutionEventType.d.ts +2 -2
  103. package/api/types/WorkflowNodeResultEventState.d.ts +4 -4
  104. package/api/types/WorkflowRequestInputRequest.d.ts +4 -1
  105. package/api/types/WorkflowRequestNumberInputRequest.d.ts +8 -0
  106. package/api/types/WorkflowRequestNumberInputRequest.js +5 -0
  107. package/api/types/index.d.ts +25 -0
  108. package/api/types/index.js +25 -0
  109. package/core/fetcher/APIResponse.d.ts +1 -0
  110. package/core/fetcher/Fetcher.d.ts +1 -4
  111. package/core/fetcher/Fetcher.js +52 -31
  112. package/core/fetcher/getHeader.d.ts +1 -0
  113. package/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
  114. package/core/fetcher/index.d.ts +1 -0
  115. package/core/fetcher/index.js +3 -1
  116. package/core/index.d.ts +0 -1
  117. package/core/index.js +0 -1
  118. package/core/streaming-fetcher/Stream.d.ts +3 -2
  119. package/core/streaming-fetcher/index.d.ts +0 -3
  120. package/core/streaming-fetcher/index.js +1 -5
  121. package/dist/Client.d.ts +38 -0
  122. package/dist/Client.js +260 -36
  123. package/dist/api/client/requests/ExecutePromptRequest.d.ts +20 -0
  124. package/dist/api/client/requests/ExecutePromptRequest.js +5 -0
  125. package/dist/api/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
  126. package/dist/api/client/requests/ExecutePromptStreamRequest.js +5 -0
  127. package/dist/api/client/requests/GenerateBodyRequest.d.ts +11 -0
  128. package/dist/api/client/requests/SubmitCompletionActualsRequest.d.ts +6 -0
  129. package/dist/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +6 -0
  130. package/dist/api/client/requests/index.d.ts +2 -0
  131. package/dist/api/errors/ForbiddenError.d.ts +1 -2
  132. package/dist/api/resources/deployments/client/Client.js +2 -2
  133. package/dist/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +6 -0
  134. package/dist/api/resources/documentIndexes/client/Client.js +2 -2
  135. package/dist/api/resources/documents/client/Client.d.ts +3 -0
  136. package/dist/api/resources/documents/client/Client.js +7 -5
  137. package/dist/api/resources/documents/client/requests/DocumentsListRequest.d.ts +4 -0
  138. package/dist/api/resources/modelVersions/client/Client.js +1 -1
  139. package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
  140. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -0
  141. package/dist/api/resources/sandboxes/client/Client.d.ts +3 -0
  142. package/dist/api/resources/sandboxes/client/Client.js +5 -2
  143. package/dist/api/resources/testSuites/client/Client.d.ts +8 -0
  144. package/dist/api/resources/testSuites/client/Client.js +10 -2
  145. package/dist/api/resources/testSuites/client/requests/UpsertTestSuiteTestCaseRequest.d.ts +7 -0
  146. package/dist/api/types/BlockTypeEnum.d.ts +4 -4
  147. package/dist/api/types/ChatMessageRole.d.ts +4 -4
  148. package/dist/api/types/DeploymentRead.d.ts +6 -6
  149. package/dist/api/types/DeploymentStatus.d.ts +3 -3
  150. package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
  151. package/dist/api/types/DocumentIndexRead.d.ts +5 -5
  152. package/dist/api/types/DocumentIndexStatus.d.ts +2 -2
  153. package/dist/api/types/DocumentRead.d.ts +5 -5
  154. package/dist/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
  155. package/dist/api/types/EnvironmentEnum.d.ts +3 -3
  156. package/dist/api/types/ErrorVariableValue.d.ts +7 -0
  157. package/dist/api/types/ErrorVariableValue.js +5 -0
  158. package/dist/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
  159. package/dist/api/types/ExecutePromptApiErrorResponse.js +5 -0
  160. package/dist/api/types/ExecutePromptEvent.d.ts +19 -0
  161. package/dist/api/types/ExecutePromptEvent.js +5 -0
  162. package/dist/api/types/ExecutePromptResponse.d.ts +13 -0
  163. package/dist/api/types/ExecutePromptResponse.js +5 -0
  164. package/dist/api/types/FinishReasonEnum.d.ts +3 -3
  165. package/dist/api/types/FulfilledEnum.d.ts +4 -0
  166. package/dist/api/types/FulfilledEnum.js +5 -0
  167. package/dist/api/types/FulfilledExecutePromptEvent.d.ts +12 -0
  168. package/dist/api/types/FulfilledExecutePromptEvent.js +5 -0
  169. package/dist/api/types/FulfilledExecutePromptResponse.d.ts +15 -0
  170. package/dist/api/types/FulfilledExecutePromptResponse.js +5 -0
  171. package/dist/api/types/FulfilledPromptExecutionMeta.d.ts +11 -0
  172. package/dist/api/types/FulfilledPromptExecutionMeta.js +5 -0
  173. package/dist/api/types/GenerateOptionsRequest.d.ts +2 -2
  174. package/dist/api/types/IndexingStateEnum.d.ts +5 -5
  175. package/dist/api/types/InitiatedEnum.d.ts +4 -0
  176. package/dist/api/types/InitiatedEnum.js +5 -0
  177. package/dist/api/types/InitiatedExecutePromptEvent.d.ts +11 -0
  178. package/dist/api/types/InitiatedExecutePromptEvent.js +5 -0
  179. package/dist/api/types/InitiatedPromptExecutionMeta.d.ts +12 -0
  180. package/dist/api/types/InitiatedPromptExecutionMeta.js +5 -0
  181. package/dist/api/types/JsonVariableValue.d.ts +6 -0
  182. package/dist/api/types/JsonVariableValue.js +5 -0
  183. package/dist/api/types/LogicalOperator.d.ts +18 -18
  184. package/dist/api/types/LogprobsEnum.d.ts +2 -2
  185. package/dist/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
  186. package/dist/api/types/ModelVersionRead.d.ts +13 -12
  187. package/dist/api/types/ModelVersionReadStatusEnum.d.ts +4 -4
  188. package/dist/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
  189. package/dist/api/types/ProcessingStateEnum.d.ts +4 -4
  190. package/dist/api/types/PromptDeploymentExpandMetaRequestRequest.d.ts +15 -0
  191. package/dist/api/types/PromptDeploymentExpandMetaRequestRequest.js +5 -0
  192. package/dist/api/types/PromptExecutionMeta.d.ts +14 -0
  193. package/dist/api/types/PromptExecutionMeta.js +5 -0
  194. package/dist/api/types/PromptOutput.d.ts +16 -0
  195. package/dist/api/types/PromptOutput.js +5 -0
  196. package/dist/api/types/ProviderEnum.d.ts +15 -13
  197. package/dist/api/types/ProviderEnum.js +1 -0
  198. package/dist/api/types/RawPromptExecutionOverridesRequest.d.ts +10 -0
  199. package/dist/api/types/RawPromptExecutionOverridesRequest.js +5 -0
  200. package/dist/api/types/RejectedEnum.d.ts +4 -0
  201. package/dist/api/types/RejectedEnum.js +5 -0
  202. package/dist/api/types/RejectedExecutePromptEvent.d.ts +12 -0
  203. package/dist/api/types/RejectedExecutePromptEvent.js +5 -0
  204. package/dist/api/types/RejectedExecutePromptResponse.d.ts +15 -0
  205. package/dist/api/types/RejectedExecutePromptResponse.js +5 -0
  206. package/dist/api/types/RejectedPromptExecutionMeta.d.ts +11 -0
  207. package/dist/api/types/RejectedPromptExecutionMeta.js +5 -0
  208. package/dist/api/types/ScenarioInputTypeEnum.d.ts +2 -2
  209. package/dist/api/types/SlimDocument.d.ts +7 -7
  210. package/dist/api/types/StreamingEnum.d.ts +4 -0
  211. package/dist/api/types/StreamingEnum.js +5 -0
  212. package/dist/api/types/StreamingExecutePromptEvent.d.ts +15 -0
  213. package/dist/api/types/StreamingExecutePromptEvent.js +5 -0
  214. package/dist/api/types/StreamingPromptExecutionMeta.d.ts +9 -0
  215. package/dist/api/types/StreamingPromptExecutionMeta.js +5 -0
  216. package/dist/api/types/StringVariableValue.d.ts +6 -0
  217. package/dist/api/types/StringVariableValue.js +5 -0
  218. package/dist/api/types/VellumErrorCodeEnum.d.ts +3 -3
  219. package/dist/api/types/VellumVariableType.d.ts +9 -7
  220. package/dist/api/types/VellumVariableType.js +1 -0
  221. package/dist/api/types/WorkflowExecutionEventErrorCode.d.ts +6 -6
  222. package/dist/api/types/WorkflowExecutionEventType.d.ts +2 -2
  223. package/dist/api/types/WorkflowNodeResultEventState.d.ts +4 -4
  224. package/dist/api/types/WorkflowRequestInputRequest.d.ts +4 -1
  225. package/dist/api/types/WorkflowRequestNumberInputRequest.d.ts +8 -0
  226. package/dist/api/types/WorkflowRequestNumberInputRequest.js +5 -0
  227. package/dist/api/types/index.d.ts +25 -0
  228. package/dist/api/types/index.js +25 -0
  229. package/dist/core/fetcher/APIResponse.d.ts +1 -0
  230. package/dist/core/fetcher/Fetcher.d.ts +1 -4
  231. package/dist/core/fetcher/Fetcher.js +52 -31
  232. package/dist/core/fetcher/getHeader.d.ts +1 -0
  233. package/dist/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
  234. package/dist/core/fetcher/index.d.ts +1 -0
  235. package/dist/core/fetcher/index.js +3 -1
  236. package/dist/core/index.d.ts +0 -1
  237. package/dist/core/index.js +0 -1
  238. package/dist/core/streaming-fetcher/Stream.d.ts +3 -2
  239. package/dist/core/streaming-fetcher/index.d.ts +0 -3
  240. package/dist/core/streaming-fetcher/index.js +1 -5
  241. package/dist/serialization/client/requests/ExecutePromptRequest.d.ts +20 -0
  242. package/dist/serialization/client/requests/ExecutePromptRequest.js +52 -0
  243. package/dist/serialization/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
  244. package/dist/serialization/client/requests/ExecutePromptStreamRequest.js +52 -0
  245. package/dist/serialization/client/requests/index.d.ts +2 -0
  246. package/dist/serialization/client/requests/index.js +5 -1
  247. package/dist/serialization/types/ErrorVariableValue.d.ts +12 -0
  248. package/dist/serialization/types/ErrorVariableValue.js +42 -0
  249. package/dist/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
  250. package/dist/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
  251. package/dist/serialization/types/ExecutePromptEvent.d.ts +22 -0
  252. package/dist/serialization/types/ExecutePromptEvent.js +50 -0
  253. package/dist/serialization/types/ExecutePromptResponse.d.ts +16 -0
  254. package/dist/serialization/types/ExecutePromptResponse.js +48 -0
  255. package/dist/serialization/types/FulfilledEnum.d.ts +10 -0
  256. package/dist/serialization/types/FulfilledEnum.js +31 -0
  257. package/dist/serialization/types/FulfilledExecutePromptEvent.d.ts +14 -0
  258. package/dist/serialization/types/FulfilledExecutePromptEvent.js +44 -0
  259. package/dist/serialization/types/FulfilledExecutePromptResponse.d.ts +15 -0
  260. package/dist/serialization/types/FulfilledExecutePromptResponse.js +45 -0
  261. package/dist/serialization/types/FulfilledPromptExecutionMeta.d.ts +13 -0
  262. package/dist/serialization/types/FulfilledPromptExecutionMeta.js +43 -0
  263. package/dist/serialization/types/InitiatedEnum.d.ts +10 -0
  264. package/dist/serialization/types/InitiatedEnum.js +31 -0
  265. package/dist/serialization/types/InitiatedExecutePromptEvent.d.ts +13 -0
  266. package/dist/serialization/types/InitiatedExecutePromptEvent.js +43 -0
  267. package/dist/serialization/types/InitiatedPromptExecutionMeta.d.ts +15 -0
  268. package/dist/serialization/types/InitiatedPromptExecutionMeta.js +36 -0
  269. package/dist/serialization/types/JsonVariableValue.d.ts +12 -0
  270. package/dist/serialization/types/JsonVariableValue.js +33 -0
  271. package/dist/serialization/types/PromptDeploymentExpandMetaRequestRequest.d.ts +16 -0
  272. package/dist/serialization/types/PromptDeploymentExpandMetaRequestRequest.js +37 -0
  273. package/dist/serialization/types/PromptExecutionMeta.d.ts +16 -0
  274. package/dist/serialization/types/PromptExecutionMeta.js +46 -0
  275. package/dist/serialization/types/PromptOutput.d.ts +19 -0
  276. package/dist/serialization/types/PromptOutput.js +49 -0
  277. package/dist/serialization/types/ProviderEnum.d.ts +1 -1
  278. package/dist/serialization/types/ProviderEnum.js +1 -0
  279. package/dist/serialization/types/RawPromptExecutionOverridesRequest.d.ts +14 -0
  280. package/dist/serialization/types/RawPromptExecutionOverridesRequest.js +35 -0
  281. package/dist/serialization/types/RejectedEnum.d.ts +10 -0
  282. package/dist/serialization/types/RejectedEnum.js +31 -0
  283. package/dist/serialization/types/RejectedExecutePromptEvent.d.ts +14 -0
  284. package/dist/serialization/types/RejectedExecutePromptEvent.js +44 -0
  285. package/dist/serialization/types/RejectedExecutePromptResponse.d.ts +15 -0
  286. package/dist/serialization/types/RejectedExecutePromptResponse.js +45 -0
  287. package/dist/serialization/types/RejectedPromptExecutionMeta.d.ts +13 -0
  288. package/dist/serialization/types/RejectedPromptExecutionMeta.js +43 -0
  289. package/dist/serialization/types/StreamingEnum.d.ts +10 -0
  290. package/dist/serialization/types/StreamingEnum.js +31 -0
  291. package/dist/serialization/types/StreamingExecutePromptEvent.d.ts +16 -0
  292. package/dist/serialization/types/StreamingExecutePromptEvent.js +46 -0
  293. package/dist/serialization/types/StreamingPromptExecutionMeta.d.ts +12 -0
  294. package/dist/serialization/types/StreamingPromptExecutionMeta.js +33 -0
  295. package/dist/serialization/types/StringVariableValue.d.ts +12 -0
  296. package/dist/serialization/types/StringVariableValue.js +33 -0
  297. package/dist/serialization/types/VellumVariableType.d.ts +1 -1
  298. package/dist/serialization/types/VellumVariableType.js +1 -1
  299. package/dist/serialization/types/WorkflowRequestInputRequest.d.ts +4 -1
  300. package/dist/serialization/types/WorkflowRequestInputRequest.js +1 -0
  301. package/dist/serialization/types/WorkflowRequestNumberInputRequest.d.ts +13 -0
  302. package/dist/serialization/types/WorkflowRequestNumberInputRequest.js +34 -0
  303. package/dist/serialization/types/index.d.ts +25 -0
  304. package/dist/serialization/types/index.js +25 -0
  305. package/package.json +6 -5
  306. package/serialization/client/requests/ExecutePromptRequest.d.ts +20 -0
  307. package/serialization/client/requests/ExecutePromptRequest.js +52 -0
  308. package/serialization/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
  309. package/serialization/client/requests/ExecutePromptStreamRequest.js +52 -0
  310. package/serialization/client/requests/index.d.ts +2 -0
  311. package/serialization/client/requests/index.js +5 -1
  312. package/serialization/types/ErrorVariableValue.d.ts +12 -0
  313. package/serialization/types/ErrorVariableValue.js +42 -0
  314. package/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
  315. package/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
  316. package/serialization/types/ExecutePromptEvent.d.ts +22 -0
  317. package/serialization/types/ExecutePromptEvent.js +50 -0
  318. package/serialization/types/ExecutePromptResponse.d.ts +16 -0
  319. package/serialization/types/ExecutePromptResponse.js +48 -0
  320. package/serialization/types/FulfilledEnum.d.ts +10 -0
  321. package/serialization/types/FulfilledEnum.js +31 -0
  322. package/serialization/types/FulfilledExecutePromptEvent.d.ts +14 -0
  323. package/serialization/types/FulfilledExecutePromptEvent.js +44 -0
  324. package/serialization/types/FulfilledExecutePromptResponse.d.ts +15 -0
  325. package/serialization/types/FulfilledExecutePromptResponse.js +45 -0
  326. package/serialization/types/FulfilledPromptExecutionMeta.d.ts +13 -0
  327. package/serialization/types/FulfilledPromptExecutionMeta.js +43 -0
  328. package/serialization/types/InitiatedEnum.d.ts +10 -0
  329. package/serialization/types/InitiatedEnum.js +31 -0
  330. package/serialization/types/InitiatedExecutePromptEvent.d.ts +13 -0
  331. package/serialization/types/InitiatedExecutePromptEvent.js +43 -0
  332. package/serialization/types/InitiatedPromptExecutionMeta.d.ts +15 -0
  333. package/serialization/types/InitiatedPromptExecutionMeta.js +36 -0
  334. package/serialization/types/JsonVariableValue.d.ts +12 -0
  335. package/serialization/types/JsonVariableValue.js +33 -0
  336. package/serialization/types/PromptDeploymentExpandMetaRequestRequest.d.ts +16 -0
  337. package/serialization/types/PromptDeploymentExpandMetaRequestRequest.js +37 -0
  338. package/serialization/types/PromptExecutionMeta.d.ts +16 -0
  339. package/serialization/types/PromptExecutionMeta.js +46 -0
  340. package/serialization/types/PromptOutput.d.ts +19 -0
  341. package/serialization/types/PromptOutput.js +49 -0
  342. package/serialization/types/ProviderEnum.d.ts +1 -1
  343. package/serialization/types/ProviderEnum.js +1 -0
  344. package/serialization/types/RawPromptExecutionOverridesRequest.d.ts +14 -0
  345. package/serialization/types/RawPromptExecutionOverridesRequest.js +35 -0
  346. package/serialization/types/RejectedEnum.d.ts +10 -0
  347. package/serialization/types/RejectedEnum.js +31 -0
  348. package/serialization/types/RejectedExecutePromptEvent.d.ts +14 -0
  349. package/serialization/types/RejectedExecutePromptEvent.js +44 -0
  350. package/serialization/types/RejectedExecutePromptResponse.d.ts +15 -0
  351. package/serialization/types/RejectedExecutePromptResponse.js +45 -0
  352. package/serialization/types/RejectedPromptExecutionMeta.d.ts +13 -0
  353. package/serialization/types/RejectedPromptExecutionMeta.js +43 -0
  354. package/serialization/types/StreamingEnum.d.ts +10 -0
  355. package/serialization/types/StreamingEnum.js +31 -0
  356. package/serialization/types/StreamingExecutePromptEvent.d.ts +16 -0
  357. package/serialization/types/StreamingExecutePromptEvent.js +46 -0
  358. package/serialization/types/StreamingPromptExecutionMeta.d.ts +12 -0
  359. package/serialization/types/StreamingPromptExecutionMeta.js +33 -0
  360. package/serialization/types/StringVariableValue.d.ts +12 -0
  361. package/serialization/types/StringVariableValue.js +33 -0
  362. package/serialization/types/VellumVariableType.d.ts +1 -1
  363. package/serialization/types/VellumVariableType.js +1 -1
  364. package/serialization/types/WorkflowRequestInputRequest.d.ts +4 -1
  365. package/serialization/types/WorkflowRequestInputRequest.js +1 -0
  366. package/serialization/types/WorkflowRequestNumberInputRequest.d.ts +13 -0
  367. package/serialization/types/WorkflowRequestNumberInputRequest.js +34 -0
  368. package/serialization/types/index.d.ts +25 -0
  369. package/serialization/types/index.js +25 -0
  370. package/core/form-data-utils/getFormDataContentLength.d.ts +0 -2
  371. package/core/form-data-utils/getFormDataContentLength.js +0 -27
  372. package/core/form-data-utils/index.d.ts +0 -1
  373. package/core/form-data-utils/index.js +0 -5
  374. package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -24
  375. package/core/streaming-fetcher/StreamingFetcher.js +0 -58
  376. package/core/streaming-fetcher/getHeader.d.ts +0 -2
  377. package/dist/core/form-data-utils/getFormDataContentLength.d.ts +0 -2
  378. package/dist/core/form-data-utils/getFormDataContentLength.js +0 -27
  379. package/dist/core/form-data-utils/index.d.ts +0 -1
  380. package/dist/core/form-data-utils/index.js +0 -5
  381. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -24
  382. package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -58
  383. package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
package/dist/Client.js CHANGED
@@ -56,13 +56,154 @@ class VellumClient {
56
56
  constructor(_options) {
57
57
  this._options = _options;
58
58
  }
59
+ /**
60
+ * Executes a deployed Prompt and returns the result.
61
+ *
62
+ * Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
63
+ * In the meantime, we recommend still using the `/generate` endpoint for prompts with function calling.
64
+ * @throws {@link Vellum.BadRequestError}
65
+ * @throws {@link Vellum.ForbiddenError}
66
+ * @throws {@link Vellum.NotFoundError}
67
+ * @throws {@link Vellum.InternalServerError}
68
+ */
69
+ executePrompt(request, requestOptions) {
70
+ var _a;
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const _response = yield core.fetcher({
73
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
74
+ .predict, "v1/execute-prompt"),
75
+ method: "POST",
76
+ headers: {
77
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
78
+ "X-Fern-Language": "JavaScript",
79
+ "X-Fern-SDK-Name": "vellum-ai",
80
+ "X-Fern-SDK-Version": "v0.1.10",
81
+ },
82
+ contentType: "application/json",
83
+ body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
84
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
85
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
+ });
87
+ if (_response.ok) {
88
+ return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
89
+ unrecognizedObjectKeys: "passthrough",
90
+ allowUnrecognizedUnionMembers: true,
91
+ allowUnrecognizedEnumValues: true,
92
+ breadcrumbsPrefix: ["response"],
93
+ });
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 400:
98
+ throw new Vellum.BadRequestError(_response.error.body);
99
+ case 403:
100
+ throw new Vellum.ForbiddenError(_response.error.body);
101
+ case 404:
102
+ throw new Vellum.NotFoundError(_response.error.body);
103
+ case 500:
104
+ throw new Vellum.InternalServerError(_response.error.body);
105
+ default:
106
+ throw new errors.VellumError({
107
+ statusCode: _response.error.statusCode,
108
+ body: _response.error.body,
109
+ });
110
+ }
111
+ }
112
+ switch (_response.error.reason) {
113
+ case "non-json":
114
+ throw new errors.VellumError({
115
+ statusCode: _response.error.statusCode,
116
+ body: _response.error.rawBody,
117
+ });
118
+ case "timeout":
119
+ throw new errors.VellumTimeoutError();
120
+ case "unknown":
121
+ throw new errors.VellumError({
122
+ message: _response.error.errorMessage,
123
+ });
124
+ }
125
+ });
126
+ }
127
+ /**
128
+ * Executes a deployed Prompt and streams back the results.
129
+ *
130
+ * Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
131
+ * In the meantime, we recommend still using the `/generate-stream` endpoint for prompts with function calling
132
+ */
133
+ executePromptStream(request, requestOptions) {
134
+ var _a;
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const _response = yield core.fetcher({
137
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
138
+ .predict, "v1/execute-prompt-stream"),
139
+ method: "POST",
140
+ headers: {
141
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
142
+ "X-Fern-Language": "JavaScript",
143
+ "X-Fern-SDK-Name": "vellum-ai",
144
+ "X-Fern-SDK-Version": "v0.1.10",
145
+ },
146
+ contentType: "application/json",
147
+ body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
148
+ unrecognizedObjectKeys: "strip",
149
+ }),
150
+ responseType: "streaming",
151
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
152
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
153
+ });
154
+ if (_response.ok) {
155
+ return new core.Stream({
156
+ stream: _response.body,
157
+ terminator: "\n",
158
+ parse: (data) => __awaiter(this, void 0, void 0, function* () {
159
+ return yield serializers.ExecutePromptEvent.parseOrThrow(data, {
160
+ unrecognizedObjectKeys: "passthrough",
161
+ allowUnrecognizedUnionMembers: true,
162
+ allowUnrecognizedEnumValues: true,
163
+ breadcrumbsPrefix: ["response"],
164
+ });
165
+ }),
166
+ });
167
+ }
168
+ if (_response.error.reason === "status-code") {
169
+ switch (_response.error.statusCode) {
170
+ case 400:
171
+ throw new Vellum.BadRequestError(_response.error.body);
172
+ case 403:
173
+ throw new Vellum.ForbiddenError(_response.error.body);
174
+ case 404:
175
+ throw new Vellum.NotFoundError(_response.error.body);
176
+ case 500:
177
+ throw new Vellum.InternalServerError(_response.error.body);
178
+ default:
179
+ throw new errors.VellumError({
180
+ statusCode: _response.error.statusCode,
181
+ body: _response.error.body,
182
+ });
183
+ }
184
+ }
185
+ switch (_response.error.reason) {
186
+ case "non-json":
187
+ throw new errors.VellumError({
188
+ statusCode: _response.error.statusCode,
189
+ body: _response.error.rawBody,
190
+ });
191
+ case "timeout":
192
+ throw new errors.VellumTimeoutError();
193
+ case "unknown":
194
+ throw new errors.VellumError({
195
+ message: _response.error.errorMessage,
196
+ });
197
+ }
198
+ });
199
+ }
59
200
  /**
60
201
  * Executes a deployed Workflow and streams back its results.
61
202
  */
62
203
  executeWorkflowStream(request, requestOptions) {
63
204
  var _a;
64
205
  return __awaiter(this, void 0, void 0, function* () {
65
- const _response = yield core.streamingFetcher({
206
+ const _response = yield core.fetcher({
66
207
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
67
208
  .predict, "v1/execute-workflow-stream"),
68
209
  method: "POST",
@@ -70,25 +211,58 @@ class VellumClient {
70
211
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
71
212
  "X-Fern-Language": "JavaScript",
72
213
  "X-Fern-SDK-Name": "vellum-ai",
73
- "X-Fern-SDK-Version": "0.1.8",
214
+ "X-Fern-SDK-Version": "v0.1.10",
74
215
  },
216
+ contentType: "application/json",
75
217
  body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
76
218
  unrecognizedObjectKeys: "strip",
77
219
  }),
220
+ responseType: "streaming",
78
221
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
222
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
79
223
  });
80
- return new core.Stream({
81
- stream: _response.data,
82
- terminator: "\n",
83
- parse: (data) => __awaiter(this, void 0, void 0, function* () {
84
- return yield serializers.WorkflowStreamEvent.parseOrThrow(data, {
85
- unrecognizedObjectKeys: "passthrough",
86
- allowUnrecognizedUnionMembers: true,
87
- allowUnrecognizedEnumValues: true,
88
- breadcrumbsPrefix: ["response"],
224
+ if (_response.ok) {
225
+ return new core.Stream({
226
+ stream: _response.body,
227
+ terminator: "\n",
228
+ parse: (data) => __awaiter(this, void 0, void 0, function* () {
229
+ return yield serializers.WorkflowStreamEvent.parseOrThrow(data, {
230
+ unrecognizedObjectKeys: "passthrough",
231
+ allowUnrecognizedUnionMembers: true,
232
+ allowUnrecognizedEnumValues: true,
233
+ breadcrumbsPrefix: ["response"],
234
+ });
235
+ }),
236
+ });
237
+ }
238
+ if (_response.error.reason === "status-code") {
239
+ switch (_response.error.statusCode) {
240
+ case 400:
241
+ throw new Vellum.BadRequestError(_response.error.body);
242
+ case 404:
243
+ throw new Vellum.NotFoundError(_response.error.body);
244
+ case 500:
245
+ throw new Vellum.InternalServerError(_response.error.body);
246
+ default:
247
+ throw new errors.VellumError({
248
+ statusCode: _response.error.statusCode,
249
+ body: _response.error.body,
250
+ });
251
+ }
252
+ }
253
+ switch (_response.error.reason) {
254
+ case "non-json":
255
+ throw new errors.VellumError({
256
+ statusCode: _response.error.statusCode,
257
+ body: _response.error.rawBody,
89
258
  });
90
- }),
91
- });
259
+ case "timeout":
260
+ throw new errors.VellumTimeoutError();
261
+ case "unknown":
262
+ throw new errors.VellumError({
263
+ message: _response.error.errorMessage,
264
+ });
265
+ }
92
266
  });
93
267
  }
94
268
  /**
@@ -99,6 +273,16 @@ class VellumClient {
99
273
  * @throws {@link Vellum.ForbiddenError}
100
274
  * @throws {@link Vellum.NotFoundError}
101
275
  * @throws {@link Vellum.InternalServerError}
276
+ *
277
+ * @example
278
+ * await vellum.generate({
279
+ * requests: [{
280
+ * inputValues: {}
281
+ * }],
282
+ * options: {
283
+ * logprobs: Vellum.LogprobsEnum.All
284
+ * }
285
+ * })
102
286
  */
103
287
  generate(request, requestOptions) {
104
288
  var _a;
@@ -111,7 +295,7 @@ class VellumClient {
111
295
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
112
296
  "X-Fern-Language": "JavaScript",
113
297
  "X-Fern-SDK-Name": "vellum-ai",
114
- "X-Fern-SDK-Version": "0.1.8",
298
+ "X-Fern-SDK-Version": "v0.1.10",
115
299
  },
116
300
  contentType: "application/json",
117
301
  body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -131,12 +315,7 @@ class VellumClient {
131
315
  case 400:
132
316
  throw new Vellum.BadRequestError(_response.error.body);
133
317
  case 403:
134
- throw new Vellum.ForbiddenError(yield serializers.GenerateErrorResponse.parseOrThrow(_response.error.body, {
135
- unrecognizedObjectKeys: "passthrough",
136
- allowUnrecognizedUnionMembers: true,
137
- allowUnrecognizedEnumValues: true,
138
- breadcrumbsPrefix: ["response"],
139
- }));
318
+ throw new Vellum.ForbiddenError(_response.error.body);
140
319
  case 404:
141
320
  throw new Vellum.NotFoundError(_response.error.body);
142
321
  case 500:
@@ -171,7 +350,7 @@ class VellumClient {
171
350
  generateStream(request, requestOptions) {
172
351
  var _a;
173
352
  return __awaiter(this, void 0, void 0, function* () {
174
- const _response = yield core.streamingFetcher({
353
+ const _response = yield core.fetcher({
175
354
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
176
355
  .predict, "v1/generate-stream"),
177
356
  method: "POST",
@@ -179,23 +358,58 @@ class VellumClient {
179
358
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
180
359
  "X-Fern-Language": "JavaScript",
181
360
  "X-Fern-SDK-Name": "vellum-ai",
182
- "X-Fern-SDK-Version": "0.1.8",
361
+ "X-Fern-SDK-Version": "v0.1.10",
183
362
  },
363
+ contentType: "application/json",
184
364
  body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
365
+ responseType: "streaming",
185
366
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
367
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
186
368
  });
187
- return new core.Stream({
188
- stream: _response.data,
189
- terminator: "\n",
190
- parse: (data) => __awaiter(this, void 0, void 0, function* () {
191
- return yield serializers.GenerateStreamResponse.parseOrThrow(data, {
192
- unrecognizedObjectKeys: "passthrough",
193
- allowUnrecognizedUnionMembers: true,
194
- allowUnrecognizedEnumValues: true,
195
- breadcrumbsPrefix: ["response"],
369
+ if (_response.ok) {
370
+ return new core.Stream({
371
+ stream: _response.body,
372
+ terminator: "\n",
373
+ parse: (data) => __awaiter(this, void 0, void 0, function* () {
374
+ return yield serializers.GenerateStreamResponse.parseOrThrow(data, {
375
+ unrecognizedObjectKeys: "passthrough",
376
+ allowUnrecognizedUnionMembers: true,
377
+ allowUnrecognizedEnumValues: true,
378
+ breadcrumbsPrefix: ["response"],
379
+ });
380
+ }),
381
+ });
382
+ }
383
+ if (_response.error.reason === "status-code") {
384
+ switch (_response.error.statusCode) {
385
+ case 400:
386
+ throw new Vellum.BadRequestError(_response.error.body);
387
+ case 403:
388
+ throw new Vellum.ForbiddenError(_response.error.body);
389
+ case 404:
390
+ throw new Vellum.NotFoundError(_response.error.body);
391
+ case 500:
392
+ throw new Vellum.InternalServerError(_response.error.body);
393
+ default:
394
+ throw new errors.VellumError({
395
+ statusCode: _response.error.statusCode,
396
+ body: _response.error.body,
397
+ });
398
+ }
399
+ }
400
+ switch (_response.error.reason) {
401
+ case "non-json":
402
+ throw new errors.VellumError({
403
+ statusCode: _response.error.statusCode,
404
+ body: _response.error.rawBody,
196
405
  });
197
- }),
198
- });
406
+ case "timeout":
407
+ throw new errors.VellumTimeoutError();
408
+ case "unknown":
409
+ throw new errors.VellumError({
410
+ message: _response.error.errorMessage,
411
+ });
412
+ }
199
413
  });
200
414
  }
201
415
  /**
@@ -217,7 +431,7 @@ class VellumClient {
217
431
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
218
432
  "X-Fern-Language": "JavaScript",
219
433
  "X-Fern-SDK-Name": "vellum-ai",
220
- "X-Fern-SDK-Version": "0.1.8",
434
+ "X-Fern-SDK-Version": "v0.1.10",
221
435
  },
222
436
  contentType: "application/json",
223
437
  body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -269,6 +483,11 @@ class VellumClient {
269
483
  * @throws {@link Vellum.BadRequestError}
270
484
  * @throws {@link Vellum.NotFoundError}
271
485
  * @throws {@link Vellum.InternalServerError}
486
+ *
487
+ * @example
488
+ * await vellum.submitCompletionActuals({
489
+ * actuals: []
490
+ * })
272
491
  */
273
492
  submitCompletionActuals(request, requestOptions) {
274
493
  var _a;
@@ -281,7 +500,7 @@ class VellumClient {
281
500
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
282
501
  "X-Fern-Language": "JavaScript",
283
502
  "X-Fern-SDK-Name": "vellum-ai",
284
- "X-Fern-SDK-Version": "0.1.8",
503
+ "X-Fern-SDK-Version": "v0.1.10",
285
504
  },
286
505
  contentType: "application/json",
287
506
  body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
@@ -327,6 +546,11 @@ class VellumClient {
327
546
  * Used to submit feedback regarding the quality of previous workflow execution and its outputs.
328
547
  *
329
548
  * **Note:** Uses a base url of `https://predict.vellum.ai`.
549
+ *
550
+ * @example
551
+ * await vellum.submitWorkflowExecutionActuals({
552
+ * actuals: []
553
+ * })
330
554
  */
331
555
  submitWorkflowExecutionActuals(request, requestOptions) {
332
556
  var _a;
@@ -339,7 +563,7 @@ class VellumClient {
339
563
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
340
564
  "X-Fern-Language": "JavaScript",
341
565
  "X-Fern-SDK-Name": "vellum-ai",
342
- "X-Fern-SDK-Version": "0.1.8",
566
+ "X-Fern-SDK-Version": "v0.1.10",
343
567
  },
344
568
  contentType: "application/json",
345
569
  body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../..";
5
+ export interface ExecutePromptRequest {
6
+ inputs: Vellum.PromptDeploymentInputRequest[];
7
+ /** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
8
+ promptDeploymentId?: string;
9
+ /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
10
+ promptDeploymentName?: string;
11
+ /** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
12
+ releaseTag?: string;
13
+ externalId?: string;
14
+ /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
15
+ expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
16
+ rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
17
+ /** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
18
+ expandRaw?: string[];
19
+ metadata?: Record<string, unknown>;
20
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../..";
5
+ export interface ExecutePromptStreamRequest {
6
+ inputs: Vellum.PromptDeploymentInputRequest[];
7
+ /** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
8
+ promptDeploymentId?: string;
9
+ /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
10
+ promptDeploymentName?: string;
11
+ /** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
12
+ releaseTag?: string;
13
+ externalId?: string;
14
+ /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
15
+ expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
16
+ rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
17
+ /** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
18
+ expandRaw?: string[];
19
+ metadata?: Record<string, unknown>;
20
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,17 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * requests: [{
9
+ * inputValues: {}
10
+ * }],
11
+ * options: {
12
+ * logprobs: Vellum.LogprobsEnum.All
13
+ * }
14
+ * }
15
+ */
5
16
  export interface GenerateBodyRequest {
6
17
  /** The ID of the deployment. Must provide either this or deployment_name. */
7
18
  deploymentId?: string;
@@ -2,6 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * actuals: []
9
+ * }
10
+ */
5
11
  export interface SubmitCompletionActualsRequest {
6
12
  /** The ID of the deployment. Must provide either this or deployment_name. */
7
13
  deploymentId?: string;
@@ -2,6 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * actuals: []
9
+ * }
10
+ */
5
11
  export interface SubmitWorkflowExecutionActualsRequest {
6
12
  /** Feedback regarding the quality of an output on a previously executed workflow. */
7
13
  actuals: Vellum.SubmitWorkflowExecutionActualRequest[];
@@ -1,3 +1,5 @@
1
+ export { ExecutePromptRequest } from "./ExecutePromptRequest";
2
+ export { ExecutePromptStreamRequest } from "./ExecutePromptStreamRequest";
1
3
  export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
2
4
  export { GenerateBodyRequest } from "./GenerateBodyRequest";
3
5
  export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
@@ -2,7 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors";
5
- import * as Vellum from "..";
6
5
  export declare class ForbiddenError extends errors.VellumError {
7
- constructor(body: Vellum.GenerateErrorResponse);
6
+ constructor(body?: unknown);
8
7
  }
@@ -62,7 +62,7 @@ class Deployments {
62
62
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "vellum-ai",
65
- "X-Fern-SDK-Version": "0.1.8",
65
+ "X-Fern-SDK-Version": "v0.1.10",
66
66
  },
67
67
  contentType: "application/json",
68
68
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -108,7 +108,7 @@ class Deployments {
108
108
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
109
109
  "X-Fern-Language": "JavaScript",
110
110
  "X-Fern-SDK-Name": "vellum-ai",
111
- "X-Fern-SDK-Version": "0.1.8",
111
+ "X-Fern-SDK-Version": "v0.1.10",
112
112
  },
113
113
  contentType: "application/json",
114
114
  body: yield serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
@@ -2,6 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * inputs: []
9
+ * }
10
+ */
5
11
  export interface DeploymentProviderPayloadRequest {
6
12
  /** The ID of the deployment. Must provide either this or deployment_name. */
7
13
  deploymentId?: string;
@@ -62,7 +62,7 @@ class DocumentIndexes {
62
62
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "vellum-ai",
65
- "X-Fern-SDK-Version": "0.1.8",
65
+ "X-Fern-SDK-Version": "v0.1.10",
66
66
  },
67
67
  contentType: "application/json",
68
68
  body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
@@ -114,7 +114,7 @@ class DocumentIndexes {
114
114
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
115
115
  "X-Fern-Language": "JavaScript",
116
116
  "X-Fern-SDK-Name": "vellum-ai",
117
- "X-Fern-SDK-Version": "0.1.8",
117
+ "X-Fern-SDK-Version": "v0.1.10",
118
118
  },
119
119
  contentType: "application/json",
120
120
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -21,6 +21,9 @@ export declare class Documents {
21
21
  constructor(_options: Documents.Options);
22
22
  /**
23
23
  * Used to list documents. Optionally filter on supported fields.
24
+ *
25
+ * @example
26
+ * await vellum.documents.list({})
24
27
  */
25
28
  list(request?: Vellum.DocumentsListRequest, requestOptions?: Documents.RequestOptions): Promise<Vellum.PaginatedSlimDocumentList>;
26
29
  destroy(id: string, requestOptions?: Documents.RequestOptions): Promise<void>;
@@ -52,6 +52,9 @@ class Documents {
52
52
  }
53
53
  /**
54
54
  * Used to list documents. Optionally filter on supported fields.
55
+ *
56
+ * @example
57
+ * await vellum.documents.list({})
55
58
  */
56
59
  list(request = {}, requestOptions) {
57
60
  var _a;
@@ -78,7 +81,7 @@ class Documents {
78
81
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
79
82
  "X-Fern-Language": "JavaScript",
80
83
  "X-Fern-SDK-Name": "vellum-ai",
81
- "X-Fern-SDK-Version": "0.1.8",
84
+ "X-Fern-SDK-Version": "v0.1.10",
82
85
  },
83
86
  contentType: "application/json",
84
87
  queryParameters: _queryParams,
@@ -125,7 +128,7 @@ class Documents {
125
128
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
126
129
  "X-Fern-Language": "JavaScript",
127
130
  "X-Fern-SDK-Name": "vellum-ai",
128
- "X-Fern-SDK-Version": "0.1.8",
131
+ "X-Fern-SDK-Version": "v0.1.10",
129
132
  },
130
133
  contentType: "application/json",
131
134
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -169,7 +172,7 @@ class Documents {
169
172
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
170
173
  "X-Fern-Language": "JavaScript",
171
174
  "X-Fern-SDK-Name": "vellum-ai",
172
- "X-Fern-SDK-Version": "0.1.8",
175
+ "X-Fern-SDK-Version": "v0.1.10",
173
176
  },
174
177
  contentType: "application/json",
175
178
  body: yield serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
@@ -245,8 +248,7 @@ class Documents {
245
248
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
246
249
  "X-Fern-Language": "JavaScript",
247
250
  "X-Fern-SDK-Name": "vellum-ai",
248
- "X-Fern-SDK-Version": "0.1.8",
249
- "Content-Length": (yield core.getFormDataContentLength(_request)).toString(),
251
+ "X-Fern-SDK-Version": "v0.1.10",
250
252
  },
251
253
  contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
252
254
  body: _request,
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface DocumentsListRequest {
5
9
  /**
6
10
  * Filter down to only those documents that are included in the specified index. You may provide either the Vellum-generated ID or the unique name of the index specified upon initial creation.
@@ -62,7 +62,7 @@ class ModelVersions {
62
62
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "vellum-ai",
65
- "X-Fern-SDK-Version": "0.1.8",
65
+ "X-Fern-SDK-Version": "v0.1.10",
66
66
  },
67
67
  contentType: "application/json",
68
68
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -69,7 +69,7 @@ class RegisteredPrompts {
69
69
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "vellum-ai",
72
- "X-Fern-SDK-Version": "0.1.8",
72
+ "X-Fern-SDK-Version": "v0.1.10",
73
73
  },
74
74
  contentType: "application/json",
75
75
  body: yield serializers.RegisterPromptRequestRequest.jsonOrThrow(request, {