vellum-ai 0.1.4 → 0.1.6

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 (215) hide show
  1. package/Client.d.ts +16 -0
  2. package/Client.js +137 -12
  3. package/api/errors/ForbiddenError.d.ts +1 -2
  4. package/api/resources/deployments/client/Client.d.ts +1 -0
  5. package/api/resources/deployments/client/Client.js +50 -1
  6. package/api/resources/deployments/client/index.d.ts +1 -1
  7. package/api/resources/deployments/client/index.js +15 -0
  8. package/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +11 -0
  9. package/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.js +5 -0
  10. package/api/resources/deployments/client/requests/index.d.ts +1 -0
  11. package/api/resources/deployments/client/requests/index.js +2 -0
  12. package/api/resources/documentIndexes/client/Client.js +2 -2
  13. package/api/resources/documents/client/Client.js +4 -4
  14. package/api/resources/index.d.ts +1 -0
  15. package/api/resources/index.js +1 -0
  16. package/api/resources/modelVersions/client/Client.d.ts +1 -1
  17. package/api/resources/modelVersions/client/Client.js +2 -2
  18. package/api/resources/registeredPrompts/client/Client.js +1 -1
  19. package/api/resources/sandboxes/client/Client.js +2 -2
  20. package/api/resources/testSuites/client/Client.js +2 -2
  21. package/api/types/ChatHistoryInputRequest.d.ts +9 -0
  22. package/api/types/ChatHistoryInputRequest.js +5 -0
  23. package/api/types/DeploymentProviderPayloadResponse.d.ts +6 -0
  24. package/api/types/DeploymentProviderPayloadResponse.js +5 -0
  25. package/api/types/DeploymentRead.d.ts +1 -0
  26. package/api/types/ErrorExecutePromptResponse.d.ts +8 -0
  27. package/api/types/ErrorExecutePromptResponse.js +5 -0
  28. package/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
  29. package/api/types/ExecutePromptApiErrorResponse.js +5 -0
  30. package/api/types/ExecutePromptRequest.d.ts +14 -0
  31. package/api/types/ExecutePromptRequest.js +5 -0
  32. package/api/types/ExecutePromptResponse.d.ts +16 -0
  33. package/api/types/ExecutePromptResponse.js +5 -0
  34. package/api/types/ExecutePromptStreamingResponse.d.ts +19 -0
  35. package/api/types/ExecutePromptStreamingResponse.js +5 -0
  36. package/api/types/FulfilledExecutePromptStreamingResponse.d.ts +7 -0
  37. package/api/types/FulfilledExecutePromptStreamingResponse.js +5 -0
  38. package/api/types/InitiatedExecutePromptResponse.d.ts +8 -0
  39. package/api/types/InitiatedExecutePromptResponse.js +5 -0
  40. package/api/types/InitiatedExecutePromptStreamingResponse.d.ts +7 -0
  41. package/api/types/InitiatedExecutePromptStreamingResponse.js +5 -0
  42. package/api/types/JsonExecutePromptResponse.d.ts +7 -0
  43. package/api/types/JsonExecutePromptResponse.js +5 -0
  44. package/api/types/JsonInputRequest.d.ts +8 -0
  45. package/api/types/JsonInputRequest.js +5 -0
  46. package/api/types/PromptDeploymentInputRequest.d.ts +16 -0
  47. package/api/types/PromptDeploymentInputRequest.js +5 -0
  48. package/api/types/RejectedExecutePromptResponse.d.ts +9 -0
  49. package/api/types/RejectedExecutePromptResponse.js +5 -0
  50. package/api/types/RejectedExecutePromptStreamingResponse.d.ts +7 -0
  51. package/api/types/RejectedExecutePromptStreamingResponse.js +5 -0
  52. package/api/types/StreamingExecutePromptStreamingResponse.d.ts +7 -0
  53. package/api/types/StreamingExecutePromptStreamingResponse.js +5 -0
  54. package/api/types/StringExecutePromptResponse.d.ts +7 -0
  55. package/api/types/StringExecutePromptResponse.js +5 -0
  56. package/api/types/StringInputRequest.d.ts +8 -0
  57. package/api/types/StringInputRequest.js +5 -0
  58. package/api/types/index.d.ts +18 -0
  59. package/api/types/index.js +18 -0
  60. package/dist/Client.d.ts +16 -0
  61. package/dist/Client.js +137 -12
  62. package/dist/api/errors/ForbiddenError.d.ts +1 -2
  63. package/dist/api/resources/deployments/client/Client.d.ts +1 -0
  64. package/dist/api/resources/deployments/client/Client.js +50 -1
  65. package/dist/api/resources/deployments/client/index.d.ts +1 -1
  66. package/dist/api/resources/deployments/client/index.js +15 -0
  67. package/dist/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +11 -0
  68. package/dist/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.js +5 -0
  69. package/dist/api/resources/deployments/client/requests/index.d.ts +1 -0
  70. package/dist/api/resources/deployments/client/requests/index.js +2 -0
  71. package/dist/api/resources/documentIndexes/client/Client.js +2 -2
  72. package/dist/api/resources/documents/client/Client.js +4 -4
  73. package/dist/api/resources/index.d.ts +1 -0
  74. package/dist/api/resources/index.js +1 -0
  75. package/dist/api/resources/modelVersions/client/Client.d.ts +1 -1
  76. package/dist/api/resources/modelVersions/client/Client.js +2 -2
  77. package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
  78. package/dist/api/resources/sandboxes/client/Client.js +2 -2
  79. package/dist/api/resources/testSuites/client/Client.js +2 -2
  80. package/dist/api/types/ChatHistoryInputRequest.d.ts +9 -0
  81. package/dist/api/types/ChatHistoryInputRequest.js +5 -0
  82. package/dist/api/types/DeploymentProviderPayloadResponse.d.ts +6 -0
  83. package/dist/api/types/DeploymentProviderPayloadResponse.js +5 -0
  84. package/dist/api/types/DeploymentRead.d.ts +1 -0
  85. package/dist/api/types/ErrorExecutePromptResponse.d.ts +8 -0
  86. package/dist/api/types/ErrorExecutePromptResponse.js +5 -0
  87. package/dist/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
  88. package/dist/api/types/ExecutePromptApiErrorResponse.js +5 -0
  89. package/dist/api/types/ExecutePromptRequest.d.ts +14 -0
  90. package/dist/api/types/ExecutePromptRequest.js +5 -0
  91. package/dist/api/types/ExecutePromptResponse.d.ts +16 -0
  92. package/dist/api/types/ExecutePromptResponse.js +5 -0
  93. package/dist/api/types/ExecutePromptStreamingResponse.d.ts +19 -0
  94. package/dist/api/types/ExecutePromptStreamingResponse.js +5 -0
  95. package/dist/api/types/FulfilledExecutePromptStreamingResponse.d.ts +7 -0
  96. package/dist/api/types/FulfilledExecutePromptStreamingResponse.js +5 -0
  97. package/dist/api/types/InitiatedExecutePromptResponse.d.ts +8 -0
  98. package/dist/api/types/InitiatedExecutePromptResponse.js +5 -0
  99. package/dist/api/types/InitiatedExecutePromptStreamingResponse.d.ts +7 -0
  100. package/dist/api/types/InitiatedExecutePromptStreamingResponse.js +5 -0
  101. package/dist/api/types/JsonExecutePromptResponse.d.ts +7 -0
  102. package/dist/api/types/JsonExecutePromptResponse.js +5 -0
  103. package/dist/api/types/JsonInputRequest.d.ts +8 -0
  104. package/dist/api/types/JsonInputRequest.js +5 -0
  105. package/dist/api/types/PromptDeploymentInputRequest.d.ts +16 -0
  106. package/dist/api/types/PromptDeploymentInputRequest.js +5 -0
  107. package/dist/api/types/RejectedExecutePromptResponse.d.ts +9 -0
  108. package/dist/api/types/RejectedExecutePromptResponse.js +5 -0
  109. package/dist/api/types/RejectedExecutePromptStreamingResponse.d.ts +7 -0
  110. package/dist/api/types/RejectedExecutePromptStreamingResponse.js +5 -0
  111. package/dist/api/types/StreamingExecutePromptStreamingResponse.d.ts +7 -0
  112. package/dist/api/types/StreamingExecutePromptStreamingResponse.js +5 -0
  113. package/dist/api/types/StringExecutePromptResponse.d.ts +7 -0
  114. package/dist/api/types/StringExecutePromptResponse.js +5 -0
  115. package/dist/api/types/StringInputRequest.d.ts +8 -0
  116. package/dist/api/types/StringInputRequest.js +5 -0
  117. package/dist/api/types/index.d.ts +18 -0
  118. package/dist/api/types/index.js +18 -0
  119. package/dist/serialization/resources/deployments/client/index.d.ts +1 -0
  120. package/dist/serialization/resources/deployments/client/index.js +17 -0
  121. package/dist/serialization/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +14 -0
  122. package/dist/serialization/resources/deployments/client/requests/DeploymentProviderPayloadRequest.js +44 -0
  123. package/dist/serialization/resources/deployments/client/requests/index.d.ts +1 -0
  124. package/dist/serialization/resources/deployments/client/requests/index.js +5 -0
  125. package/dist/serialization/resources/deployments/index.d.ts +1 -0
  126. package/dist/serialization/resources/deployments/index.js +17 -0
  127. package/dist/serialization/resources/index.d.ts +2 -0
  128. package/dist/serialization/resources/index.js +3 -1
  129. package/dist/serialization/types/ChatHistoryInputRequest.d.ts +13 -0
  130. package/dist/serialization/types/ChatHistoryInputRequest.js +43 -0
  131. package/dist/serialization/types/DeploymentProviderPayloadResponse.d.ts +12 -0
  132. package/dist/serialization/types/DeploymentProviderPayloadResponse.js +33 -0
  133. package/dist/serialization/types/ErrorExecutePromptResponse.d.ts +13 -0
  134. package/dist/serialization/types/ErrorExecutePromptResponse.js +43 -0
  135. package/dist/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
  136. package/dist/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
  137. package/dist/serialization/types/ExecutePromptRequest.d.ts +16 -0
  138. package/dist/serialization/types/ExecutePromptRequest.js +46 -0
  139. package/dist/serialization/types/ExecutePromptResponse.d.ts +19 -0
  140. package/dist/serialization/types/ExecutePromptResponse.js +49 -0
  141. package/dist/serialization/types/ExecutePromptStreamingResponse.d.ts +22 -0
  142. package/dist/serialization/types/ExecutePromptStreamingResponse.js +50 -0
  143. package/dist/serialization/types/FulfilledExecutePromptStreamingResponse.d.ts +12 -0
  144. package/dist/serialization/types/FulfilledExecutePromptStreamingResponse.js +42 -0
  145. package/dist/serialization/types/InitiatedExecutePromptResponse.d.ts +13 -0
  146. package/dist/serialization/types/InitiatedExecutePromptResponse.js +43 -0
  147. package/dist/serialization/types/InitiatedExecutePromptStreamingResponse.d.ts +12 -0
  148. package/dist/serialization/types/InitiatedExecutePromptStreamingResponse.js +42 -0
  149. package/dist/serialization/types/JsonExecutePromptResponse.d.ts +13 -0
  150. package/dist/serialization/types/JsonExecutePromptResponse.js +34 -0
  151. package/dist/serialization/types/JsonInputRequest.d.ts +13 -0
  152. package/dist/serialization/types/JsonInputRequest.js +34 -0
  153. package/dist/serialization/types/PromptDeploymentInputRequest.d.ts +19 -0
  154. package/dist/serialization/types/PromptDeploymentInputRequest.js +49 -0
  155. package/dist/serialization/types/RejectedExecutePromptResponse.d.ts +14 -0
  156. package/dist/serialization/types/RejectedExecutePromptResponse.js +44 -0
  157. package/dist/serialization/types/RejectedExecutePromptStreamingResponse.d.ts +12 -0
  158. package/dist/serialization/types/RejectedExecutePromptStreamingResponse.js +42 -0
  159. package/dist/serialization/types/StreamingExecutePromptStreamingResponse.d.ts +12 -0
  160. package/dist/serialization/types/StreamingExecutePromptStreamingResponse.js +42 -0
  161. package/dist/serialization/types/StringExecutePromptResponse.d.ts +13 -0
  162. package/dist/serialization/types/StringExecutePromptResponse.js +34 -0
  163. package/dist/serialization/types/StringInputRequest.d.ts +13 -0
  164. package/dist/serialization/types/StringInputRequest.js +34 -0
  165. package/dist/serialization/types/index.d.ts +18 -0
  166. package/dist/serialization/types/index.js +18 -0
  167. package/package.json +1 -1
  168. package/serialization/resources/deployments/client/index.d.ts +1 -0
  169. package/serialization/resources/deployments/client/index.js +17 -0
  170. package/serialization/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +14 -0
  171. package/serialization/resources/deployments/client/requests/DeploymentProviderPayloadRequest.js +44 -0
  172. package/serialization/resources/deployments/client/requests/index.d.ts +1 -0
  173. package/serialization/resources/deployments/client/requests/index.js +5 -0
  174. package/serialization/resources/deployments/index.d.ts +1 -0
  175. package/serialization/resources/deployments/index.js +17 -0
  176. package/serialization/resources/index.d.ts +2 -0
  177. package/serialization/resources/index.js +3 -1
  178. package/serialization/types/ChatHistoryInputRequest.d.ts +13 -0
  179. package/serialization/types/ChatHistoryInputRequest.js +43 -0
  180. package/serialization/types/DeploymentProviderPayloadResponse.d.ts +12 -0
  181. package/serialization/types/DeploymentProviderPayloadResponse.js +33 -0
  182. package/serialization/types/ErrorExecutePromptResponse.d.ts +13 -0
  183. package/serialization/types/ErrorExecutePromptResponse.js +43 -0
  184. package/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
  185. package/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
  186. package/serialization/types/ExecutePromptRequest.d.ts +16 -0
  187. package/serialization/types/ExecutePromptRequest.js +46 -0
  188. package/serialization/types/ExecutePromptResponse.d.ts +19 -0
  189. package/serialization/types/ExecutePromptResponse.js +49 -0
  190. package/serialization/types/ExecutePromptStreamingResponse.d.ts +22 -0
  191. package/serialization/types/ExecutePromptStreamingResponse.js +50 -0
  192. package/serialization/types/FulfilledExecutePromptStreamingResponse.d.ts +12 -0
  193. package/serialization/types/FulfilledExecutePromptStreamingResponse.js +42 -0
  194. package/serialization/types/InitiatedExecutePromptResponse.d.ts +13 -0
  195. package/serialization/types/InitiatedExecutePromptResponse.js +43 -0
  196. package/serialization/types/InitiatedExecutePromptStreamingResponse.d.ts +12 -0
  197. package/serialization/types/InitiatedExecutePromptStreamingResponse.js +42 -0
  198. package/serialization/types/JsonExecutePromptResponse.d.ts +13 -0
  199. package/serialization/types/JsonExecutePromptResponse.js +34 -0
  200. package/serialization/types/JsonInputRequest.d.ts +13 -0
  201. package/serialization/types/JsonInputRequest.js +34 -0
  202. package/serialization/types/PromptDeploymentInputRequest.d.ts +19 -0
  203. package/serialization/types/PromptDeploymentInputRequest.js +49 -0
  204. package/serialization/types/RejectedExecutePromptResponse.d.ts +14 -0
  205. package/serialization/types/RejectedExecutePromptResponse.js +44 -0
  206. package/serialization/types/RejectedExecutePromptStreamingResponse.d.ts +12 -0
  207. package/serialization/types/RejectedExecutePromptStreamingResponse.js +42 -0
  208. package/serialization/types/StreamingExecutePromptStreamingResponse.d.ts +12 -0
  209. package/serialization/types/StreamingExecutePromptStreamingResponse.js +42 -0
  210. package/serialization/types/StringExecutePromptResponse.d.ts +13 -0
  211. package/serialization/types/StringExecutePromptResponse.js +34 -0
  212. package/serialization/types/StringInputRequest.d.ts +13 -0
  213. package/serialization/types/StringInputRequest.js +34 -0
  214. package/serialization/types/index.d.ts +18 -0
  215. package/serialization/types/index.js +18 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export declare type ExecutePromptStreamingResponse = Vellum.ExecutePromptStreamingResponse.Initiated | Vellum.ExecutePromptStreamingResponse.Streaming | Vellum.ExecutePromptStreamingResponse.Fulfilled | Vellum.ExecutePromptStreamingResponse.Rejected;
6
+ export declare namespace ExecutePromptStreamingResponse {
7
+ interface Initiated extends Vellum.InitiatedExecutePromptStreamingResponse {
8
+ state: "INITIATED";
9
+ }
10
+ interface Streaming extends Vellum.StreamingExecutePromptStreamingResponse {
11
+ state: "STREAMING";
12
+ }
13
+ interface Fulfilled extends Vellum.FulfilledExecutePromptStreamingResponse {
14
+ state: "FULFILLED";
15
+ }
16
+ interface Rejected extends Vellum.RejectedExecutePromptStreamingResponse {
17
+ state: "REJECTED";
18
+ }
19
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface FulfilledExecutePromptStreamingResponse {
6
+ data: Vellum.ExecutePromptResponse;
7
+ }
@@ -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,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface InitiatedExecutePromptResponse {
6
+ type: Vellum.VellumVariableType;
7
+ executionId: string;
8
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface InitiatedExecutePromptStreamingResponse {
6
+ data: Vellum.InitiatedExecutePromptResponse;
7
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface JsonExecutePromptResponse {
5
+ executionId: string;
6
+ value: Record<string, unknown>;
7
+ }
@@ -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,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface JsonInputRequest {
5
+ /** The variable's name, as defined in the deployment. */
6
+ name: string;
7
+ value: Record<string, unknown>;
8
+ }
@@ -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,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export declare type PromptDeploymentInputRequest = Vellum.PromptDeploymentInputRequest.String | Vellum.PromptDeploymentInputRequest.Json | Vellum.PromptDeploymentInputRequest.ChatHistory;
6
+ export declare namespace PromptDeploymentInputRequest {
7
+ interface String extends Vellum.StringInputRequest {
8
+ type: "STRING";
9
+ }
10
+ interface Json extends Vellum.JsonInputRequest {
11
+ type: "JSON";
12
+ }
13
+ interface ChatHistory extends Vellum.ChatHistoryInputRequest {
14
+ type: "CHAT_HISTORY";
15
+ }
16
+ }
@@ -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,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface RejectedExecutePromptResponse {
6
+ type: string;
7
+ value: Vellum.VellumError;
8
+ executionId: string;
9
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface RejectedExecutePromptStreamingResponse {
6
+ data: Vellum.RejectedExecutePromptResponse;
7
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface StreamingExecutePromptStreamingResponse {
6
+ data: Vellum.ExecutePromptResponse;
7
+ }
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface StringExecutePromptResponse {
5
+ executionId: string;
6
+ value: string;
7
+ }
@@ -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,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface StringInputRequest {
5
+ /** The variable's name, as defined in the deployment. */
6
+ name: string;
7
+ value: string;
8
+ }
@@ -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 });
@@ -1,11 +1,14 @@
1
+ export * from "./ExecutePromptRequest";
1
2
  export * from "./ApiNodeResult";
2
3
  export * from "./ApiNodeResultData";
3
4
  export * from "./BlockTypeEnum";
5
+ export * from "./ChatHistoryInputRequest";
4
6
  export * from "./ChatMessage";
5
7
  export * from "./ChatMessageRequest";
6
8
  export * from "./ChatMessageRole";
7
9
  export * from "./ConditionalNodeResult";
8
10
  export * from "./ConditionalNodeResultData";
11
+ export * from "./DeploymentProviderPayloadResponse";
9
12
  export * from "./DeploymentRead";
10
13
  export * from "./DeploymentStatus";
11
14
  export * from "./DocumentDocumentToDocumentIndex";
@@ -15,10 +18,15 @@ export * from "./DocumentRead";
15
18
  export * from "./DocumentStatus";
16
19
  export * from "./EnrichedNormalizedCompletion";
17
20
  export * from "./EnvironmentEnum";
21
+ export * from "./ErrorExecutePromptResponse";
18
22
  export * from "./EvaluationParams";
19
23
  export * from "./EvaluationParamsRequest";
24
+ export * from "./ExecutePromptApiErrorResponse";
25
+ export * from "./ExecutePromptResponse";
26
+ export * from "./ExecutePromptStreamingResponse";
20
27
  export * from "./ExecuteWorkflowStreamErrorResponse";
21
28
  export * from "./FinishReasonEnum";
29
+ export * from "./FulfilledExecutePromptStreamingResponse";
22
30
  export * from "./GenerateErrorResponse";
23
31
  export * from "./GenerateOptionsRequest";
24
32
  export * from "./GenerateRequest";
@@ -30,6 +38,10 @@ export * from "./GenerateStreamResponse";
30
38
  export * from "./GenerateStreamResult";
31
39
  export * from "./GenerateStreamResultData";
32
40
  export * from "./IndexingStateEnum";
41
+ export * from "./InitiatedExecutePromptResponse";
42
+ export * from "./InitiatedExecutePromptStreamingResponse";
43
+ export * from "./JsonExecutePromptResponse";
44
+ export * from "./JsonInputRequest";
33
45
  export * from "./LogicalOperator";
34
46
  export * from "./LogprobsEnum";
35
47
  export * from "./MetadataFilterConfigRequest";
@@ -53,6 +65,7 @@ export * from "./NormalizedTokenLogProbs";
53
65
  export * from "./PaginatedSlimDocumentList";
54
66
  export * from "./ProcessingFailureReasonEnum";
55
67
  export * from "./ProcessingStateEnum";
68
+ export * from "./PromptDeploymentInputRequest";
56
69
  export * from "./PromptNodeResult";
57
70
  export * from "./PromptNodeResultData";
58
71
  export * from "./PromptTemplateBlock";
@@ -72,6 +85,8 @@ export * from "./RegisteredPromptInputVariableRequest";
72
85
  export * from "./RegisteredPromptModelVersion";
73
86
  export * from "./RegisteredPromptSandbox";
74
87
  export * from "./RegisteredPromptSandboxSnapshot";
88
+ export * from "./RejectedExecutePromptResponse";
89
+ export * from "./RejectedExecutePromptStreamingResponse";
75
90
  export * from "./SandboxMetricInputParams";
76
91
  export * from "./SandboxMetricInputParamsRequest";
77
92
  export * from "./SandboxScenario";
@@ -91,6 +106,9 @@ export * from "./SearchResultMergingRequest";
91
106
  export * from "./SearchResultRequest";
92
107
  export * from "./SearchWeightsRequest";
93
108
  export * from "./SlimDocument";
109
+ export * from "./StreamingExecutePromptStreamingResponse";
110
+ export * from "./StringExecutePromptResponse";
111
+ export * from "./StringInputRequest";
94
112
  export * from "./SubmitCompletionActualRequest";
95
113
  export * from "./SubmitCompletionActualsErrorResponse";
96
114
  export * from "./SubmitWorkflowExecutionActualRequest";
@@ -14,14 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ExecutePromptRequest"), exports);
17
18
  __exportStar(require("./ApiNodeResult"), exports);
18
19
  __exportStar(require("./ApiNodeResultData"), exports);
19
20
  __exportStar(require("./BlockTypeEnum"), exports);
21
+ __exportStar(require("./ChatHistoryInputRequest"), exports);
20
22
  __exportStar(require("./ChatMessage"), exports);
21
23
  __exportStar(require("./ChatMessageRequest"), exports);
22
24
  __exportStar(require("./ChatMessageRole"), exports);
23
25
  __exportStar(require("./ConditionalNodeResult"), exports);
24
26
  __exportStar(require("./ConditionalNodeResultData"), exports);
27
+ __exportStar(require("./DeploymentProviderPayloadResponse"), exports);
25
28
  __exportStar(require("./DeploymentRead"), exports);
26
29
  __exportStar(require("./DeploymentStatus"), exports);
27
30
  __exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
@@ -31,10 +34,15 @@ __exportStar(require("./DocumentRead"), exports);
31
34
  __exportStar(require("./DocumentStatus"), exports);
32
35
  __exportStar(require("./EnrichedNormalizedCompletion"), exports);
33
36
  __exportStar(require("./EnvironmentEnum"), exports);
37
+ __exportStar(require("./ErrorExecutePromptResponse"), exports);
34
38
  __exportStar(require("./EvaluationParams"), exports);
35
39
  __exportStar(require("./EvaluationParamsRequest"), exports);
40
+ __exportStar(require("./ExecutePromptApiErrorResponse"), exports);
41
+ __exportStar(require("./ExecutePromptResponse"), exports);
42
+ __exportStar(require("./ExecutePromptStreamingResponse"), exports);
36
43
  __exportStar(require("./ExecuteWorkflowStreamErrorResponse"), exports);
37
44
  __exportStar(require("./FinishReasonEnum"), exports);
45
+ __exportStar(require("./FulfilledExecutePromptStreamingResponse"), exports);
38
46
  __exportStar(require("./GenerateErrorResponse"), exports);
39
47
  __exportStar(require("./GenerateOptionsRequest"), exports);
40
48
  __exportStar(require("./GenerateRequest"), exports);
@@ -46,6 +54,10 @@ __exportStar(require("./GenerateStreamResponse"), exports);
46
54
  __exportStar(require("./GenerateStreamResult"), exports);
47
55
  __exportStar(require("./GenerateStreamResultData"), exports);
48
56
  __exportStar(require("./IndexingStateEnum"), exports);
57
+ __exportStar(require("./InitiatedExecutePromptResponse"), exports);
58
+ __exportStar(require("./InitiatedExecutePromptStreamingResponse"), exports);
59
+ __exportStar(require("./JsonExecutePromptResponse"), exports);
60
+ __exportStar(require("./JsonInputRequest"), exports);
49
61
  __exportStar(require("./LogicalOperator"), exports);
50
62
  __exportStar(require("./LogprobsEnum"), exports);
51
63
  __exportStar(require("./MetadataFilterConfigRequest"), exports);
@@ -69,6 +81,7 @@ __exportStar(require("./NormalizedTokenLogProbs"), exports);
69
81
  __exportStar(require("./PaginatedSlimDocumentList"), exports);
70
82
  __exportStar(require("./ProcessingFailureReasonEnum"), exports);
71
83
  __exportStar(require("./ProcessingStateEnum"), exports);
84
+ __exportStar(require("./PromptDeploymentInputRequest"), exports);
72
85
  __exportStar(require("./PromptNodeResult"), exports);
73
86
  __exportStar(require("./PromptNodeResultData"), exports);
74
87
  __exportStar(require("./PromptTemplateBlock"), exports);
@@ -88,6 +101,8 @@ __exportStar(require("./RegisteredPromptInputVariableRequest"), exports);
88
101
  __exportStar(require("./RegisteredPromptModelVersion"), exports);
89
102
  __exportStar(require("./RegisteredPromptSandbox"), exports);
90
103
  __exportStar(require("./RegisteredPromptSandboxSnapshot"), exports);
104
+ __exportStar(require("./RejectedExecutePromptResponse"), exports);
105
+ __exportStar(require("./RejectedExecutePromptStreamingResponse"), exports);
91
106
  __exportStar(require("./SandboxMetricInputParams"), exports);
92
107
  __exportStar(require("./SandboxMetricInputParamsRequest"), exports);
93
108
  __exportStar(require("./SandboxScenario"), exports);
@@ -107,6 +122,9 @@ __exportStar(require("./SearchResultMergingRequest"), exports);
107
122
  __exportStar(require("./SearchResultRequest"), exports);
108
123
  __exportStar(require("./SearchWeightsRequest"), exports);
109
124
  __exportStar(require("./SlimDocument"), exports);
125
+ __exportStar(require("./StreamingExecutePromptStreamingResponse"), exports);
126
+ __exportStar(require("./StringExecutePromptResponse"), exports);
127
+ __exportStar(require("./StringInputRequest"), exports);
110
128
  __exportStar(require("./SubmitCompletionActualRequest"), exports);
111
129
  __exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
112
130
  __exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
package/dist/Client.d.ts CHANGED
@@ -24,6 +24,22 @@ export declare namespace VellumClient {
24
24
  export declare class VellumClient {
25
25
  protected readonly _options: VellumClient.Options;
26
26
  constructor(_options: VellumClient.Options);
27
+ /**
28
+ * Executes a deployed Prompt and returns the result.
29
+ * @throws {@link Vellum.BadRequestError}
30
+ * @throws {@link Vellum.ForbiddenError}
31
+ * @throws {@link Vellum.NotFoundError}
32
+ * @throws {@link Vellum.InternalServerError}
33
+ */
34
+ executePrompt(request: Vellum.ExecutePromptRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.ExecutePromptResponse>;
35
+ /**
36
+ * Executes a deployed Prompt and streams back the results.
37
+ * @throws {@link Vellum.BadRequestError}
38
+ * @throws {@link Vellum.ForbiddenError}
39
+ * @throws {@link Vellum.NotFoundError}
40
+ * @throws {@link Vellum.InternalServerError}
41
+ */
42
+ executePromptStream(request: Vellum.ExecutePromptRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.ExecutePromptStreamingResponse>;
27
43
  /**
28
44
  * Executes a deployed Workflow and streams back its results.
29
45
  */
package/dist/Client.js CHANGED
@@ -56,6 +56,136 @@ class VellumClient {
56
56
  constructor(_options) {
57
57
  this._options = _options;
58
58
  }
59
+ /**
60
+ * Executes a deployed Prompt and returns the result.
61
+ * @throws {@link Vellum.BadRequestError}
62
+ * @throws {@link Vellum.ForbiddenError}
63
+ * @throws {@link Vellum.NotFoundError}
64
+ * @throws {@link Vellum.InternalServerError}
65
+ */
66
+ executePrompt(request, requestOptions) {
67
+ var _a;
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const _response = yield core.fetcher({
70
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
71
+ .default, "v1/execute-prompt"),
72
+ method: "POST",
73
+ headers: {
74
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
75
+ "X-Fern-Language": "JavaScript",
76
+ "X-Fern-SDK-Name": "vellum-ai",
77
+ "X-Fern-SDK-Version": "0.1.6",
78
+ },
79
+ contentType: "application/json",
80
+ body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
81
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
82
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
+ });
84
+ if (_response.ok) {
85
+ return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
86
+ unrecognizedObjectKeys: "passthrough",
87
+ allowUnrecognizedUnionMembers: true,
88
+ allowUnrecognizedEnumValues: true,
89
+ breadcrumbsPrefix: ["response"],
90
+ });
91
+ }
92
+ if (_response.error.reason === "status-code") {
93
+ switch (_response.error.statusCode) {
94
+ case 400:
95
+ throw new Vellum.BadRequestError(_response.error.body);
96
+ case 403:
97
+ throw new Vellum.ForbiddenError(_response.error.body);
98
+ case 404:
99
+ throw new Vellum.NotFoundError(_response.error.body);
100
+ case 500:
101
+ throw new Vellum.InternalServerError(_response.error.body);
102
+ default:
103
+ throw new errors.VellumError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.body,
106
+ });
107
+ }
108
+ }
109
+ switch (_response.error.reason) {
110
+ case "non-json":
111
+ throw new errors.VellumError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.rawBody,
114
+ });
115
+ case "timeout":
116
+ throw new errors.VellumTimeoutError();
117
+ case "unknown":
118
+ throw new errors.VellumError({
119
+ message: _response.error.errorMessage,
120
+ });
121
+ }
122
+ });
123
+ }
124
+ /**
125
+ * Executes a deployed Prompt and streams back the results.
126
+ * @throws {@link Vellum.BadRequestError}
127
+ * @throws {@link Vellum.ForbiddenError}
128
+ * @throws {@link Vellum.NotFoundError}
129
+ * @throws {@link Vellum.InternalServerError}
130
+ */
131
+ executePromptStream(request, requestOptions) {
132
+ var _a;
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const _response = yield core.fetcher({
135
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
136
+ .default, "v1/execute-prompt-stream"),
137
+ method: "POST",
138
+ headers: {
139
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
140
+ "X-Fern-Language": "JavaScript",
141
+ "X-Fern-SDK-Name": "vellum-ai",
142
+ "X-Fern-SDK-Version": "0.1.6",
143
+ },
144
+ contentType: "application/json",
145
+ body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
146
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
147
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
148
+ });
149
+ if (_response.ok) {
150
+ return yield serializers.ExecutePromptStreamingResponse.parseOrThrow(_response.body, {
151
+ unrecognizedObjectKeys: "passthrough",
152
+ allowUnrecognizedUnionMembers: true,
153
+ allowUnrecognizedEnumValues: true,
154
+ breadcrumbsPrefix: ["response"],
155
+ });
156
+ }
157
+ if (_response.error.reason === "status-code") {
158
+ switch (_response.error.statusCode) {
159
+ case 400:
160
+ throw new Vellum.BadRequestError(_response.error.body);
161
+ case 403:
162
+ throw new Vellum.ForbiddenError(_response.error.body);
163
+ case 404:
164
+ throw new Vellum.NotFoundError(_response.error.body);
165
+ case 500:
166
+ throw new Vellum.InternalServerError(_response.error.body);
167
+ default:
168
+ throw new errors.VellumError({
169
+ statusCode: _response.error.statusCode,
170
+ body: _response.error.body,
171
+ });
172
+ }
173
+ }
174
+ switch (_response.error.reason) {
175
+ case "non-json":
176
+ throw new errors.VellumError({
177
+ statusCode: _response.error.statusCode,
178
+ body: _response.error.rawBody,
179
+ });
180
+ case "timeout":
181
+ throw new errors.VellumTimeoutError();
182
+ case "unknown":
183
+ throw new errors.VellumError({
184
+ message: _response.error.errorMessage,
185
+ });
186
+ }
187
+ });
188
+ }
59
189
  /**
60
190
  * Executes a deployed Workflow and streams back its results.
61
191
  */
@@ -70,7 +200,7 @@ class VellumClient {
70
200
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
71
201
  "X-Fern-Language": "JavaScript",
72
202
  "X-Fern-SDK-Name": "vellum-ai",
73
- "X-Fern-SDK-Version": "v0.1.4",
203
+ "X-Fern-SDK-Version": "0.1.6",
74
204
  },
75
205
  body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
76
206
  unrecognizedObjectKeys: "strip",
@@ -111,7 +241,7 @@ class VellumClient {
111
241
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
112
242
  "X-Fern-Language": "JavaScript",
113
243
  "X-Fern-SDK-Name": "vellum-ai",
114
- "X-Fern-SDK-Version": "v0.1.4",
244
+ "X-Fern-SDK-Version": "0.1.6",
115
245
  },
116
246
  contentType: "application/json",
117
247
  body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -131,12 +261,7 @@ class VellumClient {
131
261
  case 400:
132
262
  throw new Vellum.BadRequestError(_response.error.body);
133
263
  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
- }));
264
+ throw new Vellum.ForbiddenError(_response.error.body);
140
265
  case 404:
141
266
  throw new Vellum.NotFoundError(_response.error.body);
142
267
  case 500:
@@ -179,7 +304,7 @@ class VellumClient {
179
304
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
180
305
  "X-Fern-Language": "JavaScript",
181
306
  "X-Fern-SDK-Name": "vellum-ai",
182
- "X-Fern-SDK-Version": "v0.1.4",
307
+ "X-Fern-SDK-Version": "0.1.6",
183
308
  },
184
309
  body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
185
310
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -217,7 +342,7 @@ class VellumClient {
217
342
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
218
343
  "X-Fern-Language": "JavaScript",
219
344
  "X-Fern-SDK-Name": "vellum-ai",
220
- "X-Fern-SDK-Version": "v0.1.4",
345
+ "X-Fern-SDK-Version": "0.1.6",
221
346
  },
222
347
  contentType: "application/json",
223
348
  body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -281,7 +406,7 @@ class VellumClient {
281
406
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
282
407
  "X-Fern-Language": "JavaScript",
283
408
  "X-Fern-SDK-Name": "vellum-ai",
284
- "X-Fern-SDK-Version": "v0.1.4",
409
+ "X-Fern-SDK-Version": "0.1.6",
285
410
  },
286
411
  contentType: "application/json",
287
412
  body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
@@ -339,7 +464,7 @@ class VellumClient {
339
464
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
340
465
  "X-Fern-Language": "JavaScript",
341
466
  "X-Fern-SDK-Name": "vellum-ai",
342
- "X-Fern-SDK-Version": "v0.1.4",
467
+ "X-Fern-SDK-Version": "0.1.6",
343
468
  },
344
469
  contentType: "application/json",
345
470
  body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
@@ -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
  }
@@ -21,4 +21,5 @@ export declare class Deployments {
21
21
  * Used to retrieve a deployment given its ID or name.
22
22
  */
23
23
  retrieve(id: string, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentRead>;
24
+ retrieveProviderPayload(request: Vellum.DeploymentProviderPayloadRequest, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentProviderPayloadResponse>;
24
25
  }