vellum-ai 0.6.7 → 0.6.11

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 (166) hide show
  1. package/Client.d.ts +9 -6
  2. package/Client.js +40 -37
  3. package/api/client/requests/ExecutePromptRequest.d.ts +7 -5
  4. package/api/client/requests/ExecutePromptStreamRequest.d.ts +7 -5
  5. package/api/resources/deployments/client/Client.d.ts +8 -5
  6. package/api/resources/deployments/client/Client.js +22 -17
  7. package/api/resources/documentIndexes/client/Client.d.ts +37 -12
  8. package/api/resources/documentIndexes/client/Client.js +128 -30
  9. package/api/resources/documents/client/Client.d.ts +11 -7
  10. package/api/resources/documents/client/Client.js +25 -22
  11. package/api/resources/folderEntities/client/Client.d.ts +4 -1
  12. package/api/resources/folderEntities/client/Client.js +4 -3
  13. package/api/resources/sandboxes/client/Client.d.ts +7 -4
  14. package/api/resources/sandboxes/client/Client.js +14 -13
  15. package/api/resources/testSuiteRuns/client/Client.d.ts +6 -3
  16. package/api/resources/testSuiteRuns/client/Client.js +13 -10
  17. package/api/resources/testSuites/client/Client.d.ts +6 -3
  18. package/api/resources/testSuites/client/Client.js +16 -14
  19. package/api/resources/workflowDeployments/client/Client.d.ts +7 -4
  20. package/api/resources/workflowDeployments/client/Client.js +17 -13
  21. package/api/resources/workflowSandboxes/client/Client.d.ts +4 -1
  22. package/api/resources/workflowSandboxes/client/Client.js +5 -6
  23. package/api/types/IterationStateEnum.d.ts +12 -0
  24. package/api/types/IterationStateEnum.js +10 -0
  25. package/api/types/MapNodeResultData.d.ts +2 -0
  26. package/api/types/PromptNodeResultData.d.ts +1 -0
  27. package/api/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
  28. package/api/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
  29. package/api/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
  30. package/api/types/index.d.ts +1 -0
  31. package/api/types/index.js +1 -0
  32. package/core/fetcher/Fetcher.d.ts +2 -0
  33. package/core/fetcher/Fetcher.js +19 -185
  34. package/core/fetcher/createRequestUrl.d.ts +1 -0
  35. package/core/fetcher/createRequestUrl.js +13 -0
  36. package/core/fetcher/getFetchFn.d.ts +4 -0
  37. package/core/fetcher/getFetchFn.js +55 -0
  38. package/core/fetcher/getRequestBody.d.ts +7 -0
  39. package/core/fetcher/getRequestBody.js +23 -0
  40. package/core/fetcher/getResponseBody.d.ts +1 -0
  41. package/core/fetcher/getResponseBody.js +48 -0
  42. package/core/fetcher/makeRequest.d.ts +1 -0
  43. package/core/fetcher/makeRequest.js +40 -0
  44. package/core/fetcher/requestWithRetries.d.ts +1 -0
  45. package/core/fetcher/requestWithRetries.js +32 -0
  46. package/core/fetcher/signals.d.ts +12 -0
  47. package/core/fetcher/signals.js +37 -0
  48. package/core/form-data-utils/FormDataWrapper.d.ts +10 -21
  49. package/core/form-data-utils/FormDataWrapper.js +82 -49
  50. package/core/runtime/runtime.d.ts +1 -0
  51. package/core/runtime/runtime.js +1 -0
  52. package/core/schemas/Schema.d.ts +7 -4
  53. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  54. package/core/schemas/builders/lazy/lazy.js +8 -19
  55. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  56. package/core/schemas/builders/list/list.js +31 -44
  57. package/core/schemas/builders/object/object.js +90 -111
  58. package/core/schemas/builders/object/types.d.ts +2 -2
  59. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  60. package/core/schemas/builders/record/record.js +49 -60
  61. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  62. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  63. package/core/schemas/builders/set/set.js +6 -15
  64. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  65. package/core/schemas/builders/union/union.js +51 -62
  66. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  67. package/dist/Client.d.ts +9 -6
  68. package/dist/Client.js +40 -37
  69. package/dist/api/client/requests/ExecutePromptRequest.d.ts +7 -5
  70. package/dist/api/client/requests/ExecutePromptStreamRequest.d.ts +7 -5
  71. package/dist/api/resources/deployments/client/Client.d.ts +8 -5
  72. package/dist/api/resources/deployments/client/Client.js +22 -17
  73. package/dist/api/resources/documentIndexes/client/Client.d.ts +37 -12
  74. package/dist/api/resources/documentIndexes/client/Client.js +128 -30
  75. package/dist/api/resources/documents/client/Client.d.ts +11 -7
  76. package/dist/api/resources/documents/client/Client.js +25 -22
  77. package/dist/api/resources/folderEntities/client/Client.d.ts +4 -1
  78. package/dist/api/resources/folderEntities/client/Client.js +4 -3
  79. package/dist/api/resources/sandboxes/client/Client.d.ts +7 -4
  80. package/dist/api/resources/sandboxes/client/Client.js +14 -13
  81. package/dist/api/resources/testSuiteRuns/client/Client.d.ts +6 -3
  82. package/dist/api/resources/testSuiteRuns/client/Client.js +13 -10
  83. package/dist/api/resources/testSuites/client/Client.d.ts +6 -3
  84. package/dist/api/resources/testSuites/client/Client.js +16 -14
  85. package/dist/api/resources/workflowDeployments/client/Client.d.ts +7 -4
  86. package/dist/api/resources/workflowDeployments/client/Client.js +17 -13
  87. package/dist/api/resources/workflowSandboxes/client/Client.d.ts +4 -1
  88. package/dist/api/resources/workflowSandboxes/client/Client.js +5 -6
  89. package/dist/api/types/IterationStateEnum.d.ts +12 -0
  90. package/dist/api/types/IterationStateEnum.js +10 -0
  91. package/dist/api/types/MapNodeResultData.d.ts +2 -0
  92. package/dist/api/types/PromptNodeResultData.d.ts +1 -0
  93. package/dist/api/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
  94. package/dist/api/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
  95. package/dist/api/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
  96. package/dist/api/types/index.d.ts +1 -0
  97. package/dist/api/types/index.js +1 -0
  98. package/dist/core/fetcher/Fetcher.d.ts +2 -0
  99. package/dist/core/fetcher/Fetcher.js +19 -185
  100. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  101. package/dist/core/fetcher/createRequestUrl.js +13 -0
  102. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  103. package/dist/core/fetcher/getFetchFn.js +55 -0
  104. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  105. package/dist/core/fetcher/getRequestBody.js +23 -0
  106. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  107. package/dist/core/fetcher/getResponseBody.js +48 -0
  108. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  109. package/dist/core/fetcher/makeRequest.js +40 -0
  110. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  111. package/dist/core/fetcher/requestWithRetries.js +32 -0
  112. package/dist/core/fetcher/signals.d.ts +12 -0
  113. package/dist/core/fetcher/signals.js +37 -0
  114. package/dist/core/form-data-utils/FormDataWrapper.d.ts +10 -21
  115. package/dist/core/form-data-utils/FormDataWrapper.js +82 -49
  116. package/dist/core/runtime/runtime.d.ts +1 -0
  117. package/dist/core/runtime/runtime.js +1 -0
  118. package/dist/core/schemas/Schema.d.ts +7 -4
  119. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  120. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  121. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  122. package/dist/core/schemas/builders/list/list.js +31 -44
  123. package/dist/core/schemas/builders/object/object.js +90 -111
  124. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  125. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  126. package/dist/core/schemas/builders/record/record.js +49 -60
  127. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  128. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  129. package/dist/core/schemas/builders/set/set.js +6 -15
  130. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  131. package/dist/core/schemas/builders/union/union.js +51 -62
  132. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  133. package/dist/serialization/types/IterationStateEnum.d.ts +10 -0
  134. package/dist/serialization/types/IterationStateEnum.js +31 -0
  135. package/dist/serialization/types/MapNodeResultData.d.ts +2 -0
  136. package/dist/serialization/types/MapNodeResultData.js +2 -0
  137. package/dist/serialization/types/MetadataFilterConfigRequest.js +2 -10
  138. package/dist/serialization/types/MetadataFilterRuleRequest.js +2 -10
  139. package/dist/serialization/types/PromptNodeResultData.d.ts +1 -0
  140. package/dist/serialization/types/PromptNodeResultData.js +1 -0
  141. package/dist/serialization/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
  142. package/dist/serialization/types/TestSuiteRunMetricNumberOutput.js +1 -1
  143. package/dist/serialization/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
  144. package/dist/serialization/types/TestSuiteRunMetricStringOutput.js +1 -1
  145. package/dist/serialization/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
  146. package/dist/serialization/types/TestSuiteTestCaseRejectedBulkResult.js +1 -1
  147. package/dist/serialization/types/index.d.ts +1 -0
  148. package/dist/serialization/types/index.js +1 -0
  149. package/package.json +6 -1
  150. package/reference.md +2418 -0
  151. package/serialization/types/IterationStateEnum.d.ts +10 -0
  152. package/serialization/types/IterationStateEnum.js +31 -0
  153. package/serialization/types/MapNodeResultData.d.ts +2 -0
  154. package/serialization/types/MapNodeResultData.js +2 -0
  155. package/serialization/types/MetadataFilterConfigRequest.js +2 -10
  156. package/serialization/types/MetadataFilterRuleRequest.js +2 -10
  157. package/serialization/types/PromptNodeResultData.d.ts +1 -0
  158. package/serialization/types/PromptNodeResultData.js +1 -0
  159. package/serialization/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
  160. package/serialization/types/TestSuiteRunMetricNumberOutput.js +1 -1
  161. package/serialization/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
  162. package/serialization/types/TestSuiteRunMetricStringOutput.js +1 -1
  163. package/serialization/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
  164. package/serialization/types/TestSuiteTestCaseRejectedBulkResult.js +1 -1
  165. package/serialization/types/index.d.ts +1 -0
  166. package/serialization/types/index.js +1 -0
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.undiscriminatedUnion = void 0;
13
4
  const Schema_1 = require("../../Schema");
@@ -15,37 +6,35 @@ const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
15
6
  const schema_utils_1 = require("../schema-utils");
16
7
  function undiscriminatedUnion(schemas) {
17
8
  const baseSchema = {
18
- parse: (raw, opts) => __awaiter(this, void 0, void 0, function* () {
9
+ parse: (raw, opts) => {
19
10
  return validateAndTransformUndiscriminatedUnion((schema, opts) => schema.parse(raw, opts), schemas, opts);
20
- }),
21
- json: (parsed, opts) => __awaiter(this, void 0, void 0, function* () {
11
+ },
12
+ json: (parsed, opts) => {
22
13
  return validateAndTransformUndiscriminatedUnion((schema, opts) => schema.json(parsed, opts), schemas, opts);
23
- }),
14
+ },
24
15
  getType: () => Schema_1.SchemaType.UNDISCRIMINATED_UNION,
25
16
  };
26
17
  return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
27
18
  }
28
19
  exports.undiscriminatedUnion = undiscriminatedUnion;
29
20
  function validateAndTransformUndiscriminatedUnion(transform, schemas, opts) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- const errors = [];
32
- for (const [index, schema] of schemas.entries()) {
33
- const transformed = yield transform(schema, Object.assign(Object.assign({}, opts), { skipValidation: false }));
34
- if (transformed.ok) {
35
- return transformed;
36
- }
37
- else {
38
- for (const error of transformed.errors) {
39
- errors.push({
40
- path: error.path,
41
- message: `[Variant ${index}] ${error.message}`,
42
- });
43
- }
21
+ const errors = [];
22
+ for (const [index, schema] of schemas.entries()) {
23
+ const transformed = transform(schema, Object.assign(Object.assign({}, opts), { skipValidation: false }));
24
+ if (transformed.ok) {
25
+ return transformed;
26
+ }
27
+ else {
28
+ for (const error of transformed.errors) {
29
+ errors.push({
30
+ path: error.path,
31
+ message: `[Variant ${index}] ${error.message}`,
32
+ });
44
33
  }
45
34
  }
46
- return {
47
- ok: false,
48
- errors,
49
- };
50
- });
35
+ }
36
+ return {
37
+ ok: false,
38
+ errors,
39
+ };
51
40
  }
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __rest = (this && this.__rest) || function (s, e) {
12
3
  var t = {};
13
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -36,7 +27,7 @@ function union(discriminant, union) {
36
27
  : discriminant.parsedDiscriminant;
37
28
  const discriminantValueSchema = (0, enum_1.enum_)((0, keys_1.keys)(union));
38
29
  const baseSchema = {
39
- parse: (raw, opts) => __awaiter(this, void 0, void 0, function* () {
30
+ parse: (raw, opts) => {
40
31
  return transformAndValidateUnion({
41
32
  value: raw,
42
33
  discriminant: rawDiscriminant,
@@ -53,8 +44,8 @@ function union(discriminant, union) {
53
44
  transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => additionalPropertiesSchema.parse(additionalProperties, opts),
54
45
  breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
55
46
  });
56
- }),
57
- json: (parsed, opts) => __awaiter(this, void 0, void 0, function* () {
47
+ },
48
+ json: (parsed, opts) => {
58
49
  return transformAndValidateUnion({
59
50
  value: parsed,
60
51
  discriminant: parsedDiscriminant,
@@ -71,71 +62,69 @@ function union(discriminant, union) {
71
62
  transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => additionalPropertiesSchema.json(additionalProperties, opts),
72
63
  breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
73
64
  });
74
- }),
65
+ },
75
66
  getType: () => Schema_1.SchemaType.UNION,
76
67
  };
77
68
  return Object.assign(Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema));
78
69
  }
79
70
  exports.union = union;
80
71
  function transformAndValidateUnion({ value, discriminant, transformedDiscriminant, transformDiscriminantValue, getAdditionalPropertiesSchema, allowUnrecognizedUnionMembers = false, transformAdditionalProperties, breadcrumbsPrefix = [], }) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- if (!(0, isPlainObject_1.isPlainObject)(value)) {
72
+ if (!(0, isPlainObject_1.isPlainObject)(value)) {
73
+ return {
74
+ ok: false,
75
+ errors: [
76
+ {
77
+ path: breadcrumbsPrefix,
78
+ message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "object"),
79
+ },
80
+ ],
81
+ };
82
+ }
83
+ const _a = value, _b = discriminant, discriminantValue = _a[_b], additionalProperties = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
84
+ if (discriminantValue == null) {
85
+ return {
86
+ ok: false,
87
+ errors: [
88
+ {
89
+ path: breadcrumbsPrefix,
90
+ message: `Missing discriminant ("${discriminant}")`,
91
+ },
92
+ ],
93
+ };
94
+ }
95
+ const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue);
96
+ if (!transformedDiscriminantValue.ok) {
97
+ return {
98
+ ok: false,
99
+ errors: transformedDiscriminantValue.errors,
100
+ };
101
+ }
102
+ const additionalPropertiesSchema = getAdditionalPropertiesSchema(transformedDiscriminantValue.value);
103
+ if (additionalPropertiesSchema == null) {
104
+ if (allowUnrecognizedUnionMembers) {
83
105
  return {
84
- ok: false,
85
- errors: [
86
- {
87
- path: breadcrumbsPrefix,
88
- message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "object"),
89
- },
90
- ],
106
+ ok: true,
107
+ value: Object.assign({ [transformedDiscriminant]: transformedDiscriminantValue.value }, additionalProperties),
91
108
  };
92
109
  }
93
- const _a = value, _b = discriminant, discriminantValue = _a[_b], additionalProperties = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
94
- if (discriminantValue == null) {
110
+ else {
95
111
  return {
96
112
  ok: false,
97
113
  errors: [
98
114
  {
99
- path: breadcrumbsPrefix,
100
- message: `Missing discriminant ("${discriminant}")`,
115
+ path: [...breadcrumbsPrefix, discriminant],
116
+ message: "Unexpected discriminant value",
101
117
  },
102
118
  ],
103
119
  };
104
120
  }
105
- const transformedDiscriminantValue = yield transformDiscriminantValue(discriminantValue);
106
- if (!transformedDiscriminantValue.ok) {
107
- return {
108
- ok: false,
109
- errors: transformedDiscriminantValue.errors,
110
- };
111
- }
112
- const additionalPropertiesSchema = getAdditionalPropertiesSchema(transformedDiscriminantValue.value);
113
- if (additionalPropertiesSchema == null) {
114
- if (allowUnrecognizedUnionMembers) {
115
- return {
116
- ok: true,
117
- value: Object.assign({ [transformedDiscriminant]: transformedDiscriminantValue.value }, additionalProperties),
118
- };
119
- }
120
- else {
121
- return {
122
- ok: false,
123
- errors: [
124
- {
125
- path: [...breadcrumbsPrefix, discriminant],
126
- message: "Unexpected discriminant value",
127
- },
128
- ],
129
- };
130
- }
131
- }
132
- const transformedAdditionalProperties = yield transformAdditionalProperties(additionalProperties, additionalPropertiesSchema);
133
- if (!transformedAdditionalProperties.ok) {
134
- return transformedAdditionalProperties;
135
- }
136
- return {
137
- ok: true,
138
- value: Object.assign({ [transformedDiscriminant]: discriminantValue }, transformedAdditionalProperties.value),
139
- };
140
- });
121
+ }
122
+ const transformedAdditionalProperties = transformAdditionalProperties(additionalProperties, additionalPropertiesSchema);
123
+ if (!transformedAdditionalProperties.ok) {
124
+ return transformedAdditionalProperties;
125
+ }
126
+ return {
127
+ ok: true,
128
+ value: Object.assign({ [transformedDiscriminant]: discriminantValue }, transformedAdditionalProperties.value),
129
+ };
141
130
  }
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.maybeSkipValidation = void 0;
13
4
  function maybeSkipValidation(schema) {
@@ -15,8 +6,8 @@ function maybeSkipValidation(schema) {
15
6
  }
16
7
  exports.maybeSkipValidation = maybeSkipValidation;
17
8
  function transformAndMaybeSkipValidation(transform) {
18
- return (value, opts) => __awaiter(this, void 0, void 0, function* () {
19
- const transformed = yield transform(value, opts);
9
+ return (value, opts) => {
10
+ const transformed = transform(value, opts);
20
11
  const { skipValidation = false } = opts !== null && opts !== void 0 ? opts : {};
21
12
  if (!transformed.ok && skipValidation) {
22
13
  // eslint-disable-next-line no-console
@@ -33,5 +24,5 @@ function transformAndMaybeSkipValidation(transform) {
33
24
  else {
34
25
  return transformed;
35
26
  }
36
- });
27
+ };
37
28
  }
package/dist/Client.d.ts CHANGED
@@ -19,8 +19,11 @@ export declare namespace VellumClient {
19
19
  apiKey: core.Supplier<string>;
20
20
  }
21
21
  interface RequestOptions {
22
+ /** The maximum time to wait for a response in seconds. */
22
23
  timeoutInSeconds?: number;
24
+ /** The number of times to retry the request. Defaults to 2. */
23
25
  maxRetries?: number;
26
+ /** A hook to abort the request. */
24
27
  abortSignal?: AbortSignal;
25
28
  }
26
29
  }
@@ -39,7 +42,7 @@ export declare class VellumClient {
39
42
  * @throws {@link Vellum.InternalServerError}
40
43
  *
41
44
  * @example
42
- * await vellum.executePrompt({
45
+ * await client.executePrompt({
43
46
  * inputs: [{
44
47
  * type: "STRING",
45
48
  * name: "string",
@@ -94,7 +97,7 @@ export declare class VellumClient {
94
97
  * @throws {@link Vellum.InternalServerError}
95
98
  *
96
99
  * @example
97
- * await vellum.executeWorkflow({
100
+ * await client.executeWorkflow({
98
101
  * inputs: [{
99
102
  * type: "STRING",
100
103
  * name: "string",
@@ -126,7 +129,7 @@ export declare class VellumClient {
126
129
  * @throws {@link Vellum.InternalServerError}
127
130
  *
128
131
  * @example
129
- * await vellum.generate({
132
+ * await client.generate({
130
133
  * requests: [{
131
134
  * inputValues: {}
132
135
  * }]
@@ -151,7 +154,7 @@ export declare class VellumClient {
151
154
  * @throws {@link Vellum.InternalServerError}
152
155
  *
153
156
  * @example
154
- * await vellum.search({
157
+ * await client.search({
155
158
  * query: "query"
156
159
  * })
157
160
  */
@@ -167,7 +170,7 @@ export declare class VellumClient {
167
170
  * @throws {@link Vellum.InternalServerError}
168
171
  *
169
172
  * @example
170
- * await vellum.submitCompletionActuals({
173
+ * await client.submitCompletionActuals({
171
174
  * actuals: [{}]
172
175
  * })
173
176
  */
@@ -181,7 +184,7 @@ export declare class VellumClient {
181
184
  * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration.
182
185
  *
183
186
  * @example
184
- * await vellum.submitWorkflowExecutionActuals({
187
+ * await client.submitWorkflowExecutionActuals({
185
188
  * actuals: []
186
189
  * })
187
190
  */
package/dist/Client.js CHANGED
@@ -70,7 +70,7 @@ class VellumClient {
70
70
  * @throws {@link Vellum.InternalServerError}
71
71
  *
72
72
  * @example
73
- * await vellum.executePrompt({
73
+ * await client.executePrompt({
74
74
  * inputs: [{
75
75
  * type: "STRING",
76
76
  * name: "string",
@@ -116,15 +116,16 @@ class VellumClient {
116
116
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
117
117
  .predict, "v1/execute-prompt"),
118
118
  method: "POST",
119
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
119
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
120
120
  contentType: "application/json",
121
- body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
121
+ requestType: "json",
122
+ body: serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
122
123
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
123
124
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
124
125
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
125
126
  });
126
127
  if (_response.ok) {
127
- return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
128
+ return serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
128
129
  unrecognizedObjectKeys: "passthrough",
129
130
  allowUnrecognizedUnionMembers: true,
130
131
  allowUnrecognizedEnumValues: true,
@@ -173,11 +174,10 @@ class VellumClient {
173
174
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
174
175
  .predict, "v1/execute-prompt-stream"),
175
176
  method: "POST",
176
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
177
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
177
178
  contentType: "application/json",
178
- body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
179
- unrecognizedObjectKeys: "strip",
180
- }),
179
+ requestType: "json",
180
+ body: serializers.ExecutePromptStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
181
181
  responseType: "streaming",
182
182
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
183
183
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -187,7 +187,7 @@ class VellumClient {
187
187
  return new core.Stream({
188
188
  stream: _response.body,
189
189
  parse: (data) => __awaiter(this, void 0, void 0, function* () {
190
- return yield serializers.ExecutePromptEvent.parseOrThrow(data, {
190
+ return serializers.ExecutePromptEvent.parseOrThrow(data, {
191
191
  unrecognizedObjectKeys: "passthrough",
192
192
  allowUnrecognizedUnionMembers: true,
193
193
  allowUnrecognizedEnumValues: true,
@@ -244,7 +244,7 @@ class VellumClient {
244
244
  * @throws {@link Vellum.InternalServerError}
245
245
  *
246
246
  * @example
247
- * await vellum.executeWorkflow({
247
+ * await client.executeWorkflow({
248
248
  * inputs: [{
249
249
  * type: "STRING",
250
250
  * name: "string",
@@ -263,15 +263,16 @@ class VellumClient {
263
263
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
264
264
  .predict, "v1/execute-workflow"),
265
265
  method: "POST",
266
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
266
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
267
267
  contentType: "application/json",
268
- body: yield serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
268
+ requestType: "json",
269
+ body: serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
269
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
270
271
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
271
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
272
273
  });
273
274
  if (_response.ok) {
274
- return yield serializers.ExecuteWorkflowResponse.parseOrThrow(_response.body, {
275
+ return serializers.ExecuteWorkflowResponse.parseOrThrow(_response.body, {
275
276
  unrecognizedObjectKeys: "passthrough",
276
277
  allowUnrecognizedUnionMembers: true,
277
278
  allowUnrecognizedEnumValues: true,
@@ -318,11 +319,10 @@ class VellumClient {
318
319
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
319
320
  .predict, "v1/execute-workflow-stream"),
320
321
  method: "POST",
321
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
322
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
322
323
  contentType: "application/json",
323
- body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
324
- unrecognizedObjectKeys: "strip",
325
- }),
324
+ requestType: "json",
325
+ body: serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
326
326
  responseType: "streaming",
327
327
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
328
328
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -332,7 +332,7 @@ class VellumClient {
332
332
  return new core.Stream({
333
333
  stream: _response.body,
334
334
  parse: (data) => __awaiter(this, void 0, void 0, function* () {
335
- return yield serializers.WorkflowStreamEvent.parseOrThrow(data, {
335
+ return serializers.WorkflowStreamEvent.parseOrThrow(data, {
336
336
  unrecognizedObjectKeys: "passthrough",
337
337
  allowUnrecognizedUnionMembers: true,
338
338
  allowUnrecognizedEnumValues: true,
@@ -391,7 +391,7 @@ class VellumClient {
391
391
  * @throws {@link Vellum.InternalServerError}
392
392
  *
393
393
  * @example
394
- * await vellum.generate({
394
+ * await client.generate({
395
395
  * requests: [{
396
396
  * inputValues: {}
397
397
  * }]
@@ -404,15 +404,16 @@ class VellumClient {
404
404
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
405
405
  .predict, "v1/generate"),
406
406
  method: "POST",
407
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
407
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
408
408
  contentType: "application/json",
409
- body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
409
+ requestType: "json",
410
+ body: serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
410
411
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
411
412
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
412
413
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
413
414
  });
414
415
  if (_response.ok) {
415
- return yield serializers.GenerateResponse.parseOrThrow(_response.body, {
416
+ return serializers.GenerateResponse.parseOrThrow(_response.body, {
416
417
  unrecognizedObjectKeys: "passthrough",
417
418
  allowUnrecognizedUnionMembers: true,
418
419
  allowUnrecognizedEnumValues: true,
@@ -464,9 +465,10 @@ class VellumClient {
464
465
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
465
466
  .predict, "v1/generate-stream"),
466
467
  method: "POST",
467
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
468
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
468
469
  contentType: "application/json",
469
- body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
470
+ requestType: "json",
471
+ body: serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
470
472
  responseType: "streaming",
471
473
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
472
474
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -476,7 +478,7 @@ class VellumClient {
476
478
  return new core.Stream({
477
479
  stream: _response.body,
478
480
  parse: (data) => __awaiter(this, void 0, void 0, function* () {
479
- return yield serializers.GenerateStreamResponse.parseOrThrow(data, {
481
+ return serializers.GenerateStreamResponse.parseOrThrow(data, {
480
482
  unrecognizedObjectKeys: "passthrough",
481
483
  allowUnrecognizedUnionMembers: true,
482
484
  allowUnrecognizedEnumValues: true,
@@ -533,7 +535,7 @@ class VellumClient {
533
535
  * @throws {@link Vellum.InternalServerError}
534
536
  *
535
537
  * @example
536
- * await vellum.search({
538
+ * await client.search({
537
539
  * query: "query"
538
540
  * })
539
541
  */
@@ -544,15 +546,16 @@ class VellumClient {
544
546
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
545
547
  .predict, "v1/search"),
546
548
  method: "POST",
547
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
549
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
548
550
  contentType: "application/json",
549
- body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
551
+ requestType: "json",
552
+ body: serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
550
553
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
551
554
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
552
555
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
553
556
  });
554
557
  if (_response.ok) {
555
- return yield serializers.SearchResponse.parseOrThrow(_response.body, {
558
+ return serializers.SearchResponse.parseOrThrow(_response.body, {
556
559
  unrecognizedObjectKeys: "passthrough",
557
560
  allowUnrecognizedUnionMembers: true,
558
561
  allowUnrecognizedEnumValues: true,
@@ -600,7 +603,7 @@ class VellumClient {
600
603
  * @throws {@link Vellum.InternalServerError}
601
604
  *
602
605
  * @example
603
- * await vellum.submitCompletionActuals({
606
+ * await client.submitCompletionActuals({
604
607
  * actuals: [{}]
605
608
  * })
606
609
  */
@@ -611,11 +614,10 @@ class VellumClient {
611
614
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
612
615
  .predict, "v1/submit-completion-actuals"),
613
616
  method: "POST",
614
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
617
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
615
618
  contentType: "application/json",
616
- body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
617
- unrecognizedObjectKeys: "strip",
618
- }),
619
+ requestType: "json",
620
+ body: serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
619
621
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
620
622
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
621
623
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -662,7 +664,7 @@ class VellumClient {
662
664
  * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration.
663
665
  *
664
666
  * @example
665
- * await vellum.submitWorkflowExecutionActuals({
667
+ * await client.submitWorkflowExecutionActuals({
666
668
  * actuals: []
667
669
  * })
668
670
  */
@@ -673,9 +675,10 @@ class VellumClient {
673
675
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
674
676
  .predict, "v1/submit-workflow-execution-actuals"),
675
677
  method: "POST",
676
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
678
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
677
679
  contentType: "application/json",
678
- body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
680
+ requestType: "json",
681
+ body: serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
679
682
  unrecognizedObjectKeys: "strip",
680
683
  }),
681
684
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -44,20 +44,22 @@ import * as Vellum from "../../index";
44
44
  * }
45
45
  */
46
46
  export interface ExecutePromptRequest {
47
- /** The list of inputs defined in the Prompt's deployment with their corresponding values. */
47
+ /** A list consisting of the Prompt Deployment's input variables and their values. */
48
48
  inputs: Vellum.PromptDeploymentInputRequest[];
49
49
  /** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
50
50
  promptDeploymentId?: string;
51
- /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
51
+ /** The unique name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
52
52
  promptDeploymentName?: string;
53
53
  /** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
54
54
  releaseTag?: string;
55
- /** "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment. */
55
+ /** Optionally include a unique identifier for tracking purposes. Must be unique within a given Prompt Deployment. */
56
56
  externalId?: string;
57
- /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
57
+ /** An optionally specified configuration used to opt in to including additional metadata about this prompt execution in the API response. Corresponding values will be returned under the `meta` key of the API response. */
58
58
  expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
59
+ /** Overrides for the raw API request sent to the model host. Combined with `expand_raw`, it can be used to access new features from models. */
59
60
  rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
60
- /** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
61
+ /** A list of keys whose values you'd like to directly return from the JSON response of the model provider. Useful if you need lower-level info returned by model providers that Vellum would otherwise omit. Corresponding key/value pairs will be returned under the `raw` key of the API response. */
61
62
  expandRaw?: string[];
63
+ /** Arbitrary JSON metadata associated with this request. Can be used to capture additional monitoring data such as user id, session id, etc. for future analysis. */
62
64
  metadata?: Record<string, unknown>;
63
65
  }
@@ -44,20 +44,22 @@ import * as Vellum from "../../index";
44
44
  * }
45
45
  */
46
46
  export interface ExecutePromptStreamRequest {
47
- /** The list of inputs defined in the Prompt's deployment with their corresponding values. */
47
+ /** A list consisting of the Prompt Deployment's input variables and their values. */
48
48
  inputs: Vellum.PromptDeploymentInputRequest[];
49
49
  /** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
50
50
  promptDeploymentId?: string;
51
- /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
51
+ /** The unique name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
52
52
  promptDeploymentName?: string;
53
53
  /** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
54
54
  releaseTag?: string;
55
- /** "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment. */
55
+ /** Optionally include a unique identifier for tracking purposes. Must be unique within a given Prompt Deployment. */
56
56
  externalId?: string;
57
- /** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
57
+ /** An optionally specified configuration used to opt in to including additional metadata about this prompt execution in the API response. Corresponding values will be returned under the `meta` key of the API response. */
58
58
  expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
59
+ /** Overrides for the raw API request sent to the model host. Combined with `expand_raw`, it can be used to access new features from models. */
59
60
  rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
60
- /** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
61
+ /** A list of keys whose values you'd like to directly return from the JSON response of the model provider. Useful if you need lower-level info returned by model providers that Vellum would otherwise omit. Corresponding key/value pairs will be returned under the `raw` key of the API response. */
61
62
  expandRaw?: string[];
63
+ /** Arbitrary JSON metadata associated with this request. Can be used to capture additional monitoring data such as user id, session id, etc. for future analysis. */
62
64
  metadata?: Record<string, unknown>;
63
65
  }