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.
Files changed (235) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +17 -22
  3. package/api/errors/index.d.ts +0 -1
  4. package/api/errors/index.js +0 -1
  5. package/api/resources/deployments/client/Client.js +3 -3
  6. package/api/resources/documentIndexes/client/Client.js +6 -6
  7. package/api/resources/documents/client/Client.js +5 -5
  8. package/api/resources/folderEntities/client/Client.js +1 -1
  9. package/api/resources/index.d.ts +0 -2
  10. package/api/resources/index.js +1 -3
  11. package/api/resources/modelVersions/client/Client.js +1 -1
  12. package/api/resources/sandboxes/client/Client.js +2 -2
  13. package/api/resources/testSuiteRuns/client/Client.js +3 -3
  14. package/api/resources/testSuites/client/Client.js +3 -3
  15. package/api/resources/workflowDeployments/client/Client.js +2 -2
  16. package/api/types/index.d.ts +0 -19
  17. package/api/types/index.js +0 -19
  18. package/dist/Client.d.ts +0 -3
  19. package/dist/Client.js +17 -22
  20. package/dist/api/errors/index.d.ts +0 -1
  21. package/dist/api/errors/index.js +0 -1
  22. package/dist/api/resources/deployments/client/Client.js +3 -3
  23. package/dist/api/resources/documentIndexes/client/Client.js +6 -6
  24. package/dist/api/resources/documents/client/Client.js +5 -5
  25. package/dist/api/resources/folderEntities/client/Client.js +1 -1
  26. package/dist/api/resources/index.d.ts +0 -2
  27. package/dist/api/resources/index.js +1 -3
  28. package/dist/api/resources/modelVersions/client/Client.js +1 -1
  29. package/dist/api/resources/sandboxes/client/Client.js +2 -2
  30. package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
  31. package/dist/api/resources/testSuites/client/Client.js +3 -3
  32. package/dist/api/resources/workflowDeployments/client/Client.js +2 -2
  33. package/dist/api/types/index.d.ts +0 -19
  34. package/dist/api/types/index.js +0 -19
  35. package/dist/serialization/resources/index.d.ts +0 -2
  36. package/dist/serialization/resources/index.js +1 -3
  37. package/dist/serialization/types/index.d.ts +0 -19
  38. package/dist/serialization/types/index.js +0 -19
  39. package/package.json +1 -1
  40. package/serialization/resources/index.d.ts +0 -2
  41. package/serialization/resources/index.js +1 -3
  42. package/serialization/types/index.d.ts +0 -19
  43. package/serialization/types/index.js +0 -19
  44. package/api/errors/ConflictError.d.ts +0 -8
  45. package/api/errors/ConflictError.js +0 -41
  46. package/api/resources/registeredPrompts/client/Client.d.ts +0 -56
  47. package/api/resources/registeredPrompts/client/Client.js +0 -149
  48. package/api/resources/registeredPrompts/client/index.d.ts +0 -1
  49. package/api/resources/registeredPrompts/client/index.js +0 -17
  50. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -60
  51. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -5
  52. package/api/resources/registeredPrompts/client/requests/index.d.ts +0 -1
  53. package/api/resources/registeredPrompts/client/requests/index.js +0 -2
  54. package/api/resources/registeredPrompts/index.d.ts +0 -1
  55. package/api/resources/registeredPrompts/index.js +0 -17
  56. package/api/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -12
  57. package/api/types/ChatHistoryPromptTemplateBlockRequest.js +0 -5
  58. package/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -13
  59. package/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -5
  60. package/api/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -12
  61. package/api/types/ChatMessagePromptTemplateBlockRequest.js +0 -5
  62. package/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -13
  63. package/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -5
  64. package/api/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -12
  65. package/api/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -5
  66. package/api/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -8
  67. package/api/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -5
  68. package/api/types/JinjaPromptTemplateBlockRequest.d.ts +0 -12
  69. package/api/types/JinjaPromptTemplateBlockRequest.js +0 -5
  70. package/api/types/PromptTemplateBlockDataRequest.d.ts +0 -8
  71. package/api/types/PromptTemplateBlockDataRequest.js +0 -5
  72. package/api/types/PromptTemplateBlockRequest.d.ts +0 -19
  73. package/api/types/PromptTemplateBlockRequest.js +0 -5
  74. package/api/types/RegisterPromptErrorResponse.d.ts +0 -7
  75. package/api/types/RegisterPromptErrorResponse.js +0 -5
  76. package/api/types/RegisterPromptModelParametersRequest.d.ts +0 -14
  77. package/api/types/RegisterPromptModelParametersRequest.js +0 -5
  78. package/api/types/RegisterPromptPrompt.d.ts +0 -9
  79. package/api/types/RegisterPromptPrompt.js +0 -5
  80. package/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -9
  81. package/api/types/RegisterPromptPromptInfoRequest.js +0 -5
  82. package/api/types/RegisterPromptResponse.d.ts +0 -18
  83. package/api/types/RegisterPromptResponse.js +0 -5
  84. package/api/types/RegisteredPromptDeployment.d.ts +0 -11
  85. package/api/types/RegisteredPromptDeployment.js +0 -5
  86. package/api/types/RegisteredPromptInputVariableRequest.d.ts +0 -9
  87. package/api/types/RegisteredPromptInputVariableRequest.js +0 -5
  88. package/api/types/RegisteredPromptModelVersion.d.ts +0 -9
  89. package/api/types/RegisteredPromptModelVersion.js +0 -5
  90. package/api/types/RegisteredPromptSandbox.d.ts +0 -9
  91. package/api/types/RegisteredPromptSandbox.js +0 -5
  92. package/api/types/RegisteredPromptSandboxSnapshot.d.ts +0 -7
  93. package/api/types/RegisteredPromptSandboxSnapshot.js +0 -5
  94. package/dist/api/errors/ConflictError.d.ts +0 -8
  95. package/dist/api/errors/ConflictError.js +0 -41
  96. package/dist/api/resources/registeredPrompts/client/Client.d.ts +0 -56
  97. package/dist/api/resources/registeredPrompts/client/Client.js +0 -149
  98. package/dist/api/resources/registeredPrompts/client/index.d.ts +0 -1
  99. package/dist/api/resources/registeredPrompts/client/index.js +0 -17
  100. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -60
  101. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -5
  102. package/dist/api/resources/registeredPrompts/client/requests/index.d.ts +0 -1
  103. package/dist/api/resources/registeredPrompts/client/requests/index.js +0 -2
  104. package/dist/api/resources/registeredPrompts/index.d.ts +0 -1
  105. package/dist/api/resources/registeredPrompts/index.js +0 -17
  106. package/dist/api/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -12
  107. package/dist/api/types/ChatHistoryPromptTemplateBlockRequest.js +0 -5
  108. package/dist/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -13
  109. package/dist/api/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -5
  110. package/dist/api/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -12
  111. package/dist/api/types/ChatMessagePromptTemplateBlockRequest.js +0 -5
  112. package/dist/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -13
  113. package/dist/api/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -5
  114. package/dist/api/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -12
  115. package/dist/api/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -5
  116. package/dist/api/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -8
  117. package/dist/api/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -5
  118. package/dist/api/types/JinjaPromptTemplateBlockRequest.d.ts +0 -12
  119. package/dist/api/types/JinjaPromptTemplateBlockRequest.js +0 -5
  120. package/dist/api/types/PromptTemplateBlockDataRequest.d.ts +0 -8
  121. package/dist/api/types/PromptTemplateBlockDataRequest.js +0 -5
  122. package/dist/api/types/PromptTemplateBlockRequest.d.ts +0 -19
  123. package/dist/api/types/PromptTemplateBlockRequest.js +0 -5
  124. package/dist/api/types/RegisterPromptErrorResponse.d.ts +0 -7
  125. package/dist/api/types/RegisterPromptErrorResponse.js +0 -5
  126. package/dist/api/types/RegisterPromptModelParametersRequest.d.ts +0 -14
  127. package/dist/api/types/RegisterPromptModelParametersRequest.js +0 -5
  128. package/dist/api/types/RegisterPromptPrompt.d.ts +0 -9
  129. package/dist/api/types/RegisterPromptPrompt.js +0 -5
  130. package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +0 -9
  131. package/dist/api/types/RegisterPromptPromptInfoRequest.js +0 -5
  132. package/dist/api/types/RegisterPromptResponse.d.ts +0 -18
  133. package/dist/api/types/RegisterPromptResponse.js +0 -5
  134. package/dist/api/types/RegisteredPromptDeployment.d.ts +0 -11
  135. package/dist/api/types/RegisteredPromptDeployment.js +0 -5
  136. package/dist/api/types/RegisteredPromptInputVariableRequest.d.ts +0 -9
  137. package/dist/api/types/RegisteredPromptInputVariableRequest.js +0 -5
  138. package/dist/api/types/RegisteredPromptModelVersion.d.ts +0 -9
  139. package/dist/api/types/RegisteredPromptModelVersion.js +0 -5
  140. package/dist/api/types/RegisteredPromptSandbox.d.ts +0 -9
  141. package/dist/api/types/RegisteredPromptSandbox.js +0 -5
  142. package/dist/api/types/RegisteredPromptSandboxSnapshot.d.ts +0 -7
  143. package/dist/api/types/RegisteredPromptSandboxSnapshot.js +0 -5
  144. package/dist/serialization/resources/registeredPrompts/client/index.d.ts +0 -1
  145. package/dist/serialization/resources/registeredPrompts/client/index.js +0 -17
  146. package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -21
  147. package/dist/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -42
  148. package/dist/serialization/resources/registeredPrompts/client/requests/index.d.ts +0 -1
  149. package/dist/serialization/resources/registeredPrompts/client/requests/index.js +0 -5
  150. package/dist/serialization/resources/registeredPrompts/index.d.ts +0 -1
  151. package/dist/serialization/resources/registeredPrompts/index.js +0 -17
  152. package/dist/serialization/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -15
  153. package/dist/serialization/types/ChatHistoryPromptTemplateBlockRequest.js +0 -36
  154. package/dist/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -16
  155. package/dist/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -46
  156. package/dist/serialization/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -15
  157. package/dist/serialization/types/ChatMessagePromptTemplateBlockRequest.js +0 -45
  158. package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -15
  159. package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -36
  160. package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -16
  161. package/dist/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -37
  162. package/dist/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -14
  163. package/dist/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -35
  164. package/dist/serialization/types/JinjaPromptTemplateBlockRequest.d.ts +0 -16
  165. package/dist/serialization/types/JinjaPromptTemplateBlockRequest.js +0 -37
  166. package/dist/serialization/types/PromptTemplateBlockDataRequest.d.ts +0 -13
  167. package/dist/serialization/types/PromptTemplateBlockDataRequest.js +0 -43
  168. package/dist/serialization/types/PromptTemplateBlockRequest.d.ts +0 -25
  169. package/dist/serialization/types/PromptTemplateBlockRequest.js +0 -53
  170. package/dist/serialization/types/RegisterPromptErrorResponse.d.ts +0 -12
  171. package/dist/serialization/types/RegisterPromptErrorResponse.js +0 -33
  172. package/dist/serialization/types/RegisterPromptModelParametersRequest.d.ts +0 -20
  173. package/dist/serialization/types/RegisterPromptModelParametersRequest.js +0 -41
  174. package/dist/serialization/types/RegisterPromptPrompt.d.ts +0 -13
  175. package/dist/serialization/types/RegisterPromptPrompt.js +0 -34
  176. package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -15
  177. package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +0 -36
  178. package/dist/serialization/types/RegisterPromptResponse.d.ts +0 -22
  179. package/dist/serialization/types/RegisterPromptResponse.js +0 -43
  180. package/dist/serialization/types/RegisteredPromptDeployment.d.ts +0 -14
  181. package/dist/serialization/types/RegisteredPromptDeployment.js +0 -35
  182. package/dist/serialization/types/RegisteredPromptInputVariableRequest.d.ts +0 -15
  183. package/dist/serialization/types/RegisteredPromptInputVariableRequest.js +0 -36
  184. package/dist/serialization/types/RegisteredPromptModelVersion.d.ts +0 -13
  185. package/dist/serialization/types/RegisteredPromptModelVersion.js +0 -34
  186. package/dist/serialization/types/RegisteredPromptSandbox.d.ts +0 -13
  187. package/dist/serialization/types/RegisteredPromptSandbox.js +0 -34
  188. package/dist/serialization/types/RegisteredPromptSandboxSnapshot.d.ts +0 -12
  189. package/dist/serialization/types/RegisteredPromptSandboxSnapshot.js +0 -33
  190. package/serialization/resources/registeredPrompts/client/index.d.ts +0 -1
  191. package/serialization/resources/registeredPrompts/client/index.js +0 -17
  192. package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +0 -21
  193. package/serialization/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.js +0 -42
  194. package/serialization/resources/registeredPrompts/client/requests/index.d.ts +0 -1
  195. package/serialization/resources/registeredPrompts/client/requests/index.js +0 -5
  196. package/serialization/resources/registeredPrompts/index.d.ts +0 -1
  197. package/serialization/resources/registeredPrompts/index.js +0 -17
  198. package/serialization/types/ChatHistoryPromptTemplateBlockRequest.d.ts +0 -15
  199. package/serialization/types/ChatHistoryPromptTemplateBlockRequest.js +0 -36
  200. package/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.d.ts +0 -16
  201. package/serialization/types/ChatMessagePromptTemplateBlockPropertiesRequest.js +0 -46
  202. package/serialization/types/ChatMessagePromptTemplateBlockRequest.d.ts +0 -15
  203. package/serialization/types/ChatMessagePromptTemplateBlockRequest.js +0 -45
  204. package/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.d.ts +0 -15
  205. package/serialization/types/FunctionDefinitionPromptTemplateBlockPropertiesRequest.js +0 -36
  206. package/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.d.ts +0 -16
  207. package/serialization/types/FunctionDefinitionPromptTemplateBlockRequest.js +0 -37
  208. package/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.d.ts +0 -14
  209. package/serialization/types/JinjaPromptTemplateBlockPropertiesRequest.js +0 -35
  210. package/serialization/types/JinjaPromptTemplateBlockRequest.d.ts +0 -16
  211. package/serialization/types/JinjaPromptTemplateBlockRequest.js +0 -37
  212. package/serialization/types/PromptTemplateBlockDataRequest.d.ts +0 -13
  213. package/serialization/types/PromptTemplateBlockDataRequest.js +0 -43
  214. package/serialization/types/PromptTemplateBlockRequest.d.ts +0 -25
  215. package/serialization/types/PromptTemplateBlockRequest.js +0 -53
  216. package/serialization/types/RegisterPromptErrorResponse.d.ts +0 -12
  217. package/serialization/types/RegisterPromptErrorResponse.js +0 -33
  218. package/serialization/types/RegisterPromptModelParametersRequest.d.ts +0 -20
  219. package/serialization/types/RegisterPromptModelParametersRequest.js +0 -41
  220. package/serialization/types/RegisterPromptPrompt.d.ts +0 -13
  221. package/serialization/types/RegisterPromptPrompt.js +0 -34
  222. package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +0 -15
  223. package/serialization/types/RegisterPromptPromptInfoRequest.js +0 -36
  224. package/serialization/types/RegisterPromptResponse.d.ts +0 -22
  225. package/serialization/types/RegisterPromptResponse.js +0 -43
  226. package/serialization/types/RegisteredPromptDeployment.d.ts +0 -14
  227. package/serialization/types/RegisteredPromptDeployment.js +0 -35
  228. package/serialization/types/RegisteredPromptInputVariableRequest.d.ts +0 -15
  229. package/serialization/types/RegisteredPromptInputVariableRequest.js +0 -36
  230. package/serialization/types/RegisteredPromptModelVersion.d.ts +0 -13
  231. package/serialization/types/RegisteredPromptModelVersion.js +0 -34
  232. package/serialization/types/RegisteredPromptSandbox.d.ts +0 -13
  233. package/serialization/types/RegisteredPromptSandbox.js +0 -34
  234. package/serialization/types/RegisteredPromptSandboxSnapshot.d.ts +0 -12
  235. 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);
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export { RegisterPromptRequestRequest } from "./RegisterPromptRequestRequest";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Vellum from "..";
5
- export interface JinjaPromptTemplateBlockPropertiesRequest {
6
- template?: string;
7
- templateType?: Vellum.VellumVariableType;
8
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Vellum from "..";
5
- export interface PromptTemplateBlockDataRequest {
6
- blocks: Vellum.PromptTemplateBlockRequest[];
7
- version: number;
8
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface RegisterPromptErrorResponse {
5
- /** Details about why the request failed. */
6
- detail: string;
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface RegisterPromptPrompt {
5
- /** The ID of the generated prompt. */
6
- id: string;
7
- /** A human-friendly label for the generated prompt. */
8
- label: string;
9
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 RegisteredPromptInputVariableRequest {
6
- key: string;
7
- id?: string;
8
- type?: Vellum.VellumVariableType;
9
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface RegisteredPromptSandbox {
5
- /** The ID of the generated sandbox. */
6
- id: string;
7
- /** A human-friendly label for the generated sandbox. */
8
- label: string;
9
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface RegisteredPromptSandboxSnapshot {
5
- /** The ID of the generated sandbox snapshot. */
6
- id: string;
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });