vellum-ai 0.0.43 → 0.0.44

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 (131) hide show
  1. package/api/resources/registeredPrompts/client/Client.d.ts +2 -0
  2. package/api/resources/registeredPrompts/client/Client.js +6 -0
  3. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +2 -1
  4. package/api/types/DeploymentRead.d.ts +0 -1
  5. package/api/types/EnrichedNormalizedCompletion.d.ts +1 -0
  6. package/api/types/ModelVersionBuildConfig.d.ts +1 -0
  7. package/api/types/ModelVersionRead.d.ts +2 -2
  8. package/api/types/NodeInputCompiledErrorValue.d.ts +9 -0
  9. package/api/types/{ModelTypeDeprecated.js → NodeInputCompiledErrorValue.js} +0 -5
  10. package/api/types/NodeInputVariableCompiledValue.d.ts +4 -1
  11. package/api/types/ProviderEnum.d.ts +5 -3
  12. package/api/types/ProviderEnum.js +2 -1
  13. package/api/types/TemplatingNodeErrorResult.d.ts +8 -0
  14. package/{dist/api/types/ModelTypeDeprecated.js → api/types/TemplatingNodeErrorResult.js} +0 -5
  15. package/api/types/TemplatingNodeResultOutput.d.ts +4 -1
  16. package/api/types/TerminalNodeErrorResult.d.ts +10 -0
  17. package/api/types/TerminalNodeErrorResult.js +5 -0
  18. package/api/types/TerminalNodeResultOutput.d.ts +4 -1
  19. package/api/types/VellumError.d.ts +8 -0
  20. package/api/types/VellumError.js +5 -0
  21. package/api/types/VellumErrorCodeEnum.d.ts +14 -0
  22. package/api/types/VellumErrorCodeEnum.js +11 -0
  23. package/api/types/VellumVariableType.d.ts +3 -1
  24. package/api/types/VellumVariableType.js +1 -0
  25. package/api/types/WorkflowResultEventOutputData.d.ts +4 -1
  26. package/api/types/WorkflowResultEventOutputDataError.d.ts +13 -0
  27. package/api/types/WorkflowResultEventOutputDataError.js +5 -0
  28. package/api/types/index.d.ts +6 -1
  29. package/api/types/index.js +6 -1
  30. package/dist/api/resources/registeredPrompts/client/Client.d.ts +2 -0
  31. package/dist/api/resources/registeredPrompts/client/Client.js +6 -0
  32. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +2 -1
  33. package/dist/api/types/DeploymentRead.d.ts +0 -1
  34. package/dist/api/types/EnrichedNormalizedCompletion.d.ts +1 -0
  35. package/dist/api/types/ModelVersionBuildConfig.d.ts +1 -0
  36. package/dist/api/types/ModelVersionRead.d.ts +2 -2
  37. package/dist/api/types/NodeInputCompiledErrorValue.d.ts +9 -0
  38. package/dist/api/types/NodeInputCompiledErrorValue.js +5 -0
  39. package/dist/api/types/NodeInputVariableCompiledValue.d.ts +4 -1
  40. package/dist/api/types/ProviderEnum.d.ts +5 -3
  41. package/dist/api/types/ProviderEnum.js +2 -1
  42. package/dist/api/types/TemplatingNodeErrorResult.d.ts +8 -0
  43. package/dist/api/types/TemplatingNodeErrorResult.js +5 -0
  44. package/dist/api/types/TemplatingNodeResultOutput.d.ts +4 -1
  45. package/dist/api/types/TerminalNodeErrorResult.d.ts +10 -0
  46. package/dist/api/types/TerminalNodeErrorResult.js +5 -0
  47. package/dist/api/types/TerminalNodeResultOutput.d.ts +4 -1
  48. package/dist/api/types/VellumError.d.ts +8 -0
  49. package/dist/api/types/VellumError.js +5 -0
  50. package/dist/api/types/VellumErrorCodeEnum.d.ts +14 -0
  51. package/dist/api/types/VellumErrorCodeEnum.js +11 -0
  52. package/dist/api/types/VellumVariableType.d.ts +3 -1
  53. package/dist/api/types/VellumVariableType.js +1 -0
  54. package/dist/api/types/WorkflowResultEventOutputData.d.ts +4 -1
  55. package/dist/api/types/WorkflowResultEventOutputDataError.d.ts +13 -0
  56. package/dist/api/types/WorkflowResultEventOutputDataError.js +5 -0
  57. package/dist/api/types/index.d.ts +6 -1
  58. package/dist/api/types/index.js +6 -1
  59. package/dist/serialization/types/DeploymentRead.d.ts +0 -1
  60. package/dist/serialization/types/DeploymentRead.js +0 -1
  61. package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  62. package/dist/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  63. package/dist/serialization/types/ModelVersionBuildConfig.d.ts +1 -0
  64. package/dist/serialization/types/ModelVersionBuildConfig.js +1 -0
  65. package/dist/serialization/types/ModelVersionRead.d.ts +0 -1
  66. package/dist/serialization/types/ModelVersionRead.js +0 -1
  67. package/dist/serialization/types/NodeInputCompiledErrorValue.d.ts +14 -0
  68. package/dist/serialization/types/NodeInputCompiledErrorValue.js +35 -0
  69. package/dist/serialization/types/NodeInputVariableCompiledValue.d.ts +4 -1
  70. package/dist/serialization/types/NodeInputVariableCompiledValue.js +1 -0
  71. package/dist/serialization/types/ProviderEnum.d.ts +1 -1
  72. package/dist/serialization/types/ProviderEnum.js +11 -1
  73. package/dist/serialization/types/TemplatingNodeErrorResult.d.ts +13 -0
  74. package/dist/serialization/types/TemplatingNodeErrorResult.js +34 -0
  75. package/dist/serialization/types/TemplatingNodeResultOutput.d.ts +4 -1
  76. package/dist/serialization/types/TemplatingNodeResultOutput.js +1 -0
  77. package/dist/serialization/types/TerminalNodeErrorResult.d.ts +14 -0
  78. package/dist/serialization/types/TerminalNodeErrorResult.js +35 -0
  79. package/dist/serialization/types/TerminalNodeResultOutput.d.ts +4 -1
  80. package/dist/serialization/types/TerminalNodeResultOutput.js +1 -0
  81. package/dist/serialization/types/VellumError.d.ts +13 -0
  82. package/dist/serialization/types/VellumError.js +34 -0
  83. package/dist/serialization/types/VellumErrorCodeEnum.d.ts +10 -0
  84. package/dist/serialization/types/{ModelTypeDeprecated.js → VellumErrorCodeEnum.js} +2 -2
  85. package/dist/serialization/types/VellumVariableType.d.ts +1 -1
  86. package/dist/serialization/types/VellumVariableType.js +1 -1
  87. package/dist/serialization/types/WorkflowResultEventOutputData.d.ts +4 -1
  88. package/dist/serialization/types/WorkflowResultEventOutputData.js +1 -0
  89. package/dist/serialization/types/WorkflowResultEventOutputDataError.d.ts +17 -0
  90. package/dist/serialization/types/WorkflowResultEventOutputDataError.js +38 -0
  91. package/dist/serialization/types/index.d.ts +6 -1
  92. package/dist/serialization/types/index.js +6 -1
  93. package/package.json +1 -1
  94. package/serialization/types/DeploymentRead.d.ts +0 -1
  95. package/serialization/types/DeploymentRead.js +0 -1
  96. package/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  97. package/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  98. package/serialization/types/ModelVersionBuildConfig.d.ts +1 -0
  99. package/serialization/types/ModelVersionBuildConfig.js +1 -0
  100. package/serialization/types/ModelVersionRead.d.ts +0 -1
  101. package/serialization/types/ModelVersionRead.js +0 -1
  102. package/serialization/types/NodeInputCompiledErrorValue.d.ts +14 -0
  103. package/serialization/types/NodeInputCompiledErrorValue.js +35 -0
  104. package/serialization/types/NodeInputVariableCompiledValue.d.ts +4 -1
  105. package/serialization/types/NodeInputVariableCompiledValue.js +1 -0
  106. package/serialization/types/ProviderEnum.d.ts +1 -1
  107. package/serialization/types/ProviderEnum.js +11 -1
  108. package/serialization/types/TemplatingNodeErrorResult.d.ts +13 -0
  109. package/serialization/types/TemplatingNodeErrorResult.js +34 -0
  110. package/serialization/types/TemplatingNodeResultOutput.d.ts +4 -1
  111. package/serialization/types/TemplatingNodeResultOutput.js +1 -0
  112. package/serialization/types/TerminalNodeErrorResult.d.ts +14 -0
  113. package/serialization/types/TerminalNodeErrorResult.js +35 -0
  114. package/serialization/types/TerminalNodeResultOutput.d.ts +4 -1
  115. package/serialization/types/TerminalNodeResultOutput.js +1 -0
  116. package/serialization/types/VellumError.d.ts +13 -0
  117. package/serialization/types/VellumError.js +34 -0
  118. package/serialization/types/VellumErrorCodeEnum.d.ts +10 -0
  119. package/serialization/types/{ModelTypeDeprecated.js → VellumErrorCodeEnum.js} +2 -2
  120. package/serialization/types/VellumVariableType.d.ts +1 -1
  121. package/serialization/types/VellumVariableType.js +1 -1
  122. package/serialization/types/WorkflowResultEventOutputData.d.ts +4 -1
  123. package/serialization/types/WorkflowResultEventOutputData.js +1 -0
  124. package/serialization/types/WorkflowResultEventOutputDataError.d.ts +17 -0
  125. package/serialization/types/WorkflowResultEventOutputDataError.js +38 -0
  126. package/serialization/types/index.d.ts +6 -1
  127. package/serialization/types/index.js +6 -1
  128. package/api/types/ModelTypeDeprecated.d.ts +0 -12
  129. package/dist/api/types/ModelTypeDeprecated.d.ts +0 -12
  130. package/dist/serialization/types/ModelTypeDeprecated.d.ts +0 -10
  131. package/serialization/types/ModelTypeDeprecated.d.ts +0 -10
@@ -18,6 +18,8 @@ export declare class RegisteredPrompts {
18
18
  * partners, not directly by Vellum users.
19
19
  *
20
20
  * Under the hood, this endpoint creates a new sandbox, a new model version, and a new deployment.
21
+ * @throws {Vellum.BadRequestError}
22
+ * @throws {Vellum.NotFoundError}
21
23
  * @throws {Vellum.ConflictError}
22
24
  */
23
25
  registerPrompt(request: Vellum.RegisterPromptRequestRequest): Promise<Vellum.RegisterPromptResponse>;
@@ -46,6 +46,8 @@ class RegisteredPrompts {
46
46
  * partners, not directly by Vellum users.
47
47
  *
48
48
  * Under the hood, this endpoint creates a new sandbox, a new model version, and a new deployment.
49
+ * @throws {Vellum.BadRequestError}
50
+ * @throws {Vellum.NotFoundError}
49
51
  * @throws {Vellum.ConflictError}
50
52
  */
51
53
  async registerPrompt(request) {
@@ -69,6 +71,10 @@ class RegisteredPrompts {
69
71
  }
70
72
  if (_response.error.reason === "status-code") {
71
73
  switch (_response.error.statusCode) {
74
+ case 400:
75
+ throw new Vellum.BadRequestError(_response.error.body);
76
+ case 404:
77
+ throw new Vellum.NotFoundError(_response.error.body);
72
78
  case 409:
73
79
  throw new Vellum.ConflictError(await serializers.RegisterPromptErrorResponse.parseOrThrow(_response.error.body, {
74
80
  unrecognizedObjectKeys: "passthrough",
@@ -17,8 +17,9 @@ export interface RegisterPromptRequestRequest {
17
17
  * * `GOOGLE` - Google
18
18
  * * `HOSTED` - Hosted
19
19
  * * `MOSAICML` - MosaicML
20
- * * `MYSTIC` - Mystic
21
20
  * * `OPENAI` - OpenAI
21
+ * * `HUGGINGFACE` - HuggingFace
22
+ * * `MYSTIC` - Mystic
22
23
  * * `PYQ` - Pyq
23
24
  */
24
25
  provider: Vellum.ProviderEnum;
@@ -25,7 +25,6 @@ export interface DeploymentRead {
25
25
  * * `PRODUCTION` - Production
26
26
  */
27
27
  environment?: Vellum.EnvironmentEnum;
28
- modelType: Vellum.ModelTypeDeprecated;
29
28
  activeModelVersionIds: string[];
30
29
  lastDeployedOn: Date;
31
30
  inputVariables: Vellum.VellumVariable[];
@@ -21,5 +21,6 @@ export interface EnrichedNormalizedCompletion {
21
21
  logprobs?: Vellum.NormalizedLogProbs;
22
22
  /** The ID of the model version used to generate this completion. */
23
23
  modelVersionId: string;
24
+ promptVersionId?: string;
24
25
  type?: Vellum.VellumVariableType;
25
26
  }
@@ -7,4 +7,5 @@ export interface ModelVersionBuildConfig {
7
7
  baseModel: string;
8
8
  /** Information about the sandbox snapshot that was used to create this model version, if applicable. */
9
9
  sandboxSnapshot?: Vellum.ModelVersionSandboxSnapshot;
10
+ promptVersionId?: string;
10
11
  }
@@ -9,7 +9,6 @@ export interface ModelVersionRead {
9
9
  created: Date;
10
10
  /** Human-friendly name for this model version. */
11
11
  label: string;
12
- modelType: Vellum.ModelTypeDeprecated;
13
12
  /**
14
13
  * Which LLM provider this model version is associated with.
15
14
  *
@@ -18,8 +17,9 @@ export interface ModelVersionRead {
18
17
  * * `GOOGLE` - Google
19
18
  * * `HOSTED` - Hosted
20
19
  * * `MOSAICML` - MosaicML
21
- * * `MYSTIC` - Mystic
22
20
  * * `OPENAI` - OpenAI
21
+ * * `HUGGINGFACE` - HuggingFace
22
+ * * `MYSTIC` - Mystic
23
23
  * * `PYQ` - Pyq
24
24
  */
25
25
  provider: Vellum.ProviderEnum;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface NodeInputCompiledErrorValue {
6
+ nodeInputId: string;
7
+ key: string;
8
+ value?: Vellum.VellumError;
9
+ }
@@ -3,8 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ModelTypeDeprecated = void 0;
7
- exports.ModelTypeDeprecated = {
8
- Generate: "GENERATE",
9
- Classify: "CLASSIFY",
10
- };
@@ -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 NodeInputVariableCompiledValue = Vellum.NodeInputVariableCompiledValue.String | Vellum.NodeInputVariableCompiledValue.Number | Vellum.NodeInputVariableCompiledValue.Json | Vellum.NodeInputVariableCompiledValue.ChatHistory | Vellum.NodeInputVariableCompiledValue.SearchResults;
5
+ export declare type NodeInputVariableCompiledValue = Vellum.NodeInputVariableCompiledValue.String | Vellum.NodeInputVariableCompiledValue.Number | Vellum.NodeInputVariableCompiledValue.Json | Vellum.NodeInputVariableCompiledValue.ChatHistory | Vellum.NodeInputVariableCompiledValue.SearchResults | Vellum.NodeInputVariableCompiledValue.Error_;
6
6
  export declare namespace NodeInputVariableCompiledValue {
7
7
  interface String extends Vellum.NodeInputCompiledStringValue {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace NodeInputVariableCompiledValue {
19
19
  interface SearchResults extends Vellum.NodeInputCompiledSearchResultsValue {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.NodeInputCompiledErrorValue {
23
+ type: "ERROR";
24
+ }
22
25
  }
@@ -7,18 +7,20 @@
7
7
  * * `GOOGLE` - Google
8
8
  * * `HOSTED` - Hosted
9
9
  * * `MOSAICML` - MosaicML
10
- * * `MYSTIC` - Mystic
11
10
  * * `OPENAI` - OpenAI
11
+ * * `HUGGINGFACE` - HuggingFace
12
+ * * `MYSTIC` - Mystic
12
13
  * * `PYQ` - Pyq
13
14
  */
14
- export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "MYSTIC" | "OPENAI" | "PYQ";
15
+ export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "OPENAI" | "HUGGINGFACE" | "MYSTIC" | "PYQ";
15
16
  export declare const ProviderEnum: {
16
17
  readonly Anthropic: "ANTHROPIC";
17
18
  readonly Cohere: "COHERE";
18
19
  readonly Google: "GOOGLE";
19
20
  readonly Hosted: "HOSTED";
20
21
  readonly Mosaicml: "MOSAICML";
21
- readonly Mystic: "MYSTIC";
22
22
  readonly Openai: "OPENAI";
23
+ readonly Huggingface: "HUGGINGFACE";
24
+ readonly Mystic: "MYSTIC";
23
25
  readonly Pyq: "PYQ";
24
26
  };
@@ -10,7 +10,8 @@ exports.ProviderEnum = {
10
10
  Google: "GOOGLE",
11
11
  Hosted: "HOSTED",
12
12
  Mosaicml: "MOSAICML",
13
- Mystic: "MYSTIC",
14
13
  Openai: "OPENAI",
14
+ Huggingface: "HUGGINGFACE",
15
+ Mystic: "MYSTIC",
15
16
  Pyq: "PYQ",
16
17
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface TemplatingNodeErrorResult {
6
+ id: string;
7
+ value?: Vellum.VellumError;
8
+ }
@@ -3,8 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ModelTypeDeprecated = void 0;
7
- exports.ModelTypeDeprecated = {
8
- Generate: "GENERATE",
9
- Classify: "CLASSIFY",
10
- };
@@ -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 TemplatingNodeResultOutput = Vellum.TemplatingNodeResultOutput.String | Vellum.TemplatingNodeResultOutput.Number | Vellum.TemplatingNodeResultOutput.Json | Vellum.TemplatingNodeResultOutput.ChatHistory | Vellum.TemplatingNodeResultOutput.SearchResults;
5
+ export declare type TemplatingNodeResultOutput = Vellum.TemplatingNodeResultOutput.String | Vellum.TemplatingNodeResultOutput.Number | Vellum.TemplatingNodeResultOutput.Json | Vellum.TemplatingNodeResultOutput.ChatHistory | Vellum.TemplatingNodeResultOutput.SearchResults | Vellum.TemplatingNodeResultOutput.Error_;
6
6
  export declare namespace TemplatingNodeResultOutput {
7
7
  interface String extends Vellum.TemplatingNodeStringResult {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace TemplatingNodeResultOutput {
19
19
  interface SearchResults extends Vellum.TemplatingNodeSearchResultsResult {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.TemplatingNodeErrorResult {
23
+ type: "ERROR";
24
+ }
22
25
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface TerminalNodeErrorResult {
6
+ id?: string;
7
+ /** The unique name given to the terminal node that produced this output. */
8
+ name: string;
9
+ value?: Vellum.VellumError;
10
+ }
@@ -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 });
@@ -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 TerminalNodeResultOutput = Vellum.TerminalNodeResultOutput.String | Vellum.TerminalNodeResultOutput.Number | Vellum.TerminalNodeResultOutput.Json | Vellum.TerminalNodeResultOutput.ChatHistory | Vellum.TerminalNodeResultOutput.SearchResults;
5
+ export declare type TerminalNodeResultOutput = Vellum.TerminalNodeResultOutput.String | Vellum.TerminalNodeResultOutput.Number | Vellum.TerminalNodeResultOutput.Json | Vellum.TerminalNodeResultOutput.ChatHistory | Vellum.TerminalNodeResultOutput.SearchResults | Vellum.TerminalNodeResultOutput.Error_;
6
6
  export declare namespace TerminalNodeResultOutput {
7
7
  interface String extends Vellum.TerminalNodeStringResult {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace TerminalNodeResultOutput {
19
19
  interface SearchResults extends Vellum.TerminalNodeSearchResultsResult {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.TerminalNodeErrorResult {
23
+ type: "ERROR";
24
+ }
22
25
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface VellumError {
6
+ message: string;
7
+ code: Vellum.VellumErrorCodeEnum;
8
+ }
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * * `INVALID_REQUEST` - INVALID_REQUEST
6
+ * * `PROVIDER_ERROR` - PROVIDER_ERROR
7
+ * * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR
8
+ */
9
+ export declare type VellumErrorCodeEnum = "INVALID_REQUEST" | "PROVIDER_ERROR" | "INTERNAL_SERVER_ERROR";
10
+ export declare const VellumErrorCodeEnum: {
11
+ readonly InvalidRequest: "INVALID_REQUEST";
12
+ readonly ProviderError: "PROVIDER_ERROR";
13
+ readonly InternalServerError: "INTERNAL_SERVER_ERROR";
14
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VellumErrorCodeEnum = void 0;
7
+ exports.VellumErrorCodeEnum = {
8
+ InvalidRequest: "INVALID_REQUEST",
9
+ ProviderError: "PROVIDER_ERROR",
10
+ InternalServerError: "INTERNAL_SERVER_ERROR",
11
+ };
@@ -7,12 +7,14 @@
7
7
  * * `JSON` - JSON
8
8
  * * `CHAT_HISTORY` - CHAT_HISTORY
9
9
  * * `SEARCH_RESULTS` - SEARCH_RESULTS
10
+ * * `ERROR` - ERROR
10
11
  */
11
- export declare type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS";
12
+ export declare type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR";
12
13
  export declare const VellumVariableType: {
13
14
  readonly String: "STRING";
14
15
  readonly Number: "NUMBER";
15
16
  readonly Json: "JSON";
16
17
  readonly ChatHistory: "CHAT_HISTORY";
17
18
  readonly SearchResults: "SEARCH_RESULTS";
19
+ readonly Error: "ERROR";
18
20
  };
@@ -10,4 +10,5 @@ exports.VellumVariableType = {
10
10
  Json: "JSON",
11
11
  ChatHistory: "CHAT_HISTORY",
12
12
  SearchResults: "SEARCH_RESULTS",
13
+ Error: "ERROR",
13
14
  };
@@ -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 WorkflowResultEventOutputData = Vellum.WorkflowResultEventOutputData.String | Vellum.WorkflowResultEventOutputData.Number | Vellum.WorkflowResultEventOutputData.Json | Vellum.WorkflowResultEventOutputData.ChatHistory | Vellum.WorkflowResultEventOutputData.SearchResults;
5
+ export declare type WorkflowResultEventOutputData = Vellum.WorkflowResultEventOutputData.String | Vellum.WorkflowResultEventOutputData.Number | Vellum.WorkflowResultEventOutputData.Json | Vellum.WorkflowResultEventOutputData.ChatHistory | Vellum.WorkflowResultEventOutputData.SearchResults | Vellum.WorkflowResultEventOutputData.Error_;
6
6
  export declare namespace WorkflowResultEventOutputData {
7
7
  interface String extends Vellum.WorkflowResultEventOutputDataString {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace WorkflowResultEventOutputData {
19
19
  interface SearchResults extends Vellum.WorkflowResultEventOutputDataSearchResults {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.WorkflowResultEventOutputDataError {
23
+ type: "ERROR";
24
+ }
22
25
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface WorkflowResultEventOutputDataError {
6
+ id?: string;
7
+ name: string;
8
+ state: Vellum.WorkflowNodeResultEventState;
9
+ nodeId: string;
10
+ /** The newly output string value. Only relevant for string outputs with a state of STREAMING. */
11
+ delta?: string;
12
+ value?: Vellum.VellumError;
13
+ }
@@ -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 });
@@ -35,7 +35,6 @@ export * from "./LogprobsEnum";
35
35
  export * from "./MetadataFilterConfigRequest";
36
36
  export * from "./MetadataFilterRuleCombinator";
37
37
  export * from "./MetadataFilterRuleRequest";
38
- export * from "./ModelTypeDeprecated";
39
38
  export * from "./ModelVersionBuildConfig";
40
39
  export * from "./ModelVersionCompilePromptResponse";
41
40
  export * from "./ModelVersionCompiledPrompt";
@@ -45,6 +44,7 @@ export * from "./ModelVersionRead";
45
44
  export * from "./ModelVersionReadStatusEnum";
46
45
  export * from "./ModelVersionSandboxSnapshot";
47
46
  export * from "./NodeInputCompiledChatHistoryValue";
47
+ export * from "./NodeInputCompiledErrorValue";
48
48
  export * from "./NodeInputCompiledJsonValue";
49
49
  export * from "./NodeInputCompiledNumberValue";
50
50
  export * from "./NodeInputCompiledSearchResultsValue";
@@ -95,6 +95,7 @@ export * from "./SubmitCompletionActualRequest";
95
95
  export * from "./SubmitCompletionActualsErrorResponse";
96
96
  export * from "./SubmitWorkflowExecutionActualRequest";
97
97
  export * from "./TemplatingNodeChatHistoryResult";
98
+ export * from "./TemplatingNodeErrorResult";
98
99
  export * from "./TemplatingNodeJsonResult";
99
100
  export * from "./TemplatingNodeNumberResult";
100
101
  export * from "./TemplatingNodeResult";
@@ -103,6 +104,7 @@ export * from "./TemplatingNodeResultOutput";
103
104
  export * from "./TemplatingNodeSearchResultsResult";
104
105
  export * from "./TemplatingNodeStringResult";
105
106
  export * from "./TerminalNodeChatHistoryResult";
107
+ export * from "./TerminalNodeErrorResult";
106
108
  export * from "./TerminalNodeJsonResult";
107
109
  export * from "./TerminalNodeNumberResult";
108
110
  export * from "./TerminalNodeResult";
@@ -113,6 +115,8 @@ export * from "./TerminalNodeStringResult";
113
115
  export * from "./TestSuiteTestCase";
114
116
  export * from "./UploadDocumentErrorResponse";
115
117
  export * from "./UploadDocumentResponse";
118
+ export * from "./VellumError";
119
+ export * from "./VellumErrorCodeEnum";
116
120
  export * from "./VellumVariable";
117
121
  export * from "./VellumVariableType";
118
122
  export * from "./WorkflowEventError";
@@ -133,6 +137,7 @@ export * from "./WorkflowRequestStringInputRequest";
133
137
  export * from "./WorkflowResultEvent";
134
138
  export * from "./WorkflowResultEventOutputData";
135
139
  export * from "./WorkflowResultEventOutputDataChatHistory";
140
+ export * from "./WorkflowResultEventOutputDataError";
136
141
  export * from "./WorkflowResultEventOutputDataJson";
137
142
  export * from "./WorkflowResultEventOutputDataNumber";
138
143
  export * from "./WorkflowResultEventOutputDataSearchResults";
@@ -51,7 +51,6 @@ __exportStar(require("./LogprobsEnum"), exports);
51
51
  __exportStar(require("./MetadataFilterConfigRequest"), exports);
52
52
  __exportStar(require("./MetadataFilterRuleCombinator"), exports);
53
53
  __exportStar(require("./MetadataFilterRuleRequest"), exports);
54
- __exportStar(require("./ModelTypeDeprecated"), exports);
55
54
  __exportStar(require("./ModelVersionBuildConfig"), exports);
56
55
  __exportStar(require("./ModelVersionCompilePromptResponse"), exports);
57
56
  __exportStar(require("./ModelVersionCompiledPrompt"), exports);
@@ -61,6 +60,7 @@ __exportStar(require("./ModelVersionRead"), exports);
61
60
  __exportStar(require("./ModelVersionReadStatusEnum"), exports);
62
61
  __exportStar(require("./ModelVersionSandboxSnapshot"), exports);
63
62
  __exportStar(require("./NodeInputCompiledChatHistoryValue"), exports);
63
+ __exportStar(require("./NodeInputCompiledErrorValue"), exports);
64
64
  __exportStar(require("./NodeInputCompiledJsonValue"), exports);
65
65
  __exportStar(require("./NodeInputCompiledNumberValue"), exports);
66
66
  __exportStar(require("./NodeInputCompiledSearchResultsValue"), exports);
@@ -111,6 +111,7 @@ __exportStar(require("./SubmitCompletionActualRequest"), exports);
111
111
  __exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
112
112
  __exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
113
113
  __exportStar(require("./TemplatingNodeChatHistoryResult"), exports);
114
+ __exportStar(require("./TemplatingNodeErrorResult"), exports);
114
115
  __exportStar(require("./TemplatingNodeJsonResult"), exports);
115
116
  __exportStar(require("./TemplatingNodeNumberResult"), exports);
116
117
  __exportStar(require("./TemplatingNodeResult"), exports);
@@ -119,6 +120,7 @@ __exportStar(require("./TemplatingNodeResultOutput"), exports);
119
120
  __exportStar(require("./TemplatingNodeSearchResultsResult"), exports);
120
121
  __exportStar(require("./TemplatingNodeStringResult"), exports);
121
122
  __exportStar(require("./TerminalNodeChatHistoryResult"), exports);
123
+ __exportStar(require("./TerminalNodeErrorResult"), exports);
122
124
  __exportStar(require("./TerminalNodeJsonResult"), exports);
123
125
  __exportStar(require("./TerminalNodeNumberResult"), exports);
124
126
  __exportStar(require("./TerminalNodeResult"), exports);
@@ -129,6 +131,8 @@ __exportStar(require("./TerminalNodeStringResult"), exports);
129
131
  __exportStar(require("./TestSuiteTestCase"), exports);
130
132
  __exportStar(require("./UploadDocumentErrorResponse"), exports);
131
133
  __exportStar(require("./UploadDocumentResponse"), exports);
134
+ __exportStar(require("./VellumError"), exports);
135
+ __exportStar(require("./VellumErrorCodeEnum"), exports);
132
136
  __exportStar(require("./VellumVariable"), exports);
133
137
  __exportStar(require("./VellumVariableType"), exports);
134
138
  __exportStar(require("./WorkflowEventError"), exports);
@@ -149,6 +153,7 @@ __exportStar(require("./WorkflowRequestStringInputRequest"), exports);
149
153
  __exportStar(require("./WorkflowResultEvent"), exports);
150
154
  __exportStar(require("./WorkflowResultEventOutputData"), exports);
151
155
  __exportStar(require("./WorkflowResultEventOutputDataChatHistory"), exports);
156
+ __exportStar(require("./WorkflowResultEventOutputDataError"), exports);
152
157
  __exportStar(require("./WorkflowResultEventOutputDataJson"), exports);
153
158
  __exportStar(require("./WorkflowResultEventOutputDataNumber"), exports);
154
159
  __exportStar(require("./WorkflowResultEventOutputDataSearchResults"), exports);
@@ -18,6 +18,8 @@ export declare class RegisteredPrompts {
18
18
  * partners, not directly by Vellum users.
19
19
  *
20
20
  * Under the hood, this endpoint creates a new sandbox, a new model version, and a new deployment.
21
+ * @throws {Vellum.BadRequestError}
22
+ * @throws {Vellum.NotFoundError}
21
23
  * @throws {Vellum.ConflictError}
22
24
  */
23
25
  registerPrompt(request: Vellum.RegisterPromptRequestRequest): Promise<Vellum.RegisterPromptResponse>;
@@ -46,6 +46,8 @@ class RegisteredPrompts {
46
46
  * partners, not directly by Vellum users.
47
47
  *
48
48
  * Under the hood, this endpoint creates a new sandbox, a new model version, and a new deployment.
49
+ * @throws {Vellum.BadRequestError}
50
+ * @throws {Vellum.NotFoundError}
49
51
  * @throws {Vellum.ConflictError}
50
52
  */
51
53
  async registerPrompt(request) {
@@ -69,6 +71,10 @@ class RegisteredPrompts {
69
71
  }
70
72
  if (_response.error.reason === "status-code") {
71
73
  switch (_response.error.statusCode) {
74
+ case 400:
75
+ throw new Vellum.BadRequestError(_response.error.body);
76
+ case 404:
77
+ throw new Vellum.NotFoundError(_response.error.body);
72
78
  case 409:
73
79
  throw new Vellum.ConflictError(await serializers.RegisterPromptErrorResponse.parseOrThrow(_response.error.body, {
74
80
  unrecognizedObjectKeys: "passthrough",
@@ -17,8 +17,9 @@ export interface RegisterPromptRequestRequest {
17
17
  * * `GOOGLE` - Google
18
18
  * * `HOSTED` - Hosted
19
19
  * * `MOSAICML` - MosaicML
20
- * * `MYSTIC` - Mystic
21
20
  * * `OPENAI` - OpenAI
21
+ * * `HUGGINGFACE` - HuggingFace
22
+ * * `MYSTIC` - Mystic
22
23
  * * `PYQ` - Pyq
23
24
  */
24
25
  provider: Vellum.ProviderEnum;
@@ -25,7 +25,6 @@ export interface DeploymentRead {
25
25
  * * `PRODUCTION` - Production
26
26
  */
27
27
  environment?: Vellum.EnvironmentEnum;
28
- modelType: Vellum.ModelTypeDeprecated;
29
28
  activeModelVersionIds: string[];
30
29
  lastDeployedOn: Date;
31
30
  inputVariables: Vellum.VellumVariable[];
@@ -21,5 +21,6 @@ export interface EnrichedNormalizedCompletion {
21
21
  logprobs?: Vellum.NormalizedLogProbs;
22
22
  /** The ID of the model version used to generate this completion. */
23
23
  modelVersionId: string;
24
+ promptVersionId?: string;
24
25
  type?: Vellum.VellumVariableType;
25
26
  }
@@ -7,4 +7,5 @@ export interface ModelVersionBuildConfig {
7
7
  baseModel: string;
8
8
  /** Information about the sandbox snapshot that was used to create this model version, if applicable. */
9
9
  sandboxSnapshot?: Vellum.ModelVersionSandboxSnapshot;
10
+ promptVersionId?: string;
10
11
  }
@@ -9,7 +9,6 @@ export interface ModelVersionRead {
9
9
  created: Date;
10
10
  /** Human-friendly name for this model version. */
11
11
  label: string;
12
- modelType: Vellum.ModelTypeDeprecated;
13
12
  /**
14
13
  * Which LLM provider this model version is associated with.
15
14
  *
@@ -18,8 +17,9 @@ export interface ModelVersionRead {
18
17
  * * `GOOGLE` - Google
19
18
  * * `HOSTED` - Hosted
20
19
  * * `MOSAICML` - MosaicML
21
- * * `MYSTIC` - Mystic
22
20
  * * `OPENAI` - OpenAI
21
+ * * `HUGGINGFACE` - HuggingFace
22
+ * * `MYSTIC` - Mystic
23
23
  * * `PYQ` - Pyq
24
24
  */
25
25
  provider: Vellum.ProviderEnum;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface NodeInputCompiledErrorValue {
6
+ nodeInputId: string;
7
+ key: string;
8
+ value?: Vellum.VellumError;
9
+ }
@@ -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 });
@@ -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 NodeInputVariableCompiledValue = Vellum.NodeInputVariableCompiledValue.String | Vellum.NodeInputVariableCompiledValue.Number | Vellum.NodeInputVariableCompiledValue.Json | Vellum.NodeInputVariableCompiledValue.ChatHistory | Vellum.NodeInputVariableCompiledValue.SearchResults;
5
+ export declare type NodeInputVariableCompiledValue = Vellum.NodeInputVariableCompiledValue.String | Vellum.NodeInputVariableCompiledValue.Number | Vellum.NodeInputVariableCompiledValue.Json | Vellum.NodeInputVariableCompiledValue.ChatHistory | Vellum.NodeInputVariableCompiledValue.SearchResults | Vellum.NodeInputVariableCompiledValue.Error_;
6
6
  export declare namespace NodeInputVariableCompiledValue {
7
7
  interface String extends Vellum.NodeInputCompiledStringValue {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace NodeInputVariableCompiledValue {
19
19
  interface SearchResults extends Vellum.NodeInputCompiledSearchResultsValue {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.NodeInputCompiledErrorValue {
23
+ type: "ERROR";
24
+ }
22
25
  }
@@ -7,18 +7,20 @@
7
7
  * * `GOOGLE` - Google
8
8
  * * `HOSTED` - Hosted
9
9
  * * `MOSAICML` - MosaicML
10
- * * `MYSTIC` - Mystic
11
10
  * * `OPENAI` - OpenAI
11
+ * * `HUGGINGFACE` - HuggingFace
12
+ * * `MYSTIC` - Mystic
12
13
  * * `PYQ` - Pyq
13
14
  */
14
- export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "MYSTIC" | "OPENAI" | "PYQ";
15
+ export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "OPENAI" | "HUGGINGFACE" | "MYSTIC" | "PYQ";
15
16
  export declare const ProviderEnum: {
16
17
  readonly Anthropic: "ANTHROPIC";
17
18
  readonly Cohere: "COHERE";
18
19
  readonly Google: "GOOGLE";
19
20
  readonly Hosted: "HOSTED";
20
21
  readonly Mosaicml: "MOSAICML";
21
- readonly Mystic: "MYSTIC";
22
22
  readonly Openai: "OPENAI";
23
+ readonly Huggingface: "HUGGINGFACE";
24
+ readonly Mystic: "MYSTIC";
23
25
  readonly Pyq: "PYQ";
24
26
  };
@@ -10,7 +10,8 @@ exports.ProviderEnum = {
10
10
  Google: "GOOGLE",
11
11
  Hosted: "HOSTED",
12
12
  Mosaicml: "MOSAICML",
13
- Mystic: "MYSTIC",
14
13
  Openai: "OPENAI",
14
+ Huggingface: "HUGGINGFACE",
15
+ Mystic: "MYSTIC",
15
16
  Pyq: "PYQ",
16
17
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface TemplatingNodeErrorResult {
6
+ id: string;
7
+ value?: Vellum.VellumError;
8
+ }
@@ -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 });
@@ -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 TemplatingNodeResultOutput = Vellum.TemplatingNodeResultOutput.String | Vellum.TemplatingNodeResultOutput.Number | Vellum.TemplatingNodeResultOutput.Json | Vellum.TemplatingNodeResultOutput.ChatHistory | Vellum.TemplatingNodeResultOutput.SearchResults;
5
+ export declare type TemplatingNodeResultOutput = Vellum.TemplatingNodeResultOutput.String | Vellum.TemplatingNodeResultOutput.Number | Vellum.TemplatingNodeResultOutput.Json | Vellum.TemplatingNodeResultOutput.ChatHistory | Vellum.TemplatingNodeResultOutput.SearchResults | Vellum.TemplatingNodeResultOutput.Error_;
6
6
  export declare namespace TemplatingNodeResultOutput {
7
7
  interface String extends Vellum.TemplatingNodeStringResult {
8
8
  type: "STRING";
@@ -19,4 +19,7 @@ export declare namespace TemplatingNodeResultOutput {
19
19
  interface SearchResults extends Vellum.TemplatingNodeSearchResultsResult {
20
20
  type: "SEARCH_RESULTS";
21
21
  }
22
+ interface Error_ extends Vellum.TemplatingNodeErrorResult {
23
+ type: "ERROR";
24
+ }
22
25
  }