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.
Files changed (143) hide show
  1. package/Client.js +1 -1
  2. package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +14 -1
  3. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +11 -1
  4. package/api/types/BlockTypeEnum.d.ts +8 -1
  5. package/api/types/BlockTypeEnum.js +1 -0
  6. package/api/types/ChatMessageRole.d.ts +8 -1
  7. package/api/types/ChatMessageRole.js +1 -0
  8. package/api/types/ContentType.d.ts +12 -0
  9. package/api/types/ContentType.js +10 -0
  10. package/api/types/DeploymentRead.d.ts +20 -3
  11. package/api/types/DeploymentReadStatusEnum.d.ts +5 -0
  12. package/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
  13. package/api/types/DocumentIndexRead.d.ts +14 -1
  14. package/api/types/DocumentIndexStatus.d.ts +4 -0
  15. package/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
  16. package/api/types/EnvironmentEnum.d.ts +5 -0
  17. package/api/types/FinishReasonEnum.d.ts +5 -0
  18. package/api/types/GenerateOptionsRequest.d.ts +6 -1
  19. package/api/types/IndexingStateEnum.d.ts +7 -0
  20. package/api/types/LogprobsEnum.d.ts +4 -0
  21. package/api/types/ModelTypeEnum.d.ts +4 -0
  22. package/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
  23. package/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
  24. package/api/types/ModelVersionRead.d.ts +18 -3
  25. package/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
  26. package/api/types/ProcessingStateEnum.d.ts +6 -0
  27. package/api/types/PromptTemplateBlockProperties.d.ts +5 -1
  28. package/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
  29. package/api/types/ProviderEnum.d.ts +11 -1
  30. package/api/types/ProviderEnum.js +1 -0
  31. package/api/types/ScenarioInput.d.ts +1 -1
  32. package/api/types/ScenarioInputRequest.d.ts +1 -1
  33. package/api/types/ScenarioInputTypeEnum.d.ts +12 -0
  34. package/{dist/api/types/TypeEnum.js → api/types/ScenarioInputTypeEnum.js} +2 -2
  35. package/api/types/SlimDocument.d.ts +18 -3
  36. package/api/types/index.d.ts +3 -2
  37. package/api/types/index.js +3 -2
  38. package/dist/Client.js +1 -1
  39. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +14 -1
  40. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +11 -1
  41. package/dist/api/types/BlockTypeEnum.d.ts +8 -1
  42. package/dist/api/types/BlockTypeEnum.js +1 -0
  43. package/dist/api/types/ChatMessageRole.d.ts +8 -1
  44. package/dist/api/types/ChatMessageRole.js +1 -0
  45. package/dist/api/types/ContentType.d.ts +12 -0
  46. package/dist/api/types/ContentType.js +10 -0
  47. package/dist/api/types/DeploymentRead.d.ts +20 -3
  48. package/dist/api/types/DeploymentReadStatusEnum.d.ts +5 -0
  49. package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
  50. package/dist/api/types/DocumentIndexRead.d.ts +14 -1
  51. package/dist/api/types/DocumentIndexStatus.d.ts +4 -0
  52. package/dist/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
  53. package/dist/api/types/EnvironmentEnum.d.ts +5 -0
  54. package/dist/api/types/FinishReasonEnum.d.ts +5 -0
  55. package/dist/api/types/GenerateOptionsRequest.d.ts +6 -1
  56. package/dist/api/types/IndexingStateEnum.d.ts +7 -0
  57. package/dist/api/types/LogprobsEnum.d.ts +4 -0
  58. package/dist/api/types/ModelTypeEnum.d.ts +4 -0
  59. package/dist/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
  60. package/dist/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
  61. package/dist/api/types/ModelVersionRead.d.ts +18 -3
  62. package/dist/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
  63. package/dist/api/types/ProcessingStateEnum.d.ts +6 -0
  64. package/dist/api/types/PromptTemplateBlockProperties.d.ts +5 -1
  65. package/dist/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
  66. package/dist/api/types/ProviderEnum.d.ts +11 -1
  67. package/dist/api/types/ProviderEnum.js +1 -0
  68. package/dist/api/types/ScenarioInput.d.ts +1 -1
  69. package/dist/api/types/ScenarioInputRequest.d.ts +1 -1
  70. package/dist/api/types/ScenarioInputTypeEnum.d.ts +12 -0
  71. package/{api/types/TypeEnum.js → dist/api/types/ScenarioInputTypeEnum.js} +2 -2
  72. package/dist/api/types/SlimDocument.d.ts +18 -3
  73. package/dist/api/types/index.d.ts +3 -2
  74. package/dist/api/types/index.js +3 -2
  75. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
  76. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
  77. package/dist/serialization/types/BlockTypeEnum.d.ts +1 -1
  78. package/dist/serialization/types/BlockTypeEnum.js +1 -1
  79. package/dist/serialization/types/ChatMessageRole.d.ts +1 -1
  80. package/dist/serialization/types/ChatMessageRole.js +1 -1
  81. package/dist/serialization/types/ContentType.d.ts +10 -0
  82. package/dist/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
  83. package/dist/serialization/types/DocumentIndexRead.d.ts +1 -0
  84. package/dist/serialization/types/DocumentIndexRead.js +1 -0
  85. package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  86. package/dist/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  87. package/{serialization/types/ModelVersionExecConfigRead.d.ts → dist/serialization/types/ModelVersionExecConfig.d.ts} +3 -3
  88. package/dist/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
  89. package/dist/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
  90. package/dist/serialization/types/ModelVersionExecConfigParameters.js +2 -2
  91. package/dist/serialization/types/ModelVersionRead.d.ts +1 -1
  92. package/dist/serialization/types/ModelVersionRead.js +1 -1
  93. package/dist/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
  94. package/dist/serialization/types/PromptTemplateBlockProperties.js +5 -1
  95. package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
  96. package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
  97. package/dist/serialization/types/ProviderEnum.d.ts +1 -1
  98. package/dist/serialization/types/ProviderEnum.js +1 -1
  99. package/dist/serialization/types/ScenarioInput.d.ts +1 -1
  100. package/dist/serialization/types/ScenarioInput.js +1 -1
  101. package/dist/serialization/types/ScenarioInputRequest.d.ts +1 -1
  102. package/dist/serialization/types/ScenarioInputRequest.js +1 -1
  103. package/dist/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
  104. package/dist/serialization/types/ScenarioInputTypeEnum.js +31 -0
  105. package/dist/serialization/types/index.d.ts +3 -2
  106. package/dist/serialization/types/index.js +3 -2
  107. package/package.json +1 -1
  108. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
  109. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
  110. package/serialization/types/BlockTypeEnum.d.ts +1 -1
  111. package/serialization/types/BlockTypeEnum.js +1 -1
  112. package/serialization/types/ChatMessageRole.d.ts +1 -1
  113. package/serialization/types/ChatMessageRole.js +1 -1
  114. package/serialization/types/ContentType.d.ts +10 -0
  115. package/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
  116. package/serialization/types/DocumentIndexRead.d.ts +1 -0
  117. package/serialization/types/DocumentIndexRead.js +1 -0
  118. package/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  119. package/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  120. package/{dist/serialization/types/ModelVersionExecConfigRead.d.ts → serialization/types/ModelVersionExecConfig.d.ts} +3 -3
  121. package/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
  122. package/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
  123. package/serialization/types/ModelVersionExecConfigParameters.js +2 -2
  124. package/serialization/types/ModelVersionRead.d.ts +1 -1
  125. package/serialization/types/ModelVersionRead.js +1 -1
  126. package/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
  127. package/serialization/types/PromptTemplateBlockProperties.js +5 -1
  128. package/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
  129. package/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
  130. package/serialization/types/ProviderEnum.d.ts +1 -1
  131. package/serialization/types/ProviderEnum.js +1 -1
  132. package/serialization/types/ScenarioInput.d.ts +1 -1
  133. package/serialization/types/ScenarioInput.js +1 -1
  134. package/serialization/types/ScenarioInputRequest.d.ts +1 -1
  135. package/serialization/types/ScenarioInputRequest.js +1 -1
  136. package/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
  137. package/serialization/types/ScenarioInputTypeEnum.js +31 -0
  138. package/serialization/types/index.d.ts +3 -2
  139. package/serialization/types/index.js +3 -2
  140. package/api/types/TypeEnum.d.ts +0 -8
  141. package/dist/api/types/TypeEnum.d.ts +0 -8
  142. /package/api/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +0 -0
  143. /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).default, "v1/generate-stream"),
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
- /** The current status of the document index */
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
- /** The initial LLM provider to use for this prompt */
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
- export declare type BlockTypeEnum = "CHAT_MESSAGE" | "CHAT_HISTORY" | "JINJA";
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
  };
@@ -8,4 +8,5 @@ exports.BlockTypeEnum = {
8
8
  ChatMessage: "CHAT_MESSAGE",
9
9
  ChatHistory: "CHAT_HISTORY",
10
10
  Jinja: "JINJA",
11
+ FunctionDefinition: "FUNCTION_DEFINITION",
11
12
  };
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export declare type ChatMessageRole = "SYSTEM" | "ASSISTANT" | "USER";
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
  };
@@ -8,4 +8,5 @@ exports.ChatMessageRole = {
8
8
  System: "SYSTEM",
9
9
  Assistant: "ASSISTANT",
10
10
  User: "USER",
11
+ Function: "FUNCTION",
11
12
  };
@@ -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
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ContentType = void 0;
7
+ exports.ContentType = {
8
+ String: "STRING",
9
+ Json: "JSON",
10
+ };
@@ -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
- /** The current status of the deployment */
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
- /** The environment this deployment is used in */
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
- /** The type of model this deployment serves */
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
- /** An enum value representing where this document is along its indexing lifecycle for this index. */
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
- /** The current status of the document index */
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
- /** The reason the generation finished. */
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
- /** Which logprobs to include, if any. Defaults to NONE. */
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
+ * * `ALL` - ALL
6
+ * * `NONE` - NONE
7
+ */
4
8
  export declare type LogprobsEnum = "ALL" | "NONE";
5
9
  export declare const LogprobsEnum: {
6
10
  readonly All: "ALL";
@@ -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 ModelVersionExecConfigRead {
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: number;
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
- /** The type of task this model is used for. */
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
- /** Which LLM provider this model version is associated with. */
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.ModelVersionExecConfigRead;
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
- blocks?: Record<string, unknown>[];
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
- blocks?: Record<string, unknown>[];
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
- export declare type ProviderEnum = "ANTHROPIC" | "COHERE" | "GOOGLE" | "HOSTED" | "OPENAI" | "PYQ";
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
  };
@@ -9,6 +9,7 @@ exports.ProviderEnum = {
9
9
  Cohere: "COHERE",
10
10
  Google: "GOOGLE",
11
11
  Hosted: "HOSTED",
12
+ Mosaicml: "MOSAICML",
12
13
  Openai: "OPENAI",
13
14
  Pyq: "PYQ",
14
15
  };
@@ -4,7 +4,7 @@
4
4
  import * as Vellum from "..";
5
5
  export interface ScenarioInput {
6
6
  key: string;
7
- type?: Vellum.TypeEnum;
7
+ type?: Vellum.ScenarioInputTypeEnum;
8
8
  value?: string;
9
9
  chatHistory?: Vellum.ChatMessage[];
10
10
  }
@@ -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.TypeEnum;
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.TypeEnum = void 0;
7
- exports.TypeEnum = {
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
- /** An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle. */
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
- /** An enum value representing why the document could not be processed. Is null unless processing_state is FAILED. */
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
- /** The document's current status. */
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[];
@@ -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";
@@ -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).default, "v1/generate-stream"),
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),