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.
Files changed (189) hide show
  1. package/Client.js +1 -1
  2. package/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  3. package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +18 -4
  4. package/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  5. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +14 -4
  6. package/api/resources/sandboxes/client/Client.d.ts +6 -0
  7. package/api/resources/sandboxes/client/Client.js +37 -0
  8. package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  9. package/api/resources/testSuites/client/Client.d.ts +6 -0
  10. package/api/resources/testSuites/client/Client.js +37 -0
  11. package/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  12. package/api/types/BlockTypeEnum.d.ts +8 -1
  13. package/api/types/BlockTypeEnum.js +1 -0
  14. package/api/types/ChatMessageRole.d.ts +8 -1
  15. package/api/types/ChatMessageRole.js +1 -0
  16. package/api/types/ContentType.d.ts +12 -0
  17. package/api/types/ContentType.js +10 -0
  18. package/api/types/DeploymentRead.d.ts +22 -5
  19. package/api/types/DeploymentReadStatusEnum.d.ts +5 -0
  20. package/api/types/Document.d.ts +1 -1
  21. package/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
  22. package/api/types/DocumentIndexRead.d.ts +17 -4
  23. package/api/types/DocumentIndexStatus.d.ts +4 -0
  24. package/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
  25. package/api/types/EnvironmentEnum.d.ts +5 -0
  26. package/api/types/FinishReasonEnum.d.ts +5 -0
  27. package/api/types/GenerateOptionsRequest.d.ts +6 -1
  28. package/api/types/IndexingStateEnum.d.ts +7 -0
  29. package/api/types/LogprobsEnum.d.ts +4 -0
  30. package/api/types/ModelTypeEnum.d.ts +4 -0
  31. package/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
  32. package/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
  33. package/api/types/ModelVersionRead.d.ts +20 -5
  34. package/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
  35. package/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  36. package/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  37. package/api/types/ProcessingFailureReasonEnum.js +0 -4
  38. package/api/types/ProcessingStateEnum.d.ts +6 -0
  39. package/api/types/PromptTemplateBlockProperties.d.ts +5 -1
  40. package/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
  41. package/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  42. package/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  43. package/api/types/ProviderEnum.d.ts +11 -1
  44. package/api/types/ProviderEnum.js +1 -0
  45. package/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  46. package/api/types/ScenarioInput.d.ts +1 -1
  47. package/api/types/ScenarioInputRequest.d.ts +2 -1
  48. package/api/types/ScenarioInputTypeEnum.d.ts +12 -0
  49. package/{dist/api/types/TypeEnum.js → api/types/ScenarioInputTypeEnum.js} +2 -2
  50. package/api/types/SlimDocument.d.ts +19 -4
  51. package/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  52. package/api/types/SlimDocumentStatusEnum.js +0 -4
  53. package/api/types/index.d.ts +3 -2
  54. package/api/types/index.js +3 -2
  55. package/dist/Client.js +1 -1
  56. package/dist/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  57. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +18 -4
  58. package/dist/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  59. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +14 -4
  60. package/dist/api/resources/sandboxes/client/Client.d.ts +6 -0
  61. package/dist/api/resources/sandboxes/client/Client.js +37 -0
  62. package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  63. package/dist/api/resources/testSuites/client/Client.d.ts +6 -0
  64. package/dist/api/resources/testSuites/client/Client.js +37 -0
  65. package/dist/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  66. package/dist/api/types/BlockTypeEnum.d.ts +8 -1
  67. package/dist/api/types/BlockTypeEnum.js +1 -0
  68. package/dist/api/types/ChatMessageRole.d.ts +8 -1
  69. package/dist/api/types/ChatMessageRole.js +1 -0
  70. package/dist/api/types/ContentType.d.ts +12 -0
  71. package/dist/api/types/ContentType.js +10 -0
  72. package/dist/api/types/DeploymentRead.d.ts +22 -5
  73. package/dist/api/types/DeploymentReadStatusEnum.d.ts +5 -0
  74. package/dist/api/types/Document.d.ts +1 -1
  75. package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +9 -1
  76. package/dist/api/types/DocumentIndexRead.d.ts +17 -4
  77. package/dist/api/types/DocumentIndexStatus.d.ts +4 -0
  78. package/dist/api/types/EnrichedNormalizedCompletion.d.ts +8 -1
  79. package/dist/api/types/EnvironmentEnum.d.ts +5 -0
  80. package/dist/api/types/FinishReasonEnum.d.ts +5 -0
  81. package/dist/api/types/GenerateOptionsRequest.d.ts +6 -1
  82. package/dist/api/types/IndexingStateEnum.d.ts +7 -0
  83. package/dist/api/types/LogprobsEnum.d.ts +4 -0
  84. package/dist/api/types/ModelTypeEnum.d.ts +4 -0
  85. package/dist/api/types/{ModelVersionExecConfigRead.d.ts → ModelVersionExecConfig.d.ts} +2 -2
  86. package/dist/api/types/ModelVersionExecConfigParameters.d.ts +2 -2
  87. package/dist/api/types/ModelVersionRead.d.ts +20 -5
  88. package/dist/api/types/ModelVersionReadStatusEnum.d.ts +6 -0
  89. package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  90. package/dist/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  91. package/dist/api/types/ProcessingFailureReasonEnum.js +0 -4
  92. package/dist/api/types/ProcessingStateEnum.d.ts +6 -0
  93. package/dist/api/types/PromptTemplateBlockProperties.d.ts +5 -1
  94. package/dist/api/types/PromptTemplateBlockPropertiesRequest.d.ts +7 -1
  95. package/dist/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  96. package/dist/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  97. package/dist/api/types/ProviderEnum.d.ts +11 -1
  98. package/dist/api/types/ProviderEnum.js +1 -0
  99. package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  100. package/dist/api/types/ScenarioInput.d.ts +1 -1
  101. package/dist/api/types/ScenarioInputRequest.d.ts +2 -1
  102. package/dist/api/types/ScenarioInputTypeEnum.d.ts +12 -0
  103. package/{api/types/TypeEnum.js → dist/api/types/ScenarioInputTypeEnum.js} +2 -2
  104. package/dist/api/types/SlimDocument.d.ts +19 -4
  105. package/dist/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  106. package/dist/api/types/SlimDocumentStatusEnum.js +0 -4
  107. package/dist/api/types/index.d.ts +3 -2
  108. package/dist/api/types/index.js +3 -2
  109. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
  110. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
  111. package/dist/serialization/types/BlockTypeEnum.d.ts +1 -1
  112. package/dist/serialization/types/BlockTypeEnum.js +1 -1
  113. package/dist/serialization/types/ChatMessageRole.d.ts +1 -1
  114. package/dist/serialization/types/ChatMessageRole.js +1 -1
  115. package/dist/serialization/types/ContentType.d.ts +10 -0
  116. package/dist/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
  117. package/dist/serialization/types/DocumentIndexRead.d.ts +1 -0
  118. package/dist/serialization/types/DocumentIndexRead.js +1 -0
  119. package/dist/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  120. package/dist/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  121. package/{serialization/types/ModelVersionExecConfigRead.d.ts → dist/serialization/types/ModelVersionExecConfig.d.ts} +3 -3
  122. package/dist/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
  123. package/dist/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
  124. package/dist/serialization/types/ModelVersionExecConfigParameters.js +2 -2
  125. package/dist/serialization/types/ModelVersionRead.d.ts +1 -1
  126. package/dist/serialization/types/ModelVersionRead.js +1 -1
  127. package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  128. package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  129. package/dist/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  130. package/dist/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
  131. package/dist/serialization/types/PromptTemplateBlockProperties.js +5 -1
  132. package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
  133. package/dist/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
  134. package/dist/serialization/types/ProviderEnum.d.ts +1 -1
  135. package/dist/serialization/types/ProviderEnum.js +1 -1
  136. package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  137. package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  138. package/dist/serialization/types/ScenarioInput.d.ts +1 -1
  139. package/dist/serialization/types/ScenarioInput.js +1 -1
  140. package/dist/serialization/types/ScenarioInputRequest.d.ts +1 -1
  141. package/dist/serialization/types/ScenarioInputRequest.js +1 -1
  142. package/dist/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
  143. package/dist/serialization/types/ScenarioInputTypeEnum.js +31 -0
  144. package/dist/serialization/types/SlimDocumentStatusEnum.js +1 -1
  145. package/dist/serialization/types/index.d.ts +3 -2
  146. package/dist/serialization/types/index.js +3 -2
  147. package/package.json +1 -1
  148. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +1 -0
  149. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +1 -0
  150. package/serialization/types/BlockTypeEnum.d.ts +1 -1
  151. package/serialization/types/BlockTypeEnum.js +1 -1
  152. package/serialization/types/ChatMessageRole.d.ts +1 -1
  153. package/serialization/types/ChatMessageRole.js +1 -1
  154. package/serialization/types/ContentType.d.ts +10 -0
  155. package/serialization/types/{TypeEnum.js → ContentType.js} +2 -5
  156. package/serialization/types/DocumentIndexRead.d.ts +1 -0
  157. package/serialization/types/DocumentIndexRead.js +1 -0
  158. package/serialization/types/EnrichedNormalizedCompletion.d.ts +1 -0
  159. package/serialization/types/EnrichedNormalizedCompletion.js +1 -0
  160. package/{dist/serialization/types/ModelVersionExecConfigRead.d.ts → serialization/types/ModelVersionExecConfig.d.ts} +3 -3
  161. package/serialization/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +3 -3
  162. package/serialization/types/ModelVersionExecConfigParameters.d.ts +2 -2
  163. package/serialization/types/ModelVersionExecConfigParameters.js +2 -2
  164. package/serialization/types/ModelVersionRead.d.ts +1 -1
  165. package/serialization/types/ModelVersionRead.js +1 -1
  166. package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  167. package/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  168. package/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  169. package/serialization/types/PromptTemplateBlockProperties.d.ts +5 -1
  170. package/serialization/types/PromptTemplateBlockProperties.js +5 -1
  171. package/serialization/types/PromptTemplateBlockPropertiesRequest.d.ts +5 -1
  172. package/serialization/types/PromptTemplateBlockPropertiesRequest.js +5 -1
  173. package/serialization/types/ProviderEnum.d.ts +1 -1
  174. package/serialization/types/ProviderEnum.js +1 -1
  175. package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  176. package/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  177. package/serialization/types/ScenarioInput.d.ts +1 -1
  178. package/serialization/types/ScenarioInput.js +1 -1
  179. package/serialization/types/ScenarioInputRequest.d.ts +1 -1
  180. package/serialization/types/ScenarioInputRequest.js +1 -1
  181. package/serialization/types/{TypeEnum.d.ts → ScenarioInputTypeEnum.d.ts} +2 -2
  182. package/serialization/types/ScenarioInputTypeEnum.js +31 -0
  183. package/serialization/types/SlimDocumentStatusEnum.js +1 -1
  184. package/serialization/types/index.d.ts +3 -2
  185. package/serialization/types/index.js +3 -2
  186. package/api/types/TypeEnum.d.ts +0 -8
  187. package/dist/api/types/TypeEnum.d.ts +0 -8
  188. /package/api/types/{ModelVersionExecConfigRead.js → ModelVersionExecConfig.js} +0 -0
  189. /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,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
- /** 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;
12
- /** Configuration representing how documents should be indexed. */
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
- /** 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
- /** 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
- 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
+ };
@@ -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
- /** 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";
@@ -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
- /** 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
  }
@@ -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
- /** 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;
14
- /** Configuration representing how documents should be indexed. */
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
- /** 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
  }
@@ -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
- /** 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
- /** 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.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";
@@ -8,5 +8,5 @@ export interface ModelVersionSandboxSnapshot {
8
8
  promptIndex?: number;
9
9
  /** The id of the prompt in the sandbox snapshot. */
10
10
  promptId?: string;
11
- sandboxId: string;
11
+ sandboxId?: string;
12
12
  }
@@ -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";