vellum-ai 0.2.0 → 0.2.1
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 +7 -0
- package/Client.js +70 -8
- package/api/client/requests/ExecuteWorkflowRequest.d.ts +16 -0
- package/api/client/requests/ExecuteWorkflowRequest.js +5 -0
- package/api/client/requests/index.d.ts +1 -0
- package/api/resources/deployments/client/Client.js +3 -3
- 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/resources/workflowDeployments/client/Client.js +1 -1
- package/api/types/ArrayEnum.d.ts +4 -0
- package/api/types/ArrayEnum.js +5 -0
- package/api/types/ArrayVariableValue.d.ts +7 -0
- package/api/types/ArrayVariableValue.js +5 -0
- package/api/types/ChatHistoryEnum.d.ts +4 -0
- package/api/types/ChatHistoryEnum.js +5 -0
- package/api/types/ChatHistoryVariableValue.d.ts +7 -0
- package/api/types/ChatHistoryVariableValue.js +5 -0
- package/api/types/ErrorEnum.d.ts +4 -0
- package/api/types/ErrorEnum.js +5 -0
- package/api/types/ExecuteWorkflowErrorResponse.d.ts +7 -0
- package/api/types/ExecuteWorkflowErrorResponse.js +5 -0
- package/api/types/ExecuteWorkflowResponse.d.ts +10 -0
- package/api/types/ExecuteWorkflowResponse.js +5 -0
- package/api/types/ExecuteWorkflowWorkflowResultEvent.d.ts +13 -0
- package/api/types/ExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/api/types/FulfilledExecuteWorkflowWorkflowResultEvent.d.ts +12 -0
- package/api/types/FulfilledExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/api/types/JsonEnum.d.ts +4 -0
- package/api/types/JsonEnum.js +5 -0
- package/api/types/NumberEnum.d.ts +4 -0
- package/api/types/NumberEnum.js +5 -0
- package/api/types/NumberVariableValue.d.ts +6 -0
- package/api/types/NumberVariableValue.js +5 -0
- package/api/types/RejectedExecuteWorkflowWorkflowResultEvent.d.ts +12 -0
- package/api/types/RejectedExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/api/types/ScenarioInputTypeEnum.d.ts +2 -2
- package/api/types/SearchResultsEnum.d.ts +4 -0
- package/api/types/SearchResultsEnum.js +5 -0
- package/api/types/SearchResultsVariableValue.d.ts +7 -0
- package/api/types/SearchResultsVariableValue.js +5 -0
- package/api/types/VariableValue.d.ts +31 -0
- package/api/types/VariableValue.js +5 -0
- package/api/types/WorkflowOutput.d.ts +34 -0
- package/api/types/WorkflowOutput.js +5 -0
- package/api/types/WorkflowOutputArray.d.ts +13 -0
- package/api/types/WorkflowOutputArray.js +5 -0
- package/api/types/WorkflowOutputChatHistory.d.ts +13 -0
- package/api/types/WorkflowOutputChatHistory.js +5 -0
- package/api/types/WorkflowOutputError.d.ts +13 -0
- package/api/types/WorkflowOutputError.js +5 -0
- package/api/types/WorkflowOutputFunctionCall.d.ts +13 -0
- package/api/types/WorkflowOutputFunctionCall.js +5 -0
- package/api/types/WorkflowOutputImage.d.ts +13 -0
- package/api/types/WorkflowOutputImage.js +5 -0
- package/api/types/WorkflowOutputJson.d.ts +12 -0
- package/api/types/WorkflowOutputJson.js +5 -0
- package/api/types/WorkflowOutputNumber.d.ts +12 -0
- package/api/types/WorkflowOutputNumber.js +5 -0
- package/api/types/WorkflowOutputSearchResults.d.ts +13 -0
- package/api/types/WorkflowOutputSearchResults.js +5 -0
- package/api/types/WorkflowOutputString.d.ts +12 -0
- package/api/types/WorkflowOutputString.js +5 -0
- package/api/types/WorkflowResultEvent.d.ts +1 -0
- package/api/types/index.d.ts +26 -0
- package/api/types/index.js +26 -0
- package/dist/Client.d.ts +7 -0
- package/dist/Client.js +70 -8
- package/dist/api/client/requests/ExecuteWorkflowRequest.d.ts +16 -0
- package/dist/api/client/requests/ExecuteWorkflowRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/resources/deployments/client/Client.js +3 -3
- 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/resources/workflowDeployments/client/Client.js +1 -1
- package/dist/api/types/ArrayEnum.d.ts +4 -0
- package/dist/api/types/ArrayEnum.js +5 -0
- package/dist/api/types/ArrayVariableValue.d.ts +7 -0
- package/dist/api/types/ArrayVariableValue.js +5 -0
- package/dist/api/types/ChatHistoryEnum.d.ts +4 -0
- package/dist/api/types/ChatHistoryEnum.js +5 -0
- package/dist/api/types/ChatHistoryVariableValue.d.ts +7 -0
- package/dist/api/types/ChatHistoryVariableValue.js +5 -0
- package/dist/api/types/ErrorEnum.d.ts +4 -0
- package/dist/api/types/ErrorEnum.js +5 -0
- package/dist/api/types/ExecuteWorkflowErrorResponse.d.ts +7 -0
- package/dist/api/types/ExecuteWorkflowErrorResponse.js +5 -0
- package/dist/api/types/ExecuteWorkflowResponse.d.ts +10 -0
- package/dist/api/types/ExecuteWorkflowResponse.js +5 -0
- package/dist/api/types/ExecuteWorkflowWorkflowResultEvent.d.ts +13 -0
- package/dist/api/types/ExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/dist/api/types/FulfilledExecuteWorkflowWorkflowResultEvent.d.ts +12 -0
- package/dist/api/types/FulfilledExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/dist/api/types/JsonEnum.d.ts +4 -0
- package/dist/api/types/JsonEnum.js +5 -0
- package/dist/api/types/NumberEnum.d.ts +4 -0
- package/dist/api/types/NumberEnum.js +5 -0
- package/dist/api/types/NumberVariableValue.d.ts +6 -0
- package/dist/api/types/NumberVariableValue.js +5 -0
- package/dist/api/types/RejectedExecuteWorkflowWorkflowResultEvent.d.ts +12 -0
- package/dist/api/types/RejectedExecuteWorkflowWorkflowResultEvent.js +5 -0
- package/dist/api/types/ScenarioInputTypeEnum.d.ts +2 -2
- package/dist/api/types/SearchResultsEnum.d.ts +4 -0
- package/dist/api/types/SearchResultsEnum.js +5 -0
- package/dist/api/types/SearchResultsVariableValue.d.ts +7 -0
- package/dist/api/types/SearchResultsVariableValue.js +5 -0
- package/dist/api/types/VariableValue.d.ts +31 -0
- package/dist/api/types/VariableValue.js +5 -0
- package/dist/api/types/WorkflowOutput.d.ts +34 -0
- package/dist/api/types/WorkflowOutput.js +5 -0
- package/dist/api/types/WorkflowOutputArray.d.ts +13 -0
- package/dist/api/types/WorkflowOutputArray.js +5 -0
- package/dist/api/types/WorkflowOutputChatHistory.d.ts +13 -0
- package/dist/api/types/WorkflowOutputChatHistory.js +5 -0
- package/dist/api/types/WorkflowOutputError.d.ts +13 -0
- package/dist/api/types/WorkflowOutputError.js +5 -0
- package/dist/api/types/WorkflowOutputFunctionCall.d.ts +13 -0
- package/dist/api/types/WorkflowOutputFunctionCall.js +5 -0
- package/dist/api/types/WorkflowOutputImage.d.ts +13 -0
- package/dist/api/types/WorkflowOutputImage.js +5 -0
- package/dist/api/types/WorkflowOutputJson.d.ts +12 -0
- package/dist/api/types/WorkflowOutputJson.js +5 -0
- package/dist/api/types/WorkflowOutputNumber.d.ts +12 -0
- package/dist/api/types/WorkflowOutputNumber.js +5 -0
- package/dist/api/types/WorkflowOutputSearchResults.d.ts +13 -0
- package/dist/api/types/WorkflowOutputSearchResults.js +5 -0
- package/dist/api/types/WorkflowOutputString.d.ts +12 -0
- package/dist/api/types/WorkflowOutputString.js +5 -0
- package/dist/api/types/WorkflowResultEvent.d.ts +1 -0
- package/dist/api/types/index.d.ts +26 -0
- package/dist/api/types/index.js +26 -0
- package/dist/serialization/client/requests/ExecuteWorkflowRequest.d.ts +16 -0
- package/dist/serialization/client/requests/ExecuteWorkflowRequest.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/ArrayEnum.d.ts +10 -0
- package/dist/serialization/types/ArrayEnum.js +31 -0
- package/dist/serialization/types/ArrayVariableValue.d.ts +12 -0
- package/dist/serialization/types/ArrayVariableValue.js +42 -0
- package/dist/serialization/types/ChatHistoryEnum.d.ts +10 -0
- package/dist/serialization/types/ChatHistoryEnum.js +31 -0
- package/dist/serialization/types/ChatHistoryVariableValue.d.ts +12 -0
- package/dist/serialization/types/ChatHistoryVariableValue.js +44 -0
- package/dist/serialization/types/ErrorEnum.d.ts +10 -0
- package/dist/serialization/types/ErrorEnum.js +31 -0
- package/dist/serialization/types/ExecuteWorkflowErrorResponse.d.ts +12 -0
- package/dist/serialization/types/ExecuteWorkflowErrorResponse.js +33 -0
- package/dist/serialization/types/ExecuteWorkflowResponse.d.ts +15 -0
- package/dist/serialization/types/ExecuteWorkflowResponse.js +45 -0
- package/dist/serialization/types/ExecuteWorkflowWorkflowResultEvent.d.ts +16 -0
- package/dist/serialization/types/ExecuteWorkflowWorkflowResultEvent.js +48 -0
- package/dist/serialization/types/FulfilledExecuteWorkflowWorkflowResultEvent.d.ts +14 -0
- package/dist/serialization/types/FulfilledExecuteWorkflowWorkflowResultEvent.js +44 -0
- package/dist/serialization/types/JsonEnum.d.ts +10 -0
- package/dist/serialization/types/JsonEnum.js +31 -0
- package/dist/serialization/types/NumberEnum.d.ts +10 -0
- package/dist/serialization/types/NumberEnum.js +31 -0
- package/dist/serialization/types/NumberVariableValue.d.ts +12 -0
- package/dist/serialization/types/NumberVariableValue.js +33 -0
- package/dist/serialization/types/RejectedExecuteWorkflowWorkflowResultEvent.d.ts +14 -0
- package/dist/serialization/types/RejectedExecuteWorkflowWorkflowResultEvent.js +44 -0
- package/dist/serialization/types/SearchResultsEnum.d.ts +10 -0
- package/dist/serialization/types/SearchResultsEnum.js +31 -0
- package/dist/serialization/types/SearchResultsVariableValue.d.ts +12 -0
- package/dist/serialization/types/SearchResultsVariableValue.js +44 -0
- package/dist/serialization/types/VariableValue.d.ts +34 -0
- package/dist/serialization/types/VariableValue.js +54 -0
- package/dist/serialization/types/WorkflowOutput.d.ts +37 -0
- package/dist/serialization/types/WorkflowOutput.js +55 -0
- package/dist/serialization/types/WorkflowOutputArray.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputArray.js +44 -0
- package/dist/serialization/types/WorkflowOutputChatHistory.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputChatHistory.js +44 -0
- package/dist/serialization/types/WorkflowOutputError.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputError.js +44 -0
- package/dist/serialization/types/WorkflowOutputFunctionCall.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputFunctionCall.js +44 -0
- package/dist/serialization/types/WorkflowOutputImage.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputImage.js +44 -0
- package/dist/serialization/types/WorkflowOutputJson.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputJson.js +35 -0
- package/dist/serialization/types/WorkflowOutputNumber.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputNumber.js +35 -0
- package/dist/serialization/types/WorkflowOutputSearchResults.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputSearchResults.js +44 -0
- package/dist/serialization/types/WorkflowOutputString.d.ts +14 -0
- package/dist/serialization/types/WorkflowOutputString.js +35 -0
- package/dist/serialization/types/WorkflowResultEvent.d.ts +1 -0
- package/dist/serialization/types/WorkflowResultEvent.js +3 -0
- package/dist/serialization/types/index.d.ts +26 -0
- package/dist/serialization/types/index.js +26 -0
- package/package.json +1 -1
- package/serialization/client/requests/ExecuteWorkflowRequest.d.ts +16 -0
- package/serialization/client/requests/ExecuteWorkflowRequest.js +46 -0
- package/serialization/client/requests/index.d.ts +1 -0
- package/serialization/client/requests/index.js +3 -1
- package/serialization/types/ArrayEnum.d.ts +10 -0
- package/serialization/types/ArrayEnum.js +31 -0
- package/serialization/types/ArrayVariableValue.d.ts +12 -0
- package/serialization/types/ArrayVariableValue.js +42 -0
- package/serialization/types/ChatHistoryEnum.d.ts +10 -0
- package/serialization/types/ChatHistoryEnum.js +31 -0
- package/serialization/types/ChatHistoryVariableValue.d.ts +12 -0
- package/serialization/types/ChatHistoryVariableValue.js +44 -0
- package/serialization/types/ErrorEnum.d.ts +10 -0
- package/serialization/types/ErrorEnum.js +31 -0
- package/serialization/types/ExecuteWorkflowErrorResponse.d.ts +12 -0
- package/serialization/types/ExecuteWorkflowErrorResponse.js +33 -0
- package/serialization/types/ExecuteWorkflowResponse.d.ts +15 -0
- package/serialization/types/ExecuteWorkflowResponse.js +45 -0
- package/serialization/types/ExecuteWorkflowWorkflowResultEvent.d.ts +16 -0
- package/serialization/types/ExecuteWorkflowWorkflowResultEvent.js +48 -0
- package/serialization/types/FulfilledExecuteWorkflowWorkflowResultEvent.d.ts +14 -0
- package/serialization/types/FulfilledExecuteWorkflowWorkflowResultEvent.js +44 -0
- package/serialization/types/JsonEnum.d.ts +10 -0
- package/serialization/types/JsonEnum.js +31 -0
- package/serialization/types/NumberEnum.d.ts +10 -0
- package/serialization/types/NumberEnum.js +31 -0
- package/serialization/types/NumberVariableValue.d.ts +12 -0
- package/serialization/types/NumberVariableValue.js +33 -0
- package/serialization/types/RejectedExecuteWorkflowWorkflowResultEvent.d.ts +14 -0
- package/serialization/types/RejectedExecuteWorkflowWorkflowResultEvent.js +44 -0
- package/serialization/types/SearchResultsEnum.d.ts +10 -0
- package/serialization/types/SearchResultsEnum.js +31 -0
- package/serialization/types/SearchResultsVariableValue.d.ts +12 -0
- package/serialization/types/SearchResultsVariableValue.js +44 -0
- package/serialization/types/VariableValue.d.ts +34 -0
- package/serialization/types/VariableValue.js +54 -0
- package/serialization/types/WorkflowOutput.d.ts +37 -0
- package/serialization/types/WorkflowOutput.js +55 -0
- package/serialization/types/WorkflowOutputArray.d.ts +14 -0
- package/serialization/types/WorkflowOutputArray.js +44 -0
- package/serialization/types/WorkflowOutputChatHistory.d.ts +14 -0
- package/serialization/types/WorkflowOutputChatHistory.js +44 -0
- package/serialization/types/WorkflowOutputError.d.ts +14 -0
- package/serialization/types/WorkflowOutputError.js +44 -0
- package/serialization/types/WorkflowOutputFunctionCall.d.ts +14 -0
- package/serialization/types/WorkflowOutputFunctionCall.js +44 -0
- package/serialization/types/WorkflowOutputImage.d.ts +14 -0
- package/serialization/types/WorkflowOutputImage.js +44 -0
- package/serialization/types/WorkflowOutputJson.d.ts +14 -0
- package/serialization/types/WorkflowOutputJson.js +35 -0
- package/serialization/types/WorkflowOutputNumber.d.ts +14 -0
- package/serialization/types/WorkflowOutputNumber.js +35 -0
- package/serialization/types/WorkflowOutputSearchResults.d.ts +14 -0
- package/serialization/types/WorkflowOutputSearchResults.js +44 -0
- package/serialization/types/WorkflowOutputString.d.ts +14 -0
- package/serialization/types/WorkflowOutputString.js +35 -0
- package/serialization/types/WorkflowResultEvent.d.ts +1 -0
- package/serialization/types/WorkflowResultEvent.js +3 -0
- package/serialization/types/index.d.ts +26 -0
- package/serialization/types/index.js +26 -0
package/Client.d.ts
CHANGED
|
@@ -43,6 +43,13 @@ export declare class VellumClient {
|
|
|
43
43
|
* In the meantime, we recommend still using the `/generate-stream` endpoint for prompts with function calling
|
|
44
44
|
*/
|
|
45
45
|
executePromptStream(request: Vellum.ExecutePromptStreamRequest, requestOptions?: VellumClient.RequestOptions): Promise<core.Stream<Vellum.ExecutePromptEvent>>;
|
|
46
|
+
/**
|
|
47
|
+
* Executes a deployed Workflow and returns its outputs.
|
|
48
|
+
* @throws {@link Vellum.BadRequestError}
|
|
49
|
+
* @throws {@link Vellum.NotFoundError}
|
|
50
|
+
* @throws {@link Vellum.InternalServerError}
|
|
51
|
+
*/
|
|
52
|
+
executeWorkflow(request: Vellum.ExecuteWorkflowRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.ExecuteWorkflowResponse>;
|
|
46
53
|
/**
|
|
47
54
|
* Executes a deployed Workflow and streams back its results.
|
|
48
55
|
*/
|
package/Client.js
CHANGED
|
@@ -78,7 +78,7 @@ class VellumClient {
|
|
|
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.2.
|
|
81
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
82
82
|
},
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -142,7 +142,7 @@ class VellumClient {
|
|
|
142
142
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
143
143
|
"X-Fern-Language": "JavaScript",
|
|
144
144
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
145
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
145
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
146
146
|
},
|
|
147
147
|
contentType: "application/json",
|
|
148
148
|
body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
|
|
@@ -198,6 +198,68 @@ class VellumClient {
|
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Executes a deployed Workflow and returns its outputs.
|
|
203
|
+
* @throws {@link Vellum.BadRequestError}
|
|
204
|
+
* @throws {@link Vellum.NotFoundError}
|
|
205
|
+
* @throws {@link Vellum.InternalServerError}
|
|
206
|
+
*/
|
|
207
|
+
executeWorkflow(request, requestOptions) {
|
|
208
|
+
var _a;
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const _response = yield core.fetcher({
|
|
211
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
212
|
+
.default, "v1/execute-workflow"),
|
|
213
|
+
method: "POST",
|
|
214
|
+
headers: {
|
|
215
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
216
|
+
"X-Fern-Language": "JavaScript",
|
|
217
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
218
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
219
|
+
},
|
|
220
|
+
contentType: "application/json",
|
|
221
|
+
body: yield serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
222
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
223
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
224
|
+
});
|
|
225
|
+
if (_response.ok) {
|
|
226
|
+
return yield serializers.ExecuteWorkflowResponse.parseOrThrow(_response.body, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
breadcrumbsPrefix: ["response"],
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
if (_response.error.reason === "status-code") {
|
|
234
|
+
switch (_response.error.statusCode) {
|
|
235
|
+
case 400:
|
|
236
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
237
|
+
case 404:
|
|
238
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
239
|
+
case 500:
|
|
240
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
241
|
+
default:
|
|
242
|
+
throw new errors.VellumError({
|
|
243
|
+
statusCode: _response.error.statusCode,
|
|
244
|
+
body: _response.error.body,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
switch (_response.error.reason) {
|
|
249
|
+
case "non-json":
|
|
250
|
+
throw new errors.VellumError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.rawBody,
|
|
253
|
+
});
|
|
254
|
+
case "timeout":
|
|
255
|
+
throw new errors.VellumTimeoutError();
|
|
256
|
+
case "unknown":
|
|
257
|
+
throw new errors.VellumError({
|
|
258
|
+
message: _response.error.errorMessage,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
201
263
|
/**
|
|
202
264
|
* Executes a deployed Workflow and streams back its results.
|
|
203
265
|
*/
|
|
@@ -212,7 +274,7 @@ class VellumClient {
|
|
|
212
274
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
213
275
|
"X-Fern-Language": "JavaScript",
|
|
214
276
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
215
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
277
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
216
278
|
},
|
|
217
279
|
contentType: "application/json",
|
|
218
280
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
@@ -301,7 +363,7 @@ class VellumClient {
|
|
|
301
363
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
302
364
|
"X-Fern-Language": "JavaScript",
|
|
303
365
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
304
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
366
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
305
367
|
},
|
|
306
368
|
contentType: "application/json",
|
|
307
369
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -364,7 +426,7 @@ class VellumClient {
|
|
|
364
426
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
365
427
|
"X-Fern-Language": "JavaScript",
|
|
366
428
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
367
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
429
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
368
430
|
},
|
|
369
431
|
contentType: "application/json",
|
|
370
432
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -456,7 +518,7 @@ class VellumClient {
|
|
|
456
518
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
457
519
|
"X-Fern-Language": "JavaScript",
|
|
458
520
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
459
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
521
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
460
522
|
},
|
|
461
523
|
contentType: "application/json",
|
|
462
524
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -525,7 +587,7 @@ class VellumClient {
|
|
|
525
587
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
526
588
|
"X-Fern-Language": "JavaScript",
|
|
527
589
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
528
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
590
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
529
591
|
},
|
|
530
592
|
contentType: "application/json",
|
|
531
593
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -588,7 +650,7 @@ class VellumClient {
|
|
|
588
650
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
589
651
|
"X-Fern-Language": "JavaScript",
|
|
590
652
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
591
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
653
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
592
654
|
},
|
|
593
655
|
contentType: "application/json",
|
|
594
656
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -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 interface ExecuteWorkflowRequest {
|
|
6
|
+
/** The ID of the Workflow Deployment. Must provide either this or workflow_deployment_name. */
|
|
7
|
+
workflowDeploymentId?: string;
|
|
8
|
+
/** The name of the Workflow Deployment. Must provide either this or workflow_deployment_id. */
|
|
9
|
+
workflowDeploymentName?: string;
|
|
10
|
+
/** Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment */
|
|
11
|
+
releaseTag?: string;
|
|
12
|
+
/** The list of inputs defined in the Workflow's Deployment with their corresponding values. */
|
|
13
|
+
inputs: Vellum.WorkflowRequestInputRequest[];
|
|
14
|
+
/** Optionally include a unique identifier for monitoring purposes. */
|
|
15
|
+
externalId?: string;
|
|
16
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ExecutePromptRequest } from "./ExecutePromptRequest";
|
|
2
2
|
export { ExecutePromptStreamRequest } from "./ExecutePromptStreamRequest";
|
|
3
|
+
export { ExecuteWorkflowRequest } from "./ExecuteWorkflowRequest";
|
|
3
4
|
export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
|
|
4
5
|
export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
5
6
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|
|
@@ -73,7 +73,7 @@ class Deployments {
|
|
|
73
73
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
74
74
|
"X-Fern-Language": "JavaScript",
|
|
75
75
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
76
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
76
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
77
77
|
},
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
queryParameters: _queryParams,
|
|
@@ -126,7 +126,7 @@ class Deployments {
|
|
|
126
126
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
127
127
|
"X-Fern-Language": "JavaScript",
|
|
128
128
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
129
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
129
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
130
130
|
},
|
|
131
131
|
contentType: "application/json",
|
|
132
132
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -172,7 +172,7 @@ class Deployments {
|
|
|
172
172
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
173
173
|
"X-Fern-Language": "JavaScript",
|
|
174
174
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
175
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
175
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
176
176
|
},
|
|
177
177
|
contentType: "application/json",
|
|
178
178
|
body: yield serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
|
|
@@ -73,7 +73,7 @@ class DocumentIndexes {
|
|
|
73
73
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
74
74
|
"X-Fern-Language": "JavaScript",
|
|
75
75
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
76
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
76
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
77
77
|
},
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
|
|
@@ -128,7 +128,7 @@ class DocumentIndexes {
|
|
|
128
128
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
129
129
|
"X-Fern-Language": "JavaScript",
|
|
130
130
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
131
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
131
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
132
132
|
},
|
|
133
133
|
contentType: "application/json",
|
|
134
134
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -81,7 +81,7 @@ class Documents {
|
|
|
81
81
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
82
82
|
"X-Fern-Language": "JavaScript",
|
|
83
83
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
84
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
84
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
85
85
|
},
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
queryParameters: _queryParams,
|
|
@@ -128,7 +128,7 @@ class Documents {
|
|
|
128
128
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
129
129
|
"X-Fern-Language": "JavaScript",
|
|
130
130
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
131
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
131
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
132
132
|
},
|
|
133
133
|
contentType: "application/json",
|
|
134
134
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -177,7 +177,7 @@ class Documents {
|
|
|
177
177
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
178
178
|
"X-Fern-Language": "JavaScript",
|
|
179
179
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
180
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
180
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
181
181
|
},
|
|
182
182
|
contentType: "application/json",
|
|
183
183
|
body: yield serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
|
|
@@ -253,7 +253,7 @@ class Documents {
|
|
|
253
253
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
254
254
|
"X-Fern-Language": "JavaScript",
|
|
255
255
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
256
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
256
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
257
257
|
},
|
|
258
258
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
259
259
|
body: _request,
|
|
@@ -65,7 +65,7 @@ class ModelVersions {
|
|
|
65
65
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
68
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
68
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -101,7 +101,7 @@ class RegisteredPrompts {
|
|
|
101
101
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
102
102
|
"X-Fern-Language": "JavaScript",
|
|
103
103
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
104
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
104
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
105
105
|
},
|
|
106
106
|
contentType: "application/json",
|
|
107
107
|
body: yield serializers.RegisterPromptRequestRequest.jsonOrThrow(request, {
|
|
@@ -82,7 +82,7 @@ class Sandboxes {
|
|
|
82
82
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
83
83
|
"X-Fern-Language": "JavaScript",
|
|
84
84
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
85
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
85
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
86
86
|
},
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
body: yield serializers.UpsertSandboxScenarioRequestRequest.jsonOrThrow(request, {
|
|
@@ -137,7 +137,7 @@ class Sandboxes {
|
|
|
137
137
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
138
138
|
"X-Fern-Language": "JavaScript",
|
|
139
139
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
140
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
140
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
141
141
|
},
|
|
142
142
|
contentType: "application/json",
|
|
143
143
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -74,7 +74,7 @@ class TestSuites {
|
|
|
74
74
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
77
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
77
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
78
78
|
},
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
body: yield serializers.UpsertTestSuiteTestCaseRequest.jsonOrThrow(request, {
|
|
@@ -129,7 +129,7 @@ class TestSuites {
|
|
|
129
129
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
130
130
|
"X-Fern-Language": "JavaScript",
|
|
131
131
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
132
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
132
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
133
133
|
},
|
|
134
134
|
contentType: "application/json",
|
|
135
135
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -73,7 +73,7 @@ class WorkflowDeployments {
|
|
|
73
73
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
74
74
|
"X-Fern-Language": "JavaScript",
|
|
75
75
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
76
|
-
"X-Fern-SDK-Version": "v0.2.
|
|
76
|
+
"X-Fern-SDK-Version": "v0.2.1",
|
|
77
77
|
},
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
queryParameters: _queryParams,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface ExecuteWorkflowResponse {
|
|
6
|
+
executionId: string;
|
|
7
|
+
runId?: string;
|
|
8
|
+
externalId?: string;
|
|
9
|
+
data: Vellum.ExecuteWorkflowWorkflowResultEvent;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type ExecuteWorkflowWorkflowResultEvent = Vellum.ExecuteWorkflowWorkflowResultEvent.Fulfilled | Vellum.ExecuteWorkflowWorkflowResultEvent.Rejected;
|
|
6
|
+
export declare namespace ExecuteWorkflowWorkflowResultEvent {
|
|
7
|
+
interface Fulfilled extends Vellum.FulfilledExecuteWorkflowWorkflowResultEvent {
|
|
8
|
+
state: "FULFILLED";
|
|
9
|
+
}
|
|
10
|
+
interface Rejected extends Vellum.RejectedExecuteWorkflowWorkflowResultEvent {
|
|
11
|
+
state: "REJECTED";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
/**
|
|
6
|
+
* The successful response from the Workflow execution containing the produced outputs.
|
|
7
|
+
*/
|
|
8
|
+
export interface FulfilledExecuteWorkflowWorkflowResultEvent {
|
|
9
|
+
id: string;
|
|
10
|
+
ts: Date;
|
|
11
|
+
outputs: Vellum.WorkflowOutput[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
/**
|
|
6
|
+
* The unsuccessful response from the Workflow execution containing an error specifying what went wrong.
|
|
7
|
+
*/
|
|
8
|
+
export interface RejectedExecuteWorkflowWorkflowResultEvent {
|
|
9
|
+
id: string;
|
|
10
|
+
ts: Date;
|
|
11
|
+
error: Vellum.WorkflowEventError;
|
|
12
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* - `TEXT` -
|
|
6
|
-
* - `CHAT_HISTORY` -
|
|
5
|
+
* - `TEXT` - TEXT
|
|
6
|
+
* - `CHAT_HISTORY` - CHAT_HISTORY
|
|
7
7
|
*/
|
|
8
8
|
export declare type ScenarioInputTypeEnum = "TEXT" | "CHAT_HISTORY";
|
|
9
9
|
export declare const ScenarioInputTypeEnum: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type VariableValue = Vellum.VariableValue.String | Vellum.VariableValue.Number | Vellum.VariableValue.Json | Vellum.VariableValue.ChatHistory | Vellum.VariableValue.SearchResults | Vellum.VariableValue.Error_ | Vellum.VariableValue.Array | Vellum.VariableValue.FunctionCall;
|
|
6
|
+
export declare namespace VariableValue {
|
|
7
|
+
interface String extends Vellum.StringVariableValue {
|
|
8
|
+
type: "STRING";
|
|
9
|
+
}
|
|
10
|
+
interface Number extends Vellum.NumberVariableValue {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
13
|
+
interface Json extends Vellum.JsonVariableValue {
|
|
14
|
+
type: "JSON";
|
|
15
|
+
}
|
|
16
|
+
interface ChatHistory extends Vellum.ChatHistoryVariableValue {
|
|
17
|
+
type: "CHAT_HISTORY";
|
|
18
|
+
}
|
|
19
|
+
interface SearchResults extends Vellum.SearchResultsVariableValue {
|
|
20
|
+
type: "SEARCH_RESULTS";
|
|
21
|
+
}
|
|
22
|
+
interface Error_ extends Vellum.ErrorVariableValue {
|
|
23
|
+
type: "ERROR";
|
|
24
|
+
}
|
|
25
|
+
interface Array extends Vellum.ArrayVariableValue {
|
|
26
|
+
type: "ARRAY";
|
|
27
|
+
}
|
|
28
|
+
interface FunctionCall extends Vellum.FunctionCallVariableValue {
|
|
29
|
+
type: "FUNCTION_CALL";
|
|
30
|
+
}
|
|
31
|
+
}
|