vellum-ai 0.0.16 → 0.0.18
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.js +1 -1
- package/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
- package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +18 -4
- package/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +14 -4
- package/api/resources/sandboxes/client/Client.d.ts +6 -0
- package/api/resources/sandboxes/client/Client.js +37 -0
- package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
- package/api/resources/testSuites/client/Client.d.ts +6 -0
- package/api/resources/testSuites/client/Client.js +37 -0
- package/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
- package/api/types/BlockTypeEnum.d.ts +8 -1
- package/api/types/BlockTypeEnum.js +1 -0
- package/api/types/ChatMessageRole.d.ts +8 -1
- package/api/types/ChatMessageRole.js +1 -0
- package/api/types/ContentType.d.ts +12 -0
- package/api/types/ContentType.js +10 -0
- package/api/types/DeploymentRead.d.ts +22 -5
- package/api/types/DeploymentReadStatusEnum.d.ts +5 -0
- package/api/types/Document.d.ts +1 -1
- package/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
- package/api/types/DocumentIndexRead.d.ts +17 -4
- package/api/types/DocumentIndexStatus.d.ts +4 -0
- package/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
- package/api/types/EnvironmentEnum.d.ts +5 -0
- package/api/types/FinishReasonEnum.d.ts +5 -0
- package/api/types/GenerateOptionsRequest.d.ts +6 -1
- package/api/types/IndexingStateEnum.d.ts +7 -0
- package/api/types/LogprobsEnum.d.ts +4 -0
- package/api/types/ModelTypeEnum.d.ts +4 -0
- package/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
- package/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/api/types/ModelVersionRead.d.ts +20 -5
- package/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
- package/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
- package/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
- package/api/types/ProcessingFailureReasonEnum.js +0 -4
- package/api/types/ProcessingStateEnum.d.ts +6 -0
- package/api/types/PromptTemplateBlockProperties.d.ts +5 -1
- package/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
- package/api/types/PromptTemplateBlockRequest.d.ts +1 -0
- package/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
- package/api/types/ProviderEnum.d.ts +11 -1
- package/api/types/ProviderEnum.js +1 -0
- package/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
- package/api/types/ScenarioInput.d.ts +1 -1
- package/api/types/ScenarioInputRequest.d.ts +2 -1
- package/api/types/ScenarioInputTypeEnum.d.ts +12 -0
- package/{dist/api/types/TypeEnum.js → api/types/ScenarioInputTypeEnum.js} +2 -2
- package/api/types/SlimDocument.d.ts +19 -4
- package/api/types/SlimDocumentStatusEnum.d.ts +0 -3
- package/api/types/SlimDocumentStatusEnum.js +0 -4
- package/api/types/index.d.ts +3 -2
- package/api/types/index.js +3 -2
- package/dist/Client.js +1 -1
- package/dist/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
- package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +18 -4
- package/dist/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +14 -4
- package/dist/api/resources/sandboxes/client/Client.d.ts +6 -0
- package/dist/api/resources/sandboxes/client/Client.js +37 -0
- package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
- package/dist/api/resources/testSuites/client/Client.d.ts +6 -0
- package/dist/api/resources/testSuites/client/Client.js +37 -0
- package/dist/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
- package/dist/api/types/BlockTypeEnum.d.ts +8 -1
- package/dist/api/types/BlockTypeEnum.js +1 -0
- package/dist/api/types/ChatMessageRole.d.ts +8 -1
- package/dist/api/types/ChatMessageRole.js +1 -0
- package/dist/api/types/ContentType.d.ts +12 -0
- package/dist/api/types/ContentType.js +10 -0
- package/dist/api/types/DeploymentRead.d.ts +22 -5
- package/dist/api/types/DeploymentReadStatusEnum.d.ts +5 -0
- package/dist/api/types/Document.d.ts +1 -1
- package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
- package/dist/api/types/DocumentIndexRead.d.ts +17 -4
- package/dist/api/types/DocumentIndexStatus.d.ts +4 -0
- package/dist/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
- package/dist/api/types/EnvironmentEnum.d.ts +5 -0
- package/dist/api/types/FinishReasonEnum.d.ts +5 -0
- package/dist/api/types/GenerateOptionsRequest.d.ts +6 -1
- package/dist/api/types/IndexingStateEnum.d.ts +7 -0
- package/dist/api/types/LogprobsEnum.d.ts +4 -0
- package/dist/api/types/ModelTypeEnum.d.ts +4 -0
- package/dist/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
- package/dist/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/dist/api/types/ModelVersionRead.d.ts +20 -5
- package/dist/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
- package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
- package/dist/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
- package/dist/api/types/ProcessingFailureReasonEnum.js +0 -4
- package/dist/api/types/ProcessingStateEnum.d.ts +6 -0
- package/dist/api/types/PromptTemplateBlockProperties.d.ts +5 -1
- package/dist/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
- package/dist/api/types/PromptTemplateBlockRequest.d.ts +1 -0
- package/dist/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
- package/dist/api/types/ProviderEnum.d.ts +11 -1
- package/dist/api/types/ProviderEnum.js +1 -0
- package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
- package/dist/api/types/ScenarioInput.d.ts +1 -1
- package/dist/api/types/ScenarioInputRequest.d.ts +2 -1
- package/dist/api/types/ScenarioInputTypeEnum.d.ts +12 -0
- package/{api/types/TypeEnum.js → dist/api/types/ScenarioInputTypeEnum.js} +2 -2
- package/dist/api/types/SlimDocument.d.ts +19 -4
- package/dist/api/types/SlimDocumentStatusEnum.d.ts +0 -3
- package/dist/api/types/SlimDocumentStatusEnum.js +0 -4
- package/dist/api/types/index.d.ts +3 -2
- package/dist/api/types/index.js +3 -2
- package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
- package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
- package/dist/serialization/types/BlockTypeEnum.d.ts +1 -1
- package/dist/serialization/types/BlockTypeEnum.js +1 -1
- package/dist/serialization/types/ChatMessageRole.d.ts +1 -1
- package/dist/serialization/types/ChatMessageRole.js +1 -1
- package/dist/serialization/types/ContentType.d.ts +10 -0
- package/dist/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
- package/dist/serialization/types/DocumentIndexRead.d.ts +1 -0
- package/dist/serialization/types/DocumentIndexRead.js +1 -0
- package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
- package/dist/serialization/types/EnrichedNormalizedCompletion.js +1 -0
- package/{serialization/types/ModelVersionExecConfigRead.d.ts → dist/serialization/types/ModelVersionExecConfig.d.ts} +3 -3
- package/dist/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
- package/dist/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/dist/serialization/types/ModelVersionExecConfigParameters.js +2 -2
- package/dist/serialization/types/ModelVersionRead.d.ts +1 -1
- package/dist/serialization/types/ModelVersionRead.js +1 -1
- package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
- package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
- package/dist/serialization/types/ProcessingFailureReasonEnum.js +1 -1
- package/dist/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
- package/dist/serialization/types/PromptTemplateBlockProperties.js +5 -1
- package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
- package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
- package/dist/serialization/types/ProviderEnum.d.ts +1 -1
- package/dist/serialization/types/ProviderEnum.js +1 -1
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
- package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
- package/dist/serialization/types/ScenarioInput.d.ts +1 -1
- package/dist/serialization/types/ScenarioInput.js +1 -1
- package/dist/serialization/types/ScenarioInputRequest.d.ts +1 -1
- package/dist/serialization/types/ScenarioInputRequest.js +1 -1
- package/dist/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
- package/dist/serialization/types/ScenarioInputTypeEnum.js +31 -0
- package/dist/serialization/types/SlimDocumentStatusEnum.js +1 -1
- package/dist/serialization/types/index.d.ts +3 -2
- package/dist/serialization/types/index.js +3 -2
- package/package.json +1 -1
- package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
- package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
- package/serialization/types/BlockTypeEnum.d.ts +1 -1
- package/serialization/types/BlockTypeEnum.js +1 -1
- package/serialization/types/ChatMessageRole.d.ts +1 -1
- package/serialization/types/ChatMessageRole.js +1 -1
- package/serialization/types/ContentType.d.ts +10 -0
- package/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
- package/serialization/types/DocumentIndexRead.d.ts +1 -0
- package/serialization/types/DocumentIndexRead.js +1 -0
- package/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
- package/serialization/types/EnrichedNormalizedCompletion.js +1 -0
- package/{dist/serialization/types/ModelVersionExecConfigRead.d.ts → serialization/types/ModelVersionExecConfig.d.ts} +3 -3
- package/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
- package/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
- package/serialization/types/ModelVersionExecConfigParameters.js +2 -2
- package/serialization/types/ModelVersionRead.d.ts +1 -1
- package/serialization/types/ModelVersionRead.js +1 -1
- package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
- package/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
- package/serialization/types/ProcessingFailureReasonEnum.js +1 -1
- package/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
- package/serialization/types/PromptTemplateBlockProperties.js +5 -1
- package/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
- package/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
- package/serialization/types/ProviderEnum.d.ts +1 -1
- package/serialization/types/ProviderEnum.js +1 -1
- package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
- package/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
- package/serialization/types/ScenarioInput.d.ts +1 -1
- package/serialization/types/ScenarioInput.js +1 -1
- package/serialization/types/ScenarioInputRequest.d.ts +1 -1
- package/serialization/types/ScenarioInputRequest.js +1 -1
- package/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
- package/serialization/types/ScenarioInputTypeEnum.js +31 -0
- package/serialization/types/SlimDocumentStatusEnum.js +1 -1
- package/serialization/types/index.d.ts +3 -2
- package/serialization/types/index.js +3 -2
- package/api/types/TypeEnum.d.ts +0 -8
- package/dist/api/types/TypeEnum.d.ts +0 -8
- /package/api/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +0 -0
- /package/dist/api/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +0 -0
package/Client.js
CHANGED
|
@@ -117,7 +117,7 @@ class VellumClient {
|
|
|
117
117
|
async generateStream(request, cb, opts) {
|
|
118
118
|
const _queue = new core.CallbackQueue();
|
|
119
119
|
await core.streamingFetcher({
|
|
120
|
-
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).
|
|
120
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).predict, "v1/generate-stream"),
|
|
121
121
|
method: "POST",
|
|
122
122
|
headers: {
|
|
123
123
|
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
@@ -7,7 +7,7 @@ export interface SearchRequestBodyRequest {
|
|
|
7
7
|
indexId?: string;
|
|
8
8
|
/** The name of the index to search against. Must provide either this or index_id. */
|
|
9
9
|
indexName?: string;
|
|
10
|
-
/** The query to search for. */
|
|
10
|
+
/** The query to search for. <span style="white-space: nowrap">`non-empty`</span> */
|
|
11
11
|
query: string;
|
|
12
12
|
/** Configuration options for the search. */
|
|
13
13
|
options?: Vellum.SearchRequestOptionsRequest;
|
|
@@ -3,13 +3,27 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../../../..";
|
|
5
5
|
export interface DocumentIndexCreateRequest {
|
|
6
|
-
/** A human-readable label for the document index
|
|
6
|
+
/** A human-readable label for the document index <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
7
7
|
label: string;
|
|
8
|
-
/** A name that uniquely identifies this index within its workspace */
|
|
8
|
+
/** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
9
9
|
name: string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The current status of the document index
|
|
12
|
+
*
|
|
13
|
+
* * `ACTIVE` - Active
|
|
14
|
+
* * `ARCHIVED` - Archived
|
|
15
|
+
*/
|
|
11
16
|
status?: Vellum.DocumentIndexStatus;
|
|
12
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The environment this document index is used in
|
|
19
|
+
*
|
|
20
|
+
* * `DEVELOPMENT` - Development
|
|
21
|
+
* * `STAGING` - Staging
|
|
22
|
+
* * `PRODUCTION` - Production
|
|
23
|
+
*/
|
|
24
|
+
environment?: Vellum.EnvironmentEnum;
|
|
25
|
+
/** Configuration representing how documents should be indexed */
|
|
13
26
|
indexingConfig: Record<string, unknown>;
|
|
27
|
+
/** Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index */
|
|
14
28
|
copyDocumentsFromIndexId?: string;
|
|
15
29
|
}
|
|
@@ -6,7 +6,7 @@ export interface UploadDocumentBodyRequest {
|
|
|
6
6
|
addToIndexNames?: string[];
|
|
7
7
|
/** Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed. */
|
|
8
8
|
externalId?: string;
|
|
9
|
-
/** A human-friendly name for this document. Typically the filename. */
|
|
9
|
+
/** A human-friendly name for this document. Typically the filename. <span style="white-space: nowrap">`non-empty`</span> */
|
|
10
10
|
label: string;
|
|
11
11
|
/** Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches. */
|
|
12
12
|
keywords?: string[];
|
|
@@ -3,15 +3,25 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../../../..";
|
|
5
5
|
export interface RegisterPromptRequestRequest {
|
|
6
|
-
/** A human-friendly label for corresponding entities created in Vellum. */
|
|
6
|
+
/** A human-friendly label for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
|
|
7
7
|
label: string;
|
|
8
|
-
/** A uniquely-identifying name for corresponding entities created in Vellum. */
|
|
8
|
+
/** A uniquely-identifying name for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
|
|
9
9
|
name: string;
|
|
10
10
|
/** Information about how to execute the prompt template. */
|
|
11
11
|
prompt: Vellum.RegisterPromptPromptInfoRequest;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The initial LLM provider to use for this prompt
|
|
14
|
+
*
|
|
15
|
+
* * `ANTHROPIC` - Anthropic
|
|
16
|
+
* * `COHERE` - Cohere
|
|
17
|
+
* * `GOOGLE` - Google
|
|
18
|
+
* * `HOSTED` - Hosted
|
|
19
|
+
* * `MOSAICML` - MosaicML
|
|
20
|
+
* * `OPENAI` - OpenAI
|
|
21
|
+
* * `PYQ` - Pyq
|
|
22
|
+
*/
|
|
13
23
|
provider: Vellum.ProviderEnum;
|
|
14
|
-
/** The initial model to use for this prompt */
|
|
24
|
+
/** The initial model to use for this prompt <span style="white-space: nowrap">`non-empty`</span> */
|
|
15
25
|
model: string;
|
|
16
26
|
/** The initial model parameters to use for this prompt */
|
|
17
27
|
parameters: Vellum.RegisterPromptModelParametersRequest;
|
|
@@ -25,4 +25,10 @@ export declare class Sandboxes {
|
|
|
25
25
|
* or overwritten with default values.
|
|
26
26
|
*/
|
|
27
27
|
upsertSandboxScenario(id: string, request: Vellum.UpsertSandboxScenarioRequestRequest): Promise<Vellum.SandboxScenario>;
|
|
28
|
+
/**
|
|
29
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
30
|
+
*
|
|
31
|
+
* Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
|
|
32
|
+
*/
|
|
33
|
+
deleteSandboxScenario(id: string, scenarioId: string): Promise<void>;
|
|
28
34
|
}
|
|
@@ -90,5 +90,42 @@ class Sandboxes {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
95
|
+
*
|
|
96
|
+
* Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
|
|
97
|
+
*/
|
|
98
|
+
async deleteSandboxScenario(id, scenarioId) {
|
|
99
|
+
const _response = await core.fetcher({
|
|
100
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/sandboxes/${id}/scenarios/${scenarioId}`),
|
|
101
|
+
method: "DELETE",
|
|
102
|
+
headers: {
|
|
103
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
104
|
+
},
|
|
105
|
+
contentType: "application/json",
|
|
106
|
+
});
|
|
107
|
+
if (_response.ok) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
throw new errors.VellumError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.body,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
switch (_response.error.reason) {
|
|
117
|
+
case "non-json":
|
|
118
|
+
throw new errors.VellumError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.rawBody,
|
|
121
|
+
});
|
|
122
|
+
case "timeout":
|
|
123
|
+
throw new errors.VellumTimeoutError();
|
|
124
|
+
case "unknown":
|
|
125
|
+
throw new errors.VellumError({
|
|
126
|
+
message: _response.error.errorMessage,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
93
130
|
}
|
|
94
131
|
exports.Sandboxes = Sandboxes;
|
|
@@ -6,7 +6,7 @@ export interface UpsertSandboxScenarioRequestRequest {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
/** The inputs for the scenario */
|
|
8
8
|
inputs: Vellum.ScenarioInputRequest[];
|
|
9
|
-
/** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. */
|
|
9
|
+
/** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. <span style="white-space: nowrap">`non-empty`</span> */
|
|
10
10
|
scenarioId?: string;
|
|
11
11
|
metricInputParams?: Vellum.SandboxMetricInputParamsRequest;
|
|
12
12
|
}
|
|
@@ -25,4 +25,10 @@ export declare class TestSuites {
|
|
|
25
25
|
* or overwritten with default values.
|
|
26
26
|
*/
|
|
27
27
|
upsertTestSuiteTestCase(id: string, request: Vellum.TestSuiteTestCaseRequest): Promise<Vellum.TestSuiteTestCase>;
|
|
28
|
+
/**
|
|
29
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
30
|
+
*
|
|
31
|
+
* Deletes an existing test case for a test suite, keying off of the test case id.
|
|
32
|
+
*/
|
|
33
|
+
deleteTestSuiteTestCase(id: string, testCaseId: string): Promise<void>;
|
|
28
34
|
}
|
|
@@ -88,5 +88,42 @@ class TestSuites {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
93
|
+
*
|
|
94
|
+
* Deletes an existing test case for a test suite, keying off of the test case id.
|
|
95
|
+
*/
|
|
96
|
+
async deleteTestSuiteTestCase(id, testCaseId) {
|
|
97
|
+
const _response = await core.fetcher({
|
|
98
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/test-suites/${id}/test-cases/${testCaseId}`),
|
|
99
|
+
method: "DELETE",
|
|
100
|
+
headers: {
|
|
101
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
102
|
+
},
|
|
103
|
+
contentType: "application/json",
|
|
104
|
+
});
|
|
105
|
+
if (_response.ok) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (_response.error.reason === "status-code") {
|
|
109
|
+
throw new errors.VellumError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.body,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
switch (_response.error.reason) {
|
|
115
|
+
case "non-json":
|
|
116
|
+
throw new errors.VellumError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.rawBody,
|
|
119
|
+
});
|
|
120
|
+
case "timeout":
|
|
121
|
+
throw new errors.VellumTimeoutError();
|
|
122
|
+
case "unknown":
|
|
123
|
+
throw new errors.VellumError({
|
|
124
|
+
message: _response.error.errorMessage,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
91
128
|
}
|
|
92
129
|
exports.TestSuites = TestSuites;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../../../..";
|
|
5
5
|
export interface TestSuiteTestCaseRequest {
|
|
6
|
-
/** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. */
|
|
6
|
+
/** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. <span style="white-space: nowrap">`non-empty`</span> */
|
|
7
7
|
testCaseId?: string;
|
|
8
8
|
/** A human-friendly label for the test case. */
|
|
9
9
|
label?: string;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* * `CHAT_MESSAGE` - CHAT_MESSAGE
|
|
6
|
+
* * `CHAT_HISTORY` - CHAT_HISTORY
|
|
7
|
+
* * `JINJA` - JINJA
|
|
8
|
+
* * `FUNCTION_DEFINITION` - FUNCTION_DEFINITION
|
|
9
|
+
*/
|
|
10
|
+
export declare type BlockTypeEnum = "CHAT_MESSAGE" | "CHAT_HISTORY" | "JINJA" | "FUNCTION_DEFINITION";
|
|
5
11
|
export declare const BlockTypeEnum: {
|
|
6
12
|
readonly ChatMessage: "CHAT_MESSAGE";
|
|
7
13
|
readonly ChatHistory: "CHAT_HISTORY";
|
|
8
14
|
readonly Jinja: "JINJA";
|
|
15
|
+
readonly FunctionDefinition: "FUNCTION_DEFINITION";
|
|
9
16
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* * `SYSTEM` - System
|
|
6
|
+
* * `ASSISTANT` - Assistant
|
|
7
|
+
* * `USER` - User
|
|
8
|
+
* * `FUNCTION` - Function
|
|
9
|
+
*/
|
|
10
|
+
export declare type ChatMessageRole = "SYSTEM" | "ASSISTANT" | "USER" | "FUNCTION";
|
|
5
11
|
export declare const ChatMessageRole: {
|
|
6
12
|
readonly System: "SYSTEM";
|
|
7
13
|
readonly Assistant: "ASSISTANT";
|
|
8
14
|
readonly User: "USER";
|
|
15
|
+
readonly Function: "FUNCTION";
|
|
9
16
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `STRING` - STRING
|
|
6
|
+
* * `JSON` - JSON
|
|
7
|
+
*/
|
|
8
|
+
export declare type ContentType = "STRING" | "JSON";
|
|
9
|
+
export declare const ContentType: {
|
|
10
|
+
readonly String: "STRING";
|
|
11
|
+
readonly Json: "JSON";
|
|
12
|
+
};
|
|
@@ -5,15 +5,32 @@ import * as Vellum from "..";
|
|
|
5
5
|
export interface DeploymentRead {
|
|
6
6
|
id: string;
|
|
7
7
|
created: string;
|
|
8
|
-
/** A human-readable label for the deployment */
|
|
8
|
+
/** A human-readable label for the deployment <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
9
9
|
label: string;
|
|
10
|
-
/** A name that uniquely identifies this deployment within its workspace */
|
|
10
|
+
/** A name that uniquely identifies this deployment within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
11
11
|
name: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The current status of the deployment
|
|
14
|
+
*
|
|
15
|
+
* * `ACTIVE` - Active
|
|
16
|
+
* * `INACTIVE` - Inactive
|
|
17
|
+
* * `ARCHIVED` - Archived
|
|
18
|
+
*/
|
|
13
19
|
status?: Vellum.DeploymentReadStatusEnum;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* The environment this deployment is used in
|
|
22
|
+
*
|
|
23
|
+
* * `DEVELOPMENT` - Development
|
|
24
|
+
* * `STAGING` - Staging
|
|
25
|
+
* * `PRODUCTION` - Production
|
|
26
|
+
*/
|
|
15
27
|
environment?: Vellum.EnvironmentEnum;
|
|
16
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The type of model this deployment serves
|
|
30
|
+
*
|
|
31
|
+
* * `GENERATE` - Generate
|
|
32
|
+
* * `CLASSIFY` - Classify
|
|
33
|
+
*/
|
|
17
34
|
modelType: Vellum.ModelTypeEnum;
|
|
18
35
|
activeModelVersionIds: string[];
|
|
19
36
|
lastDeployedOn: string;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `ACTIVE` - Active
|
|
6
|
+
* * `INACTIVE` - Inactive
|
|
7
|
+
* * `ARCHIVED` - Archived
|
|
8
|
+
*/
|
|
4
9
|
export declare type DeploymentReadStatusEnum = "ACTIVE" | "INACTIVE" | "ARCHIVED";
|
|
5
10
|
export declare const DeploymentReadStatusEnum: {
|
|
6
11
|
readonly Active: "ACTIVE";
|
package/api/types/Document.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface Document {
|
|
5
5
|
/** The ID of the document. */
|
|
6
6
|
id: string;
|
|
7
|
-
/** The human-readable name for the document. */
|
|
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;
|
|
@@ -7,6 +7,14 @@ export interface DocumentDocumentToDocumentIndex {
|
|
|
7
7
|
id: string;
|
|
8
8
|
/** Vellum-generated ID that uniquely identifies the index this document is included in. */
|
|
9
9
|
documentIndexId: string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* An enum value representing where this document is along its indexing lifecycle for this index.
|
|
12
|
+
*
|
|
13
|
+
* * `AWAITING_PROCESSING` - Awaiting Processing
|
|
14
|
+
* * `QUEUED` - Queued
|
|
15
|
+
* * `INDEXING` - Indexing
|
|
16
|
+
* * `INDEXED` - Indexed
|
|
17
|
+
* * `FAILED` - Failed
|
|
18
|
+
*/
|
|
11
19
|
indexingState?: Vellum.IndexingStateEnum;
|
|
12
20
|
}
|
|
@@ -5,12 +5,25 @@ import * as Vellum from "..";
|
|
|
5
5
|
export interface DocumentIndexRead {
|
|
6
6
|
id: string;
|
|
7
7
|
created: string;
|
|
8
|
-
/** A human-readable label for the document index
|
|
8
|
+
/** A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
9
9
|
label: string;
|
|
10
|
-
/** A name that uniquely identifies this index within its workspace */
|
|
10
|
+
/** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
11
11
|
name: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The current status of the document index
|
|
14
|
+
*
|
|
15
|
+
* * `ACTIVE` - Active
|
|
16
|
+
* * `ARCHIVED` - Archived
|
|
17
|
+
*/
|
|
13
18
|
status?: Vellum.DocumentIndexStatus;
|
|
14
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The environment this document index is used in
|
|
21
|
+
*
|
|
22
|
+
* * `DEVELOPMENT` - Development
|
|
23
|
+
* * `STAGING` - Staging
|
|
24
|
+
* * `PRODUCTION` - Production
|
|
25
|
+
*/
|
|
26
|
+
environment?: Vellum.EnvironmentEnum;
|
|
27
|
+
/** Configuration representing how documents should be indexed */
|
|
15
28
|
indexingConfig: Record<string, unknown>;
|
|
16
29
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `ACTIVE` - Active
|
|
6
|
+
* * `ARCHIVED` - Archived
|
|
7
|
+
*/
|
|
4
8
|
export declare type DocumentIndexStatus = "ACTIVE" | "ARCHIVED";
|
|
5
9
|
export declare const DocumentIndexStatus: {
|
|
6
10
|
readonly Active: "ACTIVE";
|
|
@@ -9,10 +9,17 @@ export interface EnrichedNormalizedCompletion {
|
|
|
9
9
|
externalId?: string;
|
|
10
10
|
/** The text generated by the LLM. */
|
|
11
11
|
text: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The reason the generation finished.
|
|
14
|
+
*
|
|
15
|
+
* * `LENGTH` - LENGTH
|
|
16
|
+
* * `STOP` - STOP
|
|
17
|
+
* * `UNKNOWN` - UNKNOWN
|
|
18
|
+
*/
|
|
13
19
|
finishReason?: Vellum.FinishReasonEnum;
|
|
14
20
|
/** The logprobs of the completion. Only present if specified in the original request options. */
|
|
15
21
|
logprobs?: Vellum.NormalizedLogProbs;
|
|
16
22
|
/** The ID of the model version used to generate this completion. */
|
|
17
23
|
modelVersionId: string;
|
|
24
|
+
type?: Vellum.ContentType;
|
|
18
25
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `DEVELOPMENT` - Development
|
|
6
|
+
* * `STAGING` - Staging
|
|
7
|
+
* * `PRODUCTION` - Production
|
|
8
|
+
*/
|
|
4
9
|
export declare type EnvironmentEnum = "DEVELOPMENT" | "STAGING" | "PRODUCTION";
|
|
5
10
|
export declare const EnvironmentEnum: {
|
|
6
11
|
readonly Development: "DEVELOPMENT";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `LENGTH` - LENGTH
|
|
6
|
+
* * `STOP` - STOP
|
|
7
|
+
* * `UNKNOWN` - UNKNOWN
|
|
8
|
+
*/
|
|
4
9
|
export declare type FinishReasonEnum = "LENGTH" | "STOP" | "UNKNOWN";
|
|
5
10
|
export declare const FinishReasonEnum: {
|
|
6
11
|
readonly Length: "LENGTH";
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "..";
|
|
5
5
|
export interface GenerateOptionsRequest {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Which logprobs to include, if any. Defaults to NONE.
|
|
8
|
+
*
|
|
9
|
+
* * `ALL` - ALL
|
|
10
|
+
* * `NONE` - NONE
|
|
11
|
+
*/
|
|
7
12
|
logprobs?: Vellum.LogprobsEnum;
|
|
8
13
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `AWAITING_PROCESSING` - Awaiting Processing
|
|
6
|
+
* * `QUEUED` - Queued
|
|
7
|
+
* * `INDEXING` - Indexing
|
|
8
|
+
* * `INDEXED` - Indexed
|
|
9
|
+
* * `FAILED` - Failed
|
|
10
|
+
*/
|
|
4
11
|
export declare type IndexingStateEnum = "AWAITING_PROCESSING" | "QUEUED" | "INDEXING" | "INDEXED" | "FAILED";
|
|
5
12
|
export declare const IndexingStateEnum: {
|
|
6
13
|
readonly AwaitingProcessing: "AWAITING_PROCESSING";
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `GENERATE` - Generate
|
|
6
|
+
* * `CLASSIFY` - Classify
|
|
7
|
+
*/
|
|
4
8
|
export declare type ModelTypeEnum = "GENERATE" | "CLASSIFY";
|
|
5
9
|
export declare const ModelTypeEnum: {
|
|
6
10
|
readonly Generate: "GENERATE";
|
|
@@ -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 interface
|
|
5
|
+
export interface ModelVersionExecConfig {
|
|
6
6
|
/** The generation parameters that are passed to the LLM provider at runtime. */
|
|
7
7
|
parameters: Vellum.ModelVersionExecConfigParameters;
|
|
8
8
|
/** Names of the input variables specified in the prompt template. */
|
|
@@ -10,5 +10,5 @@ export interface ModelVersionExecConfigRead {
|
|
|
10
10
|
/** The template used to generate prompts for this model version. */
|
|
11
11
|
promptTemplate?: string;
|
|
12
12
|
promptBlockData?: Vellum.PromptTemplateBlockData;
|
|
13
|
-
promptSyntaxVersion
|
|
13
|
+
promptSyntaxVersion?: number;
|
|
14
14
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
export interface ModelVersionExecConfigParameters {
|
|
5
5
|
temperature: number;
|
|
6
6
|
maxTokens: number;
|
|
7
|
-
stop?: string[];
|
|
8
7
|
topP: number;
|
|
9
|
-
topK?: number;
|
|
10
8
|
frequencyPenalty: number;
|
|
11
9
|
presencePenalty: number;
|
|
12
10
|
logitBias?: Record<string, number | undefined>;
|
|
11
|
+
stop?: string[];
|
|
12
|
+
topK?: number;
|
|
13
13
|
}
|
|
@@ -7,17 +7,32 @@ export interface ModelVersionRead {
|
|
|
7
7
|
id: string;
|
|
8
8
|
/** Timestamp of when this model version was created. */
|
|
9
9
|
created: string;
|
|
10
|
-
/** Human-friendly name for this model version. */
|
|
10
|
+
/** Human-friendly name for this model version. <span style="white-space: nowrap">`<= 150 characters`</span> */
|
|
11
11
|
label: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The type of task this model is used for.
|
|
14
|
+
*
|
|
15
|
+
* * `GENERATE` - Generate
|
|
16
|
+
* * `CLASSIFY` - Classify
|
|
17
|
+
*/
|
|
13
18
|
modelType: Vellum.ModelTypeEnum;
|
|
14
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Which LLM provider this model version is associated with.
|
|
21
|
+
*
|
|
22
|
+
* * `ANTHROPIC` - Anthropic
|
|
23
|
+
* * `COHERE` - Cohere
|
|
24
|
+
* * `GOOGLE` - Google
|
|
25
|
+
* * `HOSTED` - Hosted
|
|
26
|
+
* * `MOSAICML` - MosaicML
|
|
27
|
+
* * `OPENAI` - OpenAI
|
|
28
|
+
* * `PYQ` - Pyq
|
|
29
|
+
*/
|
|
15
30
|
provider: Vellum.ProviderEnum;
|
|
16
|
-
/** The unique id of this model version as it exists in the above provider's system. */
|
|
31
|
+
/** The unique id of this model version as it exists in the above provider's system. <span style="white-space: nowrap">`<= 250 characters`</span> */
|
|
17
32
|
externalId: string;
|
|
18
33
|
/** Configuration used to build this model version. */
|
|
19
34
|
buildConfig: Vellum.ModelVersionBuildConfig;
|
|
20
35
|
/** Configuration used to execute this model version. */
|
|
21
|
-
execConfig: Vellum.
|
|
36
|
+
execConfig: Vellum.ModelVersionExecConfig;
|
|
22
37
|
status?: Vellum.ModelVersionReadStatusEnum;
|
|
23
38
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `CREATING` - Creating
|
|
6
|
+
* * `READY` - Ready
|
|
7
|
+
* * `CREATION_FAILED` - Creation Failed
|
|
8
|
+
* * `DISABLED` - Disabled
|
|
9
|
+
*/
|
|
4
10
|
export declare type ModelVersionReadStatusEnum = "CREATING" | "READY" | "CREATION_FAILED" | "DISABLED";
|
|
5
11
|
export declare const ModelVersionReadStatusEnum: {
|
|
6
12
|
readonly Creating: "CREATING";
|
|
@@ -2,6 +2,3 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export declare type ProcessingFailureReasonEnum = "EXCEEDED_CHARACTER_LIMIT";
|
|
5
|
-
export declare const ProcessingFailureReasonEnum: {
|
|
6
|
-
readonly ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT";
|
|
7
|
-
};
|
|
@@ -3,7 +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.ProcessingFailureReasonEnum = void 0;
|
|
7
|
-
exports.ProcessingFailureReasonEnum = {
|
|
8
|
-
ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT",
|
|
9
|
-
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `QUEUED` - Queued
|
|
6
|
+
* * `PROCESSING` - Processing
|
|
7
|
+
* * `PROCESSED` - Processed
|
|
8
|
+
* * `FAILED` - Failed
|
|
9
|
+
*/
|
|
4
10
|
export declare type ProcessingStateEnum = "QUEUED" | "PROCESSING" | "PROCESSED" | "FAILED";
|
|
5
11
|
export declare const ProcessingStateEnum: {
|
|
6
12
|
readonly Queued: "QUEUED";
|