vellum-ai 0.8.18 → 0.8.21
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.
- package/Client.d.ts +2 -2
- package/Client.js +12 -12
- package/api/client/requests/CodeExecutorRequest.d.ts +2 -2
- package/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -1
- package/api/client/requests/GenerateStreamBodyRequest.d.ts +2 -2
- package/api/resources/adHoc/client/Client.js +1 -1
- package/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -3
- package/api/resources/deployments/client/Client.js +5 -5
- package/api/resources/documentIndexes/client/Client.js +8 -8
- package/api/resources/documents/client/Client.js +5 -5
- package/api/resources/folderEntities/client/Client.js +1 -1
- package/api/resources/metricDefinitions/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/api/resources/sandboxes/client/Client.js +5 -5
- package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequest.d.ts +2 -2
- package/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/api/resources/testSuites/client/Client.js +4 -4
- package/api/resources/workflowDeployments/client/Client.js +4 -4
- package/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +2 -2
- package/core/form-data-utils/FormDataWrapper.js +7 -7
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/Client.d.ts +2 -2
- package/dist/Client.js +12 -12
- package/dist/api/client/requests/CodeExecutorRequest.d.ts +2 -2
- package/dist/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -1
- package/dist/api/client/requests/GenerateStreamBodyRequest.d.ts +2 -2
- package/dist/api/resources/adHoc/client/Client.js +1 -1
- package/dist/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -3
- package/dist/api/resources/deployments/client/Client.js +5 -5
- package/dist/api/resources/documentIndexes/client/Client.js +8 -8
- package/dist/api/resources/documents/client/Client.js +5 -5
- package/dist/api/resources/folderEntities/client/Client.js +1 -1
- package/dist/api/resources/metricDefinitions/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/dist/api/resources/sandboxes/client/Client.js +5 -5
- package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequest.d.ts +2 -2
- package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/dist/api/resources/testSuites/client/Client.js +4 -4
- package/dist/api/resources/workflowDeployments/client/Client.js +4 -4
- package/dist/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +2 -2
- package/dist/core/form-data-utils/FormDataWrapper.js +7 -7
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +5 -1
- package/reference.md +3 -3
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -78,7 +78,7 @@ class WorkflowDeployments {
|
|
|
78
78
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
79
79
|
.default, "v1/workflow-deployments"),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
queryParameters: _queryParams,
|
|
84
84
|
requestType: "json",
|
|
@@ -131,7 +131,7 @@ class WorkflowDeployments {
|
|
|
131
131
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
132
132
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}`),
|
|
133
133
|
method: "GET",
|
|
134
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
134
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
135
135
|
contentType: "application/json",
|
|
136
136
|
requestType: "json",
|
|
137
137
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -184,7 +184,7 @@ class WorkflowDeployments {
|
|
|
184
184
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
185
185
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
186
186
|
method: "GET",
|
|
187
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
187
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
requestType: "json",
|
|
190
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -238,7 +238,7 @@ class WorkflowDeployments {
|
|
|
238
238
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
239
239
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
240
240
|
method: "PATCH",
|
|
241
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
241
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
242
242
|
contentType: "application/json",
|
|
243
243
|
requestType: "json",
|
|
244
244
|
body: serializers.PatchedWorkflowReleaseTagUpdateRequest.jsonOrThrow(request, {
|
|
@@ -64,7 +64,7 @@ class WorkflowSandboxes {
|
|
|
64
64
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
65
65
|
.default, `v1/workflow-sandboxes/${encodeURIComponent(id)}/workflows/${encodeURIComponent(workflowId)}/deploy`),
|
|
66
66
|
method: "POST",
|
|
67
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
67
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
68
68
|
contentType: "application/json",
|
|
69
69
|
requestType: "json",
|
|
70
70
|
body: serializers.DeploySandboxWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Writable } from "stream";
|
|
1
|
+
import type { Writable } from "readable-stream";
|
|
3
2
|
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
4
3
|
export declare class Node18UniversalStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>, ReadFormat> {
|
|
5
4
|
private readableStream;
|
|
@@ -165,10 +165,12 @@ class Node18UniversalStreamWrapper {
|
|
|
165
165
|
const chunks = [];
|
|
166
166
|
while (true) {
|
|
167
167
|
const { done, value } = yield this.reader.read();
|
|
168
|
-
if (done)
|
|
168
|
+
if (done) {
|
|
169
169
|
break;
|
|
170
|
-
|
|
170
|
+
}
|
|
171
|
+
if (value) {
|
|
171
172
|
chunks.push(value);
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
175
|
const decoder = new TextDecoder(this.encoding || "utf-8");
|
|
174
176
|
return decoder.decode(yield new Blob(chunks).arrayBuffer());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { Readable, Writable } from "stream";
|
|
2
|
+
import type { Readable, Writable } from "readable-stream";
|
|
3
3
|
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
4
4
|
export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
|
|
5
5
|
private readableStream;
|
|
@@ -12,7 +12,7 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
|
|
|
12
12
|
off(event: string, callback: EventCallback): void;
|
|
13
13
|
pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
14
14
|
pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
15
|
-
unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream
|
|
15
|
+
unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
|
|
16
16
|
destroy(error?: Error): void;
|
|
17
17
|
pause(): void;
|
|
18
18
|
resume(): void;
|
|
@@ -147,10 +147,12 @@ class UndiciStreamWrapper {
|
|
|
147
147
|
const chunks = [];
|
|
148
148
|
while (true) {
|
|
149
149
|
const { done, value } = yield this.reader.read();
|
|
150
|
-
if (done)
|
|
150
|
+
if (done) {
|
|
151
151
|
break;
|
|
152
|
-
|
|
152
|
+
}
|
|
153
|
+
if (value) {
|
|
153
154
|
chunks.push(value);
|
|
155
|
+
}
|
|
154
156
|
}
|
|
155
157
|
const decoder = new TextDecoder(this.encoding || "utf-8");
|
|
156
158
|
return decoder.decode(yield new Blob(chunks).arrayBuffer());
|
|
@@ -39,7 +39,7 @@ function chooseStreamWrapper(responseBody) {
|
|
|
39
39
|
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
40
40
|
return new (yield Promise.resolve().then(() => __importStar(require("./Node18UniversalStreamWrapper")))).Node18UniversalStreamWrapper(responseBody);
|
|
41
41
|
}
|
|
42
|
-
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch
|
|
42
|
+
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
43
43
|
return new (yield Promise.resolve().then(() => __importStar(require("./UndiciStreamWrapper")))).UndiciStreamWrapper(responseBody);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare type MaybePromise<T> = Promise<T> | T;
|
|
2
|
-
|
|
2
|
+
interface FormDataRequest<Body> {
|
|
3
3
|
body: Body;
|
|
4
4
|
headers: Record<string, string>;
|
|
5
5
|
duplex?: "half";
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export interface CrossPlatformFormData {
|
|
8
8
|
setup(): Promise<void>;
|
|
9
9
|
append(key: string, value: unknown): void;
|
|
@@ -73,8 +73,11 @@ class Node18FormData {
|
|
|
73
73
|
if (fileName == null && isNamedValue(value)) {
|
|
74
74
|
fileName = value.name;
|
|
75
75
|
}
|
|
76
|
-
if (value instanceof
|
|
77
|
-
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key,
|
|
76
|
+
if (value instanceof Blob) {
|
|
77
|
+
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
(_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, {
|
|
78
81
|
type: undefined,
|
|
79
82
|
name: fileName,
|
|
80
83
|
[Symbol.toStringTag]: "File",
|
|
@@ -83,16 +86,13 @@ class Node18FormData {
|
|
|
83
86
|
},
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
|
-
else {
|
|
87
|
-
(_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, value, fileName);
|
|
88
|
-
}
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
getRequest() {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
const encoder = new (yield Promise.resolve().then(() => __importStar(require("form-data-encoder")))).FormDataEncoder(this.fd);
|
|
94
94
|
return {
|
|
95
|
-
body:
|
|
95
|
+
body: (yield Promise.resolve().then(() => __importStar(require("readable-stream")))).Readable.from(encoder),
|
|
96
96
|
headers: encoder.headers,
|
|
97
97
|
duplex: "half",
|
|
98
98
|
};
|
|
@@ -120,7 +120,7 @@ class Node16FormData {
|
|
|
120
120
|
fileName = value.name;
|
|
121
121
|
}
|
|
122
122
|
let bufferedValue;
|
|
123
|
-
if (
|
|
123
|
+
if (value instanceof Blob) {
|
|
124
124
|
bufferedValue = Buffer.from(yield value.arrayBuffer());
|
|
125
125
|
}
|
|
126
126
|
else {
|
package/core/schemas/Schema.d.ts
CHANGED
package/core/schemas/Schema.js
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigint = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
function bigint() {
|
|
9
|
+
const baseSchema = {
|
|
10
|
+
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
11
|
+
if (typeof raw !== "string") {
|
|
12
|
+
return {
|
|
13
|
+
ok: false,
|
|
14
|
+
errors: [
|
|
15
|
+
{
|
|
16
|
+
path: breadcrumbsPrefix,
|
|
17
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
ok: true,
|
|
24
|
+
value: BigInt(raw),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
28
|
+
if (typeof bigint === "bigint") {
|
|
29
|
+
return {
|
|
30
|
+
ok: true,
|
|
31
|
+
value: bigint.toString(),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
errors: [
|
|
38
|
+
{
|
|
39
|
+
path: breadcrumbsPrefix,
|
|
40
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(bigint, "bigint"),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
getType: () => Schema_1.SchemaType.BIGINT,
|
|
47
|
+
};
|
|
48
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
49
|
+
}
|
|
50
|
+
exports.bigint = bigint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bigint } from "./bigint";
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bigint"), exports);
|
|
17
18
|
__exportStar(require("./date"), exports);
|
|
18
19
|
__exportStar(require("./enum"), exports);
|
|
19
20
|
__exportStar(require("./lazy"), exports);
|
|
@@ -12,9 +12,13 @@ function getTypeAsString(value) {
|
|
|
12
12
|
if (value === null) {
|
|
13
13
|
return "null";
|
|
14
14
|
}
|
|
15
|
+
if (value instanceof BigInt) {
|
|
16
|
+
return "BigInt";
|
|
17
|
+
}
|
|
15
18
|
switch (typeof value) {
|
|
16
19
|
case "string":
|
|
17
20
|
return `"${value}"`;
|
|
21
|
+
case "bigint":
|
|
18
22
|
case "number":
|
|
19
23
|
case "boolean":
|
|
20
24
|
case "undefined":
|
package/dist/Client.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class VellumClient {
|
|
|
43
43
|
* @example
|
|
44
44
|
* await client.executeCode({
|
|
45
45
|
* code: "code",
|
|
46
|
-
* runtime:
|
|
46
|
+
* runtime: "PYTHON_3_11_6",
|
|
47
47
|
* inputValues: [{
|
|
48
48
|
* name: "name",
|
|
49
49
|
* type: "STRING",
|
|
@@ -53,7 +53,7 @@ export declare class VellumClient {
|
|
|
53
53
|
* version: "version",
|
|
54
54
|
* name: "name"
|
|
55
55
|
* }],
|
|
56
|
-
* outputType:
|
|
56
|
+
* outputType: "STRING"
|
|
57
57
|
* })
|
|
58
58
|
*/
|
|
59
59
|
executeCode(request: Vellum.CodeExecutorRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.CodeExecutorResponse>;
|
package/dist/Client.js
CHANGED
|
@@ -71,7 +71,7 @@ class VellumClient {
|
|
|
71
71
|
* @example
|
|
72
72
|
* await client.executeCode({
|
|
73
73
|
* code: "code",
|
|
74
|
-
* runtime:
|
|
74
|
+
* runtime: "PYTHON_3_11_6",
|
|
75
75
|
* inputValues: [{
|
|
76
76
|
* name: "name",
|
|
77
77
|
* type: "STRING",
|
|
@@ -81,7 +81,7 @@ class VellumClient {
|
|
|
81
81
|
* version: "version",
|
|
82
82
|
* name: "name"
|
|
83
83
|
* }],
|
|
84
|
-
* outputType:
|
|
84
|
+
* outputType: "STRING"
|
|
85
85
|
* })
|
|
86
86
|
*/
|
|
87
87
|
executeCode(request, requestOptions) {
|
|
@@ -91,7 +91,7 @@ class VellumClient {
|
|
|
91
91
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
92
92
|
.default, "v1/execute-code"),
|
|
93
93
|
method: "POST",
|
|
94
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
94
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
95
95
|
contentType: "application/json",
|
|
96
96
|
requestType: "json",
|
|
97
97
|
body: serializers.CodeExecutorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -160,7 +160,7 @@ class VellumClient {
|
|
|
160
160
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
161
161
|
.predict, "v1/execute-prompt"),
|
|
162
162
|
method: "POST",
|
|
163
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
163
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
164
164
|
contentType: "application/json",
|
|
165
165
|
requestType: "json",
|
|
166
166
|
body: serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -218,7 +218,7 @@ class VellumClient {
|
|
|
218
218
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
219
219
|
.predict, "v1/execute-prompt-stream"),
|
|
220
220
|
method: "POST",
|
|
221
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
221
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
222
222
|
contentType: "application/json",
|
|
223
223
|
requestType: "json",
|
|
224
224
|
body: serializers.ExecutePromptStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -303,7 +303,7 @@ class VellumClient {
|
|
|
303
303
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
304
304
|
.predict, "v1/execute-workflow"),
|
|
305
305
|
method: "POST",
|
|
306
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
306
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
307
307
|
contentType: "application/json",
|
|
308
308
|
requestType: "json",
|
|
309
309
|
body: serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -359,7 +359,7 @@ class VellumClient {
|
|
|
359
359
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
360
360
|
.predict, "v1/execute-workflow-stream"),
|
|
361
361
|
method: "POST",
|
|
362
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
362
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
363
363
|
contentType: "application/json",
|
|
364
364
|
requestType: "json",
|
|
365
365
|
body: serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -446,7 +446,7 @@ class VellumClient {
|
|
|
446
446
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
447
447
|
.predict, "v1/generate"),
|
|
448
448
|
method: "POST",
|
|
449
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
449
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
450
450
|
contentType: "application/json",
|
|
451
451
|
requestType: "json",
|
|
452
452
|
body: serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -507,7 +507,7 @@ class VellumClient {
|
|
|
507
507
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
508
508
|
.predict, "v1/generate-stream"),
|
|
509
509
|
method: "POST",
|
|
510
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
510
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
511
511
|
contentType: "application/json",
|
|
512
512
|
requestType: "json",
|
|
513
513
|
body: serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -588,7 +588,7 @@ class VellumClient {
|
|
|
588
588
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
589
589
|
.predict, "v1/search"),
|
|
590
590
|
method: "POST",
|
|
591
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
591
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
592
592
|
contentType: "application/json",
|
|
593
593
|
requestType: "json",
|
|
594
594
|
body: serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -656,7 +656,7 @@ class VellumClient {
|
|
|
656
656
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
657
657
|
.predict, "v1/submit-completion-actuals"),
|
|
658
658
|
method: "POST",
|
|
659
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
659
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
660
660
|
contentType: "application/json",
|
|
661
661
|
requestType: "json",
|
|
662
662
|
body: serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -719,7 +719,7 @@ class VellumClient {
|
|
|
719
719
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
720
720
|
.predict, "v1/submit-workflow-execution-actuals"),
|
|
721
721
|
method: "POST",
|
|
722
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
722
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
723
723
|
contentType: "application/json",
|
|
724
724
|
requestType: "json",
|
|
725
725
|
body: serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -6,7 +6,7 @@ import * as Vellum from "../../index";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* code: "code",
|
|
9
|
-
* runtime:
|
|
9
|
+
* runtime: "PYTHON_3_11_6",
|
|
10
10
|
* inputValues: [{
|
|
11
11
|
* name: "name",
|
|
12
12
|
* type: "STRING",
|
|
@@ -16,7 +16,7 @@ import * as Vellum from "../../index";
|
|
|
16
16
|
* version: "version",
|
|
17
17
|
* name: "name"
|
|
18
18
|
* }],
|
|
19
|
-
* outputType:
|
|
19
|
+
* outputType: "STRING"
|
|
20
20
|
* }
|
|
21
21
|
*/
|
|
22
22
|
export interface CodeExecutorRequest {
|
|
@@ -17,7 +17,7 @@ import * as Vellum from "../../index";
|
|
|
17
17
|
* workflowDeploymentName: "string",
|
|
18
18
|
* releaseTag: "string",
|
|
19
19
|
* externalId: "string",
|
|
20
|
-
* eventTypes: [
|
|
20
|
+
* eventTypes: ["NODE"],
|
|
21
21
|
* metadata: {
|
|
22
22
|
* "string": {
|
|
23
23
|
* "key": "value"
|
|
@@ -15,7 +15,7 @@ import * as Vellum from "../../index";
|
|
|
15
15
|
* },
|
|
16
16
|
* chatHistory: [{
|
|
17
17
|
* text: "string",
|
|
18
|
-
* role:
|
|
18
|
+
* role: "SYSTEM",
|
|
19
19
|
* content: {
|
|
20
20
|
* type: "STRING",
|
|
21
21
|
* value: "string"
|
|
@@ -25,7 +25,7 @@ import * as Vellum from "../../index";
|
|
|
25
25
|
* externalIds: ["string"]
|
|
26
26
|
* }],
|
|
27
27
|
* options: {
|
|
28
|
-
* logprobs:
|
|
28
|
+
* logprobs: "ALL"
|
|
29
29
|
* }
|
|
30
30
|
* }
|
|
31
31
|
*/
|
|
@@ -59,7 +59,7 @@ class AdHoc {
|
|
|
59
59
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
60
60
|
.default, "v1/ad-hoc/execute-prompt-stream"),
|
|
61
61
|
method: "POST",
|
|
62
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
62
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
63
63
|
contentType: "application/json",
|
|
64
64
|
requestType: "json",
|
|
65
65
|
body: serializers.AdHocExecutePromptStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -14,7 +14,7 @@ import * as Vellum from "../../../../index";
|
|
|
14
14
|
* inputVariables: [{
|
|
15
15
|
* id: "string",
|
|
16
16
|
* key: "string",
|
|
17
|
-
* type:
|
|
17
|
+
* type: "STRING"
|
|
18
18
|
* }],
|
|
19
19
|
* parameters: {
|
|
20
20
|
* stop: ["string"],
|
|
@@ -39,10 +39,10 @@ import * as Vellum from "../../../../index";
|
|
|
39
39
|
* blockType: "JINJA",
|
|
40
40
|
* properties: {
|
|
41
41
|
* template: "string",
|
|
42
|
-
* templateType:
|
|
42
|
+
* templateType: "STRING"
|
|
43
43
|
* },
|
|
44
44
|
* id: "string",
|
|
45
|
-
* state:
|
|
45
|
+
* state: "ENABLED",
|
|
46
46
|
* cacheConfig: {
|
|
47
47
|
* type: {
|
|
48
48
|
* "key": "value"
|
|
@@ -79,7 +79,7 @@ class Deployments {
|
|
|
79
79
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
80
80
|
.default, "v1/deployments"),
|
|
81
81
|
method: "GET",
|
|
82
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
82
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
queryParameters: _queryParams,
|
|
85
85
|
requestType: "json",
|
|
@@ -132,7 +132,7 @@ class Deployments {
|
|
|
132
132
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
133
133
|
.default, `v1/deployments/${encodeURIComponent(id)}`),
|
|
134
134
|
method: "GET",
|
|
135
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
135
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -185,7 +185,7 @@ class Deployments {
|
|
|
185
185
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
186
186
|
.default, `v1/deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
187
187
|
method: "GET",
|
|
188
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
188
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
189
189
|
contentType: "application/json",
|
|
190
190
|
requestType: "json",
|
|
191
191
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -239,7 +239,7 @@ class Deployments {
|
|
|
239
239
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
240
240
|
.default, `v1/deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
241
241
|
method: "PATCH",
|
|
242
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
242
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
243
243
|
contentType: "application/json",
|
|
244
244
|
requestType: "json",
|
|
245
245
|
body: serializers.PatchedDeploymentReleaseTagUpdateRequest.jsonOrThrow(request, {
|
|
@@ -314,7 +314,7 @@ class Deployments {
|
|
|
314
314
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
315
315
|
.default, "v1/deployments/provider-payload"),
|
|
316
316
|
method: "POST",
|
|
317
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
317
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
318
318
|
contentType: "application/json",
|
|
319
319
|
requestType: "json",
|
|
320
320
|
body: serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
|