vellum-ai 0.8.9 → 0.8.10

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 (42) hide show
  1. package/.mock/definition/__package__.yml +5657 -0
  2. package/.mock/definition/adHoc.yml +40 -0
  3. package/.mock/definition/api.yml +17 -0
  4. package/.mock/definition/deployments.yml +261 -0
  5. package/.mock/definition/documentIndexes.yml +429 -0
  6. package/.mock/definition/documents.yml +261 -0
  7. package/.mock/definition/folderEntities.yml +41 -0
  8. package/.mock/definition/sandboxes.yml +194 -0
  9. package/.mock/definition/testSuiteRuns.yml +148 -0
  10. package/.mock/definition/testSuites.yml +153 -0
  11. package/.mock/definition/workflowDeployments.yml +181 -0
  12. package/.mock/definition/workflowSandboxes.yml +85 -0
  13. package/.mock/fern.config.json +4 -0
  14. package/.mock/openapi/openapi.yml +10092 -0
  15. package/Client.js +9 -9
  16. package/api/client/requests/GenerateStreamBodyRequest.d.ts +4 -1
  17. package/api/resources/adHoc/client/Client.js +1 -1
  18. package/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -1
  19. package/api/resources/deployments/client/Client.js +5 -5
  20. package/api/resources/documentIndexes/client/Client.js +8 -8
  21. package/api/resources/documents/client/Client.js +5 -5
  22. package/api/resources/folderEntities/client/Client.js +1 -1
  23. package/api/resources/sandboxes/client/Client.js +3 -3
  24. package/api/resources/testSuiteRuns/client/Client.js +3 -3
  25. package/api/resources/testSuites/client/Client.js +4 -4
  26. package/api/resources/workflowDeployments/client/Client.js +4 -4
  27. package/api/resources/workflowSandboxes/client/Client.js +1 -1
  28. package/dist/Client.js +9 -9
  29. package/dist/api/client/requests/GenerateStreamBodyRequest.d.ts +4 -1
  30. package/dist/api/resources/adHoc/client/Client.js +1 -1
  31. package/dist/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -1
  32. package/dist/api/resources/deployments/client/Client.js +5 -5
  33. package/dist/api/resources/documentIndexes/client/Client.js +8 -8
  34. package/dist/api/resources/documents/client/Client.js +5 -5
  35. package/dist/api/resources/folderEntities/client/Client.js +1 -1
  36. package/dist/api/resources/sandboxes/client/Client.js +3 -3
  37. package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
  38. package/dist/api/resources/testSuites/client/Client.js +4 -4
  39. package/dist/api/resources/workflowDeployments/client/Client.js +4 -4
  40. package/dist/api/resources/workflowSandboxes/client/Client.js +1 -1
  41. package/package.json +1 -1
  42. package/reference.md +17 -3
@@ -0,0 +1,429 @@
1
+ types:
2
+ DocumentIndexesListRequestStatus:
3
+ enum:
4
+ - ACTIVE
5
+ - ARCHIVED
6
+ source:
7
+ openapi: openapi/openapi.yml
8
+ imports:
9
+ root: __package__.yml
10
+ service:
11
+ auth: false
12
+ base-path: ''
13
+ endpoints:
14
+ list:
15
+ path: /v1/document-indexes
16
+ method: GET
17
+ auth: true
18
+ docs: Used to retrieve a list of Document Indexes.
19
+ request:
20
+ name: DocumentIndexesListRequest
21
+ query-parameters:
22
+ limit:
23
+ type: optional<integer>
24
+ docs: Number of results to return per page.
25
+ offset:
26
+ type: optional<integer>
27
+ docs: The initial index from which to return the results.
28
+ ordering:
29
+ type: optional<string>
30
+ docs: Which field to use when ordering the results.
31
+ search:
32
+ type: optional<string>
33
+ docs: Search for document indices by name or label
34
+ status:
35
+ type: optional<DocumentIndexesListRequestStatus>
36
+ docs: >-
37
+ Filter down to only document indices that have a status matching
38
+ the status specified
39
+
40
+
41
+ * `ACTIVE` - Active
42
+
43
+ * `ARCHIVED` - Archived
44
+ response:
45
+ docs: ''
46
+ type: root.PaginatedDocumentIndexReadList
47
+ url: Default
48
+ availability: pre-release
49
+ examples:
50
+ - response:
51
+ body:
52
+ count: 123
53
+ next: http://api.example.org/accounts/?offset=400&limit=100
54
+ previous: http://api.example.org/accounts/?offset=200&limit=100
55
+ results:
56
+ - id: id
57
+ created: '2024-01-15T09:30:00Z'
58
+ label: label
59
+ name: name
60
+ status: ACTIVE
61
+ environment: DEVELOPMENT
62
+ indexing_config:
63
+ vectorizer:
64
+ config: {}
65
+ model_name: text-embedding-3-small
66
+ audiences:
67
+ - customers
68
+ create:
69
+ path: /v1/document-indexes
70
+ method: POST
71
+ auth: true
72
+ docs: Creates a new document index.
73
+ request:
74
+ name: DocumentIndexCreateRequest
75
+ body:
76
+ properties:
77
+ label:
78
+ type: string
79
+ docs: A human-readable label for the document index
80
+ validation:
81
+ minLength: 1
82
+ maxLength: 150
83
+ name:
84
+ type: string
85
+ docs: A name that uniquely identifies this index within its workspace
86
+ validation:
87
+ minLength: 1
88
+ maxLength: 150
89
+ status:
90
+ type: optional<root.EntityStatus>
91
+ docs: |-
92
+ The current status of the document index
93
+
94
+ * `ACTIVE` - Active
95
+ * `ARCHIVED` - Archived
96
+ environment:
97
+ type: optional<root.EnvironmentEnum>
98
+ docs: |-
99
+ The environment this document index is used in
100
+
101
+ * `DEVELOPMENT` - Development
102
+ * `STAGING` - Staging
103
+ * `PRODUCTION` - Production
104
+ indexing_config: root.DocumentIndexIndexingConfigRequest
105
+ copy_documents_from_index_id:
106
+ type: optional<string>
107
+ docs: >-
108
+ Optionally specify the id of a document index from which you'd
109
+ like to copy and re-index its documents into this newly created
110
+ index
111
+ validation:
112
+ format: uuid
113
+ response:
114
+ docs: ''
115
+ type: root.DocumentIndexRead
116
+ url: Default
117
+ availability: pre-release
118
+ examples:
119
+ - name: Index Using Instructor Model
120
+ request:
121
+ label: My Document Index
122
+ name: my-document-index
123
+ indexing_config:
124
+ vectorizer:
125
+ model_name: hkunlp/instructor-xl
126
+ config:
127
+ instruction_domain: ''
128
+ instruction_query_text_type: plain_text
129
+ instruction_document_text_type: plain_text
130
+ chunking:
131
+ chunker_name: sentence-chunker
132
+ chunker_config:
133
+ character_limit: 1000
134
+ min_overlap_ratio: 0.5
135
+ response:
136
+ body:
137
+ id: id
138
+ created: '2024-01-15T09:30:00Z'
139
+ label: label
140
+ name: name
141
+ status: ACTIVE
142
+ environment: DEVELOPMENT
143
+ indexing_config:
144
+ vectorizer:
145
+ config: {}
146
+ model_name: text-embedding-3-small
147
+ chunking:
148
+ chunker_name: reducto-chunker
149
+ - name: Index Using a Sentence Transformers Model
150
+ request:
151
+ label: My Document Index
152
+ name: my-document-index
153
+ indexing_config:
154
+ vectorizer:
155
+ model_name: sentence-transformers/multi-qa-mpnet-base-dot-v1
156
+ config:
157
+ key: value
158
+ chunking:
159
+ chunker_name: sentence-chunker
160
+ chunker_config:
161
+ character_limit: 1000
162
+ min_overlap_ratio: 0.5
163
+ response:
164
+ body:
165
+ id: id
166
+ created: '2024-01-15T09:30:00Z'
167
+ label: label
168
+ name: name
169
+ status: ACTIVE
170
+ environment: DEVELOPMENT
171
+ indexing_config:
172
+ vectorizer:
173
+ config: {}
174
+ model_name: text-embedding-3-small
175
+ chunking:
176
+ chunker_name: reducto-chunker
177
+ - name: Index Using OpenAI Model
178
+ request:
179
+ label: My Document Index
180
+ name: my-document-index
181
+ indexing_config:
182
+ vectorizer:
183
+ config:
184
+ add_openai_api_key: true
185
+ model_name: text-embedding-ada-002
186
+ chunking:
187
+ chunker_name: sentence-chunker
188
+ chunker_config:
189
+ character_limit: 1000
190
+ min_overlap_ratio: 0.5
191
+ response:
192
+ body:
193
+ id: id
194
+ created: '2024-01-15T09:30:00Z'
195
+ label: label
196
+ name: name
197
+ status: ACTIVE
198
+ environment: DEVELOPMENT
199
+ indexing_config:
200
+ vectorizer:
201
+ config: {}
202
+ model_name: text-embedding-3-small
203
+ chunking:
204
+ chunker_name: reducto-chunker
205
+ audiences:
206
+ - customers
207
+ retrieve:
208
+ path: /v1/document-indexes/{id}
209
+ method: GET
210
+ auth: true
211
+ docs: Used to retrieve a Document Index given its ID or name.
212
+ path-parameters:
213
+ id:
214
+ type: string
215
+ docs: Either the Document Index's ID or its unique name
216
+ response:
217
+ docs: ''
218
+ type: root.DocumentIndexRead
219
+ url: Default
220
+ availability: pre-release
221
+ examples:
222
+ - path-parameters:
223
+ id: id
224
+ response:
225
+ body:
226
+ id: id
227
+ created: '2024-01-15T09:30:00Z'
228
+ label: label
229
+ name: name
230
+ status: ACTIVE
231
+ environment: DEVELOPMENT
232
+ indexing_config:
233
+ vectorizer:
234
+ config: {}
235
+ model_name: text-embedding-3-small
236
+ chunking:
237
+ chunker_name: reducto-chunker
238
+ audiences:
239
+ - customers
240
+ update:
241
+ path: /v1/document-indexes/{id}
242
+ method: PUT
243
+ auth: true
244
+ docs: Used to fully update a Document Index given its ID or name.
245
+ path-parameters:
246
+ id:
247
+ type: string
248
+ docs: Either the Document Index's ID or its unique name
249
+ request:
250
+ name: DocumentIndexUpdateRequest
251
+ body:
252
+ properties:
253
+ label:
254
+ type: string
255
+ docs: A human-readable label for the document index
256
+ validation:
257
+ minLength: 1
258
+ maxLength: 150
259
+ status:
260
+ type: optional<root.EntityStatus>
261
+ docs: |-
262
+ The current status of the document index
263
+
264
+ * `ACTIVE` - Active
265
+ * `ARCHIVED` - Archived
266
+ environment:
267
+ type: optional<root.EnvironmentEnum>
268
+ docs: |-
269
+ The environment this document index is used in
270
+
271
+ * `DEVELOPMENT` - Development
272
+ * `STAGING` - Staging
273
+ * `PRODUCTION` - Production
274
+ response:
275
+ docs: ''
276
+ type: root.DocumentIndexRead
277
+ url: Default
278
+ availability: pre-release
279
+ examples:
280
+ - path-parameters:
281
+ id: id
282
+ request:
283
+ label: label
284
+ response:
285
+ body:
286
+ id: id
287
+ created: '2024-01-15T09:30:00Z'
288
+ label: label
289
+ name: name
290
+ status: ACTIVE
291
+ environment: DEVELOPMENT
292
+ indexing_config:
293
+ vectorizer:
294
+ config: {}
295
+ model_name: text-embedding-3-small
296
+ chunking:
297
+ chunker_name: reducto-chunker
298
+ audiences:
299
+ - customers
300
+ destroy:
301
+ path: /v1/document-indexes/{id}
302
+ method: DELETE
303
+ auth: true
304
+ docs: Used to delete a Document Index given its ID or name.
305
+ path-parameters:
306
+ id:
307
+ type: string
308
+ docs: Either the Document Index's ID or its unique name
309
+ url: Default
310
+ availability: pre-release
311
+ examples:
312
+ - path-parameters:
313
+ id: id
314
+ audiences:
315
+ - customers
316
+ partialUpdate:
317
+ path: /v1/document-indexes/{id}
318
+ method: PATCH
319
+ auth: true
320
+ docs: Used to partial update a Document Index given its ID or name.
321
+ path-parameters:
322
+ id:
323
+ type: string
324
+ docs: Either the Document Index's ID or its unique name
325
+ request:
326
+ name: PatchedDocumentIndexUpdateRequest
327
+ body:
328
+ properties:
329
+ label:
330
+ type: optional<string>
331
+ docs: A human-readable label for the document index
332
+ validation:
333
+ minLength: 1
334
+ maxLength: 150
335
+ status:
336
+ type: optional<root.EntityStatus>
337
+ docs: |-
338
+ The current status of the document index
339
+
340
+ * `ACTIVE` - Active
341
+ * `ARCHIVED` - Archived
342
+ environment:
343
+ type: optional<root.EnvironmentEnum>
344
+ docs: |-
345
+ The environment this document index is used in
346
+
347
+ * `DEVELOPMENT` - Development
348
+ * `STAGING` - Staging
349
+ * `PRODUCTION` - Production
350
+ response:
351
+ docs: ''
352
+ type: root.DocumentIndexRead
353
+ url: Default
354
+ availability: pre-release
355
+ examples:
356
+ - path-parameters:
357
+ id: id
358
+ request: {}
359
+ response:
360
+ body:
361
+ id: id
362
+ created: '2024-01-15T09:30:00Z'
363
+ label: label
364
+ name: name
365
+ status: ACTIVE
366
+ environment: DEVELOPMENT
367
+ indexing_config:
368
+ vectorizer:
369
+ config: {}
370
+ model_name: text-embedding-3-small
371
+ chunking:
372
+ chunker_name: reducto-chunker
373
+ audiences:
374
+ - customers
375
+ add_document:
376
+ path: /v1/document-indexes/{id}/documents/{document_id}
377
+ method: POST
378
+ auth: true
379
+ docs: Adds a previously uploaded Document to the specified Document Index.
380
+ path-parameters:
381
+ document_id:
382
+ type: string
383
+ docs: >-
384
+ Either the Vellum-generated ID or the originally supplied
385
+ external_id that uniquely identifies the Document you'd like to add.
386
+ id:
387
+ type: string
388
+ docs: >-
389
+ Either the Vellum-generated ID or the originally specified name that
390
+ uniquely identifies the Document Index to which you'd like to add
391
+ the Document.
392
+ url: Default
393
+ availability: pre-release
394
+ examples:
395
+ - path-parameters:
396
+ document_id: document_id
397
+ id: id
398
+ audiences:
399
+ - customers
400
+ remove_document:
401
+ path: /v1/document-indexes/{id}/documents/{document_id}
402
+ method: DELETE
403
+ auth: true
404
+ docs: >-
405
+ Removes a Document from a Document Index without deleting the Document
406
+ itself.
407
+ path-parameters:
408
+ document_id:
409
+ type: string
410
+ docs: >-
411
+ Either the Vellum-generated ID or the originally supplied
412
+ external_id that uniquely identifies the Document you'd like to
413
+ remove.
414
+ id:
415
+ type: string
416
+ docs: >-
417
+ Either the Vellum-generated ID or the originally specified name that
418
+ uniquely identifies the Document Index from which you'd like to
419
+ remove a Document.
420
+ url: Default
421
+ availability: pre-release
422
+ examples:
423
+ - path-parameters:
424
+ document_id: document_id
425
+ id: id
426
+ audiences:
427
+ - customers
428
+ source:
429
+ openapi: openapi/openapi.yml
@@ -0,0 +1,261 @@
1
+ imports:
2
+ root: __package__.yml
3
+ service:
4
+ auth: false
5
+ base-path: ''
6
+ endpoints:
7
+ list:
8
+ path: /v1/documents
9
+ method: GET
10
+ auth: true
11
+ docs: Used to list documents. Optionally filter on supported fields.
12
+ request:
13
+ name: DocumentsListRequest
14
+ query-parameters:
15
+ document_index_id:
16
+ type: optional<string>
17
+ docs: >-
18
+ Filter down to only those documents that are included in the
19
+ specified index. You may provide either the Vellum-generated ID or
20
+ the unique name of the index specified upon initial creation.
21
+ limit:
22
+ type: optional<integer>
23
+ docs: Number of results to return per page.
24
+ offset:
25
+ type: optional<integer>
26
+ docs: The initial index from which to return the results.
27
+ ordering:
28
+ type: optional<string>
29
+ docs: Which field to use when ordering the results.
30
+ response:
31
+ docs: ''
32
+ type: root.PaginatedSlimDocumentList
33
+ url: Default
34
+ availability: generally-available
35
+ examples:
36
+ - response:
37
+ body:
38
+ count: 123
39
+ next: http://api.example.org/accounts/?offset=400&limit=100
40
+ previous: http://api.example.org/accounts/?offset=200&limit=100
41
+ results:
42
+ - id: id
43
+ external_id: external_id
44
+ last_uploaded_at: '2024-01-15T09:30:00Z'
45
+ label: label
46
+ processing_state: QUEUED
47
+ processing_failure_reason: EXCEEDED_CHARACTER_LIMIT
48
+ status: ACTIVE
49
+ keywords:
50
+ - keywords
51
+ metadata:
52
+ key: value
53
+ document_to_document_indexes:
54
+ - id: id
55
+ document_index_id: document_index_id
56
+ audiences:
57
+ - customers
58
+ retrieve:
59
+ path: /v1/documents/{id}
60
+ method: GET
61
+ auth: true
62
+ docs: >-
63
+ Retrieve a Document, keying off of either its Vellum-generated ID or its
64
+ external ID.
65
+ path-parameters:
66
+ id:
67
+ type: string
68
+ docs: A UUID string identifying this document.
69
+ response:
70
+ docs: ''
71
+ type: root.DocumentRead
72
+ url: Default
73
+ availability: pre-release
74
+ examples:
75
+ - path-parameters:
76
+ id: id
77
+ response:
78
+ body:
79
+ id: id
80
+ external_id: external_id
81
+ last_uploaded_at: '2024-01-15T09:30:00Z'
82
+ label: label
83
+ processing_state: QUEUED
84
+ status: ACTIVE
85
+ original_file_url: original_file_url
86
+ processed_file_url: processed_file_url
87
+ document_to_document_indexes:
88
+ - id: id
89
+ document_index_id: document_index_id
90
+ indexing_state: AWAITING_PROCESSING
91
+ metadata:
92
+ key: value
93
+ audiences:
94
+ - customers
95
+ destroy:
96
+ path: /v1/documents/{id}
97
+ method: DELETE
98
+ auth: true
99
+ docs: >-
100
+ Delete a Document, keying off of either its Vellum-generated ID or its
101
+ external ID.
102
+ path-parameters:
103
+ id:
104
+ type: string
105
+ docs: A UUID string identifying this document.
106
+ url: Default
107
+ availability: pre-release
108
+ examples:
109
+ - path-parameters:
110
+ id: id
111
+ audiences:
112
+ - customers
113
+ partialUpdate:
114
+ path: /v1/documents/{id}
115
+ method: PATCH
116
+ auth: true
117
+ docs: >-
118
+ Update a Document, keying off of either its Vellum-generated ID or its
119
+ external ID. Particularly useful for updating its metadata.
120
+ path-parameters:
121
+ id:
122
+ type: string
123
+ docs: A UUID string identifying this document.
124
+ request:
125
+ name: PatchedDocumentUpdateRequest
126
+ body:
127
+ properties:
128
+ label:
129
+ type: optional<string>
130
+ docs: >-
131
+ A human-readable label for the document. Defaults to the
132
+ originally uploaded file's file name.
133
+ validation:
134
+ minLength: 1
135
+ maxLength: 1000
136
+ status:
137
+ type: optional<root.DocumentStatus>
138
+ docs: |-
139
+ The current status of the document
140
+
141
+ * `ACTIVE` - Active
142
+ metadata:
143
+ type: optional<map<string, unknown>>
144
+ docs: >-
145
+ A JSON object containing any metadata associated with the
146
+ document that you'd like to filter upon later.
147
+ response:
148
+ docs: ''
149
+ type: root.DocumentRead
150
+ url: Default
151
+ availability: pre-release
152
+ examples:
153
+ - path-parameters:
154
+ id: id
155
+ request: {}
156
+ response:
157
+ body:
158
+ id: id
159
+ external_id: external_id
160
+ last_uploaded_at: '2024-01-15T09:30:00Z'
161
+ label: label
162
+ processing_state: QUEUED
163
+ status: ACTIVE
164
+ original_file_url: original_file_url
165
+ processed_file_url: processed_file_url
166
+ document_to_document_indexes:
167
+ - id: id
168
+ document_index_id: document_index_id
169
+ indexing_state: AWAITING_PROCESSING
170
+ metadata:
171
+ key: value
172
+ audiences:
173
+ - customers
174
+ upload:
175
+ path: /v1/upload-document
176
+ method: POST
177
+ auth: true
178
+ docs: >
179
+ Upload a document to be indexed and used for search.
180
+
181
+
182
+ **Note:** Uses a base url of `https://documents.vellum.ai`.
183
+
184
+
185
+ This is a multipart/form-data request. The `contents` field should be a
186
+ file upload. It also expects a JSON body with the following fields:
187
+
188
+ - `add_to_index_names: list[str]` - Optionally include the names of all
189
+ indexes that you'd like this document to be included in
190
+
191
+ - `external_id: str | None` - Optionally include an external ID for this
192
+ document. This is useful if you want to re-upload the same document
193
+ later when its contents change and would like it to be re-indexed.
194
+
195
+ - `label: str` - A human-friendly name for this document. Typically the
196
+ filename.
197
+
198
+ - `keywords: list[str] | None` - Optionally include a list of keywords
199
+ that'll be associated with this document. Used when performing keyword
200
+ searches.
201
+
202
+ - `metadata: dict[str, Any]` - A stringified JSON object containing any
203
+ metadata associated with the document that you'd like to filter upon
204
+ later.
205
+ request:
206
+ name: UploadDocumentBodyRequest
207
+ body:
208
+ properties:
209
+ add_to_index_names:
210
+ type: optional<list<string>>
211
+ docs: >-
212
+ Optionally include the names of all indexes that you'd like this
213
+ document to be included in
214
+ external_id:
215
+ type: optional<string>
216
+ docs: >-
217
+ Optionally include an external ID for this document. This is
218
+ useful if you want to re-upload the same document later when its
219
+ contents change and would like it to be re-indexed.
220
+ validation:
221
+ minLength: 1
222
+ maxLength: 1000
223
+ label:
224
+ type: string
225
+ docs: A human-friendly name for this document. Typically the filename.
226
+ validation:
227
+ minLength: 1
228
+ maxLength: 1000
229
+ contents: file
230
+ keywords:
231
+ type: optional<list<string>>
232
+ docs: >-
233
+ Optionally include a list of keywords that'll be associated with
234
+ this document. Used when performing keyword searches.
235
+ metadata:
236
+ type: optional<string>
237
+ docs: >-
238
+ A stringified JSON object containing any metadata associated
239
+ with the document that you'd like to filter upon later.
240
+ validation:
241
+ format: byte
242
+ content-type: multipart/form-data
243
+ response:
244
+ docs: ''
245
+ type: root.UploadDocumentResponse
246
+ url: Documents
247
+ availability: generally-available
248
+ errors:
249
+ - root.BadRequestError
250
+ - root.NotFoundError
251
+ - root.InternalServerError
252
+ examples:
253
+ - request:
254
+ label: label
255
+ response:
256
+ body:
257
+ document_id: document_id
258
+ audiences:
259
+ - customers
260
+ source:
261
+ openapi: openapi/openapi.yml