vellum-ai 0.4.0 → 0.4.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 +0 -3
- package/Client.js +17 -22
- package/api/errors/index.d.ts +0 -1
- package/api/errors/index.js +0 -1
- package/api/resources/deployments/client/Client.js +3 -3
- package/api/resources/documentIndexes/client/Client.js +6 -6
- package/api/resources/documents/client/Client.js +5 -5
- package/api/resources/folderEntities/client/Client.js +1 -1
- package/api/resources/index.d.ts +0 -2
- package/api/resources/index.js +1 -3
- package/api/resources/modelVersions/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.js +2 -2
- package/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/api/resources/testSuites/client/Client.js +3 -3
- package/api/resources/workflowDeployments/client/Client.js +2 -2
- package/api/types/index.d.ts +0 -19
- package/api/types/index.js +0 -19
- package/dist/Client.d.ts +0 -3
- package/dist/Client.js +17 -22
- package/dist/api/errors/index.d.ts +0 -1
- package/dist/api/errors/index.js +0 -1
- package/dist/api/resources/deployments/client/Client.js +3 -3
- package/dist/api/resources/documentIndexes/client/Client.js +6 -6
- package/dist/api/resources/documents/client/Client.js +5 -5
- package/dist/api/resources/folderEntities/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +0 -2
- package/dist/api/resources/index.js +1 -3
- package/dist/api/resources/modelVersions/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.js +2 -2
- package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/dist/api/resources/testSuites/client/Client.js +3 -3
- package/dist/api/resources/workflowDeployments/client/Client.js +2 -2
- package/dist/api/types/index.d.ts +0 -19
- package/dist/api/types/index.js +0 -19
- package/dist/serialization/resources/index.d.ts +0 -2
- package/dist/serialization/resources/index.js +1 -3
- package/dist/serialization/types/index.d.ts +0 -19
- package/dist/serialization/types/index.js +0 -19
- package/package.json +1 -1
- package/serialization/resources/index.d.ts +0 -2
- package/serialization/resources/index.js +1 -3
- package/serialization/types/index.d.ts +0 -19
- package/serialization/types/index.js +0 -19
- package/api/errors/ConflictError.d.ts +0 -8
- package/api/errors/ConflictError.js +0 -41
- package/api/resources/registeredPrompts/client/Client.d.ts +0 -56
- package/api/resources/registeredPrompts/client/Client.js +0 -149
- package/api/resources/registeredPrompts/client/index.d.ts +0 -1
- package/api/resources/registeredPrompts/client/index.js +0 -17
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -60
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -5
- package/api/resources/registeredPrompts/client/requests/index.d.ts +0 -1
- package/api/resources/registeredPrompts/client/requests/index.js +0 -2
- package/api/resources/registeredPrompts/index.d.ts +0 -1
- package/api/resources/registeredPrompts/index.js +0 -17
- package/api/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -12
- package/api/types/ChatHistoryPromptTemplateBlockRequest.js +0 -5
- package/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -13
- package/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -5
- package/api/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -12
- package/api/types/ChatMessagePromptTemplateBlockRequest.js +0 -5
- package/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -13
- package/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -5
- package/api/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -12
- package/api/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -5
- package/api/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -8
- package/api/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -5
- package/api/types/JinjaPromptTemplateBlockRequest.d.ts +0 -12
- package/api/types/JinjaPromptTemplateBlockRequest.js +0 -5
- package/api/types/PromptTemplateBlockDataRequest.d.ts +0 -8
- package/api/types/PromptTemplateBlockDataRequest.js +0 -5
- package/api/types/PromptTemplateBlockRequest.d.ts +0 -19
- package/api/types/PromptTemplateBlockRequest.js +0 -5
- package/api/types/RegisterPromptErrorResponse.d.ts +0 -7
- package/api/types/RegisterPromptErrorResponse.js +0 -5
- package/api/types/RegisterPromptModelParametersRequest.d.ts +0 -14
- package/api/types/RegisterPromptModelParametersRequest.js +0 -5
- package/api/types/RegisterPromptPrompt.d.ts +0 -9
- package/api/types/RegisterPromptPrompt.js +0 -5
- package/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -9
- package/api/types/RegisterPromptPromptInfoRequest.js +0 -5
- package/api/types/RegisterPromptResponse.d.ts +0 -18
- package/api/types/RegisterPromptResponse.js +0 -5
- package/api/types/RegisteredPromptDeployment.d.ts +0 -11
- package/api/types/RegisteredPromptDeployment.js +0 -5
- package/api/types/RegisteredPromptInputVariableRequest.d.ts +0 -9
- package/api/types/RegisteredPromptInputVariableRequest.js +0 -5
- package/api/types/RegisteredPromptModelVersion.d.ts +0 -9
- package/api/types/RegisteredPromptModelVersion.js +0 -5
- package/api/types/RegisteredPromptSandbox.d.ts +0 -9
- package/api/types/RegisteredPromptSandbox.js +0 -5
- package/api/types/RegisteredPromptSandboxSnapshot.d.ts +0 -7
- package/api/types/RegisteredPromptSandboxSnapshot.js +0 -5
- package/dist/api/errors/ConflictError.d.ts +0 -8
- package/dist/api/errors/ConflictError.js +0 -41
- package/dist/api/resources/registeredPrompts/client/Client.d.ts +0 -56
- package/dist/api/resources/registeredPrompts/client/Client.js +0 -149
- package/dist/api/resources/registeredPrompts/client/index.d.ts +0 -1
- package/dist/api/resources/registeredPrompts/client/index.js +0 -17
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -60
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -5
- package/dist/api/resources/registeredPrompts/client/requests/index.d.ts +0 -1
- package/dist/api/resources/registeredPrompts/client/requests/index.js +0 -2
- package/dist/api/resources/registeredPrompts/index.d.ts +0 -1
- package/dist/api/resources/registeredPrompts/index.js +0 -17
- package/dist/api/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -12
- package/dist/api/types/ChatHistoryPromptTemplateBlockRequest.js +0 -5
- package/dist/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -13
- package/dist/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -5
- package/dist/api/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -12
- package/dist/api/types/ChatMessagePromptTemplateBlockRequest.js +0 -5
- package/dist/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -13
- package/dist/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -5
- package/dist/api/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -12
- package/dist/api/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -5
- package/dist/api/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -8
- package/dist/api/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -5
- package/dist/api/types/JinjaPromptTemplateBlockRequest.d.ts +0 -12
- package/dist/api/types/JinjaPromptTemplateBlockRequest.js +0 -5
- package/dist/api/types/PromptTemplateBlockDataRequest.d.ts +0 -8
- package/dist/api/types/PromptTemplateBlockDataRequest.js +0 -5
- package/dist/api/types/PromptTemplateBlockRequest.d.ts +0 -19
- package/dist/api/types/PromptTemplateBlockRequest.js +0 -5
- package/dist/api/types/RegisterPromptErrorResponse.d.ts +0 -7
- package/dist/api/types/RegisterPromptErrorResponse.js +0 -5
- package/dist/api/types/RegisterPromptModelParametersRequest.d.ts +0 -14
- package/dist/api/types/RegisterPromptModelParametersRequest.js +0 -5
- package/dist/api/types/RegisterPromptPrompt.d.ts +0 -9
- package/dist/api/types/RegisterPromptPrompt.js +0 -5
- package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -9
- package/dist/api/types/RegisterPromptPromptInfoRequest.js +0 -5
- package/dist/api/types/RegisterPromptResponse.d.ts +0 -18
- package/dist/api/types/RegisterPromptResponse.js +0 -5
- package/dist/api/types/RegisteredPromptDeployment.d.ts +0 -11
- package/dist/api/types/RegisteredPromptDeployment.js +0 -5
- package/dist/api/types/RegisteredPromptInputVariableRequest.d.ts +0 -9
- package/dist/api/types/RegisteredPromptInputVariableRequest.js +0 -5
- package/dist/api/types/RegisteredPromptModelVersion.d.ts +0 -9
- package/dist/api/types/RegisteredPromptModelVersion.js +0 -5
- package/dist/api/types/RegisteredPromptSandbox.d.ts +0 -9
- package/dist/api/types/RegisteredPromptSandbox.js +0 -5
- package/dist/api/types/RegisteredPromptSandboxSnapshot.d.ts +0 -7
- package/dist/api/types/RegisteredPromptSandboxSnapshot.js +0 -5
- package/dist/serialization/resources/registeredPrompts/client/index.d.ts +0 -1
- package/dist/serialization/resources/registeredPrompts/client/index.js +0 -17
- package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -21
- package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -42
- package/dist/serialization/resources/registeredPrompts/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/registeredPrompts/client/requests/index.js +0 -5
- package/dist/serialization/resources/registeredPrompts/index.d.ts +0 -1
- package/dist/serialization/resources/registeredPrompts/index.js +0 -17
- package/dist/serialization/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -15
- package/dist/serialization/types/ChatHistoryPromptTemplateBlockRequest.js +0 -36
- package/dist/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -16
- package/dist/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -46
- package/dist/serialization/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -15
- package/dist/serialization/types/ChatMessagePromptTemplateBlockRequest.js +0 -45
- package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -15
- package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -36
- package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -16
- package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -37
- package/dist/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -14
- package/dist/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -35
- package/dist/serialization/types/JinjaPromptTemplateBlockRequest.d.ts +0 -16
- package/dist/serialization/types/JinjaPromptTemplateBlockRequest.js +0 -37
- package/dist/serialization/types/PromptTemplateBlockDataRequest.d.ts +0 -13
- package/dist/serialization/types/PromptTemplateBlockDataRequest.js +0 -43
- package/dist/serialization/types/PromptTemplateBlockRequest.d.ts +0 -25
- package/dist/serialization/types/PromptTemplateBlockRequest.js +0 -53
- package/dist/serialization/types/RegisterPromptErrorResponse.d.ts +0 -12
- package/dist/serialization/types/RegisterPromptErrorResponse.js +0 -33
- package/dist/serialization/types/RegisterPromptModelParametersRequest.d.ts +0 -20
- package/dist/serialization/types/RegisterPromptModelParametersRequest.js +0 -41
- package/dist/serialization/types/RegisterPromptPrompt.d.ts +0 -13
- package/dist/serialization/types/RegisterPromptPrompt.js +0 -34
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -15
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +0 -36
- package/dist/serialization/types/RegisterPromptResponse.d.ts +0 -22
- package/dist/serialization/types/RegisterPromptResponse.js +0 -43
- package/dist/serialization/types/RegisteredPromptDeployment.d.ts +0 -14
- package/dist/serialization/types/RegisteredPromptDeployment.js +0 -35
- package/dist/serialization/types/RegisteredPromptInputVariableRequest.d.ts +0 -15
- package/dist/serialization/types/RegisteredPromptInputVariableRequest.js +0 -36
- package/dist/serialization/types/RegisteredPromptModelVersion.d.ts +0 -13
- package/dist/serialization/types/RegisteredPromptModelVersion.js +0 -34
- package/dist/serialization/types/RegisteredPromptSandbox.d.ts +0 -13
- package/dist/serialization/types/RegisteredPromptSandbox.js +0 -34
- package/dist/serialization/types/RegisteredPromptSandboxSnapshot.d.ts +0 -12
- package/dist/serialization/types/RegisteredPromptSandboxSnapshot.js +0 -33
- package/serialization/resources/registeredPrompts/client/index.d.ts +0 -1
- package/serialization/resources/registeredPrompts/client/index.js +0 -17
- package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -21
- package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -42
- package/serialization/resources/registeredPrompts/client/requests/index.d.ts +0 -1
- package/serialization/resources/registeredPrompts/client/requests/index.js +0 -5
- package/serialization/resources/registeredPrompts/index.d.ts +0 -1
- package/serialization/resources/registeredPrompts/index.js +0 -17
- package/serialization/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -15
- package/serialization/types/ChatHistoryPromptTemplateBlockRequest.js +0 -36
- package/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -16
- package/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -46
- package/serialization/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -15
- package/serialization/types/ChatMessagePromptTemplateBlockRequest.js +0 -45
- package/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -15
- package/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -36
- package/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -16
- package/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -37
- package/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -14
- package/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -35
- package/serialization/types/JinjaPromptTemplateBlockRequest.d.ts +0 -16
- package/serialization/types/JinjaPromptTemplateBlockRequest.js +0 -37
- package/serialization/types/PromptTemplateBlockDataRequest.d.ts +0 -13
- package/serialization/types/PromptTemplateBlockDataRequest.js +0 -43
- package/serialization/types/PromptTemplateBlockRequest.d.ts +0 -25
- package/serialization/types/PromptTemplateBlockRequest.js +0 -53
- package/serialization/types/RegisterPromptErrorResponse.d.ts +0 -12
- package/serialization/types/RegisterPromptErrorResponse.js +0 -33
- package/serialization/types/RegisterPromptModelParametersRequest.d.ts +0 -20
- package/serialization/types/RegisterPromptModelParametersRequest.js +0 -41
- package/serialization/types/RegisterPromptPrompt.d.ts +0 -13
- package/serialization/types/RegisterPromptPrompt.js +0 -34
- package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -15
- package/serialization/types/RegisterPromptPromptInfoRequest.js +0 -36
- package/serialization/types/RegisterPromptResponse.d.ts +0 -22
- package/serialization/types/RegisterPromptResponse.js +0 -43
- package/serialization/types/RegisteredPromptDeployment.d.ts +0 -14
- package/serialization/types/RegisteredPromptDeployment.js +0 -35
- package/serialization/types/RegisteredPromptInputVariableRequest.d.ts +0 -15
- package/serialization/types/RegisteredPromptInputVariableRequest.js +0 -36
- package/serialization/types/RegisteredPromptModelVersion.d.ts +0 -13
- package/serialization/types/RegisteredPromptModelVersion.js +0 -34
- package/serialization/types/RegisteredPromptSandbox.d.ts +0 -13
- package/serialization/types/RegisteredPromptSandbox.js +0 -34
- package/serialization/types/RegisteredPromptSandboxSnapshot.d.ts +0 -12
- package/serialization/types/RegisteredPromptSandboxSnapshot.js +0 -33
|
@@ -1,149 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.RegisteredPrompts = void 0;
|
|
42
|
-
const environments = __importStar(require("../../../../environments"));
|
|
43
|
-
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const Vellum = __importStar(require("../../.."));
|
|
45
|
-
const serializers = __importStar(require("../../../../serialization"));
|
|
46
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
47
|
-
const errors = __importStar(require("../../../../errors"));
|
|
48
|
-
class RegisteredPrompts {
|
|
49
|
-
constructor(_options) {
|
|
50
|
-
this._options = _options;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Registers a prompt within Vellum and creates associated Vellum entities. Intended to be used by integration
|
|
54
|
-
* partners, not directly by Vellum users.
|
|
55
|
-
*
|
|
56
|
-
* Under the hood, this endpoint creates a new sandbox, a new model version, and a new deployment.
|
|
57
|
-
* @throws {@link Vellum.BadRequestError}
|
|
58
|
-
* @throws {@link Vellum.NotFoundError}
|
|
59
|
-
* @throws {@link Vellum.ConflictError}
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* await vellum.registeredPrompts.registerPrompt({
|
|
63
|
-
* label: "label",
|
|
64
|
-
* name: "name",
|
|
65
|
-
* prompt: {
|
|
66
|
-
* promptBlockData: {
|
|
67
|
-
* blocks: [],
|
|
68
|
-
* version: 1
|
|
69
|
-
* },
|
|
70
|
-
* inputVariables: [{
|
|
71
|
-
* key: "key"
|
|
72
|
-
* }]
|
|
73
|
-
* },
|
|
74
|
-
* model: "model",
|
|
75
|
-
* parameters: {
|
|
76
|
-
* temperature: 1.1,
|
|
77
|
-
* maxTokens: 1,
|
|
78
|
-
* topP: 1.1,
|
|
79
|
-
* frequencyPenalty: 1.1,
|
|
80
|
-
* presencePenalty: 1.1
|
|
81
|
-
* }
|
|
82
|
-
* })
|
|
83
|
-
*/
|
|
84
|
-
registerPrompt(request, requestOptions) {
|
|
85
|
-
var _a;
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
const _response = yield core.fetcher({
|
|
88
|
-
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
89
|
-
.default, "v1/registered-prompts/register"),
|
|
90
|
-
method: "POST",
|
|
91
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.4.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
92
|
-
contentType: "application/json",
|
|
93
|
-
body: yield serializers.RegisterPromptRequestRequest.jsonOrThrow(request, {
|
|
94
|
-
unrecognizedObjectKeys: "strip",
|
|
95
|
-
}),
|
|
96
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
97
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
98
|
-
});
|
|
99
|
-
if (_response.ok) {
|
|
100
|
-
return yield serializers.RegisterPromptResponse.parseOrThrow(_response.body, {
|
|
101
|
-
unrecognizedObjectKeys: "passthrough",
|
|
102
|
-
allowUnrecognizedUnionMembers: true,
|
|
103
|
-
allowUnrecognizedEnumValues: true,
|
|
104
|
-
breadcrumbsPrefix: ["response"],
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
if (_response.error.reason === "status-code") {
|
|
108
|
-
switch (_response.error.statusCode) {
|
|
109
|
-
case 400:
|
|
110
|
-
throw new Vellum.BadRequestError(_response.error.body);
|
|
111
|
-
case 404:
|
|
112
|
-
throw new Vellum.NotFoundError(_response.error.body);
|
|
113
|
-
case 409:
|
|
114
|
-
throw new Vellum.ConflictError(yield serializers.RegisterPromptErrorResponse.parseOrThrow(_response.error.body, {
|
|
115
|
-
unrecognizedObjectKeys: "passthrough",
|
|
116
|
-
allowUnrecognizedUnionMembers: true,
|
|
117
|
-
allowUnrecognizedEnumValues: true,
|
|
118
|
-
breadcrumbsPrefix: ["response"],
|
|
119
|
-
}));
|
|
120
|
-
default:
|
|
121
|
-
throw new errors.VellumError({
|
|
122
|
-
statusCode: _response.error.statusCode,
|
|
123
|
-
body: _response.error.body,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
switch (_response.error.reason) {
|
|
128
|
-
case "non-json":
|
|
129
|
-
throw new errors.VellumError({
|
|
130
|
-
statusCode: _response.error.statusCode,
|
|
131
|
-
body: _response.error.rawBody,
|
|
132
|
-
});
|
|
133
|
-
case "timeout":
|
|
134
|
-
throw new errors.VellumTimeoutError();
|
|
135
|
-
case "unknown":
|
|
136
|
-
throw new errors.VellumError({
|
|
137
|
-
message: _response.error.errorMessage,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
_getCustomAuthorizationHeaders() {
|
|
143
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
145
|
-
return { X_API_KEY: apiKeyValue };
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
exports.RegisteredPrompts = RegisteredPrompts;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests";
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests"), exports);
|
package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "../../../..";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* label: "label",
|
|
9
|
-
* name: "name",
|
|
10
|
-
* prompt: {
|
|
11
|
-
* promptBlockData: {
|
|
12
|
-
* blocks: [],
|
|
13
|
-
* version: 1
|
|
14
|
-
* },
|
|
15
|
-
* inputVariables: [{
|
|
16
|
-
* key: "key"
|
|
17
|
-
* }]
|
|
18
|
-
* },
|
|
19
|
-
* model: "model",
|
|
20
|
-
* parameters: {
|
|
21
|
-
* temperature: 1.1,
|
|
22
|
-
* maxTokens: 1,
|
|
23
|
-
* topP: 1.1,
|
|
24
|
-
* frequencyPenalty: 1.1,
|
|
25
|
-
* presencePenalty: 1.1
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
28
|
-
*/
|
|
29
|
-
export interface RegisterPromptRequestRequest {
|
|
30
|
-
/** A human-friendly label for corresponding entities created in Vellum. */
|
|
31
|
-
label: string;
|
|
32
|
-
/** A uniquely-identifying name for corresponding entities created in Vellum. */
|
|
33
|
-
name: string;
|
|
34
|
-
/** Information about how to execute the prompt template. */
|
|
35
|
-
prompt: Vellum.RegisterPromptPromptInfoRequest;
|
|
36
|
-
/**
|
|
37
|
-
* The initial LLM provider to use for this prompt
|
|
38
|
-
*
|
|
39
|
-
* * `ANTHROPIC` - Anthropic
|
|
40
|
-
* * `AWS_BEDROCK` - AWS Bedrock
|
|
41
|
-
* * `AZURE_OPENAI` - Azure OpenAI
|
|
42
|
-
* * `COHERE` - Cohere
|
|
43
|
-
* * `GOOGLE` - Google
|
|
44
|
-
* * `HOSTED` - Hosted
|
|
45
|
-
* * `MOSAICML` - MosaicML
|
|
46
|
-
* * `OPENAI` - OpenAI
|
|
47
|
-
* * `FIREWORKS_AI` - Fireworks AI
|
|
48
|
-
* * `HUGGINGFACE` - HuggingFace
|
|
49
|
-
* * `MYSTIC` - Mystic
|
|
50
|
-
* * `PYQ` - Pyq
|
|
51
|
-
* * `REPLICATE` - Replicate
|
|
52
|
-
*/
|
|
53
|
-
provider?: Vellum.ProviderEnum;
|
|
54
|
-
/** The initial model to use for this prompt */
|
|
55
|
-
model: string;
|
|
56
|
-
/** The initial model parameters to use for this prompt */
|
|
57
|
-
parameters: Vellum.RegisterPromptModelParametersRequest;
|
|
58
|
-
/** Optionally include additional metadata to store along with the prompt. */
|
|
59
|
-
meta?: Record<string, unknown>;
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RegisterPromptRequestRequest } from "./RegisterPromptRequestRequest";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client";
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
/**
|
|
6
|
-
* A block of that represents a chat history variable in a prompt template.
|
|
7
|
-
*/
|
|
8
|
-
export interface ChatHistoryPromptTemplateBlockRequest {
|
|
9
|
-
properties: Record<string, unknown>;
|
|
10
|
-
id: string;
|
|
11
|
-
state?: Vellum.PromptTemplateBlockState;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
/**
|
|
6
|
-
* The properties of a ChatMessagePromptTemplateBlock
|
|
7
|
-
*/
|
|
8
|
-
export interface ChatMessagePromptTemplateBlockPropertiesRequest {
|
|
9
|
-
blocks: Vellum.PromptTemplateBlockRequest[];
|
|
10
|
-
chatRole?: Vellum.ChatMessageRole;
|
|
11
|
-
chatSource?: string;
|
|
12
|
-
chatMessageUnterminated?: boolean;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
/**
|
|
6
|
-
* A block of that represents a chat message in a prompt template.
|
|
7
|
-
*/
|
|
8
|
-
export interface ChatMessagePromptTemplateBlockRequest {
|
|
9
|
-
properties: Vellum.ChatMessagePromptTemplateBlockPropertiesRequest;
|
|
10
|
-
id: string;
|
|
11
|
-
state?: Vellum.PromptTemplateBlockState;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface FunctionDefinitionPromptTemplateBlockPropertiesRequest {
|
|
5
|
-
/** The name identifying the function. */
|
|
6
|
-
functionName?: string;
|
|
7
|
-
/** A description to help guide the model when to invoke this function. */
|
|
8
|
-
functionDescription?: string;
|
|
9
|
-
/** An OpenAPI specification of parameters that are supported by this function. */
|
|
10
|
-
functionParameters?: Record<string, unknown>;
|
|
11
|
-
/** Set this option to true to force the model to return a function call of this function. */
|
|
12
|
-
functionForced?: boolean;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
/**
|
|
6
|
-
* A block of that represents a function definition in a prompt template.
|
|
7
|
-
*/
|
|
8
|
-
export interface FunctionDefinitionPromptTemplateBlockRequest {
|
|
9
|
-
id: string;
|
|
10
|
-
state?: Vellum.PromptTemplateBlockState;
|
|
11
|
-
properties: Vellum.FunctionDefinitionPromptTemplateBlockPropertiesRequest;
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
/**
|
|
6
|
-
* A block of Jinja template code that is used to generate a prompt
|
|
7
|
-
*/
|
|
8
|
-
export interface JinjaPromptTemplateBlockRequest {
|
|
9
|
-
id: string;
|
|
10
|
-
state?: Vellum.PromptTemplateBlockState;
|
|
11
|
-
properties: Vellum.JinjaPromptTemplateBlockPropertiesRequest;
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
export declare type PromptTemplateBlockRequest = Vellum.PromptTemplateBlockRequest.Jinja | Vellum.PromptTemplateBlockRequest.ChatHistory | Vellum.PromptTemplateBlockRequest.ChatMessage | Vellum.PromptTemplateBlockRequest.FunctionDefinition;
|
|
6
|
-
export declare namespace PromptTemplateBlockRequest {
|
|
7
|
-
interface Jinja extends Vellum.JinjaPromptTemplateBlockRequest {
|
|
8
|
-
blockType: "JINJA";
|
|
9
|
-
}
|
|
10
|
-
interface ChatHistory extends Vellum.ChatHistoryPromptTemplateBlockRequest {
|
|
11
|
-
blockType: "CHAT_HISTORY";
|
|
12
|
-
}
|
|
13
|
-
interface ChatMessage extends Vellum.ChatMessagePromptTemplateBlockRequest {
|
|
14
|
-
blockType: "CHAT_MESSAGE";
|
|
15
|
-
}
|
|
16
|
-
interface FunctionDefinition extends Vellum.FunctionDefinitionPromptTemplateBlockRequest {
|
|
17
|
-
blockType: "FUNCTION_DEFINITION";
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface RegisterPromptModelParametersRequest {
|
|
5
|
-
temperature: number;
|
|
6
|
-
maxTokens: number;
|
|
7
|
-
stop?: string[];
|
|
8
|
-
topP: number;
|
|
9
|
-
topK?: number;
|
|
10
|
-
frequencyPenalty: number;
|
|
11
|
-
presencePenalty: number;
|
|
12
|
-
logitBias?: Record<string, number | undefined>;
|
|
13
|
-
customParameters?: Record<string, unknown>;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
export interface RegisterPromptPromptInfoRequest {
|
|
6
|
-
promptBlockData: Vellum.PromptTemplateBlockDataRequest;
|
|
7
|
-
/** The input variables specified in the prompt template. */
|
|
8
|
-
inputVariables: Vellum.RegisteredPromptInputVariableRequest[];
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Vellum from "..";
|
|
5
|
-
export interface RegisterPromptResponse {
|
|
6
|
-
/** Information about the generated prompt */
|
|
7
|
-
prompt: Vellum.RegisterPromptPrompt;
|
|
8
|
-
/** Information about the generated sandbox snapshot */
|
|
9
|
-
sandboxSnapshot: Vellum.RegisteredPromptSandboxSnapshot;
|
|
10
|
-
/** Information about the generated sandbox */
|
|
11
|
-
sandbox: Vellum.RegisteredPromptSandbox;
|
|
12
|
-
/** Information about the generated model version */
|
|
13
|
-
modelVersion: Vellum.RegisteredPromptModelVersion;
|
|
14
|
-
/** The ID of the generated prompt version */
|
|
15
|
-
promptVersionId: string;
|
|
16
|
-
/** Information about the generated deployment */
|
|
17
|
-
deployment: Vellum.RegisteredPromptDeployment;
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface RegisteredPromptDeployment {
|
|
5
|
-
/** The ID of the generated deployment. */
|
|
6
|
-
id: string;
|
|
7
|
-
/** A uniquely-identifying name for generated deployment. */
|
|
8
|
-
name: string;
|
|
9
|
-
/** A human-friendly label for the generated deployment. */
|
|
10
|
-
label: string;
|
|
11
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface RegisteredPromptModelVersion {
|
|
5
|
-
/** The ID of the generated model version. */
|
|
6
|
-
id: string;
|
|
7
|
-
/** A human-friendly label for the generated model version. */
|
|
8
|
-
label: string;
|
|
9
|
-
}
|