vellum-ai 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/client/requests/GenerateBodyRequest.d.ts +1 -1
- package/api/client/requests/GenerateStreamBodyRequest.d.ts +1 -1
- package/api/resources/documentIndexes/client/Client.d.ts +4 -0
- package/api/resources/documentIndexes/client/Client.js +39 -0
- package/api/types/ApiNodeResult.d.ts +7 -0
- package/api/types/{ContentType.js → ApiNodeResult.js} +0 -5
- package/api/types/ApiNodeResultData.d.ts +11 -0
- package/{dist/api/types/ContentType.js → api/types/ApiNodeResultData.js} +0 -5
- package/api/types/EnrichedNormalizedCompletion.d.ts +1 -1
- package/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/api/types/NodeInputCompiledNumberValue.d.ts +8 -0
- package/api/types/NodeInputCompiledNumberValue.js +5 -0
- package/api/types/NodeInputVariableCompiledValue.d.ts +4 -1
- package/api/types/PromptTemplateBlockProperties.d.ts +1 -1
- package/api/types/PromptTemplateBlockPropertiesRequest.d.ts +1 -1
- package/api/types/SearchResultMergingRequest.d.ts +1 -1
- package/api/types/SearchWeightsRequest.d.ts +3 -3
- package/api/types/TemplatingNodeNumberResult.d.ts +7 -0
- package/api/types/TemplatingNodeNumberResult.js +5 -0
- package/api/types/TemplatingNodeResultOutput.d.ts +4 -1
- package/api/types/TerminalNodeNumberResult.d.ts +9 -0
- package/api/types/TerminalNodeNumberResult.js +5 -0
- package/api/types/TerminalNodeResultOutput.d.ts +4 -1
- package/api/types/VellumVariableType.d.ts +6 -4
- package/api/types/VellumVariableType.js +1 -0
- package/api/types/WorkflowNodeResultData.d.ts +4 -1
- package/api/types/WorkflowResultEventOutputData.d.ts +4 -1
- package/api/types/WorkflowResultEventOutputDataNumber.d.ts +13 -0
- package/api/types/WorkflowResultEventOutputDataNumber.js +5 -0
- package/api/types/index.d.ts +6 -1
- package/api/types/index.js +6 -1
- package/dist/api/client/requests/GenerateBodyRequest.d.ts +1 -1
- package/dist/api/client/requests/GenerateStreamBodyRequest.d.ts +1 -1
- package/dist/api/resources/documentIndexes/client/Client.d.ts +4 -0
- package/dist/api/resources/documentIndexes/client/Client.js +39 -0
- package/dist/api/types/ApiNodeResult.d.ts +7 -0
- package/dist/api/types/ApiNodeResult.js +5 -0
- package/dist/api/types/ApiNodeResultData.d.ts +11 -0
- package/dist/api/types/ApiNodeResultData.js +5 -0
- package/dist/api/types/EnrichedNormalizedCompletion.d.ts +1 -1
- package/dist/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/dist/api/types/NodeInputCompiledNumberValue.d.ts +8 -0
- package/dist/api/types/NodeInputCompiledNumberValue.js +5 -0
- package/dist/api/types/NodeInputVariableCompiledValue.d.ts +4 -1
- package/dist/api/types/PromptTemplateBlockProperties.d.ts +1 -1
- package/dist/api/types/PromptTemplateBlockPropertiesRequest.d.ts +1 -1
- package/dist/api/types/SearchResultMergingRequest.d.ts +1 -1
- package/dist/api/types/SearchWeightsRequest.d.ts +3 -3
- package/dist/api/types/TemplatingNodeNumberResult.d.ts +7 -0
- package/dist/api/types/TemplatingNodeNumberResult.js +5 -0
- package/dist/api/types/TemplatingNodeResultOutput.d.ts +4 -1
- package/dist/api/types/TerminalNodeNumberResult.d.ts +9 -0
- package/dist/api/types/TerminalNodeNumberResult.js +5 -0
- package/dist/api/types/TerminalNodeResultOutput.d.ts +4 -1
- package/dist/api/types/VellumVariableType.d.ts +6 -4
- package/dist/api/types/VellumVariableType.js +1 -0
- package/dist/api/types/WorkflowNodeResultData.d.ts +4 -1
- package/dist/api/types/WorkflowResultEventOutputData.d.ts +4 -1
- package/dist/api/types/WorkflowResultEventOutputDataNumber.d.ts +13 -0
- package/dist/api/types/WorkflowResultEventOutputDataNumber.js +5 -0
- package/dist/api/types/index.d.ts +6 -1
- package/dist/api/types/index.js +6 -1
- package/dist/serialization/types/ApiNodeResult.d.ts +12 -0
- package/dist/serialization/types/ApiNodeResult.js +33 -0
- package/dist/serialization/types/ApiNodeResultData.d.ts +17 -0
- package/dist/serialization/types/ApiNodeResultData.js +38 -0
- package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -1
- package/dist/serialization/types/EnrichedNormalizedCompletion.js +1 -1
- package/dist/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/dist/serialization/types/ModelVersionExecConfigParameters.js +2 -2
- package/dist/serialization/types/NodeInputCompiledNumberValue.d.ts +14 -0
- package/dist/serialization/types/NodeInputCompiledNumberValue.js +35 -0
- package/dist/serialization/types/NodeInputVariableCompiledValue.d.ts +4 -1
- package/dist/serialization/types/NodeInputVariableCompiledValue.js +1 -0
- package/dist/serialization/types/PromptTemplateBlockProperties.d.ts +1 -1
- package/dist/serialization/types/PromptTemplateBlockProperties.js +1 -1
- package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +1 -1
- package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.js +1 -1
- package/dist/serialization/types/SearchResultMergingRequest.d.ts +1 -1
- package/dist/serialization/types/SearchResultMergingRequest.js +1 -1
- package/dist/serialization/types/SearchWeightsRequest.d.ts +2 -2
- package/dist/serialization/types/SearchWeightsRequest.js +2 -2
- package/dist/serialization/types/TemplatingNodeNumberResult.d.ts +13 -0
- package/dist/serialization/types/{ContentType.js → TemplatingNodeNumberResult.js} +5 -2
- package/dist/serialization/types/TemplatingNodeResultOutput.d.ts +4 -1
- package/dist/serialization/types/TemplatingNodeResultOutput.js +1 -0
- package/dist/serialization/types/TerminalNodeNumberResult.d.ts +14 -0
- package/dist/serialization/types/TerminalNodeNumberResult.js +35 -0
- package/dist/serialization/types/TerminalNodeResultOutput.d.ts +4 -1
- package/dist/serialization/types/TerminalNodeResultOutput.js +1 -0
- package/dist/serialization/types/VellumVariableType.d.ts +1 -1
- package/dist/serialization/types/VellumVariableType.js +1 -1
- package/dist/serialization/types/WorkflowNodeResultData.d.ts +4 -1
- package/dist/serialization/types/WorkflowNodeResultData.js +1 -0
- package/dist/serialization/types/WorkflowResultEventOutputData.d.ts +4 -1
- package/dist/serialization/types/WorkflowResultEventOutputData.js +1 -0
- package/dist/serialization/types/WorkflowResultEventOutputDataNumber.d.ts +17 -0
- package/dist/serialization/types/WorkflowResultEventOutputDataNumber.js +38 -0
- package/dist/serialization/types/index.d.ts +6 -1
- package/dist/serialization/types/index.js +6 -1
- package/package.json +1 -1
- package/serialization/types/ApiNodeResult.d.ts +12 -0
- package/serialization/types/ApiNodeResult.js +33 -0
- package/serialization/types/ApiNodeResultData.d.ts +17 -0
- package/serialization/types/ApiNodeResultData.js +38 -0
- package/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -1
- package/serialization/types/EnrichedNormalizedCompletion.js +1 -1
- package/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/serialization/types/ModelVersionExecConfigParameters.js +2 -2
- package/serialization/types/NodeInputCompiledNumberValue.d.ts +14 -0
- package/serialization/types/NodeInputCompiledNumberValue.js +35 -0
- package/serialization/types/NodeInputVariableCompiledValue.d.ts +4 -1
- package/serialization/types/NodeInputVariableCompiledValue.js +1 -0
- package/serialization/types/PromptTemplateBlockProperties.d.ts +1 -1
- package/serialization/types/PromptTemplateBlockProperties.js +1 -1
- package/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +1 -1
- package/serialization/types/PromptTemplateBlockPropertiesRequest.js +1 -1
- package/serialization/types/SearchResultMergingRequest.d.ts +1 -1
- package/serialization/types/SearchResultMergingRequest.js +1 -1
- package/serialization/types/SearchWeightsRequest.d.ts +2 -2
- package/serialization/types/SearchWeightsRequest.js +2 -2
- package/serialization/types/TemplatingNodeNumberResult.d.ts +13 -0
- package/serialization/types/{ContentType.js → TemplatingNodeNumberResult.js} +5 -2
- package/serialization/types/TemplatingNodeResultOutput.d.ts +4 -1
- package/serialization/types/TemplatingNodeResultOutput.js +1 -0
- package/serialization/types/TerminalNodeNumberResult.d.ts +14 -0
- package/serialization/types/TerminalNodeNumberResult.js +35 -0
- package/serialization/types/TerminalNodeResultOutput.d.ts +4 -1
- package/serialization/types/TerminalNodeResultOutput.js +1 -0
- package/serialization/types/VellumVariableType.d.ts +1 -1
- package/serialization/types/VellumVariableType.js +1 -1
- package/serialization/types/WorkflowNodeResultData.d.ts +4 -1
- package/serialization/types/WorkflowNodeResultData.js +1 -0
- package/serialization/types/WorkflowResultEventOutputData.d.ts +4 -1
- package/serialization/types/WorkflowResultEventOutputData.js +1 -0
- package/serialization/types/WorkflowResultEventOutputDataNumber.d.ts +17 -0
- package/serialization/types/WorkflowResultEventOutputDataNumber.js +38 -0
- package/serialization/types/index.d.ts +6 -1
- package/serialization/types/index.js +6 -1
- package/api/types/ContentType.d.ts +0 -12
- package/dist/api/types/ContentType.d.ts +0 -12
- package/dist/serialization/types/ContentType.d.ts +0 -10
- package/serialization/types/ContentType.d.ts +0 -10
|
@@ -7,7 +7,7 @@ export interface GenerateBodyRequest {
|
|
|
7
7
|
deploymentId?: string;
|
|
8
8
|
/** The name of the deployment. Must provide either this or deployment_id. */
|
|
9
9
|
deploymentName?: string;
|
|
10
|
-
/** The generation
|
|
10
|
+
/** The generation request to make. Bulk requests are no longer supported, this field must be an array of length 1. */
|
|
11
11
|
requests: Vellum.GenerateRequest[];
|
|
12
12
|
/** Additional configuration that can be used to control what's included in the response. */
|
|
13
13
|
options?: Vellum.GenerateOptionsRequest;
|
|
@@ -7,7 +7,7 @@ export interface GenerateStreamBodyRequest {
|
|
|
7
7
|
deploymentId?: string;
|
|
8
8
|
/** The name of the deployment. Must provide either this or deployment_id. */
|
|
9
9
|
deploymentName?: string;
|
|
10
|
-
/** The generation
|
|
10
|
+
/** The generation request to make. Bulk requests are no longer supported, this field must be an array of length 1. */
|
|
11
11
|
requests: Vellum.GenerateRequest[];
|
|
12
12
|
/** Additional configuration that can be used to control what's included in the response. */
|
|
13
13
|
options?: Vellum.GenerateOptionsRequest;
|
|
@@ -17,4 +17,8 @@ export declare class DocumentIndexes {
|
|
|
17
17
|
* Creates a new document index.
|
|
18
18
|
*/
|
|
19
19
|
create(request: Vellum.DocumentIndexCreateRequest): Promise<Vellum.DocumentIndexRead>;
|
|
20
|
+
/**
|
|
21
|
+
* Used to retrieve a Document Index given its ID or name.
|
|
22
|
+
*/
|
|
23
|
+
retrieve(id: string): Promise<Vellum.DocumentIndexRead>;
|
|
20
24
|
}
|
|
@@ -82,5 +82,44 @@ class DocumentIndexes {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Used to retrieve a Document Index given its ID or name.
|
|
87
|
+
*/
|
|
88
|
+
async retrieve(id) {
|
|
89
|
+
const _response = await core.fetcher({
|
|
90
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/document-indexes/${id}`),
|
|
91
|
+
method: "GET",
|
|
92
|
+
headers: {
|
|
93
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
94
|
+
},
|
|
95
|
+
contentType: "application/json",
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return await serializers.DocumentIndexRead.parseOrThrow(_response.body, {
|
|
99
|
+
unrecognizedObjectKeys: "passthrough",
|
|
100
|
+
allowUnrecognizedUnionMembers: true,
|
|
101
|
+
allowUnrecognizedEnumValues: true,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
throw new errors.VellumError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.body,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
switch (_response.error.reason) {
|
|
111
|
+
case "non-json":
|
|
112
|
+
throw new errors.VellumError({
|
|
113
|
+
statusCode: _response.error.statusCode,
|
|
114
|
+
body: _response.error.rawBody,
|
|
115
|
+
});
|
|
116
|
+
case "timeout":
|
|
117
|
+
throw new errors.VellumTimeoutError();
|
|
118
|
+
case "unknown":
|
|
119
|
+
throw new errors.VellumError({
|
|
120
|
+
message: _response.error.errorMessage,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
85
124
|
}
|
|
86
125
|
exports.DocumentIndexes = DocumentIndexes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiNodeResultData {
|
|
5
|
+
textOutputId: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
jsonOutputId: string;
|
|
8
|
+
json?: Record<string, unknown>;
|
|
9
|
+
statusCodeOutputId: string;
|
|
10
|
+
statusCode: number;
|
|
11
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface ModelVersionExecConfigParameters {
|
|
5
|
-
temperature
|
|
6
|
-
maxTokens
|
|
5
|
+
temperature?: number;
|
|
6
|
+
maxTokens?: number;
|
|
7
7
|
topP: number;
|
|
8
8
|
frequencyPenalty: number;
|
|
9
9
|
presencePenalty: number;
|
|
@@ -2,11 +2,14 @@
|
|
|
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.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;
|
|
6
6
|
export declare namespace NodeInputVariableCompiledValue {
|
|
7
7
|
interface String extends Vellum.NodeInputCompiledStringValue {
|
|
8
8
|
type: "STRING";
|
|
9
9
|
}
|
|
10
|
+
interface Number extends Vellum.NodeInputCompiledNumberValue {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
10
13
|
interface Json extends Vellum.NodeInputCompiledJsonValue {
|
|
11
14
|
type: "JSON";
|
|
12
15
|
}
|
|
@@ -6,7 +6,7 @@ export interface PromptTemplateBlockProperties {
|
|
|
6
6
|
chatRole?: Vellum.ChatMessageRole;
|
|
7
7
|
chatMessageUnterminated?: boolean;
|
|
8
8
|
template?: string;
|
|
9
|
-
templateType?: Vellum.
|
|
9
|
+
templateType?: Vellum.VellumVariableType;
|
|
10
10
|
functionName?: string;
|
|
11
11
|
functionDescription?: string;
|
|
12
12
|
functionParameters?: Record<string, unknown>;
|
|
@@ -6,7 +6,7 @@ export interface PromptTemplateBlockPropertiesRequest {
|
|
|
6
6
|
chatRole?: Vellum.ChatMessageRole;
|
|
7
7
|
chatMessageUnterminated?: boolean;
|
|
8
8
|
template?: string;
|
|
9
|
-
templateType?: Vellum.
|
|
9
|
+
templateType?: Vellum.VellumVariableType;
|
|
10
10
|
functionName?: string;
|
|
11
11
|
functionDescription?: string;
|
|
12
12
|
functionParameters?: Record<string, unknown>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface SearchWeightsRequest {
|
|
5
5
|
/** The relative weight to give to semantic similarity */
|
|
6
|
-
semanticSimilarity
|
|
7
|
-
/** The relative weight to give to
|
|
8
|
-
keywords
|
|
6
|
+
semanticSimilarity?: number;
|
|
7
|
+
/** The relative weight to give to keywords */
|
|
8
|
+
keywords?: number;
|
|
9
9
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
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.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;
|
|
6
6
|
export declare namespace TemplatingNodeResultOutput {
|
|
7
7
|
interface String extends Vellum.TemplatingNodeStringResult {
|
|
8
8
|
type: "STRING";
|
|
9
9
|
}
|
|
10
|
+
interface Number extends Vellum.TemplatingNodeNumberResult {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
10
13
|
interface Json extends Vellum.TemplatingNodeJsonResult {
|
|
11
14
|
type: "JSON";
|
|
12
15
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
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.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;
|
|
6
6
|
export declare namespace TerminalNodeResultOutput {
|
|
7
7
|
interface String extends Vellum.TerminalNodeStringResult {
|
|
8
8
|
type: "STRING";
|
|
9
9
|
}
|
|
10
|
+
interface Number extends Vellum.TerminalNodeNumberResult {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
10
13
|
interface Json extends Vellum.TerminalNodeJsonResult {
|
|
11
14
|
type: "JSON";
|
|
12
15
|
}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* * `STRING` -
|
|
5
|
+
* * `STRING` - STRING
|
|
6
|
+
* * `NUMBER` - NUMBER
|
|
6
7
|
* * `JSON` - JSON
|
|
7
|
-
* * `CHAT_HISTORY` -
|
|
8
|
-
* * `SEARCH_RESULTS` -
|
|
8
|
+
* * `CHAT_HISTORY` - CHAT_HISTORY
|
|
9
|
+
* * `SEARCH_RESULTS` - SEARCH_RESULTS
|
|
9
10
|
*/
|
|
10
|
-
export declare type VellumVariableType = "STRING" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS";
|
|
11
|
+
export declare type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS";
|
|
11
12
|
export declare const VellumVariableType: {
|
|
12
13
|
readonly String: "STRING";
|
|
14
|
+
readonly Number: "NUMBER";
|
|
13
15
|
readonly Json: "JSON";
|
|
14
16
|
readonly ChatHistory: "CHAT_HISTORY";
|
|
15
17
|
readonly SearchResults: "SEARCH_RESULTS";
|
|
@@ -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 WorkflowNodeResultData = Vellum.WorkflowNodeResultData.Prompt | Vellum.WorkflowNodeResultData.Search | Vellum.WorkflowNodeResultData.Templating | Vellum.WorkflowNodeResultData.Conditional | Vellum.WorkflowNodeResultData.Terminal;
|
|
5
|
+
export declare type WorkflowNodeResultData = Vellum.WorkflowNodeResultData.Prompt | Vellum.WorkflowNodeResultData.Search | Vellum.WorkflowNodeResultData.Templating | Vellum.WorkflowNodeResultData.Conditional | Vellum.WorkflowNodeResultData.Api | Vellum.WorkflowNodeResultData.Terminal;
|
|
6
6
|
export declare namespace WorkflowNodeResultData {
|
|
7
7
|
interface Prompt extends Vellum.PromptNodeResult {
|
|
8
8
|
type: "PROMPT";
|
|
@@ -16,6 +16,9 @@ export declare namespace WorkflowNodeResultData {
|
|
|
16
16
|
interface Conditional extends Vellum.ConditionalNodeResult {
|
|
17
17
|
type: "CONDITIONAL";
|
|
18
18
|
}
|
|
19
|
+
interface Api extends Vellum.ApiNodeResult {
|
|
20
|
+
type: "API";
|
|
21
|
+
}
|
|
19
22
|
interface Terminal extends Vellum.TerminalNodeResult {
|
|
20
23
|
type: "TERMINAL";
|
|
21
24
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
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.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;
|
|
6
6
|
export declare namespace WorkflowResultEventOutputData {
|
|
7
7
|
interface String extends Vellum.WorkflowResultEventOutputDataString {
|
|
8
8
|
type: "STRING";
|
|
9
9
|
}
|
|
10
|
+
interface Number extends Vellum.WorkflowResultEventOutputDataNumber {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
10
13
|
interface Json extends Vellum.WorkflowResultEventOutputDataJson {
|
|
11
14
|
type: "JSON";
|
|
12
15
|
}
|
|
@@ -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 WorkflowResultEventOutputDataNumber {
|
|
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?: number;
|
|
13
|
+
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
export * from "./ApiNodeResult";
|
|
2
|
+
export * from "./ApiNodeResultData";
|
|
1
3
|
export * from "./BlockTypeEnum";
|
|
2
4
|
export * from "./ChatMessage";
|
|
3
5
|
export * from "./ChatMessageRequest";
|
|
4
6
|
export * from "./ChatMessageRole";
|
|
5
7
|
export * from "./ConditionalNodeResult";
|
|
6
8
|
export * from "./ConditionalNodeResultData";
|
|
7
|
-
export * from "./ContentType";
|
|
8
9
|
export * from "./DeploymentRead";
|
|
9
10
|
export * from "./DeploymentStatus";
|
|
10
11
|
export * from "./DocumentDocumentToDocumentIndex";
|
|
@@ -45,6 +46,7 @@ export * from "./ModelVersionReadStatusEnum";
|
|
|
45
46
|
export * from "./ModelVersionSandboxSnapshot";
|
|
46
47
|
export * from "./NodeInputCompiledChatHistoryValue";
|
|
47
48
|
export * from "./NodeInputCompiledJsonValue";
|
|
49
|
+
export * from "./NodeInputCompiledNumberValue";
|
|
48
50
|
export * from "./NodeInputCompiledSearchResultsValue";
|
|
49
51
|
export * from "./NodeInputCompiledStringValue";
|
|
50
52
|
export * from "./NodeInputVariableCompiledValue";
|
|
@@ -94,6 +96,7 @@ export * from "./SubmitCompletionActualsErrorResponse";
|
|
|
94
96
|
export * from "./SubmitWorkflowExecutionActualRequest";
|
|
95
97
|
export * from "./TemplatingNodeChatHistoryResult";
|
|
96
98
|
export * from "./TemplatingNodeJsonResult";
|
|
99
|
+
export * from "./TemplatingNodeNumberResult";
|
|
97
100
|
export * from "./TemplatingNodeResult";
|
|
98
101
|
export * from "./TemplatingNodeResultData";
|
|
99
102
|
export * from "./TemplatingNodeResultOutput";
|
|
@@ -101,6 +104,7 @@ export * from "./TemplatingNodeSearchResultsResult";
|
|
|
101
104
|
export * from "./TemplatingNodeStringResult";
|
|
102
105
|
export * from "./TerminalNodeChatHistoryResult";
|
|
103
106
|
export * from "./TerminalNodeJsonResult";
|
|
107
|
+
export * from "./TerminalNodeNumberResult";
|
|
104
108
|
export * from "./TerminalNodeResult";
|
|
105
109
|
export * from "./TerminalNodeResultData";
|
|
106
110
|
export * from "./TerminalNodeResultOutput";
|
|
@@ -130,6 +134,7 @@ export * from "./WorkflowResultEvent";
|
|
|
130
134
|
export * from "./WorkflowResultEventOutputData";
|
|
131
135
|
export * from "./WorkflowResultEventOutputDataChatHistory";
|
|
132
136
|
export * from "./WorkflowResultEventOutputDataJson";
|
|
137
|
+
export * from "./WorkflowResultEventOutputDataNumber";
|
|
133
138
|
export * from "./WorkflowResultEventOutputDataSearchResults";
|
|
134
139
|
export * from "./WorkflowResultEventOutputDataString";
|
|
135
140
|
export * from "./WorkflowStreamEvent";
|
package/api/types/index.js
CHANGED
|
@@ -14,13 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ApiNodeResult"), exports);
|
|
18
|
+
__exportStar(require("./ApiNodeResultData"), exports);
|
|
17
19
|
__exportStar(require("./BlockTypeEnum"), exports);
|
|
18
20
|
__exportStar(require("./ChatMessage"), exports);
|
|
19
21
|
__exportStar(require("./ChatMessageRequest"), exports);
|
|
20
22
|
__exportStar(require("./ChatMessageRole"), exports);
|
|
21
23
|
__exportStar(require("./ConditionalNodeResult"), exports);
|
|
22
24
|
__exportStar(require("./ConditionalNodeResultData"), exports);
|
|
23
|
-
__exportStar(require("./ContentType"), exports);
|
|
24
25
|
__exportStar(require("./DeploymentRead"), exports);
|
|
25
26
|
__exportStar(require("./DeploymentStatus"), exports);
|
|
26
27
|
__exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
|
|
@@ -61,6 +62,7 @@ __exportStar(require("./ModelVersionReadStatusEnum"), exports);
|
|
|
61
62
|
__exportStar(require("./ModelVersionSandboxSnapshot"), exports);
|
|
62
63
|
__exportStar(require("./NodeInputCompiledChatHistoryValue"), exports);
|
|
63
64
|
__exportStar(require("./NodeInputCompiledJsonValue"), exports);
|
|
65
|
+
__exportStar(require("./NodeInputCompiledNumberValue"), exports);
|
|
64
66
|
__exportStar(require("./NodeInputCompiledSearchResultsValue"), exports);
|
|
65
67
|
__exportStar(require("./NodeInputCompiledStringValue"), exports);
|
|
66
68
|
__exportStar(require("./NodeInputVariableCompiledValue"), exports);
|
|
@@ -110,6 +112,7 @@ __exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
|
110
112
|
__exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
|
|
111
113
|
__exportStar(require("./TemplatingNodeChatHistoryResult"), exports);
|
|
112
114
|
__exportStar(require("./TemplatingNodeJsonResult"), exports);
|
|
115
|
+
__exportStar(require("./TemplatingNodeNumberResult"), exports);
|
|
113
116
|
__exportStar(require("./TemplatingNodeResult"), exports);
|
|
114
117
|
__exportStar(require("./TemplatingNodeResultData"), exports);
|
|
115
118
|
__exportStar(require("./TemplatingNodeResultOutput"), exports);
|
|
@@ -117,6 +120,7 @@ __exportStar(require("./TemplatingNodeSearchResultsResult"), exports);
|
|
|
117
120
|
__exportStar(require("./TemplatingNodeStringResult"), exports);
|
|
118
121
|
__exportStar(require("./TerminalNodeChatHistoryResult"), exports);
|
|
119
122
|
__exportStar(require("./TerminalNodeJsonResult"), exports);
|
|
123
|
+
__exportStar(require("./TerminalNodeNumberResult"), exports);
|
|
120
124
|
__exportStar(require("./TerminalNodeResult"), exports);
|
|
121
125
|
__exportStar(require("./TerminalNodeResultData"), exports);
|
|
122
126
|
__exportStar(require("./TerminalNodeResultOutput"), exports);
|
|
@@ -146,6 +150,7 @@ __exportStar(require("./WorkflowResultEvent"), exports);
|
|
|
146
150
|
__exportStar(require("./WorkflowResultEventOutputData"), exports);
|
|
147
151
|
__exportStar(require("./WorkflowResultEventOutputDataChatHistory"), exports);
|
|
148
152
|
__exportStar(require("./WorkflowResultEventOutputDataJson"), exports);
|
|
153
|
+
__exportStar(require("./WorkflowResultEventOutputDataNumber"), exports);
|
|
149
154
|
__exportStar(require("./WorkflowResultEventOutputDataSearchResults"), exports);
|
|
150
155
|
__exportStar(require("./WorkflowResultEventOutputDataString"), exports);
|
|
151
156
|
__exportStar(require("./WorkflowStreamEvent"), exports);
|
|
@@ -7,7 +7,7 @@ export interface GenerateBodyRequest {
|
|
|
7
7
|
deploymentId?: string;
|
|
8
8
|
/** The name of the deployment. Must provide either this or deployment_id. */
|
|
9
9
|
deploymentName?: string;
|
|
10
|
-
/** The generation
|
|
10
|
+
/** The generation request to make. Bulk requests are no longer supported, this field must be an array of length 1. */
|
|
11
11
|
requests: Vellum.GenerateRequest[];
|
|
12
12
|
/** Additional configuration that can be used to control what's included in the response. */
|
|
13
13
|
options?: Vellum.GenerateOptionsRequest;
|
|
@@ -7,7 +7,7 @@ export interface GenerateStreamBodyRequest {
|
|
|
7
7
|
deploymentId?: string;
|
|
8
8
|
/** The name of the deployment. Must provide either this or deployment_id. */
|
|
9
9
|
deploymentName?: string;
|
|
10
|
-
/** The generation
|
|
10
|
+
/** The generation request to make. Bulk requests are no longer supported, this field must be an array of length 1. */
|
|
11
11
|
requests: Vellum.GenerateRequest[];
|
|
12
12
|
/** Additional configuration that can be used to control what's included in the response. */
|
|
13
13
|
options?: Vellum.GenerateOptionsRequest;
|
|
@@ -17,4 +17,8 @@ export declare class DocumentIndexes {
|
|
|
17
17
|
* Creates a new document index.
|
|
18
18
|
*/
|
|
19
19
|
create(request: Vellum.DocumentIndexCreateRequest): Promise<Vellum.DocumentIndexRead>;
|
|
20
|
+
/**
|
|
21
|
+
* Used to retrieve a Document Index given its ID or name.
|
|
22
|
+
*/
|
|
23
|
+
retrieve(id: string): Promise<Vellum.DocumentIndexRead>;
|
|
20
24
|
}
|
|
@@ -82,5 +82,44 @@ class DocumentIndexes {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Used to retrieve a Document Index given its ID or name.
|
|
87
|
+
*/
|
|
88
|
+
async retrieve(id) {
|
|
89
|
+
const _response = await core.fetcher({
|
|
90
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/document-indexes/${id}`),
|
|
91
|
+
method: "GET",
|
|
92
|
+
headers: {
|
|
93
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
94
|
+
},
|
|
95
|
+
contentType: "application/json",
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return await serializers.DocumentIndexRead.parseOrThrow(_response.body, {
|
|
99
|
+
unrecognizedObjectKeys: "passthrough",
|
|
100
|
+
allowUnrecognizedUnionMembers: true,
|
|
101
|
+
allowUnrecognizedEnumValues: true,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
throw new errors.VellumError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.body,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
switch (_response.error.reason) {
|
|
111
|
+
case "non-json":
|
|
112
|
+
throw new errors.VellumError({
|
|
113
|
+
statusCode: _response.error.statusCode,
|
|
114
|
+
body: _response.error.rawBody,
|
|
115
|
+
});
|
|
116
|
+
case "timeout":
|
|
117
|
+
throw new errors.VellumTimeoutError();
|
|
118
|
+
case "unknown":
|
|
119
|
+
throw new errors.VellumError({
|
|
120
|
+
message: _response.error.errorMessage,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
85
124
|
}
|
|
86
125
|
exports.DocumentIndexes = DocumentIndexes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiNodeResultData {
|
|
5
|
+
textOutputId: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
jsonOutputId: string;
|
|
8
|
+
json?: Record<string, unknown>;
|
|
9
|
+
statusCodeOutputId: string;
|
|
10
|
+
statusCode: number;
|
|
11
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface ModelVersionExecConfigParameters {
|
|
5
|
-
temperature
|
|
6
|
-
maxTokens
|
|
5
|
+
temperature?: number;
|
|
6
|
+
maxTokens?: number;
|
|
7
7
|
topP: number;
|
|
8
8
|
frequencyPenalty: number;
|
|
9
9
|
presencePenalty: number;
|
|
@@ -2,11 +2,14 @@
|
|
|
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.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;
|
|
6
6
|
export declare namespace NodeInputVariableCompiledValue {
|
|
7
7
|
interface String extends Vellum.NodeInputCompiledStringValue {
|
|
8
8
|
type: "STRING";
|
|
9
9
|
}
|
|
10
|
+
interface Number extends Vellum.NodeInputCompiledNumberValue {
|
|
11
|
+
type: "NUMBER";
|
|
12
|
+
}
|
|
10
13
|
interface Json extends Vellum.NodeInputCompiledJsonValue {
|
|
11
14
|
type: "JSON";
|
|
12
15
|
}
|