vellum-ai 0.0.17 → 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/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +14 -1
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +11 -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 +20 -3
- package/api/types/DeploymentReadStatusEnum.d.ts +5 -0
- package/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
- package/api/types/DocumentIndexRead.d.ts +14 -1
- 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 +18 -3
- package/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
- 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/ProviderEnum.d.ts +11 -1
- package/api/types/ProviderEnum.js +1 -0
- package/api/types/ScenarioInput.d.ts +1 -1
- package/api/types/ScenarioInputRequest.d.ts +1 -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 +18 -3
- package/api/types/index.d.ts +3 -2
- package/api/types/index.js +3 -2
- package/dist/Client.js +1 -1
- package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +14 -1
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +11 -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 +20 -3
- package/dist/api/types/DeploymentReadStatusEnum.d.ts +5 -0
- package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
- package/dist/api/types/DocumentIndexRead.d.ts +14 -1
- 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 +18 -3
- package/dist/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
- 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/ProviderEnum.d.ts +11 -1
- package/dist/api/types/ProviderEnum.js +1 -0
- package/dist/api/types/ScenarioInput.d.ts +1 -1
- package/dist/api/types/ScenarioInputRequest.d.ts +1 -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 +18 -3
- 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/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/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/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/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/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/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,8 +7,21 @@ export interface DocumentIndexCreateRequest {
|
|
|
7
7
|
label: string;
|
|
8
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;
|
|
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;
|
|
12
25
|
/** Configuration representing how documents should be indexed */
|
|
13
26
|
indexingConfig: Record<string, unknown>;
|
|
14
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 */
|
|
@@ -9,7 +9,17 @@ export interface RegisterPromptRequestRequest {
|
|
|
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
24
|
/** The initial model to use for this prompt <span style="white-space: nowrap">`non-empty`</span> */
|
|
15
25
|
model: 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
|
+
};
|
|
@@ -9,11 +9,28 @@ export interface DeploymentRead {
|
|
|
9
9
|
label: string;
|
|
10
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";
|
|
@@ -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
|
}
|
|
@@ -9,8 +9,21 @@ export interface DocumentIndexRead {
|
|
|
9
9
|
label: string;
|
|
10
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;
|
|
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;
|
|
14
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
|
}
|
|
@@ -9,15 +9,30 @@ export interface ModelVersionRead {
|
|
|
9
9
|
created: string;
|
|
10
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
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";
|
|
@@ -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";
|
|
@@ -6,5 +6,9 @@ export interface PromptTemplateBlockProperties {
|
|
|
6
6
|
chatRole?: Vellum.ChatMessageRole;
|
|
7
7
|
chatMessageUnterminated?: boolean;
|
|
8
8
|
template?: string;
|
|
9
|
-
|
|
9
|
+
templateType?: Vellum.ContentType;
|
|
10
|
+
functionName?: string;
|
|
11
|
+
functionDescription?: string;
|
|
12
|
+
functionParameters?: Record<string, unknown>;
|
|
13
|
+
blocks?: Vellum.PromptTemplateBlock[];
|
|
10
14
|
}
|
|
@@ -6,5 +6,11 @@ export interface PromptTemplateBlockPropertiesRequest {
|
|
|
6
6
|
chatRole?: Vellum.ChatMessageRole;
|
|
7
7
|
chatMessageUnterminated?: boolean;
|
|
8
8
|
template?: string;
|
|
9
|
-
|
|
9
|
+
templateType?: Vellum.ContentType;
|
|
10
|
+
/** <span style="white-space: nowrap">`non-empty`</span> */
|
|
11
|
+
functionName?: string;
|
|
12
|
+
/** <span style="white-space: nowrap">`non-empty`</span> */
|
|
13
|
+
functionDescription?: string;
|
|
14
|
+
functionParameters?: Record<string, unknown>;
|
|
15
|
+
blocks?: Vellum.PromptTemplateBlockRequest[];
|
|
10
16
|
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* * `ANTHROPIC` - Anthropic
|
|
6
|
+
* * `COHERE` - Cohere
|
|
7
|
+
* * `GOOGLE` - Google
|
|
8
|
+
* * `HOSTED` - Hosted
|
|
9
|
+
* * `MOSAICML` - MosaicML
|
|
10
|
+
* * `OPENAI` - OpenAI
|
|
11
|
+
* * `PYQ` - Pyq
|
|
12
|
+
*/
|
|
13
|
+
export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "MOSAICML" | "OPENAI" | "PYQ";
|
|
5
14
|
export declare const ProviderEnum: {
|
|
6
15
|
readonly Anthropic: "ANTHROPIC";
|
|
7
16
|
readonly Cohere: "COHERE";
|
|
8
17
|
readonly Google: "GOOGLE";
|
|
9
18
|
readonly Hosted: "HOSTED";
|
|
19
|
+
readonly Mosaicml: "MOSAICML";
|
|
10
20
|
readonly Openai: "OPENAI";
|
|
11
21
|
readonly Pyq: "PYQ";
|
|
12
22
|
};
|
|
@@ -5,7 +5,7 @@ import * as Vellum from "..";
|
|
|
5
5
|
export interface ScenarioInputRequest {
|
|
6
6
|
/** <span style="white-space: nowrap">`non-empty`</span> */
|
|
7
7
|
key: string;
|
|
8
|
-
type?: Vellum.
|
|
8
|
+
type?: Vellum.ScenarioInputTypeEnum;
|
|
9
9
|
value?: string;
|
|
10
10
|
chatHistory?: Vellum.ChatMessageRequest[];
|
|
11
11
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `TEXT` - Text
|
|
6
|
+
* * `CHAT_HISTORY` - Chat History
|
|
7
|
+
*/
|
|
8
|
+
export declare type ScenarioInputTypeEnum = "TEXT" | "CHAT_HISTORY";
|
|
9
|
+
export declare const ScenarioInputTypeEnum: {
|
|
10
|
+
readonly Text: "TEXT";
|
|
11
|
+
readonly ChatHistory: "CHAT_HISTORY";
|
|
12
|
+
};
|
|
@@ -3,8 +3,8 @@
|
|
|
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.
|
|
7
|
-
exports.
|
|
6
|
+
exports.ScenarioInputTypeEnum = void 0;
|
|
7
|
+
exports.ScenarioInputTypeEnum = {
|
|
8
8
|
Text: "TEXT",
|
|
9
9
|
ChatHistory: "CHAT_HISTORY",
|
|
10
10
|
};
|
|
@@ -11,11 +11,26 @@ export interface SlimDocument {
|
|
|
11
11
|
lastUploadedAt: string;
|
|
12
12
|
/** Human-friendly name for this document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
13
13
|
label: string;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle.
|
|
16
|
+
*
|
|
17
|
+
* * `QUEUED` - Queued
|
|
18
|
+
* * `PROCESSING` - Processing
|
|
19
|
+
* * `PROCESSED` - Processed
|
|
20
|
+
* * `FAILED` - Failed
|
|
21
|
+
*/
|
|
15
22
|
processingState?: Vellum.ProcessingStateEnum;
|
|
16
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* An enum value representing why the document could not be processed. Is null unless processing_state is FAILED.
|
|
25
|
+
*
|
|
26
|
+
* * `EXCEEDED_CHARACTER_LIMIT` - Exceeded Character Limit
|
|
27
|
+
*/
|
|
17
28
|
processingFailureReason?: Vellum.ProcessingFailureReasonEnum;
|
|
18
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The document's current status.
|
|
31
|
+
*
|
|
32
|
+
* * `ACTIVE` - Active
|
|
33
|
+
*/
|
|
19
34
|
status?: Vellum.SlimDocumentStatusEnum;
|
|
20
35
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
21
36
|
keywords?: string[];
|
package/api/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./BlockTypeEnum";
|
|
|
2
2
|
export * from "./ChatMessage";
|
|
3
3
|
export * from "./ChatMessageRequest";
|
|
4
4
|
export * from "./ChatMessageRole";
|
|
5
|
+
export * from "./ContentType";
|
|
5
6
|
export * from "./DeploymentRead";
|
|
6
7
|
export * from "./DeploymentReadStatusEnum";
|
|
7
8
|
export * from "./Document";
|
|
@@ -29,8 +30,8 @@ export * from "./ModelTypeEnum";
|
|
|
29
30
|
export * from "./ModelVersionBuildConfig";
|
|
30
31
|
export * from "./ModelVersionCompilePromptResponse";
|
|
31
32
|
export * from "./ModelVersionCompiledPrompt";
|
|
33
|
+
export * from "./ModelVersionExecConfig";
|
|
32
34
|
export * from "./ModelVersionExecConfigParameters";
|
|
33
|
-
export * from "./ModelVersionExecConfigRead";
|
|
34
35
|
export * from "./ModelVersionRead";
|
|
35
36
|
export * from "./ModelVersionReadStatusEnum";
|
|
36
37
|
export * from "./ModelVersionSandboxSnapshot";
|
|
@@ -62,6 +63,7 @@ export * from "./SandboxMetricInputParamsRequest";
|
|
|
62
63
|
export * from "./SandboxScenario";
|
|
63
64
|
export * from "./ScenarioInput";
|
|
64
65
|
export * from "./ScenarioInputRequest";
|
|
66
|
+
export * from "./ScenarioInputTypeEnum";
|
|
65
67
|
export * from "./SearchErrorResponse";
|
|
66
68
|
export * from "./SearchFiltersRequest";
|
|
67
69
|
export * from "./SearchRequestOptionsRequest";
|
|
@@ -74,6 +76,5 @@ export * from "./SlimDocumentStatusEnum";
|
|
|
74
76
|
export * from "./SubmitCompletionActualRequest";
|
|
75
77
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
76
78
|
export * from "./TestSuiteTestCase";
|
|
77
|
-
export * from "./TypeEnum";
|
|
78
79
|
export * from "./UploadDocumentErrorResponse";
|
|
79
80
|
export * from "./UploadDocumentResponse";
|
package/api/types/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __exportStar(require("./BlockTypeEnum"), exports);
|
|
|
18
18
|
__exportStar(require("./ChatMessage"), exports);
|
|
19
19
|
__exportStar(require("./ChatMessageRequest"), exports);
|
|
20
20
|
__exportStar(require("./ChatMessageRole"), exports);
|
|
21
|
+
__exportStar(require("./ContentType"), exports);
|
|
21
22
|
__exportStar(require("./DeploymentRead"), exports);
|
|
22
23
|
__exportStar(require("./DeploymentReadStatusEnum"), exports);
|
|
23
24
|
__exportStar(require("./Document"), exports);
|
|
@@ -45,8 +46,8 @@ __exportStar(require("./ModelTypeEnum"), exports);
|
|
|
45
46
|
__exportStar(require("./ModelVersionBuildConfig"), exports);
|
|
46
47
|
__exportStar(require("./ModelVersionCompilePromptResponse"), exports);
|
|
47
48
|
__exportStar(require("./ModelVersionCompiledPrompt"), exports);
|
|
49
|
+
__exportStar(require("./ModelVersionExecConfig"), exports);
|
|
48
50
|
__exportStar(require("./ModelVersionExecConfigParameters"), exports);
|
|
49
|
-
__exportStar(require("./ModelVersionExecConfigRead"), exports);
|
|
50
51
|
__exportStar(require("./ModelVersionRead"), exports);
|
|
51
52
|
__exportStar(require("./ModelVersionReadStatusEnum"), exports);
|
|
52
53
|
__exportStar(require("./ModelVersionSandboxSnapshot"), exports);
|
|
@@ -78,6 +79,7 @@ __exportStar(require("./SandboxMetricInputParamsRequest"), exports);
|
|
|
78
79
|
__exportStar(require("./SandboxScenario"), exports);
|
|
79
80
|
__exportStar(require("./ScenarioInput"), exports);
|
|
80
81
|
__exportStar(require("./ScenarioInputRequest"), exports);
|
|
82
|
+
__exportStar(require("./ScenarioInputTypeEnum"), exports);
|
|
81
83
|
__exportStar(require("./SearchErrorResponse"), exports);
|
|
82
84
|
__exportStar(require("./SearchFiltersRequest"), exports);
|
|
83
85
|
__exportStar(require("./SearchRequestOptionsRequest"), exports);
|
|
@@ -90,6 +92,5 @@ __exportStar(require("./SlimDocumentStatusEnum"), exports);
|
|
|
90
92
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
91
93
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
92
94
|
__exportStar(require("./TestSuiteTestCase"), exports);
|
|
93
|
-
__exportStar(require("./TypeEnum"), exports);
|
|
94
95
|
__exportStar(require("./UploadDocumentErrorResponse"), exports);
|
|
95
96
|
__exportStar(require("./UploadDocumentResponse"), exports);
|
package/dist/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),
|