vellum-ai 0.1.4 → 0.1.5
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 +8 -0
- package/Client.js +72 -12
- package/api/client/requests/ExecutePromptRequest.d.ts +14 -0
- package/api/client/requests/ExecutePromptRequest.js +5 -0
- package/api/client/requests/index.d.ts +1 -0
- package/api/errors/ForbiddenError.d.ts +1 -2
- package/api/resources/deployments/client/Client.js +1 -1
- package/api/resources/documentIndexes/client/Client.js +2 -2
- package/api/resources/documents/client/Client.js +4 -4
- package/api/resources/modelVersions/client/Client.js +1 -1
- package/api/resources/registeredPrompts/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.js +2 -2
- package/api/resources/testSuites/client/Client.js +2 -2
- package/api/types/ChatHistoryInputRequest.d.ts +9 -0
- package/api/types/ChatHistoryInputRequest.js +5 -0
- package/api/types/ErrorExecutePromptResponse.d.ts +8 -0
- package/api/types/ErrorExecutePromptResponse.js +5 -0
- package/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
- package/api/types/ExecutePromptApiErrorResponse.js +5 -0
- package/api/types/ExecutePromptResponse.d.ts +16 -0
- package/api/types/ExecutePromptResponse.js +5 -0
- package/api/types/JsonExecutePromptResponse.d.ts +7 -0
- package/api/types/JsonExecutePromptResponse.js +5 -0
- package/api/types/JsonInputRequest.d.ts +8 -0
- package/api/types/JsonInputRequest.js +5 -0
- package/api/types/PromptDeploymentInputRequest.d.ts +16 -0
- package/api/types/PromptDeploymentInputRequest.js +5 -0
- package/api/types/StringExecutePromptResponse.d.ts +7 -0
- package/api/types/StringExecutePromptResponse.js +5 -0
- package/api/types/StringInputRequest.d.ts +8 -0
- package/api/types/StringInputRequest.js +5 -0
- package/api/types/index.d.ts +9 -0
- package/api/types/index.js +9 -0
- package/dist/Client.d.ts +8 -0
- package/dist/Client.js +72 -12
- package/dist/api/client/requests/ExecutePromptRequest.d.ts +14 -0
- package/dist/api/client/requests/ExecutePromptRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/api/resources/deployments/client/Client.js +1 -1
- package/dist/api/resources/documentIndexes/client/Client.js +2 -2
- package/dist/api/resources/documents/client/Client.js +4 -4
- package/dist/api/resources/modelVersions/client/Client.js +1 -1
- package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.js +2 -2
- package/dist/api/resources/testSuites/client/Client.js +2 -2
- package/dist/api/types/ChatHistoryInputRequest.d.ts +9 -0
- package/dist/api/types/ChatHistoryInputRequest.js +5 -0
- package/dist/api/types/ErrorExecutePromptResponse.d.ts +8 -0
- package/dist/api/types/ErrorExecutePromptResponse.js +5 -0
- package/dist/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
- package/dist/api/types/ExecutePromptApiErrorResponse.js +5 -0
- package/dist/api/types/ExecutePromptResponse.d.ts +16 -0
- package/dist/api/types/ExecutePromptResponse.js +5 -0
- package/dist/api/types/JsonExecutePromptResponse.d.ts +7 -0
- package/dist/api/types/JsonExecutePromptResponse.js +5 -0
- package/dist/api/types/JsonInputRequest.d.ts +8 -0
- package/dist/api/types/JsonInputRequest.js +5 -0
- package/dist/api/types/PromptDeploymentInputRequest.d.ts +16 -0
- package/dist/api/types/PromptDeploymentInputRequest.js +5 -0
- package/dist/api/types/StringExecutePromptResponse.d.ts +7 -0
- package/dist/api/types/StringExecutePromptResponse.js +5 -0
- package/dist/api/types/StringInputRequest.d.ts +8 -0
- package/dist/api/types/StringInputRequest.js +5 -0
- package/dist/api/types/index.d.ts +9 -0
- package/dist/api/types/index.js +9 -0
- package/dist/serialization/client/requests/ExecutePromptRequest.d.ts +16 -0
- package/dist/serialization/client/requests/ExecutePromptRequest.js +46 -0
- package/dist/serialization/client/requests/index.d.ts +1 -0
- package/dist/serialization/client/requests/index.js +3 -1
- package/dist/serialization/types/ChatHistoryInputRequest.d.ts +13 -0
- package/dist/serialization/types/ChatHistoryInputRequest.js +43 -0
- package/dist/serialization/types/ErrorExecutePromptResponse.d.ts +13 -0
- package/dist/serialization/types/ErrorExecutePromptResponse.js +43 -0
- package/dist/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
- package/dist/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
- package/dist/serialization/types/ExecutePromptResponse.d.ts +19 -0
- package/dist/serialization/types/ExecutePromptResponse.js +49 -0
- package/dist/serialization/types/JsonExecutePromptResponse.d.ts +13 -0
- package/dist/serialization/types/JsonExecutePromptResponse.js +34 -0
- package/dist/serialization/types/JsonInputRequest.d.ts +13 -0
- package/dist/serialization/types/JsonInputRequest.js +34 -0
- package/dist/serialization/types/PromptDeploymentInputRequest.d.ts +19 -0
- package/dist/serialization/types/PromptDeploymentInputRequest.js +49 -0
- package/dist/serialization/types/StringExecutePromptResponse.d.ts +13 -0
- package/dist/serialization/types/StringExecutePromptResponse.js +34 -0
- package/dist/serialization/types/StringInputRequest.d.ts +13 -0
- package/dist/serialization/types/StringInputRequest.js +34 -0
- package/dist/serialization/types/index.d.ts +9 -0
- package/dist/serialization/types/index.js +9 -0
- package/package.json +1 -1
- package/serialization/client/requests/ExecutePromptRequest.d.ts +16 -0
- package/serialization/client/requests/ExecutePromptRequest.js +46 -0
- package/serialization/client/requests/index.d.ts +1 -0
- package/serialization/client/requests/index.js +3 -1
- package/serialization/types/ChatHistoryInputRequest.d.ts +13 -0
- package/serialization/types/ChatHistoryInputRequest.js +43 -0
- package/serialization/types/ErrorExecutePromptResponse.d.ts +13 -0
- package/serialization/types/ErrorExecutePromptResponse.js +43 -0
- package/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
- package/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
- package/serialization/types/ExecutePromptResponse.d.ts +19 -0
- package/serialization/types/ExecutePromptResponse.js +49 -0
- package/serialization/types/JsonExecutePromptResponse.d.ts +13 -0
- package/serialization/types/JsonExecutePromptResponse.js +34 -0
- package/serialization/types/JsonInputRequest.d.ts +13 -0
- package/serialization/types/JsonInputRequest.js +34 -0
- package/serialization/types/PromptDeploymentInputRequest.d.ts +19 -0
- package/serialization/types/PromptDeploymentInputRequest.js +49 -0
- package/serialization/types/StringExecutePromptResponse.d.ts +13 -0
- package/serialization/types/StringExecutePromptResponse.js +34 -0
- package/serialization/types/StringInputRequest.d.ts +13 -0
- package/serialization/types/StringInputRequest.js +34 -0
- package/serialization/types/index.d.ts +9 -0
- package/serialization/types/index.js +9 -0
package/dist/Client.js
CHANGED
|
@@ -56,6 +56,71 @@ class VellumClient {
|
|
|
56
56
|
constructor(_options) {
|
|
57
57
|
this._options = _options;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Executes a deployed Prompt and returns the result.
|
|
61
|
+
* @throws {@link Vellum.BadRequestError}
|
|
62
|
+
* @throws {@link Vellum.ForbiddenError}
|
|
63
|
+
* @throws {@link Vellum.NotFoundError}
|
|
64
|
+
* @throws {@link Vellum.InternalServerError}
|
|
65
|
+
*/
|
|
66
|
+
executePrompt(request, requestOptions) {
|
|
67
|
+
var _a;
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const _response = yield core.fetcher({
|
|
70
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
71
|
+
.default, "v1/execute-prompt"),
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers: {
|
|
74
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
75
|
+
"X-Fern-Language": "JavaScript",
|
|
76
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
77
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
78
|
+
},
|
|
79
|
+
contentType: "application/json",
|
|
80
|
+
body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
});
|
|
84
|
+
if (_response.ok) {
|
|
85
|
+
return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
|
|
86
|
+
unrecognizedObjectKeys: "passthrough",
|
|
87
|
+
allowUnrecognizedUnionMembers: true,
|
|
88
|
+
allowUnrecognizedEnumValues: true,
|
|
89
|
+
breadcrumbsPrefix: ["response"],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (_response.error.reason === "status-code") {
|
|
93
|
+
switch (_response.error.statusCode) {
|
|
94
|
+
case 400:
|
|
95
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
96
|
+
case 403:
|
|
97
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
98
|
+
case 404:
|
|
99
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
100
|
+
case 500:
|
|
101
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
102
|
+
default:
|
|
103
|
+
throw new errors.VellumError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.body,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
switch (_response.error.reason) {
|
|
110
|
+
case "non-json":
|
|
111
|
+
throw new errors.VellumError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.rawBody,
|
|
114
|
+
});
|
|
115
|
+
case "timeout":
|
|
116
|
+
throw new errors.VellumTimeoutError();
|
|
117
|
+
case "unknown":
|
|
118
|
+
throw new errors.VellumError({
|
|
119
|
+
message: _response.error.errorMessage,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
59
124
|
/**
|
|
60
125
|
* Executes a deployed Workflow and streams back its results.
|
|
61
126
|
*/
|
|
@@ -70,7 +135,7 @@ class VellumClient {
|
|
|
70
135
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
71
136
|
"X-Fern-Language": "JavaScript",
|
|
72
137
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
73
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
138
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
74
139
|
},
|
|
75
140
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
76
141
|
unrecognizedObjectKeys: "strip",
|
|
@@ -111,7 +176,7 @@ class VellumClient {
|
|
|
111
176
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
177
|
"X-Fern-Language": "JavaScript",
|
|
113
178
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
179
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
115
180
|
},
|
|
116
181
|
contentType: "application/json",
|
|
117
182
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -131,12 +196,7 @@ class VellumClient {
|
|
|
131
196
|
case 400:
|
|
132
197
|
throw new Vellum.BadRequestError(_response.error.body);
|
|
133
198
|
case 403:
|
|
134
|
-
throw new Vellum.ForbiddenError(
|
|
135
|
-
unrecognizedObjectKeys: "passthrough",
|
|
136
|
-
allowUnrecognizedUnionMembers: true,
|
|
137
|
-
allowUnrecognizedEnumValues: true,
|
|
138
|
-
breadcrumbsPrefix: ["response"],
|
|
139
|
-
}));
|
|
199
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
140
200
|
case 404:
|
|
141
201
|
throw new Vellum.NotFoundError(_response.error.body);
|
|
142
202
|
case 500:
|
|
@@ -179,7 +239,7 @@ class VellumClient {
|
|
|
179
239
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
180
240
|
"X-Fern-Language": "JavaScript",
|
|
181
241
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
182
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
242
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
183
243
|
},
|
|
184
244
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
185
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -217,7 +277,7 @@ class VellumClient {
|
|
|
217
277
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
218
278
|
"X-Fern-Language": "JavaScript",
|
|
219
279
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
220
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
280
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
221
281
|
},
|
|
222
282
|
contentType: "application/json",
|
|
223
283
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -281,7 +341,7 @@ class VellumClient {
|
|
|
281
341
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
282
342
|
"X-Fern-Language": "JavaScript",
|
|
283
343
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
284
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
344
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
285
345
|
},
|
|
286
346
|
contentType: "application/json",
|
|
287
347
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -339,7 +399,7 @@ class VellumClient {
|
|
|
339
399
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
340
400
|
"X-Fern-Language": "JavaScript",
|
|
341
401
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
342
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
402
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
343
403
|
},
|
|
344
404
|
contentType: "application/json",
|
|
345
405
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../..";
|
|
5
|
+
export interface ExecutePromptRequest {
|
|
6
|
+
inputs: Vellum.PromptDeploymentInputRequest[];
|
|
7
|
+
/** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
|
|
8
|
+
promptDeploymentId?: string;
|
|
9
|
+
/** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
|
|
10
|
+
promptDeploymentName?: string;
|
|
11
|
+
/** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
|
|
12
|
+
releaseTag?: string;
|
|
13
|
+
externalId?: string;
|
|
14
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ExecutePromptRequest } from "./ExecutePromptRequest";
|
|
1
2
|
export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
|
|
2
3
|
export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
3
4
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as errors from "../../errors";
|
|
5
|
-
import * as Vellum from "..";
|
|
6
5
|
export declare class ForbiddenError extends errors.VellumError {
|
|
7
|
-
constructor(body
|
|
6
|
+
constructor(body?: unknown);
|
|
8
7
|
}
|
|
@@ -62,7 +62,7 @@ class Deployments {
|
|
|
62
62
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
65
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -62,7 +62,7 @@ class DocumentIndexes {
|
|
|
62
62
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
65
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
|
|
@@ -114,7 +114,7 @@ class DocumentIndexes {
|
|
|
114
114
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
115
115
|
"X-Fern-Language": "JavaScript",
|
|
116
116
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
117
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
117
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
118
118
|
},
|
|
119
119
|
contentType: "application/json",
|
|
120
120
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -78,7 +78,7 @@ class Documents {
|
|
|
78
78
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
79
79
|
"X-Fern-Language": "JavaScript",
|
|
80
80
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
81
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
81
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
82
82
|
},
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
queryParameters: _queryParams,
|
|
@@ -125,7 +125,7 @@ class Documents {
|
|
|
125
125
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
126
126
|
"X-Fern-Language": "JavaScript",
|
|
127
127
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
128
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
128
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
129
129
|
},
|
|
130
130
|
contentType: "application/json",
|
|
131
131
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -169,7 +169,7 @@ class Documents {
|
|
|
169
169
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
170
170
|
"X-Fern-Language": "JavaScript",
|
|
171
171
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
172
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
172
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
173
173
|
},
|
|
174
174
|
contentType: "application/json",
|
|
175
175
|
body: yield serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
|
|
@@ -245,7 +245,7 @@ class Documents {
|
|
|
245
245
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
246
246
|
"X-Fern-Language": "JavaScript",
|
|
247
247
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
248
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
248
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
249
249
|
"Content-Length": (yield core.getFormDataContentLength(_request)).toString(),
|
|
250
250
|
},
|
|
251
251
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
@@ -62,7 +62,7 @@ class ModelVersions {
|
|
|
62
62
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
65
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -69,7 +69,7 @@ class RegisteredPrompts {
|
|
|
69
69
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
70
70
|
"X-Fern-Language": "JavaScript",
|
|
71
71
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
72
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
72
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
73
73
|
},
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
body: yield serializers.RegisterPromptRequestRequest.jsonOrThrow(request, {
|
|
@@ -68,7 +68,7 @@ class Sandboxes {
|
|
|
68
68
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
69
69
|
"X-Fern-Language": "JavaScript",
|
|
70
70
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
71
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
71
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
72
72
|
},
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
body: yield serializers.UpsertSandboxScenarioRequestRequest.jsonOrThrow(request, {
|
|
@@ -120,7 +120,7 @@ class Sandboxes {
|
|
|
120
120
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
121
121
|
"X-Fern-Language": "JavaScript",
|
|
122
122
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
123
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
123
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
124
124
|
},
|
|
125
125
|
contentType: "application/json",
|
|
126
126
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -68,7 +68,7 @@ class TestSuites {
|
|
|
68
68
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
69
69
|
"X-Fern-Language": "JavaScript",
|
|
70
70
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
71
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
71
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
72
72
|
},
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
body: yield serializers.TestSuiteTestCaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -119,7 +119,7 @@ class TestSuites {
|
|
|
119
119
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
120
120
|
"X-Fern-Language": "JavaScript",
|
|
121
121
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
122
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
122
|
+
"X-Fern-SDK-Version": "v0.1.5",
|
|
123
123
|
},
|
|
124
124
|
contentType: "application/json",
|
|
125
125
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface ChatHistoryInputRequest {
|
|
6
|
+
/** The variable's name, as defined in the deployment. */
|
|
7
|
+
name: string;
|
|
8
|
+
value: Vellum.ChatMessageRequest[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type ExecutePromptResponse = Vellum.ExecutePromptResponse.Error_ | Vellum.ExecutePromptResponse.Json | Vellum.ExecutePromptResponse.String;
|
|
6
|
+
export declare namespace ExecutePromptResponse {
|
|
7
|
+
interface Error_ extends Vellum.ErrorExecutePromptResponse {
|
|
8
|
+
type: "ERROR";
|
|
9
|
+
}
|
|
10
|
+
interface Json extends Vellum.JsonExecutePromptResponse {
|
|
11
|
+
type: "JSON";
|
|
12
|
+
}
|
|
13
|
+
interface String extends Vellum.StringExecutePromptResponse {
|
|
14
|
+
type: "STRING";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type PromptDeploymentInputRequest = Vellum.PromptDeploymentInputRequest.String | Vellum.PromptDeploymentInputRequest.Json | Vellum.PromptDeploymentInputRequest.ChatHistory;
|
|
6
|
+
export declare namespace PromptDeploymentInputRequest {
|
|
7
|
+
interface String extends Vellum.StringInputRequest {
|
|
8
|
+
type: "STRING";
|
|
9
|
+
}
|
|
10
|
+
interface Json extends Vellum.JsonInputRequest {
|
|
11
|
+
type: "JSON";
|
|
12
|
+
}
|
|
13
|
+
interface ChatHistory extends Vellum.ChatHistoryInputRequest {
|
|
14
|
+
type: "CHAT_HISTORY";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./ApiNodeResult";
|
|
2
2
|
export * from "./ApiNodeResultData";
|
|
3
3
|
export * from "./BlockTypeEnum";
|
|
4
|
+
export * from "./ChatHistoryInputRequest";
|
|
4
5
|
export * from "./ChatMessage";
|
|
5
6
|
export * from "./ChatMessageRequest";
|
|
6
7
|
export * from "./ChatMessageRole";
|
|
@@ -15,8 +16,11 @@ export * from "./DocumentRead";
|
|
|
15
16
|
export * from "./DocumentStatus";
|
|
16
17
|
export * from "./EnrichedNormalizedCompletion";
|
|
17
18
|
export * from "./EnvironmentEnum";
|
|
19
|
+
export * from "./ErrorExecutePromptResponse";
|
|
18
20
|
export * from "./EvaluationParams";
|
|
19
21
|
export * from "./EvaluationParamsRequest";
|
|
22
|
+
export * from "./ExecutePromptApiErrorResponse";
|
|
23
|
+
export * from "./ExecutePromptResponse";
|
|
20
24
|
export * from "./ExecuteWorkflowStreamErrorResponse";
|
|
21
25
|
export * from "./FinishReasonEnum";
|
|
22
26
|
export * from "./GenerateErrorResponse";
|
|
@@ -30,6 +34,8 @@ export * from "./GenerateStreamResponse";
|
|
|
30
34
|
export * from "./GenerateStreamResult";
|
|
31
35
|
export * from "./GenerateStreamResultData";
|
|
32
36
|
export * from "./IndexingStateEnum";
|
|
37
|
+
export * from "./JsonExecutePromptResponse";
|
|
38
|
+
export * from "./JsonInputRequest";
|
|
33
39
|
export * from "./LogicalOperator";
|
|
34
40
|
export * from "./LogprobsEnum";
|
|
35
41
|
export * from "./MetadataFilterConfigRequest";
|
|
@@ -53,6 +59,7 @@ export * from "./NormalizedTokenLogProbs";
|
|
|
53
59
|
export * from "./PaginatedSlimDocumentList";
|
|
54
60
|
export * from "./ProcessingFailureReasonEnum";
|
|
55
61
|
export * from "./ProcessingStateEnum";
|
|
62
|
+
export * from "./PromptDeploymentInputRequest";
|
|
56
63
|
export * from "./PromptNodeResult";
|
|
57
64
|
export * from "./PromptNodeResultData";
|
|
58
65
|
export * from "./PromptTemplateBlock";
|
|
@@ -91,6 +98,8 @@ export * from "./SearchResultMergingRequest";
|
|
|
91
98
|
export * from "./SearchResultRequest";
|
|
92
99
|
export * from "./SearchWeightsRequest";
|
|
93
100
|
export * from "./SlimDocument";
|
|
101
|
+
export * from "./StringExecutePromptResponse";
|
|
102
|
+
export * from "./StringInputRequest";
|
|
94
103
|
export * from "./SubmitCompletionActualRequest";
|
|
95
104
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
96
105
|
export * from "./SubmitWorkflowExecutionActualRequest";
|
package/dist/api/types/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ApiNodeResult"), exports);
|
|
18
18
|
__exportStar(require("./ApiNodeResultData"), exports);
|
|
19
19
|
__exportStar(require("./BlockTypeEnum"), exports);
|
|
20
|
+
__exportStar(require("./ChatHistoryInputRequest"), exports);
|
|
20
21
|
__exportStar(require("./ChatMessage"), exports);
|
|
21
22
|
__exportStar(require("./ChatMessageRequest"), exports);
|
|
22
23
|
__exportStar(require("./ChatMessageRole"), exports);
|
|
@@ -31,8 +32,11 @@ __exportStar(require("./DocumentRead"), exports);
|
|
|
31
32
|
__exportStar(require("./DocumentStatus"), exports);
|
|
32
33
|
__exportStar(require("./EnrichedNormalizedCompletion"), exports);
|
|
33
34
|
__exportStar(require("./EnvironmentEnum"), exports);
|
|
35
|
+
__exportStar(require("./ErrorExecutePromptResponse"), exports);
|
|
34
36
|
__exportStar(require("./EvaluationParams"), exports);
|
|
35
37
|
__exportStar(require("./EvaluationParamsRequest"), exports);
|
|
38
|
+
__exportStar(require("./ExecutePromptApiErrorResponse"), exports);
|
|
39
|
+
__exportStar(require("./ExecutePromptResponse"), exports);
|
|
36
40
|
__exportStar(require("./ExecuteWorkflowStreamErrorResponse"), exports);
|
|
37
41
|
__exportStar(require("./FinishReasonEnum"), exports);
|
|
38
42
|
__exportStar(require("./GenerateErrorResponse"), exports);
|
|
@@ -46,6 +50,8 @@ __exportStar(require("./GenerateStreamResponse"), exports);
|
|
|
46
50
|
__exportStar(require("./GenerateStreamResult"), exports);
|
|
47
51
|
__exportStar(require("./GenerateStreamResultData"), exports);
|
|
48
52
|
__exportStar(require("./IndexingStateEnum"), exports);
|
|
53
|
+
__exportStar(require("./JsonExecutePromptResponse"), exports);
|
|
54
|
+
__exportStar(require("./JsonInputRequest"), exports);
|
|
49
55
|
__exportStar(require("./LogicalOperator"), exports);
|
|
50
56
|
__exportStar(require("./LogprobsEnum"), exports);
|
|
51
57
|
__exportStar(require("./MetadataFilterConfigRequest"), exports);
|
|
@@ -69,6 +75,7 @@ __exportStar(require("./NormalizedTokenLogProbs"), exports);
|
|
|
69
75
|
__exportStar(require("./PaginatedSlimDocumentList"), exports);
|
|
70
76
|
__exportStar(require("./ProcessingFailureReasonEnum"), exports);
|
|
71
77
|
__exportStar(require("./ProcessingStateEnum"), exports);
|
|
78
|
+
__exportStar(require("./PromptDeploymentInputRequest"), exports);
|
|
72
79
|
__exportStar(require("./PromptNodeResult"), exports);
|
|
73
80
|
__exportStar(require("./PromptNodeResultData"), exports);
|
|
74
81
|
__exportStar(require("./PromptTemplateBlock"), exports);
|
|
@@ -107,6 +114,8 @@ __exportStar(require("./SearchResultMergingRequest"), exports);
|
|
|
107
114
|
__exportStar(require("./SearchResultRequest"), exports);
|
|
108
115
|
__exportStar(require("./SearchWeightsRequest"), exports);
|
|
109
116
|
__exportStar(require("./SlimDocument"), exports);
|
|
117
|
+
__exportStar(require("./StringExecutePromptResponse"), exports);
|
|
118
|
+
__exportStar(require("./StringInputRequest"), exports);
|
|
110
119
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
111
120
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
112
121
|
__exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../..";
|
|
5
|
+
import * as Vellum from "../../../api";
|
|
6
|
+
import * as core from "../../../core";
|
|
7
|
+
export declare const ExecutePromptRequest: core.serialization.Schema<serializers.ExecutePromptRequest.Raw, Vellum.ExecutePromptRequest>;
|
|
8
|
+
export declare namespace ExecutePromptRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
inputs: serializers.PromptDeploymentInputRequest.Raw[];
|
|
11
|
+
prompt_deployment_id?: string | null;
|
|
12
|
+
prompt_deployment_name?: string | null;
|
|
13
|
+
release_tag?: string | null;
|
|
14
|
+
external_id?: string | null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.ExecutePromptRequest = void 0;
|
|
39
|
+
const core = __importStar(require("../../../core"));
|
|
40
|
+
exports.ExecutePromptRequest = core.serialization.object({
|
|
41
|
+
inputs: core.serialization.list(core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../..")))).PromptDeploymentInputRequest; }))),
|
|
42
|
+
promptDeploymentId: core.serialization.property("prompt_deployment_id", core.serialization.string().optional()),
|
|
43
|
+
promptDeploymentName: core.serialization.property("prompt_deployment_name", core.serialization.string().optional()),
|
|
44
|
+
releaseTag: core.serialization.property("release_tag", core.serialization.string().optional()),
|
|
45
|
+
externalId: core.serialization.property("external_id", core.serialization.string().optional()),
|
|
46
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ExecutePromptRequest } from "./ExecutePromptRequest";
|
|
1
2
|
export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
|
|
2
3
|
export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
3
4
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|