vellum-ai 0.0.37 → 0.0.39
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/Client.d.ts +9 -1
- package/Client.js +43 -1
- package/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +12 -0
- package/api/client/requests/index.d.ts +1 -0
- package/api/types/DocumentRead.d.ts +1 -1
- package/api/types/SearchResult.d.ts +1 -1
- package/api/types/{Document.d.ts → SearchResultDocument.d.ts} +3 -1
- package/api/types/SlimDocument.d.ts +2 -0
- package/api/types/SubmitWorkflowExecutionActualRequest.d.ts +16 -0
- package/api/types/SubmitWorkflowExecutionActualRequest.js +5 -0
- package/api/types/WorkflowExecutionActualChatHistoryRequest.d.ts +16 -0
- package/api/types/WorkflowExecutionActualChatHistoryRequest.js +5 -0
- package/api/types/WorkflowExecutionActualJsonRequest.d.ts +15 -0
- package/api/types/WorkflowExecutionActualJsonRequest.js +5 -0
- package/api/types/WorkflowExecutionActualStringRequest.d.ts +15 -0
- package/api/types/WorkflowExecutionActualStringRequest.js +5 -0
- package/api/types/index.d.ts +5 -1
- package/api/types/index.js +5 -1
- package/dist/Client.d.ts +9 -1
- package/dist/Client.js +43 -1
- package/dist/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +12 -0
- package/dist/api/client/requests/SubmitWorkflowExecutionActualsRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/types/DocumentRead.d.ts +1 -1
- package/dist/api/types/SearchResult.d.ts +1 -1
- package/dist/api/types/{Document.d.ts → SearchResultDocument.d.ts} +3 -1
- package/dist/api/types/SearchResultDocument.js +5 -0
- package/dist/api/types/SlimDocument.d.ts +2 -0
- package/dist/api/types/SubmitWorkflowExecutionActualRequest.d.ts +16 -0
- package/dist/api/types/SubmitWorkflowExecutionActualRequest.js +5 -0
- package/dist/api/types/WorkflowExecutionActualChatHistoryRequest.d.ts +16 -0
- package/dist/api/types/WorkflowExecutionActualChatHistoryRequest.js +5 -0
- package/dist/api/types/WorkflowExecutionActualJsonRequest.d.ts +15 -0
- package/dist/api/types/WorkflowExecutionActualJsonRequest.js +5 -0
- package/dist/api/types/WorkflowExecutionActualStringRequest.d.ts +15 -0
- package/dist/api/types/WorkflowExecutionActualStringRequest.js +5 -0
- package/dist/api/types/index.d.ts +5 -1
- package/dist/api/types/index.js +5 -1
- package/dist/serialization/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +14 -0
- package/dist/serialization/client/requests/SubmitWorkflowExecutionActualsRequest.js +35 -0
- package/dist/serialization/client/requests/index.d.ts +1 -0
- package/dist/serialization/client/requests/index.js +3 -1
- package/dist/serialization/types/SearchResult.d.ts +1 -1
- package/dist/serialization/types/SearchResult.js +1 -1
- package/dist/serialization/types/{Document.d.ts → SearchResultDocument.d.ts} +3 -2
- package/dist/serialization/types/{Document.js → SearchResultDocument.js} +3 -2
- package/dist/serialization/types/SlimDocument.d.ts +1 -0
- package/dist/serialization/types/SlimDocument.js +1 -0
- package/dist/serialization/types/SubmitWorkflowExecutionActualRequest.d.ts +19 -0
- package/dist/serialization/types/SubmitWorkflowExecutionActualRequest.js +40 -0
- package/dist/serialization/types/WorkflowExecutionActualChatHistoryRequest.d.ts +16 -0
- package/dist/serialization/types/WorkflowExecutionActualChatHistoryRequest.js +39 -0
- package/dist/serialization/types/WorkflowExecutionActualJsonRequest.d.ts +16 -0
- package/dist/serialization/types/WorkflowExecutionActualJsonRequest.js +37 -0
- package/dist/serialization/types/WorkflowExecutionActualStringRequest.d.ts +16 -0
- package/dist/serialization/types/WorkflowExecutionActualStringRequest.js +37 -0
- package/dist/serialization/types/index.d.ts +5 -1
- package/dist/serialization/types/index.js +5 -1
- package/package.json +1 -1
- package/serialization/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +14 -0
- package/serialization/client/requests/SubmitWorkflowExecutionActualsRequest.js +35 -0
- package/serialization/client/requests/index.d.ts +1 -0
- package/serialization/client/requests/index.js +3 -1
- package/serialization/types/SearchResult.d.ts +1 -1
- package/serialization/types/SearchResult.js +1 -1
- package/serialization/types/{Document.d.ts → SearchResultDocument.d.ts} +3 -2
- package/serialization/types/{Document.js → SearchResultDocument.js} +3 -2
- package/serialization/types/SlimDocument.d.ts +1 -0
- package/serialization/types/SlimDocument.js +1 -0
- package/serialization/types/SubmitWorkflowExecutionActualRequest.d.ts +19 -0
- package/serialization/types/SubmitWorkflowExecutionActualRequest.js +40 -0
- package/serialization/types/WorkflowExecutionActualChatHistoryRequest.d.ts +16 -0
- package/serialization/types/WorkflowExecutionActualChatHistoryRequest.js +39 -0
- package/serialization/types/WorkflowExecutionActualJsonRequest.d.ts +16 -0
- package/serialization/types/WorkflowExecutionActualJsonRequest.js +37 -0
- package/serialization/types/WorkflowExecutionActualStringRequest.d.ts +16 -0
- package/serialization/types/WorkflowExecutionActualStringRequest.js +37 -0
- package/serialization/types/index.d.ts +5 -1
- package/serialization/types/index.js +5 -1
- /package/api/{types/Document.js → client/requests/SubmitWorkflowExecutionActualsRequest.js} +0 -0
- /package/{dist/api/types/Document.js → api/types/SearchResultDocument.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class VellumClient {
|
|
|
21
21
|
protected readonly options: VellumClient.Options;
|
|
22
22
|
constructor(options: VellumClient.Options);
|
|
23
23
|
/**
|
|
24
|
-
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">
|
|
24
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
25
25
|
*
|
|
26
26
|
* Executes a deployed Workflow and streams back its results.
|
|
27
27
|
* @throws {Vellum.BadRequestError}
|
|
@@ -75,6 +75,14 @@ export declare class VellumClient {
|
|
|
75
75
|
* @throws {Vellum.InternalServerError}
|
|
76
76
|
*/
|
|
77
77
|
submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
80
|
+
*
|
|
81
|
+
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
82
|
+
*
|
|
83
|
+
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
84
|
+
*/
|
|
85
|
+
submitWorkflowExecutionActuals(request: Vellum.SubmitWorkflowExecutionActualsRequest): Promise<void>;
|
|
78
86
|
protected _deployments: Deployments | undefined;
|
|
79
87
|
get deployments(): Deployments;
|
|
80
88
|
protected _documentIndexes: DocumentIndexes | undefined;
|
package/Client.js
CHANGED
|
@@ -49,7 +49,7 @@ class VellumClient {
|
|
|
49
49
|
this.options = options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">
|
|
52
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
53
53
|
*
|
|
54
54
|
* Executes a deployed Workflow and streams back its results.
|
|
55
55
|
* @throws {Vellum.BadRequestError}
|
|
@@ -296,6 +296,48 @@ class VellumClient {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
301
|
+
*
|
|
302
|
+
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
303
|
+
*
|
|
304
|
+
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
305
|
+
*/
|
|
306
|
+
async submitWorkflowExecutionActuals(request) {
|
|
307
|
+
const _response = await core.fetcher({
|
|
308
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, "v1/submit-workflow-execution-actuals"),
|
|
309
|
+
method: "POST",
|
|
310
|
+
headers: {
|
|
311
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
312
|
+
},
|
|
313
|
+
contentType: "application/json",
|
|
314
|
+
body: await serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
315
|
+
unrecognizedObjectKeys: "strip",
|
|
316
|
+
}),
|
|
317
|
+
});
|
|
318
|
+
if (_response.ok) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (_response.error.reason === "status-code") {
|
|
322
|
+
throw new errors.VellumError({
|
|
323
|
+
statusCode: _response.error.statusCode,
|
|
324
|
+
body: _response.error.body,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
switch (_response.error.reason) {
|
|
328
|
+
case "non-json":
|
|
329
|
+
throw new errors.VellumError({
|
|
330
|
+
statusCode: _response.error.statusCode,
|
|
331
|
+
body: _response.error.rawBody,
|
|
332
|
+
});
|
|
333
|
+
case "timeout":
|
|
334
|
+
throw new errors.VellumTimeoutError();
|
|
335
|
+
case "unknown":
|
|
336
|
+
throw new errors.VellumError({
|
|
337
|
+
message: _response.error.errorMessage,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
299
341
|
_deployments;
|
|
300
342
|
get deployments() {
|
|
301
343
|
return (this._deployments ??= new Client_1.Deployments(this.options));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../..";
|
|
5
|
+
export interface SubmitWorkflowExecutionActualsRequest {
|
|
6
|
+
/** Feedback regarding the quality of an output on a previously executed workflow. */
|
|
7
|
+
actuals: Vellum.SubmitWorkflowExecutionActualRequest[];
|
|
8
|
+
/** The Vellum-generated ID of a previously executed workflow. Must provide either this or external_id. */
|
|
9
|
+
executionId?: string;
|
|
10
|
+
/** The external ID that was originally provided by when executing the workflow, if applicable, that you'd now like to submit actuals for. Must provide either this or execution_id. */
|
|
11
|
+
externalId?: string;
|
|
12
|
+
}
|
|
@@ -3,3 +3,4 @@ export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
|
3
3
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|
|
4
4
|
export { SearchRequestBodyRequest } from "./SearchRequestBodyRequest";
|
|
5
5
|
export { SubmitCompletionActualsRequest } from "./SubmitCompletionActualsRequest";
|
|
6
|
+
export { SubmitWorkflowExecutionActualsRequest } from "./SubmitWorkflowExecutionActualsRequest";
|
|
@@ -27,6 +27,6 @@ export interface DocumentRead {
|
|
|
27
27
|
originalFileUrl?: string;
|
|
28
28
|
processedFileUrl?: string;
|
|
29
29
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
30
|
-
/** A previously supplied JSON object containing metadata that can filtered on when searching. */
|
|
30
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
31
31
|
metadata?: Record<string, unknown>;
|
|
32
32
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface SearchResultDocument {
|
|
5
5
|
/** The ID of the document. */
|
|
6
6
|
id: string;
|
|
7
7
|
/** The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
8
8
|
label: string;
|
|
9
9
|
/** The unique ID of the document as represented in an external system and specified when it was originally uploaded. */
|
|
10
10
|
externalId?: string;
|
|
11
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
11
13
|
}
|
|
@@ -35,5 +35,7 @@ export interface SlimDocument {
|
|
|
35
35
|
status?: Vellum.DocumentStatus;
|
|
36
36
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
37
37
|
keywords?: string[];
|
|
38
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
38
40
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
39
41
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type SubmitWorkflowExecutionActualRequest = Vellum.SubmitWorkflowExecutionActualRequest.String | Vellum.SubmitWorkflowExecutionActualRequest.Json | Vellum.SubmitWorkflowExecutionActualRequest.ChatHistory;
|
|
6
|
+
export declare namespace SubmitWorkflowExecutionActualRequest {
|
|
7
|
+
interface String extends Vellum.WorkflowExecutionActualStringRequest {
|
|
8
|
+
outputType: "STRING";
|
|
9
|
+
}
|
|
10
|
+
interface Json extends Vellum.WorkflowExecutionActualJsonRequest {
|
|
11
|
+
outputType: "JSON";
|
|
12
|
+
}
|
|
13
|
+
interface ChatHistory extends Vellum.WorkflowExecutionActualChatHistoryRequest {
|
|
14
|
+
outputType: "CHAT_HISTORY";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface WorkflowExecutionActualChatHistoryRequest {
|
|
6
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
7
|
+
outputId?: string;
|
|
8
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
9
|
+
outputKey?: string;
|
|
10
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
11
|
+
quality?: number;
|
|
12
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
13
|
+
timestamp?: number;
|
|
14
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
15
|
+
desiredOutputValue?: Vellum.ChatMessageRequest[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowExecutionActualJsonRequest {
|
|
5
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
6
|
+
outputId?: string;
|
|
7
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
8
|
+
outputKey?: string;
|
|
9
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
10
|
+
quality?: number;
|
|
11
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
14
|
+
desiredOutputValue?: Record<string, unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowExecutionActualStringRequest {
|
|
5
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
6
|
+
outputId?: string;
|
|
7
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
8
|
+
outputKey?: string;
|
|
9
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
10
|
+
quality?: number;
|
|
11
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
14
|
+
desiredOutputValue?: string;
|
|
15
|
+
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from "./ConditionalNodeResultData";
|
|
|
7
7
|
export * from "./ContentType";
|
|
8
8
|
export * from "./DeploymentRead";
|
|
9
9
|
export * from "./DeploymentStatus";
|
|
10
|
-
export * from "./Document";
|
|
11
10
|
export * from "./DocumentDocumentToDocumentIndex";
|
|
12
11
|
export * from "./DocumentIndexRead";
|
|
13
12
|
export * from "./DocumentIndexStatus";
|
|
@@ -85,11 +84,13 @@ export * from "./SearchNodeResultData";
|
|
|
85
84
|
export * from "./SearchRequestOptionsRequest";
|
|
86
85
|
export * from "./SearchResponse";
|
|
87
86
|
export * from "./SearchResult";
|
|
87
|
+
export * from "./SearchResultDocument";
|
|
88
88
|
export * from "./SearchResultMergingRequest";
|
|
89
89
|
export * from "./SearchWeightsRequest";
|
|
90
90
|
export * from "./SlimDocument";
|
|
91
91
|
export * from "./SubmitCompletionActualRequest";
|
|
92
92
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
93
|
+
export * from "./SubmitWorkflowExecutionActualRequest";
|
|
93
94
|
export * from "./TemplatingNodeChatHistoryResult";
|
|
94
95
|
export * from "./TemplatingNodeJsonResult";
|
|
95
96
|
export * from "./TemplatingNodeResult";
|
|
@@ -110,6 +111,9 @@ export * from "./UploadDocumentResponse";
|
|
|
110
111
|
export * from "./VellumVariable";
|
|
111
112
|
export * from "./VellumVariableType";
|
|
112
113
|
export * from "./WorkflowEventError";
|
|
114
|
+
export * from "./WorkflowExecutionActualChatHistoryRequest";
|
|
115
|
+
export * from "./WorkflowExecutionActualJsonRequest";
|
|
116
|
+
export * from "./WorkflowExecutionActualStringRequest";
|
|
113
117
|
export * from "./WorkflowExecutionEventErrorCode";
|
|
114
118
|
export * from "./WorkflowExecutionEventType";
|
|
115
119
|
export * from "./WorkflowExecutionNodeResultEvent";
|
package/api/types/index.js
CHANGED
|
@@ -23,7 +23,6 @@ __exportStar(require("./ConditionalNodeResultData"), exports);
|
|
|
23
23
|
__exportStar(require("./ContentType"), exports);
|
|
24
24
|
__exportStar(require("./DeploymentRead"), exports);
|
|
25
25
|
__exportStar(require("./DeploymentStatus"), exports);
|
|
26
|
-
__exportStar(require("./Document"), exports);
|
|
27
26
|
__exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
|
|
28
27
|
__exportStar(require("./DocumentIndexRead"), exports);
|
|
29
28
|
__exportStar(require("./DocumentIndexStatus"), exports);
|
|
@@ -101,11 +100,13 @@ __exportStar(require("./SearchNodeResultData"), exports);
|
|
|
101
100
|
__exportStar(require("./SearchRequestOptionsRequest"), exports);
|
|
102
101
|
__exportStar(require("./SearchResponse"), exports);
|
|
103
102
|
__exportStar(require("./SearchResult"), exports);
|
|
103
|
+
__exportStar(require("./SearchResultDocument"), exports);
|
|
104
104
|
__exportStar(require("./SearchResultMergingRequest"), exports);
|
|
105
105
|
__exportStar(require("./SearchWeightsRequest"), exports);
|
|
106
106
|
__exportStar(require("./SlimDocument"), exports);
|
|
107
107
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
108
108
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
109
|
+
__exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
|
|
109
110
|
__exportStar(require("./TemplatingNodeChatHistoryResult"), exports);
|
|
110
111
|
__exportStar(require("./TemplatingNodeJsonResult"), exports);
|
|
111
112
|
__exportStar(require("./TemplatingNodeResult"), exports);
|
|
@@ -126,6 +127,9 @@ __exportStar(require("./UploadDocumentResponse"), exports);
|
|
|
126
127
|
__exportStar(require("./VellumVariable"), exports);
|
|
127
128
|
__exportStar(require("./VellumVariableType"), exports);
|
|
128
129
|
__exportStar(require("./WorkflowEventError"), exports);
|
|
130
|
+
__exportStar(require("./WorkflowExecutionActualChatHistoryRequest"), exports);
|
|
131
|
+
__exportStar(require("./WorkflowExecutionActualJsonRequest"), exports);
|
|
132
|
+
__exportStar(require("./WorkflowExecutionActualStringRequest"), exports);
|
|
129
133
|
__exportStar(require("./WorkflowExecutionEventErrorCode"), exports);
|
|
130
134
|
__exportStar(require("./WorkflowExecutionEventType"), exports);
|
|
131
135
|
__exportStar(require("./WorkflowExecutionNodeResultEvent"), exports);
|
package/dist/Client.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class VellumClient {
|
|
|
21
21
|
protected readonly options: VellumClient.Options;
|
|
22
22
|
constructor(options: VellumClient.Options);
|
|
23
23
|
/**
|
|
24
|
-
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">
|
|
24
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
25
25
|
*
|
|
26
26
|
* Executes a deployed Workflow and streams back its results.
|
|
27
27
|
* @throws {Vellum.BadRequestError}
|
|
@@ -75,6 +75,14 @@ export declare class VellumClient {
|
|
|
75
75
|
* @throws {Vellum.InternalServerError}
|
|
76
76
|
*/
|
|
77
77
|
submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
80
|
+
*
|
|
81
|
+
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
82
|
+
*
|
|
83
|
+
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
84
|
+
*/
|
|
85
|
+
submitWorkflowExecutionActuals(request: Vellum.SubmitWorkflowExecutionActualsRequest): Promise<void>;
|
|
78
86
|
protected _deployments: Deployments | undefined;
|
|
79
87
|
get deployments(): Deployments;
|
|
80
88
|
protected _documentIndexes: DocumentIndexes | undefined;
|
package/dist/Client.js
CHANGED
|
@@ -49,7 +49,7 @@ class VellumClient {
|
|
|
49
49
|
this.options = options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">
|
|
52
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
53
53
|
*
|
|
54
54
|
* Executes a deployed Workflow and streams back its results.
|
|
55
55
|
* @throws {Vellum.BadRequestError}
|
|
@@ -296,6 +296,48 @@ class VellumClient {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
301
|
+
*
|
|
302
|
+
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
303
|
+
*
|
|
304
|
+
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
305
|
+
*/
|
|
306
|
+
async submitWorkflowExecutionActuals(request) {
|
|
307
|
+
const _response = await core.fetcher({
|
|
308
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, "v1/submit-workflow-execution-actuals"),
|
|
309
|
+
method: "POST",
|
|
310
|
+
headers: {
|
|
311
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
312
|
+
},
|
|
313
|
+
contentType: "application/json",
|
|
314
|
+
body: await serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
315
|
+
unrecognizedObjectKeys: "strip",
|
|
316
|
+
}),
|
|
317
|
+
});
|
|
318
|
+
if (_response.ok) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (_response.error.reason === "status-code") {
|
|
322
|
+
throw new errors.VellumError({
|
|
323
|
+
statusCode: _response.error.statusCode,
|
|
324
|
+
body: _response.error.body,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
switch (_response.error.reason) {
|
|
328
|
+
case "non-json":
|
|
329
|
+
throw new errors.VellumError({
|
|
330
|
+
statusCode: _response.error.statusCode,
|
|
331
|
+
body: _response.error.rawBody,
|
|
332
|
+
});
|
|
333
|
+
case "timeout":
|
|
334
|
+
throw new errors.VellumTimeoutError();
|
|
335
|
+
case "unknown":
|
|
336
|
+
throw new errors.VellumError({
|
|
337
|
+
message: _response.error.errorMessage,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
299
341
|
_deployments;
|
|
300
342
|
get deployments() {
|
|
301
343
|
return (this._deployments ??= new Client_1.Deployments(this.options));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../..";
|
|
5
|
+
export interface SubmitWorkflowExecutionActualsRequest {
|
|
6
|
+
/** Feedback regarding the quality of an output on a previously executed workflow. */
|
|
7
|
+
actuals: Vellum.SubmitWorkflowExecutionActualRequest[];
|
|
8
|
+
/** The Vellum-generated ID of a previously executed workflow. Must provide either this or external_id. */
|
|
9
|
+
executionId?: string;
|
|
10
|
+
/** The external ID that was originally provided by when executing the workflow, if applicable, that you'd now like to submit actuals for. Must provide either this or execution_id. */
|
|
11
|
+
externalId?: string;
|
|
12
|
+
}
|
|
@@ -3,3 +3,4 @@ export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
|
3
3
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|
|
4
4
|
export { SearchRequestBodyRequest } from "./SearchRequestBodyRequest";
|
|
5
5
|
export { SubmitCompletionActualsRequest } from "./SubmitCompletionActualsRequest";
|
|
6
|
+
export { SubmitWorkflowExecutionActualsRequest } from "./SubmitWorkflowExecutionActualsRequest";
|
|
@@ -27,6 +27,6 @@ export interface DocumentRead {
|
|
|
27
27
|
originalFileUrl?: string;
|
|
28
28
|
processedFileUrl?: string;
|
|
29
29
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
30
|
-
/** A previously supplied JSON object containing metadata that can filtered on when searching. */
|
|
30
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
31
31
|
metadata?: Record<string, unknown>;
|
|
32
32
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface SearchResultDocument {
|
|
5
5
|
/** The ID of the document. */
|
|
6
6
|
id: string;
|
|
7
7
|
/** The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
8
8
|
label: string;
|
|
9
9
|
/** The unique ID of the document as represented in an external system and specified when it was originally uploaded. */
|
|
10
10
|
externalId?: string;
|
|
11
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
11
13
|
}
|
|
@@ -35,5 +35,7 @@ export interface SlimDocument {
|
|
|
35
35
|
status?: Vellum.DocumentStatus;
|
|
36
36
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
37
37
|
keywords?: string[];
|
|
38
|
+
/** A previously supplied JSON object containing metadata that can be filtered on when searching. */
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
38
40
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
39
41
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export declare type SubmitWorkflowExecutionActualRequest = Vellum.SubmitWorkflowExecutionActualRequest.String | Vellum.SubmitWorkflowExecutionActualRequest.Json | Vellum.SubmitWorkflowExecutionActualRequest.ChatHistory;
|
|
6
|
+
export declare namespace SubmitWorkflowExecutionActualRequest {
|
|
7
|
+
interface String extends Vellum.WorkflowExecutionActualStringRequest {
|
|
8
|
+
outputType: "STRING";
|
|
9
|
+
}
|
|
10
|
+
interface Json extends Vellum.WorkflowExecutionActualJsonRequest {
|
|
11
|
+
outputType: "JSON";
|
|
12
|
+
}
|
|
13
|
+
interface ChatHistory extends Vellum.WorkflowExecutionActualChatHistoryRequest {
|
|
14
|
+
outputType: "CHAT_HISTORY";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface WorkflowExecutionActualChatHistoryRequest {
|
|
6
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
7
|
+
outputId?: string;
|
|
8
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
9
|
+
outputKey?: string;
|
|
10
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
11
|
+
quality?: number;
|
|
12
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
13
|
+
timestamp?: number;
|
|
14
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
15
|
+
desiredOutputValue?: Vellum.ChatMessageRequest[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowExecutionActualJsonRequest {
|
|
5
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
6
|
+
outputId?: string;
|
|
7
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
8
|
+
outputKey?: string;
|
|
9
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
10
|
+
quality?: number;
|
|
11
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
14
|
+
desiredOutputValue?: Record<string, unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowExecutionActualStringRequest {
|
|
5
|
+
/** The Vellum-generated ID of a workflow output. Must provide either this or output_key. output_key is typically preferred. */
|
|
6
|
+
outputId?: string;
|
|
7
|
+
/** The user-defined name of a workflow output. Must provide either this or output_id. Should correspond to the `Name` specified in a Final Output Node. Generally preferred over output_id. */
|
|
8
|
+
outputKey?: string;
|
|
9
|
+
/** Optionally provide a decimal number between 0.0 and 1.0 (inclusive) representing the quality of the output. 0 is the worst, 1 is the best. */
|
|
10
|
+
quality?: number;
|
|
11
|
+
/** Optionally provide the timestamp representing when this feedback was collected. Used for reporting purposes. */
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
/** Optionally provide the value that the output ideally should have been. */
|
|
14
|
+
desiredOutputValue?: string;
|
|
15
|
+
}
|
|
@@ -7,7 +7,6 @@ export * from "./ConditionalNodeResultData";
|
|
|
7
7
|
export * from "./ContentType";
|
|
8
8
|
export * from "./DeploymentRead";
|
|
9
9
|
export * from "./DeploymentStatus";
|
|
10
|
-
export * from "./Document";
|
|
11
10
|
export * from "./DocumentDocumentToDocumentIndex";
|
|
12
11
|
export * from "./DocumentIndexRead";
|
|
13
12
|
export * from "./DocumentIndexStatus";
|
|
@@ -85,11 +84,13 @@ export * from "./SearchNodeResultData";
|
|
|
85
84
|
export * from "./SearchRequestOptionsRequest";
|
|
86
85
|
export * from "./SearchResponse";
|
|
87
86
|
export * from "./SearchResult";
|
|
87
|
+
export * from "./SearchResultDocument";
|
|
88
88
|
export * from "./SearchResultMergingRequest";
|
|
89
89
|
export * from "./SearchWeightsRequest";
|
|
90
90
|
export * from "./SlimDocument";
|
|
91
91
|
export * from "./SubmitCompletionActualRequest";
|
|
92
92
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
93
|
+
export * from "./SubmitWorkflowExecutionActualRequest";
|
|
93
94
|
export * from "./TemplatingNodeChatHistoryResult";
|
|
94
95
|
export * from "./TemplatingNodeJsonResult";
|
|
95
96
|
export * from "./TemplatingNodeResult";
|
|
@@ -110,6 +111,9 @@ export * from "./UploadDocumentResponse";
|
|
|
110
111
|
export * from "./VellumVariable";
|
|
111
112
|
export * from "./VellumVariableType";
|
|
112
113
|
export * from "./WorkflowEventError";
|
|
114
|
+
export * from "./WorkflowExecutionActualChatHistoryRequest";
|
|
115
|
+
export * from "./WorkflowExecutionActualJsonRequest";
|
|
116
|
+
export * from "./WorkflowExecutionActualStringRequest";
|
|
113
117
|
export * from "./WorkflowExecutionEventErrorCode";
|
|
114
118
|
export * from "./WorkflowExecutionEventType";
|
|
115
119
|
export * from "./WorkflowExecutionNodeResultEvent";
|
package/dist/api/types/index.js
CHANGED
|
@@ -23,7 +23,6 @@ __exportStar(require("./ConditionalNodeResultData"), exports);
|
|
|
23
23
|
__exportStar(require("./ContentType"), exports);
|
|
24
24
|
__exportStar(require("./DeploymentRead"), exports);
|
|
25
25
|
__exportStar(require("./DeploymentStatus"), exports);
|
|
26
|
-
__exportStar(require("./Document"), exports);
|
|
27
26
|
__exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
|
|
28
27
|
__exportStar(require("./DocumentIndexRead"), exports);
|
|
29
28
|
__exportStar(require("./DocumentIndexStatus"), exports);
|
|
@@ -101,11 +100,13 @@ __exportStar(require("./SearchNodeResultData"), exports);
|
|
|
101
100
|
__exportStar(require("./SearchRequestOptionsRequest"), exports);
|
|
102
101
|
__exportStar(require("./SearchResponse"), exports);
|
|
103
102
|
__exportStar(require("./SearchResult"), exports);
|
|
103
|
+
__exportStar(require("./SearchResultDocument"), exports);
|
|
104
104
|
__exportStar(require("./SearchResultMergingRequest"), exports);
|
|
105
105
|
__exportStar(require("./SearchWeightsRequest"), exports);
|
|
106
106
|
__exportStar(require("./SlimDocument"), exports);
|
|
107
107
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
108
108
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
109
|
+
__exportStar(require("./SubmitWorkflowExecutionActualRequest"), exports);
|
|
109
110
|
__exportStar(require("./TemplatingNodeChatHistoryResult"), exports);
|
|
110
111
|
__exportStar(require("./TemplatingNodeJsonResult"), exports);
|
|
111
112
|
__exportStar(require("./TemplatingNodeResult"), exports);
|
|
@@ -126,6 +127,9 @@ __exportStar(require("./UploadDocumentResponse"), exports);
|
|
|
126
127
|
__exportStar(require("./VellumVariable"), exports);
|
|
127
128
|
__exportStar(require("./VellumVariableType"), exports);
|
|
128
129
|
__exportStar(require("./WorkflowEventError"), exports);
|
|
130
|
+
__exportStar(require("./WorkflowExecutionActualChatHistoryRequest"), exports);
|
|
131
|
+
__exportStar(require("./WorkflowExecutionActualJsonRequest"), exports);
|
|
132
|
+
__exportStar(require("./WorkflowExecutionActualStringRequest"), exports);
|
|
129
133
|
__exportStar(require("./WorkflowExecutionEventErrorCode"), exports);
|
|
130
134
|
__exportStar(require("./WorkflowExecutionEventType"), exports);
|
|
131
135
|
__exportStar(require("./WorkflowExecutionNodeResultEvent"), exports);
|