vellum-ai 0.1.0 → 0.1.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.js +6 -6
- 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/index.d.ts +0 -1
- package/api/resources/index.js +0 -1
- package/api/resources/modelVersions/client/Client.d.ts +0 -4
- package/api/resources/modelVersions/client/Client.js +1 -53
- package/api/resources/modelVersions/client/index.d.ts +1 -1
- package/api/resources/modelVersions/client/index.js +0 -15
- package/api/resources/registeredPrompts/client/Client.js +1 -1
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +4 -1
- package/api/resources/sandboxes/client/Client.js +2 -2
- package/api/resources/testSuites/client/Client.js +2 -2
- package/api/types/EnrichedNormalizedCompletion.d.ts +3 -1
- package/api/types/ModelVersionRead.d.ts +3 -0
- package/api/types/ProviderEnum.d.ts +7 -1
- package/api/types/ProviderEnum.js +3 -0
- package/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -1
- package/api/types/RegisterPromptResponse.d.ts +2 -0
- package/api/types/index.d.ts +0 -2
- package/api/types/index.js +0 -2
- package/dist/Client.js +6 -6
- 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/index.d.ts +0 -1
- package/dist/api/resources/index.js +0 -1
- package/dist/api/resources/modelVersions/client/Client.d.ts +0 -4
- package/dist/api/resources/modelVersions/client/Client.js +1 -53
- package/dist/api/resources/modelVersions/client/index.d.ts +1 -1
- package/dist/api/resources/modelVersions/client/index.js +0 -15
- package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +4 -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/EnrichedNormalizedCompletion.d.ts +3 -1
- package/dist/api/types/ModelVersionRead.d.ts +3 -0
- package/dist/api/types/ProviderEnum.d.ts +7 -1
- package/dist/api/types/ProviderEnum.js +3 -0
- package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -1
- package/dist/api/types/RegisterPromptResponse.d.ts +2 -0
- package/dist/api/types/index.d.ts +0 -2
- package/dist/api/types/index.js +0 -2
- package/dist/serialization/resources/index.d.ts +0 -2
- package/dist/serialization/resources/index.js +1 -3
- package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -1
- package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +1 -1
- package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +3 -1
- package/dist/serialization/types/EnrichedNormalizedCompletion.js +3 -1
- package/dist/serialization/types/ProviderEnum.d.ts +1 -1
- package/dist/serialization/types/ProviderEnum.js +3 -0
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -1
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +0 -1
- package/dist/serialization/types/RegisterPromptResponse.d.ts +1 -0
- package/dist/serialization/types/RegisterPromptResponse.js +1 -0
- package/dist/serialization/types/index.d.ts +0 -2
- package/dist/serialization/types/index.js +0 -2
- package/package.json +1 -1
- package/serialization/resources/index.d.ts +0 -2
- package/serialization/resources/index.js +1 -3
- package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -1
- package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +1 -1
- package/serialization/types/EnrichedNormalizedCompletion.d.ts +3 -1
- package/serialization/types/EnrichedNormalizedCompletion.js +3 -1
- package/serialization/types/ProviderEnum.d.ts +1 -1
- package/serialization/types/ProviderEnum.js +3 -0
- package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -1
- package/serialization/types/RegisterPromptPromptInfoRequest.js +0 -1
- package/serialization/types/RegisterPromptResponse.d.ts +1 -0
- package/serialization/types/RegisterPromptResponse.js +1 -0
- package/serialization/types/index.d.ts +0 -2
- package/serialization/types/index.js +0 -2
- package/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +0 -7
- package/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +0 -5
- package/api/resources/modelVersions/client/requests/index.d.ts +0 -1
- package/api/resources/modelVersions/client/requests/index.js +0 -2
- package/api/types/ModelVersionCompilePromptResponse.d.ts +0 -8
- package/api/types/ModelVersionCompilePromptResponse.js +0 -5
- package/api/types/ModelVersionCompiledPrompt.d.ts +0 -9
- package/api/types/ModelVersionCompiledPrompt.js +0 -5
- package/dist/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +0 -7
- package/dist/api/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +0 -5
- package/dist/api/resources/modelVersions/client/requests/index.d.ts +0 -1
- package/dist/api/resources/modelVersions/client/requests/index.js +0 -2
- package/dist/api/types/ModelVersionCompilePromptResponse.d.ts +0 -8
- package/dist/api/types/ModelVersionCompilePromptResponse.js +0 -5
- package/dist/api/types/ModelVersionCompiledPrompt.d.ts +0 -9
- package/dist/api/types/ModelVersionCompiledPrompt.js +0 -5
- package/dist/serialization/resources/modelVersions/client/index.d.ts +0 -1
- package/dist/serialization/resources/modelVersions/client/index.js +0 -17
- package/dist/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +0 -12
- package/dist/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +0 -33
- package/dist/serialization/resources/modelVersions/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/modelVersions/client/requests/index.js +0 -5
- package/dist/serialization/resources/modelVersions/index.d.ts +0 -1
- package/dist/serialization/resources/modelVersions/index.js +0 -17
- package/dist/serialization/types/ModelVersionCompilePromptResponse.d.ts +0 -12
- package/dist/serialization/types/ModelVersionCompilePromptResponse.js +0 -42
- package/dist/serialization/types/ModelVersionCompiledPrompt.d.ts +0 -13
- package/dist/serialization/types/ModelVersionCompiledPrompt.js +0 -34
- package/serialization/resources/modelVersions/client/index.d.ts +0 -1
- package/serialization/resources/modelVersions/client/index.js +0 -17
- package/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.d.ts +0 -12
- package/serialization/resources/modelVersions/client/requests/ModelVersionCompilePromptRequestRequest.js +0 -33
- package/serialization/resources/modelVersions/client/requests/index.d.ts +0 -1
- package/serialization/resources/modelVersions/client/requests/index.js +0 -5
- package/serialization/resources/modelVersions/index.d.ts +0 -1
- package/serialization/resources/modelVersions/index.js +0 -17
- package/serialization/types/ModelVersionCompilePromptResponse.d.ts +0 -12
- package/serialization/types/ModelVersionCompilePromptResponse.js +0 -42
- package/serialization/types/ModelVersionCompiledPrompt.d.ts +0 -13
- package/serialization/types/ModelVersionCompiledPrompt.js +0 -34
package/Client.js
CHANGED
|
@@ -70,7 +70,7 @@ class VellumClient {
|
|
|
70
70
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
73
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
73
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
74
74
|
},
|
|
75
75
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
76
76
|
unrecognizedObjectKeys: "strip",
|
|
@@ -111,7 +111,7 @@ class VellumClient {
|
|
|
111
111
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -179,7 +179,7 @@ class VellumClient {
|
|
|
179
179
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
180
180
|
"X-Fern-Language": "JavaScript",
|
|
181
181
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
182
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
182
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
183
183
|
},
|
|
184
184
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
185
185
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -217,7 +217,7 @@ class VellumClient {
|
|
|
217
217
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
218
218
|
"X-Fern-Language": "JavaScript",
|
|
219
219
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
220
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
220
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
221
221
|
},
|
|
222
222
|
contentType: "application/json",
|
|
223
223
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -281,7 +281,7 @@ class VellumClient {
|
|
|
281
281
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
282
282
|
"X-Fern-Language": "JavaScript",
|
|
283
283
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
284
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
284
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
285
285
|
},
|
|
286
286
|
contentType: "application/json",
|
|
287
287
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -339,7 +339,7 @@ class VellumClient {
|
|
|
339
339
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
340
340
|
"X-Fern-Language": "JavaScript",
|
|
341
341
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
342
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
342
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
343
343
|
},
|
|
344
344
|
contentType: "application/json",
|
|
345
345
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
249
249
|
"Content-Length": (yield core.getFormDataContentLength(_request)).toString(),
|
|
250
250
|
},
|
|
251
251
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
package/api/resources/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * as sandboxes from "./sandboxes";
|
|
|
7
7
|
export * as testSuites from "./testSuites";
|
|
8
8
|
export * from "./documentIndexes/client/requests";
|
|
9
9
|
export * from "./documents/client/requests";
|
|
10
|
-
export * from "./modelVersions/client/requests";
|
|
11
10
|
export * from "./registeredPrompts/client/requests";
|
|
12
11
|
export * from "./sandboxes/client/requests";
|
|
13
12
|
export * from "./testSuites/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -36,7 +36,6 @@ exports.sandboxes = __importStar(require("./sandboxes"));
|
|
|
36
36
|
exports.testSuites = __importStar(require("./testSuites"));
|
|
37
37
|
__exportStar(require("./documentIndexes/client/requests"), exports);
|
|
38
38
|
__exportStar(require("./documents/client/requests"), exports);
|
|
39
|
-
__exportStar(require("./modelVersions/client/requests"), exports);
|
|
40
39
|
__exportStar(require("./registeredPrompts/client/requests"), exports);
|
|
41
40
|
__exportStar(require("./sandboxes/client/requests"), exports);
|
|
42
41
|
__exportStar(require("./testSuites/client/requests"), exports);
|
|
@@ -21,8 +21,4 @@ export declare class ModelVersions {
|
|
|
21
21
|
* Used to retrieve a model version given its ID.
|
|
22
22
|
*/
|
|
23
23
|
retrieve(id: string, requestOptions?: ModelVersions.RequestOptions): Promise<Vellum.ModelVersionRead>;
|
|
24
|
-
/**
|
|
25
|
-
* Compiles the prompt backing the model version using the provided input values.
|
|
26
|
-
*/
|
|
27
|
-
modelVersionCompilePrompt(id: string, request: Vellum.ModelVersionCompilePromptRequestRequest, requestOptions?: ModelVersions.RequestOptions): Promise<Vellum.ModelVersionCompilePromptResponse>;
|
|
28
24
|
}
|
|
@@ -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.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -97,57 +97,5 @@ class ModelVersions {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Compiles the prompt backing the model version using the provided input values.
|
|
102
|
-
*/
|
|
103
|
-
modelVersionCompilePrompt(id, request, requestOptions) {
|
|
104
|
-
var _a;
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const _response = yield core.fetcher({
|
|
107
|
-
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
108
|
-
.default, `v1/model-versions/${id}/compile-prompt`),
|
|
109
|
-
method: "POST",
|
|
110
|
-
headers: {
|
|
111
|
-
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
|
-
"X-Fern-Language": "JavaScript",
|
|
113
|
-
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "v0.1.0",
|
|
115
|
-
},
|
|
116
|
-
contentType: "application/json",
|
|
117
|
-
body: yield serializers.ModelVersionCompilePromptRequestRequest.jsonOrThrow(request, {
|
|
118
|
-
unrecognizedObjectKeys: "strip",
|
|
119
|
-
}),
|
|
120
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
121
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
122
|
-
});
|
|
123
|
-
if (_response.ok) {
|
|
124
|
-
return yield serializers.ModelVersionCompilePromptResponse.parseOrThrow(_response.body, {
|
|
125
|
-
unrecognizedObjectKeys: "passthrough",
|
|
126
|
-
allowUnrecognizedUnionMembers: true,
|
|
127
|
-
allowUnrecognizedEnumValues: true,
|
|
128
|
-
breadcrumbsPrefix: ["response"],
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
if (_response.error.reason === "status-code") {
|
|
132
|
-
throw new errors.VellumError({
|
|
133
|
-
statusCode: _response.error.statusCode,
|
|
134
|
-
body: _response.error.body,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
switch (_response.error.reason) {
|
|
138
|
-
case "non-json":
|
|
139
|
-
throw new errors.VellumError({
|
|
140
|
-
statusCode: _response.error.statusCode,
|
|
141
|
-
body: _response.error.rawBody,
|
|
142
|
-
});
|
|
143
|
-
case "timeout":
|
|
144
|
-
throw new errors.VellumTimeoutError();
|
|
145
|
-
case "unknown":
|
|
146
|
-
throw new errors.VellumError({
|
|
147
|
-
message: _response.error.errorMessage,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
100
|
}
|
|
153
101
|
exports.ModelVersions = ModelVersions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests"), exports);
|
|
@@ -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.1",
|
|
73
73
|
},
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
body: yield serializers.RegisterPromptRequestRequest.jsonOrThrow(request, {
|
|
@@ -13,6 +13,8 @@ export interface RegisterPromptRequestRequest {
|
|
|
13
13
|
* The initial LLM provider to use for this prompt
|
|
14
14
|
*
|
|
15
15
|
* * `ANTHROPIC` - Anthropic
|
|
16
|
+
* * `AWS_BEDROCK` - AWS Bedrock
|
|
17
|
+
* * `AZURE_OPENAI` - Azure OpenAI
|
|
16
18
|
* * `COHERE` - Cohere
|
|
17
19
|
* * `GOOGLE` - Google
|
|
18
20
|
* * `HOSTED` - Hosted
|
|
@@ -21,8 +23,9 @@ export interface RegisterPromptRequestRequest {
|
|
|
21
23
|
* * `HUGGINGFACE` - HuggingFace
|
|
22
24
|
* * `MYSTIC` - Mystic
|
|
23
25
|
* * `PYQ` - Pyq
|
|
26
|
+
* * `REPLICATE` - Replicate
|
|
24
27
|
*/
|
|
25
|
-
provider
|
|
28
|
+
provider?: Vellum.ProviderEnum;
|
|
26
29
|
/** The initial model to use for this prompt */
|
|
27
30
|
model: string;
|
|
28
31
|
/** The initial model parameters to use for this prompt */
|
|
@@ -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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
123
123
|
},
|
|
124
124
|
contentType: "application/json",
|
|
125
125
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -21,6 +21,8 @@ export interface EnrichedNormalizedCompletion {
|
|
|
21
21
|
logprobs?: Vellum.NormalizedLogProbs;
|
|
22
22
|
/** The ID of the model version used to generate this completion. */
|
|
23
23
|
modelVersionId: string;
|
|
24
|
-
promptVersionId
|
|
24
|
+
promptVersionId: string;
|
|
25
25
|
type?: Vellum.VellumVariableType;
|
|
26
|
+
deploymentReleaseTag: string;
|
|
27
|
+
modelName: string;
|
|
26
28
|
}
|
|
@@ -13,6 +13,8 @@ export interface ModelVersionRead {
|
|
|
13
13
|
* Which LLM provider this model version is associated with.
|
|
14
14
|
*
|
|
15
15
|
* * `ANTHROPIC` - Anthropic
|
|
16
|
+
* * `AWS_BEDROCK` - AWS Bedrock
|
|
17
|
+
* * `AZURE_OPENAI` - Azure OpenAI
|
|
16
18
|
* * `COHERE` - Cohere
|
|
17
19
|
* * `GOOGLE` - Google
|
|
18
20
|
* * `HOSTED` - Hosted
|
|
@@ -21,6 +23,7 @@ export interface ModelVersionRead {
|
|
|
21
23
|
* * `HUGGINGFACE` - HuggingFace
|
|
22
24
|
* * `MYSTIC` - Mystic
|
|
23
25
|
* * `PYQ` - Pyq
|
|
26
|
+
* * `REPLICATE` - Replicate
|
|
24
27
|
*/
|
|
25
28
|
provider: Vellum.ProviderEnum;
|
|
26
29
|
/** The unique id of this model version as it exists in the above provider's system. */
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* * `ANTHROPIC` - Anthropic
|
|
6
|
+
* * `AWS_BEDROCK` - AWS Bedrock
|
|
7
|
+
* * `AZURE_OPENAI` - Azure OpenAI
|
|
6
8
|
* * `COHERE` - Cohere
|
|
7
9
|
* * `GOOGLE` - Google
|
|
8
10
|
* * `HOSTED` - Hosted
|
|
@@ -11,10 +13,13 @@
|
|
|
11
13
|
* * `HUGGINGFACE` - HuggingFace
|
|
12
14
|
* * `MYSTIC` - Mystic
|
|
13
15
|
* * `PYQ` - Pyq
|
|
16
|
+
* * `REPLICATE` - Replicate
|
|
14
17
|
*/
|
|
15
|
-
export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "OPENAI" | "HUGGINGFACE" | "MYSTIC" | "PYQ";
|
|
18
|
+
export declare type ProviderEnum = "ANTHROPIC" | "AWS_BEDROCK" | "AZURE_OPENAI" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "OPENAI" | "HUGGINGFACE" | "MYSTIC" | "PYQ" | "REPLICATE";
|
|
16
19
|
export declare const ProviderEnum: {
|
|
17
20
|
readonly Anthropic: "ANTHROPIC";
|
|
21
|
+
readonly AwsBedrock: "AWS_BEDROCK";
|
|
22
|
+
readonly AzureOpenai: "AZURE_OPENAI";
|
|
18
23
|
readonly Cohere: "COHERE";
|
|
19
24
|
readonly Google: "GOOGLE";
|
|
20
25
|
readonly Hosted: "HOSTED";
|
|
@@ -23,4 +28,5 @@ export declare const ProviderEnum: {
|
|
|
23
28
|
readonly Huggingface: "HUGGINGFACE";
|
|
24
29
|
readonly Mystic: "MYSTIC";
|
|
25
30
|
readonly Pyq: "PYQ";
|
|
31
|
+
readonly Replicate: "REPLICATE";
|
|
26
32
|
};
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ProviderEnum = void 0;
|
|
7
7
|
exports.ProviderEnum = {
|
|
8
8
|
Anthropic: "ANTHROPIC",
|
|
9
|
+
AwsBedrock: "AWS_BEDROCK",
|
|
10
|
+
AzureOpenai: "AZURE_OPENAI",
|
|
9
11
|
Cohere: "COHERE",
|
|
10
12
|
Google: "GOOGLE",
|
|
11
13
|
Hosted: "HOSTED",
|
|
@@ -14,4 +16,5 @@ exports.ProviderEnum = {
|
|
|
14
16
|
Huggingface: "HUGGINGFACE",
|
|
15
17
|
Mystic: "MYSTIC",
|
|
16
18
|
Pyq: "PYQ",
|
|
19
|
+
Replicate: "REPLICATE",
|
|
17
20
|
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "..";
|
|
5
5
|
export interface RegisterPromptPromptInfoRequest {
|
|
6
|
-
promptSyntaxVersion?: number;
|
|
7
6
|
promptBlockData: Vellum.PromptTemplateBlockDataRequest;
|
|
8
7
|
/** The input variables specified in the prompt template. */
|
|
9
8
|
inputVariables: Vellum.RegisteredPromptInputVariableRequest[];
|
|
@@ -11,6 +11,8 @@ export interface RegisterPromptResponse {
|
|
|
11
11
|
sandbox: Vellum.RegisteredPromptSandbox;
|
|
12
12
|
/** Information about the generated model version */
|
|
13
13
|
modelVersion: Vellum.RegisteredPromptModelVersion;
|
|
14
|
+
/** The ID of the generated prompt version */
|
|
15
|
+
promptVersionId: string;
|
|
14
16
|
/** Information about the generated deployment */
|
|
15
17
|
deployment: Vellum.RegisteredPromptDeployment;
|
|
16
18
|
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -36,8 +36,6 @@ export * from "./MetadataFilterConfigRequest";
|
|
|
36
36
|
export * from "./MetadataFilterRuleCombinator";
|
|
37
37
|
export * from "./MetadataFilterRuleRequest";
|
|
38
38
|
export * from "./ModelVersionBuildConfig";
|
|
39
|
-
export * from "./ModelVersionCompilePromptResponse";
|
|
40
|
-
export * from "./ModelVersionCompiledPrompt";
|
|
41
39
|
export * from "./ModelVersionExecConfig";
|
|
42
40
|
export * from "./ModelVersionExecConfigParameters";
|
|
43
41
|
export * from "./ModelVersionRead";
|
package/api/types/index.js
CHANGED
|
@@ -52,8 +52,6 @@ __exportStar(require("./MetadataFilterConfigRequest"), exports);
|
|
|
52
52
|
__exportStar(require("./MetadataFilterRuleCombinator"), exports);
|
|
53
53
|
__exportStar(require("./MetadataFilterRuleRequest"), exports);
|
|
54
54
|
__exportStar(require("./ModelVersionBuildConfig"), exports);
|
|
55
|
-
__exportStar(require("./ModelVersionCompilePromptResponse"), exports);
|
|
56
|
-
__exportStar(require("./ModelVersionCompiledPrompt"), exports);
|
|
57
55
|
__exportStar(require("./ModelVersionExecConfig"), exports);
|
|
58
56
|
__exportStar(require("./ModelVersionExecConfigParameters"), exports);
|
|
59
57
|
__exportStar(require("./ModelVersionRead"), exports);
|
package/dist/Client.js
CHANGED
|
@@ -70,7 +70,7 @@ class VellumClient {
|
|
|
70
70
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
73
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
73
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
74
74
|
},
|
|
75
75
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
76
76
|
unrecognizedObjectKeys: "strip",
|
|
@@ -111,7 +111,7 @@ class VellumClient {
|
|
|
111
111
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -179,7 +179,7 @@ class VellumClient {
|
|
|
179
179
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
180
180
|
"X-Fern-Language": "JavaScript",
|
|
181
181
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
182
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
182
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
183
183
|
},
|
|
184
184
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
185
185
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -217,7 +217,7 @@ class VellumClient {
|
|
|
217
217
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
218
218
|
"X-Fern-Language": "JavaScript",
|
|
219
219
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
220
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
220
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
221
221
|
},
|
|
222
222
|
contentType: "application/json",
|
|
223
223
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -281,7 +281,7 @@ class VellumClient {
|
|
|
281
281
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
282
282
|
"X-Fern-Language": "JavaScript",
|
|
283
283
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
284
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
284
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
285
285
|
},
|
|
286
286
|
contentType: "application/json",
|
|
287
287
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -339,7 +339,7 @@ class VellumClient {
|
|
|
339
339
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
340
340
|
"X-Fern-Language": "JavaScript",
|
|
341
341
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
342
|
-
"X-Fern-SDK-Version": "v0.1.
|
|
342
|
+
"X-Fern-SDK-Version": "v0.1.1",
|
|
343
343
|
},
|
|
344
344
|
contentType: "application/json",
|
|
345
345
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
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.1",
|
|
249
249
|
"Content-Length": (yield core.getFormDataContentLength(_request)).toString(),
|
|
250
250
|
},
|
|
251
251
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
@@ -7,7 +7,6 @@ export * as sandboxes from "./sandboxes";
|
|
|
7
7
|
export * as testSuites from "./testSuites";
|
|
8
8
|
export * from "./documentIndexes/client/requests";
|
|
9
9
|
export * from "./documents/client/requests";
|
|
10
|
-
export * from "./modelVersions/client/requests";
|
|
11
10
|
export * from "./registeredPrompts/client/requests";
|
|
12
11
|
export * from "./sandboxes/client/requests";
|
|
13
12
|
export * from "./testSuites/client/requests";
|
|
@@ -36,7 +36,6 @@ exports.sandboxes = __importStar(require("./sandboxes"));
|
|
|
36
36
|
exports.testSuites = __importStar(require("./testSuites"));
|
|
37
37
|
__exportStar(require("./documentIndexes/client/requests"), exports);
|
|
38
38
|
__exportStar(require("./documents/client/requests"), exports);
|
|
39
|
-
__exportStar(require("./modelVersions/client/requests"), exports);
|
|
40
39
|
__exportStar(require("./registeredPrompts/client/requests"), exports);
|
|
41
40
|
__exportStar(require("./sandboxes/client/requests"), exports);
|
|
42
41
|
__exportStar(require("./testSuites/client/requests"), exports);
|
|
@@ -21,8 +21,4 @@ export declare class ModelVersions {
|
|
|
21
21
|
* Used to retrieve a model version given its ID.
|
|
22
22
|
*/
|
|
23
23
|
retrieve(id: string, requestOptions?: ModelVersions.RequestOptions): Promise<Vellum.ModelVersionRead>;
|
|
24
|
-
/**
|
|
25
|
-
* Compiles the prompt backing the model version using the provided input values.
|
|
26
|
-
*/
|
|
27
|
-
modelVersionCompilePrompt(id: string, request: Vellum.ModelVersionCompilePromptRequestRequest, requestOptions?: ModelVersions.RequestOptions): Promise<Vellum.ModelVersionCompilePromptResponse>;
|
|
28
24
|
}
|
|
@@ -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.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -97,57 +97,5 @@ class ModelVersions {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Compiles the prompt backing the model version using the provided input values.
|
|
102
|
-
*/
|
|
103
|
-
modelVersionCompilePrompt(id, request, requestOptions) {
|
|
104
|
-
var _a;
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const _response = yield core.fetcher({
|
|
107
|
-
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
108
|
-
.default, `v1/model-versions/${id}/compile-prompt`),
|
|
109
|
-
method: "POST",
|
|
110
|
-
headers: {
|
|
111
|
-
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
|
-
"X-Fern-Language": "JavaScript",
|
|
113
|
-
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "v0.1.0",
|
|
115
|
-
},
|
|
116
|
-
contentType: "application/json",
|
|
117
|
-
body: yield serializers.ModelVersionCompilePromptRequestRequest.jsonOrThrow(request, {
|
|
118
|
-
unrecognizedObjectKeys: "strip",
|
|
119
|
-
}),
|
|
120
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
121
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
122
|
-
});
|
|
123
|
-
if (_response.ok) {
|
|
124
|
-
return yield serializers.ModelVersionCompilePromptResponse.parseOrThrow(_response.body, {
|
|
125
|
-
unrecognizedObjectKeys: "passthrough",
|
|
126
|
-
allowUnrecognizedUnionMembers: true,
|
|
127
|
-
allowUnrecognizedEnumValues: true,
|
|
128
|
-
breadcrumbsPrefix: ["response"],
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
if (_response.error.reason === "status-code") {
|
|
132
|
-
throw new errors.VellumError({
|
|
133
|
-
statusCode: _response.error.statusCode,
|
|
134
|
-
body: _response.error.body,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
switch (_response.error.reason) {
|
|
138
|
-
case "non-json":
|
|
139
|
-
throw new errors.VellumError({
|
|
140
|
-
statusCode: _response.error.statusCode,
|
|
141
|
-
body: _response.error.rawBody,
|
|
142
|
-
});
|
|
143
|
-
case "timeout":
|
|
144
|
-
throw new errors.VellumTimeoutError();
|
|
145
|
-
case "unknown":
|
|
146
|
-
throw new errors.VellumError({
|
|
147
|
-
message: _response.error.errorMessage,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
100
|
}
|
|
153
101
|
exports.ModelVersions = ModelVersions;
|