vellum-ai 0.1.9 → 0.1.11

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 (73) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +14 -8
  3. package/api/resources/deployments/client/Client.js +2 -2
  4. package/api/resources/documentIndexes/client/Client.js +2 -2
  5. package/api/resources/documents/client/Client.js +4 -4
  6. package/api/resources/modelVersions/client/Client.js +1 -1
  7. package/api/resources/registeredPrompts/client/Client.js +1 -1
  8. package/api/resources/sandboxes/client/Client.js +2 -2
  9. package/api/resources/testSuites/client/Client.js +2 -2
  10. package/api/types/FulfilledFunctionCall.d.ts +11 -0
  11. package/api/types/FulfilledFunctionCall.js +5 -0
  12. package/api/types/FunctionCall.d.ts +13 -0
  13. package/api/types/FunctionCall.js +5 -0
  14. package/api/types/FunctionCallVariableValue.d.ts +7 -0
  15. package/api/types/FunctionCallVariableValue.js +5 -0
  16. package/api/types/PromptOutput.d.ts +4 -1
  17. package/api/types/RejectedFunctionCall.d.ts +12 -0
  18. package/api/types/RejectedFunctionCall.js +5 -0
  19. package/api/types/VellumVariableType.d.ts +3 -1
  20. package/api/types/VellumVariableType.js +1 -0
  21. package/api/types/index.d.ts +4 -0
  22. package/api/types/index.js +4 -0
  23. package/dist/Client.d.ts +6 -0
  24. package/dist/Client.js +14 -8
  25. package/dist/api/resources/deployments/client/Client.js +2 -2
  26. package/dist/api/resources/documentIndexes/client/Client.js +2 -2
  27. package/dist/api/resources/documents/client/Client.js +4 -4
  28. package/dist/api/resources/modelVersions/client/Client.js +1 -1
  29. package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
  30. package/dist/api/resources/sandboxes/client/Client.js +2 -2
  31. package/dist/api/resources/testSuites/client/Client.js +2 -2
  32. package/dist/api/types/FulfilledFunctionCall.d.ts +11 -0
  33. package/dist/api/types/FulfilledFunctionCall.js +5 -0
  34. package/dist/api/types/FunctionCall.d.ts +13 -0
  35. package/dist/api/types/FunctionCall.js +5 -0
  36. package/dist/api/types/FunctionCallVariableValue.d.ts +7 -0
  37. package/dist/api/types/FunctionCallVariableValue.js +5 -0
  38. package/dist/api/types/PromptOutput.d.ts +4 -1
  39. package/dist/api/types/RejectedFunctionCall.d.ts +12 -0
  40. package/dist/api/types/RejectedFunctionCall.js +5 -0
  41. package/dist/api/types/VellumVariableType.d.ts +3 -1
  42. package/dist/api/types/VellumVariableType.js +1 -0
  43. package/dist/api/types/index.d.ts +4 -0
  44. package/dist/api/types/index.js +4 -0
  45. package/dist/serialization/types/FulfilledFunctionCall.d.ts +14 -0
  46. package/dist/serialization/types/FulfilledFunctionCall.js +35 -0
  47. package/dist/serialization/types/FunctionCall.d.ts +16 -0
  48. package/dist/serialization/types/FunctionCall.js +48 -0
  49. package/dist/serialization/types/FunctionCallVariableValue.d.ts +12 -0
  50. package/dist/serialization/types/FunctionCallVariableValue.js +42 -0
  51. package/dist/serialization/types/PromptOutput.d.ts +4 -1
  52. package/dist/serialization/types/PromptOutput.js +1 -0
  53. package/dist/serialization/types/RejectedFunctionCall.d.ts +14 -0
  54. package/dist/serialization/types/RejectedFunctionCall.js +44 -0
  55. package/dist/serialization/types/VellumVariableType.d.ts +1 -1
  56. package/dist/serialization/types/VellumVariableType.js +10 -1
  57. package/dist/serialization/types/index.d.ts +4 -0
  58. package/dist/serialization/types/index.js +4 -0
  59. package/package.json +1 -1
  60. package/serialization/types/FulfilledFunctionCall.d.ts +14 -0
  61. package/serialization/types/FulfilledFunctionCall.js +35 -0
  62. package/serialization/types/FunctionCall.d.ts +16 -0
  63. package/serialization/types/FunctionCall.js +48 -0
  64. package/serialization/types/FunctionCallVariableValue.d.ts +12 -0
  65. package/serialization/types/FunctionCallVariableValue.js +42 -0
  66. package/serialization/types/PromptOutput.d.ts +4 -1
  67. package/serialization/types/PromptOutput.js +1 -0
  68. package/serialization/types/RejectedFunctionCall.d.ts +14 -0
  69. package/serialization/types/RejectedFunctionCall.js +44 -0
  70. package/serialization/types/VellumVariableType.d.ts +1 -1
  71. package/serialization/types/VellumVariableType.js +10 -1
  72. package/serialization/types/index.d.ts +4 -0
  73. package/serialization/types/index.js +4 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vellum from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const FunctionCallVariableValue: core.serialization.ObjectSchema<serializers.FunctionCallVariableValue.Raw, Vellum.FunctionCallVariableValue>;
8
+ export declare namespace FunctionCallVariableValue {
9
+ interface Raw {
10
+ value: serializers.FunctionCall.Raw;
11
+ }
12
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.FunctionCallVariableValue = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.FunctionCallVariableValue = core.serialization.object({
41
+ value: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).FunctionCall; })),
42
+ });
@@ -6,7 +6,7 @@ import * as Vellum from "../../api";
6
6
  import * as core from "../../core";
7
7
  export declare const PromptOutput: core.serialization.Schema<serializers.PromptOutput.Raw, Vellum.PromptOutput>;
8
8
  export declare namespace PromptOutput {
9
- type Raw = PromptOutput.String | PromptOutput.Json | PromptOutput.Error;
9
+ type Raw = PromptOutput.String | PromptOutput.Json | PromptOutput.Error | PromptOutput.FunctionCall;
10
10
  interface String extends serializers.StringVariableValue.Raw {
11
11
  type: "STRING";
12
12
  }
@@ -16,4 +16,7 @@ export declare namespace PromptOutput {
16
16
  interface Error extends serializers.ErrorVariableValue.Raw {
17
17
  type: "ERROR";
18
18
  }
19
+ interface FunctionCall extends serializers.FunctionCallVariableValue.Raw {
20
+ type: "FUNCTION_CALL";
21
+ }
19
22
  }
@@ -42,6 +42,7 @@ exports.PromptOutput = core.serialization
42
42
  STRING: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).StringVariableValue; })),
43
43
  JSON: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).JsonVariableValue; })),
44
44
  ERROR: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).ErrorVariableValue; })),
45
+ FUNCTION_CALL: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).FunctionCallVariableValue; })),
45
46
  })
46
47
  .transform({
47
48
  transform: (value) => value,
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vellum from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const RejectedFunctionCall: core.serialization.ObjectSchema<serializers.RejectedFunctionCall.Raw, Vellum.RejectedFunctionCall>;
8
+ export declare namespace RejectedFunctionCall {
9
+ interface Raw {
10
+ error: serializers.VellumError.Raw;
11
+ id?: string | null;
12
+ name: string;
13
+ }
14
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.RejectedFunctionCall = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.RejectedFunctionCall = core.serialization.object({
41
+ error: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).VellumError; })),
42
+ id: core.serialization.string().optional(),
43
+ name: core.serialization.string(),
44
+ });
@@ -6,5 +6,5 @@ import * as Vellum from "../../api";
6
6
  import * as core from "../../core";
7
7
  export declare const VellumVariableType: core.serialization.Schema<serializers.VellumVariableType.Raw, Vellum.VellumVariableType>;
8
8
  export declare namespace VellumVariableType {
9
- type Raw = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR" | "ARRAY";
9
+ type Raw = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR" | "ARRAY" | "FUNCTION_CALL";
10
10
  }
@@ -28,4 +28,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.VellumVariableType = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.VellumVariableType = core.serialization.enum_(["STRING", "NUMBER", "JSON", "CHAT_HISTORY", "SEARCH_RESULTS", "ERROR", "ARRAY"]);
31
+ exports.VellumVariableType = core.serialization.enum_([
32
+ "STRING",
33
+ "NUMBER",
34
+ "JSON",
35
+ "CHAT_HISTORY",
36
+ "SEARCH_RESULTS",
37
+ "ERROR",
38
+ "ARRAY",
39
+ "FUNCTION_CALL",
40
+ ]);
@@ -37,7 +37,10 @@ export * from "./FinishReasonEnum";
37
37
  export * from "./FulfilledEnum";
38
38
  export * from "./FulfilledExecutePromptEvent";
39
39
  export * from "./FulfilledExecutePromptResponse";
40
+ export * from "./FulfilledFunctionCall";
40
41
  export * from "./FulfilledPromptExecutionMeta";
42
+ export * from "./FunctionCall";
43
+ export * from "./FunctionCallVariableValue";
41
44
  export * from "./GenerateErrorResponse";
42
45
  export * from "./GenerateOptionsRequest";
43
46
  export * from "./GenerateRequest";
@@ -111,6 +114,7 @@ export * from "./RegisteredPromptSandboxSnapshot";
111
114
  export * from "./RejectedEnum";
112
115
  export * from "./RejectedExecutePromptEvent";
113
116
  export * from "./RejectedExecutePromptResponse";
117
+ export * from "./RejectedFunctionCall";
114
118
  export * from "./RejectedPromptExecutionMeta";
115
119
  export * from "./SandboxMetricInputParams";
116
120
  export * from "./SandboxMetricInputParamsRequest";
@@ -53,7 +53,10 @@ __exportStar(require("./FinishReasonEnum"), exports);
53
53
  __exportStar(require("./FulfilledEnum"), exports);
54
54
  __exportStar(require("./FulfilledExecutePromptEvent"), exports);
55
55
  __exportStar(require("./FulfilledExecutePromptResponse"), exports);
56
+ __exportStar(require("./FulfilledFunctionCall"), exports);
56
57
  __exportStar(require("./FulfilledPromptExecutionMeta"), exports);
58
+ __exportStar(require("./FunctionCall"), exports);
59
+ __exportStar(require("./FunctionCallVariableValue"), exports);
57
60
  __exportStar(require("./GenerateErrorResponse"), exports);
58
61
  __exportStar(require("./GenerateOptionsRequest"), exports);
59
62
  __exportStar(require("./GenerateRequest"), exports);
@@ -127,6 +130,7 @@ __exportStar(require("./RegisteredPromptSandboxSnapshot"), exports);
127
130
  __exportStar(require("./RejectedEnum"), exports);
128
131
  __exportStar(require("./RejectedExecutePromptEvent"), exports);
129
132
  __exportStar(require("./RejectedExecutePromptResponse"), exports);
133
+ __exportStar(require("./RejectedFunctionCall"), exports);
130
134
  __exportStar(require("./RejectedPromptExecutionMeta"), exports);
131
135
  __exportStar(require("./SandboxMetricInputParams"), exports);
132
136
  __exportStar(require("./SandboxMetricInputParamsRequest"), exports);