vellum-ai 0.0.6 → 0.0.7

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 (151) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/resources/documents/client/Client.d.ts +1 -1
  4. package/api/resources/documents/client/requests/{ListDocumentsRequest.d.ts → DocumentsListRequest.d.ts} +1 -1
  5. package/api/resources/documents/client/requests/index.d.ts +1 -1
  6. package/api/resources/index.d.ts +2 -0
  7. package/api/resources/index.js +3 -1
  8. package/api/resources/sandboxes/client/Client.d.ts +17 -0
  9. package/api/resources/sandboxes/client/Client.js +83 -0
  10. package/api/resources/sandboxes/client/index.d.ts +1 -0
  11. package/api/resources/sandboxes/client/index.js +17 -0
  12. package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +12 -0
  13. package/api/resources/sandboxes/client/requests/index.d.ts +1 -0
  14. package/api/resources/sandboxes/client/requests/index.js +2 -0
  15. package/api/resources/sandboxes/index.d.ts +1 -0
  16. package/api/resources/sandboxes/index.js +17 -0
  17. package/api/types/BlockTypeEnum.d.ts +2 -3
  18. package/api/types/BlockTypeEnum.js +1 -2
  19. package/api/types/ChatMessage.d.ts +8 -0
  20. package/api/types/ChatMessage.js +5 -0
  21. package/api/types/ModelVersionExecConfigRead.d.ts +2 -1
  22. package/api/types/ModelVersionSandboxSnapshot.d.ts +2 -0
  23. package/api/types/PromptTemplateBlock.d.ts +1 -0
  24. package/api/types/SandboxInput.d.ts +10 -0
  25. package/api/types/SandboxInput.js +5 -0
  26. package/api/types/SandboxInputRequest.d.ts +10 -0
  27. package/api/types/SandboxInputRequest.js +5 -0
  28. package/api/types/SandboxMetricInputParams.d.ts +6 -0
  29. package/api/types/SandboxMetricInputParams.js +5 -0
  30. package/api/types/SandboxMetricInputParamsRequest.d.ts +6 -0
  31. package/api/types/SandboxMetricInputParamsRequest.js +5 -0
  32. package/api/types/SandboxScenario.d.ts +12 -0
  33. package/api/types/SandboxScenario.js +5 -0
  34. package/api/types/TypeEnum.d.ts +8 -0
  35. package/api/types/TypeEnum.js +10 -0
  36. package/api/types/index.d.ts +7 -0
  37. package/api/types/index.js +7 -0
  38. package/dist/Client.d.ts +3 -0
  39. package/dist/Client.js +5 -0
  40. package/dist/api/resources/documents/client/Client.d.ts +1 -1
  41. package/dist/api/resources/documents/client/requests/{ListDocumentsRequest.d.ts → DocumentsListRequest.d.ts} +1 -1
  42. package/dist/api/resources/documents/client/requests/DocumentsListRequest.js +5 -0
  43. package/dist/api/resources/documents/client/requests/index.d.ts +1 -1
  44. package/dist/api/resources/index.d.ts +2 -0
  45. package/dist/api/resources/index.js +3 -1
  46. package/dist/api/resources/sandboxes/client/Client.d.ts +17 -0
  47. package/dist/api/resources/sandboxes/client/Client.js +83 -0
  48. package/dist/api/resources/sandboxes/client/index.d.ts +1 -0
  49. package/dist/api/resources/sandboxes/client/index.js +17 -0
  50. package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +12 -0
  51. package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.js +5 -0
  52. package/dist/api/resources/sandboxes/client/requests/index.d.ts +1 -0
  53. package/dist/api/resources/sandboxes/client/requests/index.js +2 -0
  54. package/dist/api/resources/sandboxes/index.d.ts +1 -0
  55. package/dist/api/resources/sandboxes/index.js +17 -0
  56. package/dist/api/types/BlockTypeEnum.d.ts +2 -3
  57. package/dist/api/types/BlockTypeEnum.js +1 -2
  58. package/dist/api/types/ChatMessage.d.ts +8 -0
  59. package/dist/api/types/ChatMessage.js +5 -0
  60. package/dist/api/types/ModelVersionExecConfigRead.d.ts +2 -1
  61. package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +2 -0
  62. package/dist/api/types/PromptTemplateBlock.d.ts +1 -0
  63. package/dist/api/types/SandboxInput.d.ts +10 -0
  64. package/dist/api/types/SandboxInput.js +5 -0
  65. package/dist/api/types/SandboxInputRequest.d.ts +10 -0
  66. package/dist/api/types/SandboxInputRequest.js +5 -0
  67. package/dist/api/types/SandboxMetricInputParams.d.ts +6 -0
  68. package/dist/api/types/SandboxMetricInputParams.js +5 -0
  69. package/dist/api/types/SandboxMetricInputParamsRequest.d.ts +6 -0
  70. package/dist/api/types/SandboxMetricInputParamsRequest.js +5 -0
  71. package/dist/api/types/SandboxScenario.d.ts +12 -0
  72. package/dist/api/types/SandboxScenario.js +5 -0
  73. package/dist/api/types/TypeEnum.d.ts +8 -0
  74. package/dist/api/types/TypeEnum.js +10 -0
  75. package/dist/api/types/index.d.ts +7 -0
  76. package/dist/api/types/index.js +7 -0
  77. package/dist/serialization/index.d.ts +1 -0
  78. package/dist/serialization/index.js +1 -0
  79. package/dist/serialization/resources/index.d.ts +2 -0
  80. package/dist/serialization/resources/index.js +31 -0
  81. package/dist/serialization/resources/sandboxes/client/index.d.ts +1 -0
  82. package/dist/serialization/resources/sandboxes/client/index.js +17 -0
  83. package/dist/serialization/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +15 -0
  84. package/dist/serialization/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.js +38 -0
  85. package/dist/serialization/resources/sandboxes/client/requests/index.d.ts +1 -0
  86. package/dist/serialization/resources/sandboxes/client/requests/index.js +5 -0
  87. package/dist/serialization/resources/sandboxes/index.d.ts +1 -0
  88. package/dist/serialization/resources/sandboxes/index.js +17 -0
  89. package/dist/serialization/types/BlockTypeEnum.d.ts +1 -1
  90. package/dist/serialization/types/BlockTypeEnum.js +1 -1
  91. package/dist/serialization/types/ChatMessage.d.ts +13 -0
  92. package/dist/serialization/types/ChatMessage.js +34 -0
  93. package/dist/serialization/types/ModelVersionExecConfigRead.d.ts +2 -1
  94. package/dist/serialization/types/ModelVersionExecConfigRead.js +2 -1
  95. package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  96. package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -0
  97. package/dist/serialization/types/PromptTemplateBlock.d.ts +1 -0
  98. package/dist/serialization/types/PromptTemplateBlock.js +1 -0
  99. package/dist/serialization/types/SandboxInput.d.ts +15 -0
  100. package/dist/serialization/types/SandboxInput.js +38 -0
  101. package/dist/serialization/types/SandboxInputRequest.d.ts +15 -0
  102. package/dist/serialization/types/SandboxInputRequest.js +38 -0
  103. package/dist/serialization/types/SandboxMetricInputParams.d.ts +12 -0
  104. package/dist/serialization/types/SandboxMetricInputParams.js +33 -0
  105. package/dist/serialization/types/SandboxMetricInputParamsRequest.d.ts +12 -0
  106. package/dist/serialization/types/SandboxMetricInputParamsRequest.js +33 -0
  107. package/dist/serialization/types/SandboxScenario.d.ts +15 -0
  108. package/dist/serialization/types/SandboxScenario.js +36 -0
  109. package/dist/serialization/types/TypeEnum.d.ts +10 -0
  110. package/dist/serialization/types/TypeEnum.js +34 -0
  111. package/dist/serialization/types/index.d.ts +7 -0
  112. package/dist/serialization/types/index.js +7 -0
  113. package/package.json +1 -1
  114. package/serialization/index.d.ts +1 -0
  115. package/serialization/index.js +1 -0
  116. package/serialization/resources/index.d.ts +2 -0
  117. package/serialization/resources/index.js +31 -0
  118. package/serialization/resources/sandboxes/client/index.d.ts +1 -0
  119. package/serialization/resources/sandboxes/client/index.js +17 -0
  120. package/serialization/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +15 -0
  121. package/serialization/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.js +38 -0
  122. package/serialization/resources/sandboxes/client/requests/index.d.ts +1 -0
  123. package/serialization/resources/sandboxes/client/requests/index.js +5 -0
  124. package/serialization/resources/sandboxes/index.d.ts +1 -0
  125. package/serialization/resources/sandboxes/index.js +17 -0
  126. package/serialization/types/BlockTypeEnum.d.ts +1 -1
  127. package/serialization/types/BlockTypeEnum.js +1 -1
  128. package/serialization/types/ChatMessage.d.ts +13 -0
  129. package/serialization/types/ChatMessage.js +34 -0
  130. package/serialization/types/ModelVersionExecConfigRead.d.ts +2 -1
  131. package/serialization/types/ModelVersionExecConfigRead.js +2 -1
  132. package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -0
  133. package/serialization/types/ModelVersionSandboxSnapshot.js +1 -0
  134. package/serialization/types/PromptTemplateBlock.d.ts +1 -0
  135. package/serialization/types/PromptTemplateBlock.js +1 -0
  136. package/serialization/types/SandboxInput.d.ts +15 -0
  137. package/serialization/types/SandboxInput.js +38 -0
  138. package/serialization/types/SandboxInputRequest.d.ts +15 -0
  139. package/serialization/types/SandboxInputRequest.js +38 -0
  140. package/serialization/types/SandboxMetricInputParams.d.ts +12 -0
  141. package/serialization/types/SandboxMetricInputParams.js +33 -0
  142. package/serialization/types/SandboxMetricInputParamsRequest.d.ts +12 -0
  143. package/serialization/types/SandboxMetricInputParamsRequest.js +33 -0
  144. package/serialization/types/SandboxScenario.d.ts +15 -0
  145. package/serialization/types/SandboxScenario.js +36 -0
  146. package/serialization/types/TypeEnum.d.ts +10 -0
  147. package/serialization/types/TypeEnum.js +34 -0
  148. package/serialization/types/index.d.ts +7 -0
  149. package/serialization/types/index.js +7 -0
  150. /package/api/resources/documents/client/requests/{ListDocumentsRequest.js → DocumentsListRequest.js} +0 -0
  151. /package/{dist/api/resources/documents/client/requests/ListDocumentsRequest.js → api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.js} +0 -0
package/Client.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as core from "./core";
6
6
  import * as Vellum from "./api";
7
7
  import { Documents } from "./api/resources/documents/client/Client";
8
8
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
9
+ import { Sandboxes } from "./api/resources/sandboxes/client/Client";
9
10
  export declare namespace VellumClient {
10
11
  interface Options {
11
12
  environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
@@ -22,4 +23,6 @@ export declare class VellumClient {
22
23
  get documents(): Documents;
23
24
  protected _modelVersions: ModelVersions | undefined;
24
25
  get modelVersions(): ModelVersions;
26
+ protected _sandboxes: Sandboxes | undefined;
27
+ get sandboxes(): Sandboxes;
25
28
  }
package/Client.js CHANGED
@@ -37,6 +37,7 @@ const serializers = __importStar(require("./serialization"));
37
37
  const errors = __importStar(require("./errors"));
38
38
  const Client_1 = require("./api/resources/documents/client/Client");
39
39
  const Client_2 = require("./api/resources/modelVersions/client/Client");
40
+ const Client_3 = require("./api/resources/sandboxes/client/Client");
40
41
  class VellumClient {
41
42
  options;
42
43
  constructor(options) {
@@ -159,5 +160,9 @@ class VellumClient {
159
160
  get modelVersions() {
160
161
  return (this._modelVersions ??= new Client_2.ModelVersions(this.options));
161
162
  }
163
+ _sandboxes;
164
+ get sandboxes() {
165
+ return (this._sandboxes ??= new Client_3.Sandboxes(this.options));
166
+ }
162
167
  }
163
168
  exports.VellumClient = VellumClient;
@@ -15,6 +15,6 @@ export declare namespace Documents {
15
15
  export declare class Documents {
16
16
  protected readonly options: Documents.Options;
17
17
  constructor(options: Documents.Options);
18
- list(request?: Vellum.ListDocumentsRequest): Promise<Vellum.PaginatedSlimDocumentList>;
18
+ list(request?: Vellum.DocumentsListRequest): Promise<Vellum.PaginatedSlimDocumentList>;
19
19
  upload(contents: File | fs.ReadStream, request: Vellum.UploadDocumentBodyRequest): Promise<Vellum.UploadDocumentResponse>;
20
20
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface ListDocumentsRequest {
4
+ export interface DocumentsListRequest {
5
5
  documentIndexId?: string;
6
6
  limit?: number;
7
7
  offset?: number;
@@ -1,2 +1,2 @@
1
- export { ListDocumentsRequest } from "./ListDocumentsRequest";
1
+ export { DocumentsListRequest } from "./DocumentsListRequest";
2
2
  export { UploadDocumentBodyRequest } from "./UploadDocumentBodyRequest";
@@ -1,3 +1,5 @@
1
1
  export * as documents from "./documents";
2
2
  export * as modelVersions from "./modelVersions";
3
+ export * as sandboxes from "./sandboxes";
3
4
  export * from "./documents/client/requests";
5
+ export * from "./sandboxes/client/requests";
@@ -26,7 +26,9 @@ 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.modelVersions = exports.documents = void 0;
29
+ exports.sandboxes = exports.modelVersions = exports.documents = void 0;
30
30
  exports.documents = __importStar(require("./documents"));
31
31
  exports.modelVersions = __importStar(require("./modelVersions"));
32
+ exports.sandboxes = __importStar(require("./sandboxes"));
32
33
  __exportStar(require("./documents/client/requests"), exports);
34
+ __exportStar(require("./sandboxes/client/requests"), exports);
@@ -0,0 +1,17 @@
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 Sandboxes {
8
+ interface Options {
9
+ environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
10
+ apiKey: core.Supplier<string>;
11
+ }
12
+ }
13
+ export declare class Sandboxes {
14
+ protected readonly options: Sandboxes.Options;
15
+ constructor(options: Sandboxes.Options);
16
+ upsertSandboxScenario(id: string, request: Vellum.UpsertSandboxScenarioRequestRequest): Promise<Vellum.SandboxScenario>;
17
+ }
@@ -0,0 +1,83 @@
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.Sandboxes = 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 Sandboxes {
39
+ options;
40
+ constructor(options) {
41
+ this.options = options;
42
+ }
43
+ async upsertSandboxScenario(id, request) {
44
+ const _response = await core.fetcher({
45
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/sandboxes/${id}/scenarios`),
46
+ method: "POST",
47
+ headers: {
48
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
49
+ },
50
+ contentType: "application/json",
51
+ body: await serializers.UpsertSandboxScenarioRequestRequest.jsonOrThrow(request, {
52
+ unrecognizedObjectKeys: "strip",
53
+ }),
54
+ });
55
+ if (_response.ok) {
56
+ return await serializers.SandboxScenario.parseOrThrow(_response.body, {
57
+ unrecognizedObjectKeys: "passthrough",
58
+ allowUnrecognizedUnionMembers: true,
59
+ allowUnrecognizedEnumValues: true,
60
+ });
61
+ }
62
+ if (_response.error.reason === "status-code") {
63
+ throw new errors.VellumError({
64
+ statusCode: _response.error.statusCode,
65
+ body: _response.error.body,
66
+ });
67
+ }
68
+ switch (_response.error.reason) {
69
+ case "non-json":
70
+ throw new errors.VellumError({
71
+ statusCode: _response.error.statusCode,
72
+ body: _response.error.rawBody,
73
+ });
74
+ case "timeout":
75
+ throw new errors.VellumTimeoutError();
76
+ case "unknown":
77
+ throw new errors.VellumError({
78
+ message: _response.error.errorMessage,
79
+ });
80
+ }
81
+ }
82
+ }
83
+ exports.Sandboxes = Sandboxes;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -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("./requests"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../../../..";
5
+ export interface UpsertSandboxScenarioRequestRequest {
6
+ label?: string;
7
+ /** The inputs for the scenario */
8
+ inputs: Vellum.SandboxInputRequest[];
9
+ metricInputParams?: Vellum.SandboxMetricInputParamsRequest;
10
+ /** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. */
11
+ id?: string;
12
+ }
@@ -0,0 +1 @@
1
+ export { UpsertSandboxScenarioRequestRequest } from "./UpsertSandboxScenarioRequestRequest";
@@ -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,10 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export declare type BlockTypeEnum = "CHAT_MESSAGE" | "CHAT_HISTORY" | "TEXT" | "VARIABLE";
4
+ export declare type BlockTypeEnum = "CHAT_MESSAGE" | "CHAT_HISTORY" | "JINJA";
5
5
  export declare const BlockTypeEnum: {
6
6
  readonly ChatMessage: "CHAT_MESSAGE";
7
7
  readonly ChatHistory: "CHAT_HISTORY";
8
- readonly Text: "TEXT";
9
- readonly Variable: "VARIABLE";
8
+ readonly Jinja: "JINJA";
10
9
  };
@@ -7,6 +7,5 @@ exports.BlockTypeEnum = void 0;
7
7
  exports.BlockTypeEnum = {
8
8
  ChatMessage: "CHAT_MESSAGE",
9
9
  ChatHistory: "CHAT_HISTORY",
10
- Text: "TEXT",
11
- Variable: "VARIABLE",
10
+ Jinja: "JINJA",
12
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 ChatMessage {
6
+ text: string;
7
+ role: Vellum.ChatMessageRole;
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 });
@@ -8,6 +8,7 @@ export interface ModelVersionExecConfigRead {
8
8
  /** Names of the template variables specified in the prompt template. */
9
9
  inputVariables: string[];
10
10
  /** The template used to generate prompts for this model version. */
11
- promptTemplate: string;
11
+ promptTemplate?: string;
12
12
  promptBlockData?: Vellum.PromptTemplateBlockData;
13
+ promptSyntaxVersion: number;
13
14
  }
@@ -6,4 +6,6 @@ export interface ModelVersionSandboxSnapshot {
6
6
  id: string;
7
7
  /** The index of the prompt in the sandbox snapshot. */
8
8
  promptIndex: number;
9
+ /** The id of the prompt in the sandbox snapshot. */
10
+ promptId?: string;
9
11
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "..";
5
5
  export interface PromptTemplateBlock {
6
+ id: string;
6
7
  blockType: Vellum.BlockTypeEnum;
7
8
  properties: Vellum.PromptTemplateBlockProperties;
8
9
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface SandboxInput {
6
+ key: string;
7
+ type?: Vellum.TypeEnum;
8
+ value?: string;
9
+ chatHistory?: Vellum.ChatMessage[];
10
+ }
@@ -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,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface SandboxInputRequest {
6
+ key: string;
7
+ type?: Vellum.TypeEnum;
8
+ value?: string;
9
+ chatHistory?: Vellum.ChatMessageRequest[];
10
+ }
@@ -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,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SandboxMetricInputParams {
5
+ params?: Record<string, unknown>;
6
+ }
@@ -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,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SandboxMetricInputParamsRequest {
5
+ params?: Record<string, unknown>;
6
+ }
@@ -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,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface SandboxScenario {
6
+ label?: string;
7
+ /** The inputs for the scenario */
8
+ inputs: Vellum.SandboxInput[];
9
+ metricInputParams?: Vellum.SandboxMetricInputParams;
10
+ /** The id of the scenario */
11
+ id: string;
12
+ }
@@ -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 declare type TypeEnum = "TEXT" | "CHAT_HISTORY";
5
+ export declare const TypeEnum: {
6
+ readonly Text: "TEXT";
7
+ readonly ChatHistory: "CHAT_HISTORY";
8
+ };
@@ -0,0 +1,10 @@
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.TypeEnum = void 0;
7
+ exports.TypeEnum = {
8
+ Text: "TEXT",
9
+ ChatHistory: "CHAT_HISTORY",
10
+ };
@@ -1,4 +1,5 @@
1
1
  export * from "./BlockTypeEnum";
2
+ export * from "./ChatMessage";
2
3
  export * from "./ChatMessageRequest";
3
4
  export * from "./ChatMessageRole";
4
5
  export * from "./Document";
@@ -29,6 +30,11 @@ export * from "./PromptTemplateBlock";
29
30
  export * from "./PromptTemplateBlockData";
30
31
  export * from "./PromptTemplateBlockProperties";
31
32
  export * from "./ProviderEnum";
33
+ export * from "./SandboxInput";
34
+ export * from "./SandboxInputRequest";
35
+ export * from "./SandboxMetricInputParams";
36
+ export * from "./SandboxMetricInputParamsRequest";
37
+ export * from "./SandboxScenario";
32
38
  export * from "./SearchErrorResponse";
33
39
  export * from "./SearchFiltersRequest";
34
40
  export * from "./SearchRequestOptionsRequest";
@@ -40,5 +46,6 @@ export * from "./SlimDocument";
40
46
  export * from "./SlimDocumentStatusEnum";
41
47
  export * from "./SubmitCompletionActualRequest";
42
48
  export * from "./SubmitCompletionActualsErrorResponse";
49
+ export * from "./TypeEnum";
43
50
  export * from "./UploadDocumentErrorResponse";
44
51
  export * from "./UploadDocumentResponse";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BlockTypeEnum"), exports);
18
+ __exportStar(require("./ChatMessage"), exports);
18
19
  __exportStar(require("./ChatMessageRequest"), exports);
19
20
  __exportStar(require("./ChatMessageRole"), exports);
20
21
  __exportStar(require("./Document"), exports);
@@ -45,6 +46,11 @@ __exportStar(require("./PromptTemplateBlock"), exports);
45
46
  __exportStar(require("./PromptTemplateBlockData"), exports);
46
47
  __exportStar(require("./PromptTemplateBlockProperties"), exports);
47
48
  __exportStar(require("./ProviderEnum"), exports);
49
+ __exportStar(require("./SandboxInput"), exports);
50
+ __exportStar(require("./SandboxInputRequest"), exports);
51
+ __exportStar(require("./SandboxMetricInputParams"), exports);
52
+ __exportStar(require("./SandboxMetricInputParamsRequest"), exports);
53
+ __exportStar(require("./SandboxScenario"), exports);
48
54
  __exportStar(require("./SearchErrorResponse"), exports);
49
55
  __exportStar(require("./SearchFiltersRequest"), exports);
50
56
  __exportStar(require("./SearchRequestOptionsRequest"), exports);
@@ -56,5 +62,6 @@ __exportStar(require("./SlimDocument"), exports);
56
62
  __exportStar(require("./SlimDocumentStatusEnum"), exports);
57
63
  __exportStar(require("./SubmitCompletionActualRequest"), exports);
58
64
  __exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
65
+ __exportStar(require("./TypeEnum"), exports);
59
66
  __exportStar(require("./UploadDocumentErrorResponse"), exports);
60
67
  __exportStar(require("./UploadDocumentResponse"), exports);
package/dist/Client.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as core from "./core";
6
6
  import * as Vellum from "./api";
7
7
  import { Documents } from "./api/resources/documents/client/Client";
8
8
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
9
+ import { Sandboxes } from "./api/resources/sandboxes/client/Client";
9
10
  export declare namespace VellumClient {
10
11
  interface Options {
11
12
  environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
@@ -22,4 +23,6 @@ export declare class VellumClient {
22
23
  get documents(): Documents;
23
24
  protected _modelVersions: ModelVersions | undefined;
24
25
  get modelVersions(): ModelVersions;
26
+ protected _sandboxes: Sandboxes | undefined;
27
+ get sandboxes(): Sandboxes;
25
28
  }
package/dist/Client.js CHANGED
@@ -37,6 +37,7 @@ const serializers = __importStar(require("./serialization"));
37
37
  const errors = __importStar(require("./errors"));
38
38
  const Client_1 = require("./api/resources/documents/client/Client");
39
39
  const Client_2 = require("./api/resources/modelVersions/client/Client");
40
+ const Client_3 = require("./api/resources/sandboxes/client/Client");
40
41
  class VellumClient {
41
42
  options;
42
43
  constructor(options) {
@@ -159,5 +160,9 @@ class VellumClient {
159
160
  get modelVersions() {
160
161
  return (this._modelVersions ??= new Client_2.ModelVersions(this.options));
161
162
  }
163
+ _sandboxes;
164
+ get sandboxes() {
165
+ return (this._sandboxes ??= new Client_3.Sandboxes(this.options));
166
+ }
162
167
  }
163
168
  exports.VellumClient = VellumClient;
@@ -15,6 +15,6 @@ export declare namespace Documents {
15
15
  export declare class Documents {
16
16
  protected readonly options: Documents.Options;
17
17
  constructor(options: Documents.Options);
18
- list(request?: Vellum.ListDocumentsRequest): Promise<Vellum.PaginatedSlimDocumentList>;
18
+ list(request?: Vellum.DocumentsListRequest): Promise<Vellum.PaginatedSlimDocumentList>;
19
19
  upload(contents: File | fs.ReadStream, request: Vellum.UploadDocumentBodyRequest): Promise<Vellum.UploadDocumentResponse>;
20
20
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface ListDocumentsRequest {
4
+ export interface DocumentsListRequest {
5
5
  documentIndexId?: string;
6
6
  limit?: number;
7
7
  offset?: number;
@@ -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,2 +1,2 @@
1
- export { ListDocumentsRequest } from "./ListDocumentsRequest";
1
+ export { DocumentsListRequest } from "./DocumentsListRequest";
2
2
  export { UploadDocumentBodyRequest } from "./UploadDocumentBodyRequest";
@@ -1,3 +1,5 @@
1
1
  export * as documents from "./documents";
2
2
  export * as modelVersions from "./modelVersions";
3
+ export * as sandboxes from "./sandboxes";
3
4
  export * from "./documents/client/requests";
5
+ export * from "./sandboxes/client/requests";
@@ -26,7 +26,9 @@ 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.modelVersions = exports.documents = void 0;
29
+ exports.sandboxes = exports.modelVersions = exports.documents = void 0;
30
30
  exports.documents = __importStar(require("./documents"));
31
31
  exports.modelVersions = __importStar(require("./modelVersions"));
32
+ exports.sandboxes = __importStar(require("./sandboxes"));
32
33
  __exportStar(require("./documents/client/requests"), exports);
34
+ __exportStar(require("./sandboxes/client/requests"), exports);
@@ -0,0 +1,17 @@
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 Sandboxes {
8
+ interface Options {
9
+ environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
10
+ apiKey: core.Supplier<string>;
11
+ }
12
+ }
13
+ export declare class Sandboxes {
14
+ protected readonly options: Sandboxes.Options;
15
+ constructor(options: Sandboxes.Options);
16
+ upsertSandboxScenario(id: string, request: Vellum.UpsertSandboxScenarioRequestRequest): Promise<Vellum.SandboxScenario>;
17
+ }