vellum-ai 0.1.10 → 0.1.12

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 (71) hide show
  1. package/Client.js +8 -8
  2. package/api/resources/deployments/client/Client.js +2 -2
  3. package/api/resources/documentIndexes/client/Client.js +2 -2
  4. package/api/resources/documents/client/Client.js +4 -4
  5. package/api/resources/modelVersions/client/Client.js +1 -1
  6. package/api/resources/registeredPrompts/client/Client.js +1 -1
  7. package/api/resources/sandboxes/client/Client.js +2 -2
  8. package/api/resources/testSuites/client/Client.js +2 -2
  9. package/api/types/FulfilledFunctionCall.d.ts +11 -0
  10. package/api/types/FulfilledFunctionCall.js +5 -0
  11. package/api/types/FunctionCall.d.ts +13 -0
  12. package/api/types/FunctionCall.js +5 -0
  13. package/api/types/FunctionCallVariableValue.d.ts +7 -0
  14. package/api/types/FunctionCallVariableValue.js +5 -0
  15. package/api/types/PromptOutput.d.ts +4 -1
  16. package/api/types/RejectedFunctionCall.d.ts +12 -0
  17. package/api/types/RejectedFunctionCall.js +5 -0
  18. package/api/types/VellumVariableType.d.ts +3 -1
  19. package/api/types/VellumVariableType.js +1 -0
  20. package/api/types/index.d.ts +4 -0
  21. package/api/types/index.js +4 -0
  22. package/dist/Client.js +8 -8
  23. package/dist/api/resources/deployments/client/Client.js +2 -2
  24. package/dist/api/resources/documentIndexes/client/Client.js +2 -2
  25. package/dist/api/resources/documents/client/Client.js +4 -4
  26. package/dist/api/resources/modelVersions/client/Client.js +1 -1
  27. package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
  28. package/dist/api/resources/sandboxes/client/Client.js +2 -2
  29. package/dist/api/resources/testSuites/client/Client.js +2 -2
  30. package/dist/api/types/FulfilledFunctionCall.d.ts +11 -0
  31. package/dist/api/types/FulfilledFunctionCall.js +5 -0
  32. package/dist/api/types/FunctionCall.d.ts +13 -0
  33. package/dist/api/types/FunctionCall.js +5 -0
  34. package/dist/api/types/FunctionCallVariableValue.d.ts +7 -0
  35. package/dist/api/types/FunctionCallVariableValue.js +5 -0
  36. package/dist/api/types/PromptOutput.d.ts +4 -1
  37. package/dist/api/types/RejectedFunctionCall.d.ts +12 -0
  38. package/dist/api/types/RejectedFunctionCall.js +5 -0
  39. package/dist/api/types/VellumVariableType.d.ts +3 -1
  40. package/dist/api/types/VellumVariableType.js +1 -0
  41. package/dist/api/types/index.d.ts +4 -0
  42. package/dist/api/types/index.js +4 -0
  43. package/dist/serialization/types/FulfilledFunctionCall.d.ts +14 -0
  44. package/dist/serialization/types/FulfilledFunctionCall.js +35 -0
  45. package/dist/serialization/types/FunctionCall.d.ts +16 -0
  46. package/dist/serialization/types/FunctionCall.js +48 -0
  47. package/dist/serialization/types/FunctionCallVariableValue.d.ts +12 -0
  48. package/dist/serialization/types/FunctionCallVariableValue.js +42 -0
  49. package/dist/serialization/types/PromptOutput.d.ts +4 -1
  50. package/dist/serialization/types/PromptOutput.js +1 -0
  51. package/dist/serialization/types/RejectedFunctionCall.d.ts +14 -0
  52. package/dist/serialization/types/RejectedFunctionCall.js +44 -0
  53. package/dist/serialization/types/VellumVariableType.d.ts +1 -1
  54. package/dist/serialization/types/VellumVariableType.js +10 -1
  55. package/dist/serialization/types/index.d.ts +4 -0
  56. package/dist/serialization/types/index.js +4 -0
  57. package/package.json +1 -1
  58. package/serialization/types/FulfilledFunctionCall.d.ts +14 -0
  59. package/serialization/types/FulfilledFunctionCall.js +35 -0
  60. package/serialization/types/FunctionCall.d.ts +16 -0
  61. package/serialization/types/FunctionCall.js +48 -0
  62. package/serialization/types/FunctionCallVariableValue.d.ts +12 -0
  63. package/serialization/types/FunctionCallVariableValue.js +42 -0
  64. package/serialization/types/PromptOutput.d.ts +4 -1
  65. package/serialization/types/PromptOutput.js +1 -0
  66. package/serialization/types/RejectedFunctionCall.d.ts +14 -0
  67. package/serialization/types/RejectedFunctionCall.js +44 -0
  68. package/serialization/types/VellumVariableType.d.ts +1 -1
  69. package/serialization/types/VellumVariableType.js +10 -1
  70. package/serialization/types/index.d.ts +4 -0
  71. package/serialization/types/index.js +4 -0
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "..";
5
- export declare type PromptOutput = Vellum.PromptOutput.String | Vellum.PromptOutput.Json | Vellum.PromptOutput.Error_;
5
+ export declare type PromptOutput = Vellum.PromptOutput.String | Vellum.PromptOutput.Json | Vellum.PromptOutput.Error_ | Vellum.PromptOutput.FunctionCall;
6
6
  export declare namespace PromptOutput {
7
7
  interface String extends Vellum.StringVariableValue {
8
8
  type: "STRING";
@@ -13,4 +13,7 @@ export declare namespace PromptOutput {
13
13
  interface Error_ extends Vellum.ErrorVariableValue {
14
14
  type: "ERROR";
15
15
  }
16
+ interface FunctionCall extends Vellum.FunctionCallVariableValue {
17
+ type: "FUNCTION_CALL";
18
+ }
16
19
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ /**
6
+ * Returned if the function call failed to parse for some reason.
7
+ */
8
+ export interface RejectedFunctionCall {
9
+ error: Vellum.VellumError;
10
+ id?: string;
11
+ name: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,8 +9,9 @@
9
9
  * - `SEARCH_RESULTS` - SEARCH_RESULTS
10
10
  * - `ERROR` - ERROR
11
11
  * - `ARRAY` - ARRAY
12
+ * - `FUNCTION_CALL` - FUNCTION_CALL
12
13
  */
13
- export declare type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR" | "ARRAY";
14
+ export declare type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR" | "ARRAY" | "FUNCTION_CALL";
14
15
  export declare const VellumVariableType: {
15
16
  readonly String: "STRING";
16
17
  readonly Number: "NUMBER";
@@ -19,4 +20,5 @@ export declare const VellumVariableType: {
19
20
  readonly SearchResults: "SEARCH_RESULTS";
20
21
  readonly Error: "ERROR";
21
22
  readonly Array: "ARRAY";
23
+ readonly FunctionCall: "FUNCTION_CALL";
22
24
  };
@@ -12,4 +12,5 @@ exports.VellumVariableType = {
12
12
  SearchResults: "SEARCH_RESULTS",
13
13
  Error: "ERROR",
14
14
  Array: "ARRAY",
15
+ FunctionCall: "FUNCTION_CALL",
15
16
  };
@@ -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);
@@ -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 FulfilledFunctionCall: core.serialization.ObjectSchema<serializers.FulfilledFunctionCall.Raw, Vellum.FulfilledFunctionCall>;
8
+ export declare namespace FulfilledFunctionCall {
9
+ interface Raw {
10
+ arguments: Record<string, unknown>;
11
+ id?: string | null;
12
+ name: string;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.FulfilledFunctionCall = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.FulfilledFunctionCall = core.serialization.object({
32
+ arguments: core.serialization.record(core.serialization.string(), core.serialization.unknown()),
33
+ id: core.serialization.string().optional(),
34
+ name: core.serialization.string(),
35
+ });
@@ -0,0 +1,16 @@
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 FunctionCall: core.serialization.Schema<serializers.FunctionCall.Raw, Vellum.FunctionCall>;
8
+ export declare namespace FunctionCall {
9
+ type Raw = FunctionCall.Fulfilled | FunctionCall.Rejected;
10
+ interface Fulfilled extends serializers.FulfilledFunctionCall.Raw {
11
+ state: "FULFILLED";
12
+ }
13
+ interface Rejected extends serializers.RejectedFunctionCall.Raw {
14
+ state: "REJECTED";
15
+ }
16
+ }
@@ -0,0 +1,48 @@
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.FunctionCall = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.FunctionCall = core.serialization
41
+ .union("state", {
42
+ FULFILLED: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).FulfilledFunctionCall; })),
43
+ REJECTED: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).RejectedFunctionCall; })),
44
+ })
45
+ .transform({
46
+ transform: (value) => value,
47
+ untransform: (value) => value,
48
+ });
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vellum-ai",
3
- "version": "v0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "repository": "https://github.com/vellum-ai/vellum-client-node",
6
6
  "main": "./index.js",
@@ -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 FulfilledFunctionCall: core.serialization.ObjectSchema<serializers.FulfilledFunctionCall.Raw, Vellum.FulfilledFunctionCall>;
8
+ export declare namespace FulfilledFunctionCall {
9
+ interface Raw {
10
+ arguments: Record<string, unknown>;
11
+ id?: string | null;
12
+ name: string;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.FulfilledFunctionCall = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.FulfilledFunctionCall = core.serialization.object({
32
+ arguments: core.serialization.record(core.serialization.string(), core.serialization.unknown()),
33
+ id: core.serialization.string().optional(),
34
+ name: core.serialization.string(),
35
+ });
@@ -0,0 +1,16 @@
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 FunctionCall: core.serialization.Schema<serializers.FunctionCall.Raw, Vellum.FunctionCall>;
8
+ export declare namespace FunctionCall {
9
+ type Raw = FunctionCall.Fulfilled | FunctionCall.Rejected;
10
+ interface Fulfilled extends serializers.FulfilledFunctionCall.Raw {
11
+ state: "FULFILLED";
12
+ }
13
+ interface Rejected extends serializers.RejectedFunctionCall.Raw {
14
+ state: "REJECTED";
15
+ }
16
+ }
@@ -0,0 +1,48 @@
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.FunctionCall = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.FunctionCall = core.serialization
41
+ .union("state", {
42
+ FULFILLED: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).FulfilledFunctionCall; })),
43
+ REJECTED: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).RejectedFunctionCall; })),
44
+ })
45
+ .transform({
46
+ transform: (value) => value,
47
+ untransform: (value) => value,
48
+ });
@@ -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,