vellum-ai 0.0.12 → 0.0.14

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 (125) hide show
  1. package/Client.d.ts +8 -0
  2. package/Client.js +18 -8
  3. package/api/resources/deployments/client/Client.d.ts +24 -0
  4. package/api/resources/deployments/client/Client.js +87 -0
  5. package/api/resources/deployments/client/index.d.ts +1 -0
  6. package/api/resources/deployments/client/index.js +2 -0
  7. package/api/resources/deployments/index.d.ts +1 -0
  8. package/api/resources/deployments/index.js +17 -0
  9. package/api/resources/index.d.ts +2 -0
  10. package/api/resources/index.js +3 -1
  11. package/api/resources/modelVersions/client/Client.d.ts +6 -0
  12. package/api/resources/modelVersions/client/Client.js +44 -0
  13. package/api/resources/modelVersions/client/index.d.ts +1 -1
  14. package/api/resources/modelVersions/client/index.js +15 -0
  15. package/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +7 -0
  16. package/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +5 -0
  17. package/api/resources/modelVersions/client/requests/index.d.ts +1 -0
  18. package/api/resources/modelVersions/client/requests/index.js +2 -0
  19. package/api/types/DeploymentRead.d.ts +20 -0
  20. package/api/types/DeploymentRead.js +5 -0
  21. package/api/types/DeploymentReadStatusEnum.d.ts +9 -0
  22. package/api/types/DeploymentReadStatusEnum.js +11 -0
  23. package/api/types/EnvironmentEnum.d.ts +9 -0
  24. package/api/types/EnvironmentEnum.js +11 -0
  25. package/api/types/ModelVersionCompilePromptResponse.d.ts +8 -0
  26. package/api/types/ModelVersionCompilePromptResponse.js +5 -0
  27. package/api/types/ModelVersionCompiledPrompt.d.ts +9 -0
  28. package/api/types/ModelVersionCompiledPrompt.js +5 -0
  29. package/api/types/ModelVersionExecConfigRead.d.ts +2 -2
  30. package/api/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  31. package/api/types/PromptTemplateInputVariable.d.ts +7 -0
  32. package/api/types/PromptTemplateInputVariable.js +5 -0
  33. package/api/types/index.d.ts +6 -0
  34. package/api/types/index.js +6 -0
  35. package/dist/Client.d.ts +8 -0
  36. package/dist/Client.js +18 -8
  37. package/dist/api/resources/deployments/client/Client.d.ts +24 -0
  38. package/dist/api/resources/deployments/client/Client.js +87 -0
  39. package/dist/api/resources/deployments/client/index.d.ts +1 -0
  40. package/dist/api/resources/deployments/client/index.js +2 -0
  41. package/dist/api/resources/deployments/index.d.ts +1 -0
  42. package/dist/api/resources/deployments/index.js +17 -0
  43. package/dist/api/resources/index.d.ts +2 -0
  44. package/dist/api/resources/index.js +3 -1
  45. package/dist/api/resources/modelVersions/client/Client.d.ts +6 -0
  46. package/dist/api/resources/modelVersions/client/Client.js +44 -0
  47. package/dist/api/resources/modelVersions/client/index.d.ts +1 -1
  48. package/dist/api/resources/modelVersions/client/index.js +15 -0
  49. package/dist/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +7 -0
  50. package/dist/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +5 -0
  51. package/dist/api/resources/modelVersions/client/requests/index.d.ts +1 -0
  52. package/dist/api/resources/modelVersions/client/requests/index.js +2 -0
  53. package/dist/api/types/DeploymentRead.d.ts +20 -0
  54. package/dist/api/types/DeploymentRead.js +5 -0
  55. package/dist/api/types/DeploymentReadStatusEnum.d.ts +9 -0
  56. package/dist/api/types/DeploymentReadStatusEnum.js +11 -0
  57. package/dist/api/types/EnvironmentEnum.d.ts +9 -0
  58. package/dist/api/types/EnvironmentEnum.js +11 -0
  59. package/dist/api/types/ModelVersionCompilePromptResponse.d.ts +8 -0
  60. package/dist/api/types/ModelVersionCompilePromptResponse.js +5 -0
  61. package/dist/api/types/ModelVersionCompiledPrompt.d.ts +9 -0
  62. package/dist/api/types/ModelVersionCompiledPrompt.js +5 -0
  63. package/dist/api/types/ModelVersionExecConfigRead.d.ts +2 -2
  64. package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  65. package/dist/api/types/PromptTemplateInputVariable.d.ts +7 -0
  66. package/dist/api/types/PromptTemplateInputVariable.js +5 -0
  67. package/dist/api/types/index.d.ts +6 -0
  68. package/dist/api/types/index.js +6 -0
  69. package/dist/serialization/resources/index.d.ts +2 -0
  70. package/dist/serialization/resources/index.js +3 -1
  71. package/dist/serialization/resources/modelVersions/client/index.d.ts +1 -0
  72. package/dist/serialization/resources/modelVersions/client/index.js +17 -0
  73. package/dist/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +12 -0
  74. package/dist/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +33 -0
  75. package/dist/serialization/resources/modelVersions/client/requests/index.d.ts +1 -0
  76. package/dist/serialization/resources/modelVersions/client/requests/index.js +5 -0
  77. package/dist/serialization/resources/modelVersions/index.d.ts +1 -0
  78. package/dist/serialization/resources/modelVersions/index.js +17 -0
  79. package/dist/serialization/types/DeploymentRead.d.ts +20 -0
  80. package/dist/serialization/types/DeploymentRead.js +41 -0
  81. package/dist/serialization/types/DeploymentReadStatusEnum.d.ts +10 -0
  82. package/dist/serialization/types/DeploymentReadStatusEnum.js +31 -0
  83. package/dist/serialization/types/EnvironmentEnum.d.ts +10 -0
  84. package/dist/serialization/types/EnvironmentEnum.js +31 -0
  85. package/dist/serialization/types/ModelVersionCompilePromptResponse.d.ts +12 -0
  86. package/dist/serialization/types/ModelVersionCompilePromptResponse.js +33 -0
  87. package/dist/serialization/types/ModelVersionCompiledPrompt.d.ts +13 -0
  88. package/dist/serialization/types/ModelVersionCompiledPrompt.js +34 -0
  89. package/dist/serialization/types/ModelVersionExecConfigRead.d.ts +1 -1
  90. package/dist/serialization/types/ModelVersionExecConfigRead.js +1 -1
  91. package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  92. package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -0
  93. package/dist/serialization/types/PromptTemplateInputVariable.d.ts +12 -0
  94. package/dist/serialization/types/PromptTemplateInputVariable.js +33 -0
  95. package/dist/serialization/types/index.d.ts +6 -0
  96. package/dist/serialization/types/index.js +6 -0
  97. package/package.json +1 -1
  98. package/serialization/resources/index.d.ts +2 -0
  99. package/serialization/resources/index.js +3 -1
  100. package/serialization/resources/modelVersions/client/index.d.ts +1 -0
  101. package/serialization/resources/modelVersions/client/index.js +17 -0
  102. package/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +12 -0
  103. package/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +33 -0
  104. package/serialization/resources/modelVersions/client/requests/index.d.ts +1 -0
  105. package/serialization/resources/modelVersions/client/requests/index.js +5 -0
  106. package/serialization/resources/modelVersions/index.d.ts +1 -0
  107. package/serialization/resources/modelVersions/index.js +17 -0
  108. package/serialization/types/DeploymentRead.d.ts +20 -0
  109. package/serialization/types/DeploymentRead.js +41 -0
  110. package/serialization/types/DeploymentReadStatusEnum.d.ts +10 -0
  111. package/serialization/types/DeploymentReadStatusEnum.js +31 -0
  112. package/serialization/types/EnvironmentEnum.d.ts +10 -0
  113. package/serialization/types/EnvironmentEnum.js +31 -0
  114. package/serialization/types/ModelVersionCompilePromptResponse.d.ts +12 -0
  115. package/serialization/types/ModelVersionCompilePromptResponse.js +33 -0
  116. package/serialization/types/ModelVersionCompiledPrompt.d.ts +13 -0
  117. package/serialization/types/ModelVersionCompiledPrompt.js +34 -0
  118. package/serialization/types/ModelVersionExecConfigRead.d.ts +1 -1
  119. package/serialization/types/ModelVersionExecConfigRead.js +1 -1
  120. package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  121. package/serialization/types/ModelVersionSandboxSnapshot.js +1 -0
  122. package/serialization/types/PromptTemplateInputVariable.d.ts +12 -0
  123. package/serialization/types/PromptTemplateInputVariable.js +33 -0
  124. package/serialization/types/index.d.ts +6 -0
  125. package/serialization/types/index.js +6 -0
package/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import * as Vellum from "./api";
7
+ import { Deployments } from "./api/resources/deployments/client/Client";
7
8
  import { Documents } from "./api/resources/documents/client/Client";
8
9
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
9
10
  import { Sandboxes } from "./api/resources/sandboxes/client/Client";
@@ -29,6 +30,11 @@ export declare class VellumClient {
29
30
  */
30
31
  generate(request: Vellum.GenerateBodyRequest): Promise<Vellum.GenerateResponse>;
31
32
  /**
33
+ * <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
34
+ *
35
+ * Generate a stream of completions using a previously defined deployment.
36
+ *
37
+ * **Note:** Uses a base url of `https://predict.vellum.ai`.
32
38
  * @throws {Vellum.BadRequestError}
33
39
  * @throws {Vellum.NotFoundError}
34
40
  * @throws {Vellum.InternalServerError}
@@ -56,6 +62,8 @@ export declare class VellumClient {
56
62
  * @throws {Vellum.InternalServerError}
57
63
  */
58
64
  submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest): Promise<void>;
65
+ protected _deployments: Deployments | undefined;
66
+ get deployments(): Deployments;
59
67
  protected _documents: Documents | undefined;
60
68
  get documents(): Documents;
61
69
  protected _modelVersions: ModelVersions | undefined;
package/Client.js CHANGED
@@ -36,10 +36,11 @@ const Vellum = __importStar(require("./api"));
36
36
  const url_join_1 = __importDefault(require("url-join"));
37
37
  const serializers = __importStar(require("./serialization"));
38
38
  const errors = __importStar(require("./errors"));
39
- const Client_1 = require("./api/resources/documents/client/Client");
40
- const Client_2 = require("./api/resources/modelVersions/client/Client");
41
- const Client_3 = require("./api/resources/sandboxes/client/Client");
42
- const Client_4 = require("./api/resources/testSuites/client/Client");
39
+ const Client_1 = require("./api/resources/deployments/client/Client");
40
+ const Client_2 = require("./api/resources/documents/client/Client");
41
+ const Client_3 = require("./api/resources/modelVersions/client/Client");
42
+ const Client_4 = require("./api/resources/sandboxes/client/Client");
43
+ const Client_5 = require("./api/resources/testSuites/client/Client");
43
44
  class VellumClient {
44
45
  options;
45
46
  constructor(options) {
@@ -102,6 +103,11 @@ class VellumClient {
102
103
  }
103
104
  }
104
105
  /**
106
+ * <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
107
+ *
108
+ * Generate a stream of completions using a previously defined deployment.
109
+ *
110
+ * **Note:** Uses a base url of `https://predict.vellum.ai`.
105
111
  * @throws {Vellum.BadRequestError}
106
112
  * @throws {Vellum.NotFoundError}
107
113
  * @throws {Vellum.InternalServerError}
@@ -243,21 +249,25 @@ class VellumClient {
243
249
  });
244
250
  }
245
251
  }
252
+ _deployments;
253
+ get deployments() {
254
+ return (this._deployments ??= new Client_1.Deployments(this.options));
255
+ }
246
256
  _documents;
247
257
  get documents() {
248
- return (this._documents ??= new Client_1.Documents(this.options));
258
+ return (this._documents ??= new Client_2.Documents(this.options));
249
259
  }
250
260
  _modelVersions;
251
261
  get modelVersions() {
252
- return (this._modelVersions ??= new Client_2.ModelVersions(this.options));
262
+ return (this._modelVersions ??= new Client_3.ModelVersions(this.options));
253
263
  }
254
264
  _sandboxes;
255
265
  get sandboxes() {
256
- return (this._sandboxes ??= new Client_3.Sandboxes(this.options));
266
+ return (this._sandboxes ??= new Client_4.Sandboxes(this.options));
257
267
  }
258
268
  _testSuites;
259
269
  get testSuites() {
260
- return (this._testSuites ??= new Client_4.TestSuites(this.options));
270
+ return (this._testSuites ??= new Client_5.TestSuites(this.options));
261
271
  }
262
272
  }
263
273
  exports.VellumClient = VellumClient;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Vellum from "../../..";
7
+ export declare namespace Deployments {
8
+ interface Options {
9
+ environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
10
+ apiKey: core.Supplier<string>;
11
+ }
12
+ }
13
+ export declare class Deployments {
14
+ protected readonly options: Deployments.Options;
15
+ constructor(options: Deployments.Options);
16
+ /**
17
+ *
18
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
19
+ *
20
+ * Used to retrieve a deployment given its ID or name.
21
+ *
22
+ */
23
+ retrieve(id: string): Promise<Vellum.DeploymentRead>;
24
+ }
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Deployments = void 0;
33
+ const environments = __importStar(require("../../../../environments"));
34
+ const core = __importStar(require("../../../../core"));
35
+ const url_join_1 = __importDefault(require("url-join"));
36
+ const serializers = __importStar(require("../../../../serialization"));
37
+ const errors = __importStar(require("../../../../errors"));
38
+ class Deployments {
39
+ options;
40
+ constructor(options) {
41
+ this.options = options;
42
+ }
43
+ /**
44
+ *
45
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
46
+ *
47
+ * Used to retrieve a deployment given its ID or name.
48
+ *
49
+ */
50
+ async retrieve(id) {
51
+ const _response = await core.fetcher({
52
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/deployments/${id}`),
53
+ method: "GET",
54
+ headers: {
55
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
56
+ },
57
+ contentType: "application/json",
58
+ });
59
+ if (_response.ok) {
60
+ return await serializers.DeploymentRead.parseOrThrow(_response.body, {
61
+ unrecognizedObjectKeys: "passthrough",
62
+ allowUnrecognizedUnionMembers: true,
63
+ allowUnrecognizedEnumValues: true,
64
+ });
65
+ }
66
+ if (_response.error.reason === "status-code") {
67
+ throw new errors.VellumError({
68
+ statusCode: _response.error.statusCode,
69
+ body: _response.error.body,
70
+ });
71
+ }
72
+ switch (_response.error.reason) {
73
+ case "non-json":
74
+ throw new errors.VellumError({
75
+ statusCode: _response.error.statusCode,
76
+ body: _response.error.rawBody,
77
+ });
78
+ case "timeout":
79
+ throw new errors.VellumTimeoutError();
80
+ case "unknown":
81
+ throw new errors.VellumError({
82
+ message: _response.error.errorMessage,
83
+ });
84
+ }
85
+ }
86
+ }
87
+ exports.Deployments = Deployments;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -1,7 +1,9 @@
1
+ export * as deployments from "./deployments";
1
2
  export * as documents from "./documents";
2
3
  export * as modelVersions from "./modelVersions";
3
4
  export * as sandboxes from "./sandboxes";
4
5
  export * as testSuites from "./testSuites";
5
6
  export * from "./documents/client/requests";
7
+ export * from "./modelVersions/client/requests";
6
8
  export * from "./sandboxes/client/requests";
7
9
  export * from "./testSuites/client/requests";
@@ -26,11 +26,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.testSuites = exports.sandboxes = exports.modelVersions = exports.documents = void 0;
29
+ exports.testSuites = exports.sandboxes = exports.modelVersions = exports.documents = exports.deployments = void 0;
30
+ exports.deployments = __importStar(require("./deployments"));
30
31
  exports.documents = __importStar(require("./documents"));
31
32
  exports.modelVersions = __importStar(require("./modelVersions"));
32
33
  exports.sandboxes = __importStar(require("./sandboxes"));
33
34
  exports.testSuites = __importStar(require("./testSuites"));
34
35
  __exportStar(require("./documents/client/requests"), exports);
36
+ __exportStar(require("./modelVersions/client/requests"), exports);
35
37
  __exportStar(require("./sandboxes/client/requests"), exports);
36
38
  __exportStar(require("./testSuites/client/requests"), exports);
@@ -21,4 +21,10 @@ export declare class ModelVersions {
21
21
  *
22
22
  */
23
23
  retrieve(id: string): Promise<Vellum.ModelVersionRead>;
24
+ /**
25
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
26
+ *
27
+ * Compiles the prompt backing the model version using the provided input values.
28
+ */
29
+ modelVersionCompilePrompt(id: string, request: Vellum.ModelVersionCompilePromptRequestRequest): Promise<Vellum.ModelVersionCompilePromptResponse>;
24
30
  }
@@ -83,5 +83,49 @@ class ModelVersions {
83
83
  });
84
84
  }
85
85
  }
86
+ /**
87
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
88
+ *
89
+ * Compiles the prompt backing the model version using the provided input values.
90
+ */
91
+ async modelVersionCompilePrompt(id, request) {
92
+ const _response = await core.fetcher({
93
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/model-versions/${id}/compile-prompt`),
94
+ method: "POST",
95
+ headers: {
96
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
97
+ },
98
+ contentType: "application/json",
99
+ body: await serializers.ModelVersionCompilePromptRequestRequest.jsonOrThrow(request, {
100
+ unrecognizedObjectKeys: "strip",
101
+ }),
102
+ });
103
+ if (_response.ok) {
104
+ return await serializers.ModelVersionCompilePromptResponse.parseOrThrow(_response.body, {
105
+ unrecognizedObjectKeys: "passthrough",
106
+ allowUnrecognizedUnionMembers: true,
107
+ allowUnrecognizedEnumValues: true,
108
+ });
109
+ }
110
+ if (_response.error.reason === "status-code") {
111
+ throw new errors.VellumError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.body,
114
+ });
115
+ }
116
+ switch (_response.error.reason) {
117
+ case "non-json":
118
+ throw new errors.VellumError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.rawBody,
121
+ });
122
+ case "timeout":
123
+ throw new errors.VellumTimeoutError();
124
+ case "unknown":
125
+ throw new errors.VellumError({
126
+ message: _response.error.errorMessage,
127
+ });
128
+ }
129
+ }
86
130
  }
87
131
  exports.ModelVersions = ModelVersions;
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ModelVersionCompilePromptRequestRequest {
5
+ /** Key/value pairs for each variable found within the model version's prompt template. */
6
+ inputValues: 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 @@
1
+ export { ModelVersionCompilePromptRequestRequest } from "./ModelVersionCompilePromptRequestRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ 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 DeploymentRead {
6
+ id: string;
7
+ created: string;
8
+ /** A human-readable label for the deployment */
9
+ label: string;
10
+ /** A name that uniquely identifies this deployment within its workspace */
11
+ name: string;
12
+ /** The current status of the deployment */
13
+ status?: Vellum.DeploymentReadStatusEnum;
14
+ /** The environment this deployment is used in */
15
+ environment?: Vellum.EnvironmentEnum;
16
+ /** The type of model this deployment serves */
17
+ modelType: Vellum.ModelTypeEnum;
18
+ activeModelVersionIds: string[];
19
+ lastDeployedOn: string;
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,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type DeploymentReadStatusEnum = "ACTIVE" | "INACTIVE" | "ARCHIVED";
5
+ export declare const DeploymentReadStatusEnum: {
6
+ readonly Active: "ACTIVE";
7
+ readonly Inactive: "INACTIVE";
8
+ readonly Archived: "ARCHIVED";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DeploymentReadStatusEnum = void 0;
7
+ exports.DeploymentReadStatusEnum = {
8
+ Active: "ACTIVE",
9
+ Inactive: "INACTIVE",
10
+ Archived: "ARCHIVED",
11
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type EnvironmentEnum = "DEVELOPMENT" | "STAGING" | "PRODUCTION";
5
+ export declare const EnvironmentEnum: {
6
+ readonly Development: "DEVELOPMENT";
7
+ readonly Staging: "STAGING";
8
+ readonly Production: "PRODUCTION";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EnvironmentEnum = void 0;
7
+ exports.EnvironmentEnum = {
8
+ Development: "DEVELOPMENT",
9
+ Staging: "STAGING",
10
+ Production: "PRODUCTION",
11
+ };
@@ -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 ModelVersionCompilePromptResponse {
6
+ /** Information about the compiled prompt. */
7
+ prompt: Vellum.ModelVersionCompiledPrompt;
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,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ModelVersionCompiledPrompt {
5
+ /** The fully compiled prompt in normalized ChatML syntax after all variable substitutions and templating functions are applied. */
6
+ text: string;
7
+ /** The approximate number of tokens used by the compiled prompt. */
8
+ numTokens: number;
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 });
@@ -5,8 +5,8 @@ import * as Vellum from "..";
5
5
  export interface ModelVersionExecConfigRead {
6
6
  /** The generation parameters that are passed to the LLM provider at runtime. */
7
7
  parameters: Vellum.ModelVersionExecConfigParameters;
8
- /** Names of the template variables specified in the prompt template. */
9
- inputVariables: string[];
8
+ /** Names of the input variables specified in the prompt template. */
9
+ inputVariables: Vellum.PromptTemplateInputVariable[];
10
10
  /** The template used to generate prompts for this model version. */
11
11
  promptTemplate?: string;
12
12
  promptBlockData?: Vellum.PromptTemplateBlockData;
@@ -8,4 +8,5 @@ export interface ModelVersionSandboxSnapshot {
8
8
  promptIndex?: number;
9
9
  /** The id of the prompt in the sandbox snapshot. */
10
10
  promptId?: string;
11
+ sandboxId: string;
11
12
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface PromptTemplateInputVariable {
5
+ /** The name of the input variable. */
6
+ key: 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 });
@@ -2,9 +2,12 @@ export * from "./BlockTypeEnum";
2
2
  export * from "./ChatMessage";
3
3
  export * from "./ChatMessageRequest";
4
4
  export * from "./ChatMessageRole";
5
+ export * from "./DeploymentRead";
6
+ export * from "./DeploymentReadStatusEnum";
5
7
  export * from "./Document";
6
8
  export * from "./DocumentDocumentToDocumentIndex";
7
9
  export * from "./EnrichedNormalizedCompletion";
10
+ export * from "./EnvironmentEnum";
8
11
  export * from "./EvaluationParams";
9
12
  export * from "./EvaluationParamsRequest";
10
13
  export * from "./FinishReasonEnum";
@@ -22,6 +25,8 @@ export * from "./IndexingStateEnum";
22
25
  export * from "./LogprobsEnum";
23
26
  export * from "./ModelTypeEnum";
24
27
  export * from "./ModelVersionBuildConfig";
28
+ export * from "./ModelVersionCompilePromptResponse";
29
+ export * from "./ModelVersionCompiledPrompt";
25
30
  export * from "./ModelVersionExecConfigParameters";
26
31
  export * from "./ModelVersionExecConfigRead";
27
32
  export * from "./ModelVersionRead";
@@ -35,6 +40,7 @@ export * from "./ProcessingStateEnum";
35
40
  export * from "./PromptTemplateBlock";
36
41
  export * from "./PromptTemplateBlockData";
37
42
  export * from "./PromptTemplateBlockProperties";
43
+ export * from "./PromptTemplateInputVariable";
38
44
  export * from "./ProviderEnum";
39
45
  export * from "./SandboxMetricInputParams";
40
46
  export * from "./SandboxMetricInputParamsRequest";
@@ -18,9 +18,12 @@ __exportStar(require("./BlockTypeEnum"), exports);
18
18
  __exportStar(require("./ChatMessage"), exports);
19
19
  __exportStar(require("./ChatMessageRequest"), exports);
20
20
  __exportStar(require("./ChatMessageRole"), exports);
21
+ __exportStar(require("./DeploymentRead"), exports);
22
+ __exportStar(require("./DeploymentReadStatusEnum"), exports);
21
23
  __exportStar(require("./Document"), exports);
22
24
  __exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
23
25
  __exportStar(require("./EnrichedNormalizedCompletion"), exports);
26
+ __exportStar(require("./EnvironmentEnum"), exports);
24
27
  __exportStar(require("./EvaluationParams"), exports);
25
28
  __exportStar(require("./EvaluationParamsRequest"), exports);
26
29
  __exportStar(require("./FinishReasonEnum"), exports);
@@ -38,6 +41,8 @@ __exportStar(require("./IndexingStateEnum"), exports);
38
41
  __exportStar(require("./LogprobsEnum"), exports);
39
42
  __exportStar(require("./ModelTypeEnum"), exports);
40
43
  __exportStar(require("./ModelVersionBuildConfig"), exports);
44
+ __exportStar(require("./ModelVersionCompilePromptResponse"), exports);
45
+ __exportStar(require("./ModelVersionCompiledPrompt"), exports);
41
46
  __exportStar(require("./ModelVersionExecConfigParameters"), exports);
42
47
  __exportStar(require("./ModelVersionExecConfigRead"), exports);
43
48
  __exportStar(require("./ModelVersionRead"), exports);
@@ -51,6 +56,7 @@ __exportStar(require("./ProcessingStateEnum"), exports);
51
56
  __exportStar(require("./PromptTemplateBlock"), exports);
52
57
  __exportStar(require("./PromptTemplateBlockData"), exports);
53
58
  __exportStar(require("./PromptTemplateBlockProperties"), exports);
59
+ __exportStar(require("./PromptTemplateInputVariable"), exports);
54
60
  __exportStar(require("./ProviderEnum"), exports);
55
61
  __exportStar(require("./SandboxMetricInputParams"), exports);
56
62
  __exportStar(require("./SandboxMetricInputParamsRequest"), exports);
package/dist/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import * as Vellum from "./api";
7
+ import { Deployments } from "./api/resources/deployments/client/Client";
7
8
  import { Documents } from "./api/resources/documents/client/Client";
8
9
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
9
10
  import { Sandboxes } from "./api/resources/sandboxes/client/Client";
@@ -29,6 +30,11 @@ export declare class VellumClient {
29
30
  */
30
31
  generate(request: Vellum.GenerateBodyRequest): Promise<Vellum.GenerateResponse>;
31
32
  /**
33
+ * <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
34
+ *
35
+ * Generate a stream of completions using a previously defined deployment.
36
+ *
37
+ * **Note:** Uses a base url of `https://predict.vellum.ai`.
32
38
  * @throws {Vellum.BadRequestError}
33
39
  * @throws {Vellum.NotFoundError}
34
40
  * @throws {Vellum.InternalServerError}
@@ -56,6 +62,8 @@ export declare class VellumClient {
56
62
  * @throws {Vellum.InternalServerError}
57
63
  */
58
64
  submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest): Promise<void>;
65
+ protected _deployments: Deployments | undefined;
66
+ get deployments(): Deployments;
59
67
  protected _documents: Documents | undefined;
60
68
  get documents(): Documents;
61
69
  protected _modelVersions: ModelVersions | undefined;