@mixedbread/sdk 0.6.0 → 0.7.2
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/CHANGELOG.md +50 -0
- package/README.md +12 -24
- package/bin/migration-config.json +2 -2
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -4
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -4
- package/internal/headers.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +4 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +2 -0
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/data-sources/connectors.d.mts +14 -4
- package/resources/data-sources/connectors.d.mts.map +1 -1
- package/resources/data-sources/connectors.d.ts +14 -4
- package/resources/data-sources/connectors.d.ts.map +1 -1
- package/resources/data-sources/data-sources.d.mts +149 -45
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +149 -45
- package/resources/data-sources/data-sources.d.ts.map +1 -1
- package/resources/data-sources/data-sources.js.map +1 -1
- package/resources/data-sources/data-sources.mjs.map +1 -1
- package/resources/extractions/content.d.mts +4 -0
- package/resources/extractions/content.d.mts.map +1 -1
- package/resources/extractions/content.d.ts +4 -0
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/vector-stores/files.d.mts +50 -17
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +50 -17
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +19 -18
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +19 -18
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +71 -16
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +71 -16
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +18 -15
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +18 -15
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/client.ts +0 -5
- package/src/core/pagination.ts +1 -1
- package/src/core/resource.ts +1 -1
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/headers.ts +5 -5
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +2 -2
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +1 -1
- package/src/internal/utils/values.ts +3 -0
- package/src/resources/data-sources/connectors.ts +14 -4
- package/src/resources/data-sources/data-sources.ts +181 -48
- package/src/resources/extractions/content.ts +5 -0
- package/src/resources/index.ts +0 -1
- package/src/resources/vector-stores/files.ts +65 -26
- package/src/resources/vector-stores/vector-stores.ts +86 -20
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/chat.d.mts +0 -27
- package/resources/chat.d.mts.map +0 -1
- package/resources/chat.d.ts +0 -27
- package/resources/chat.d.ts.map +0 -1
- package/resources/chat.js +0 -28
- package/resources/chat.js.map +0 -1
- package/resources/chat.mjs +0 -24
- package/resources/chat.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
- package/src/resources/chat.ts +0 -33
@@ -6,31 +6,32 @@ import * as VectorStoresAPI from './vector-stores';
|
|
6
6
|
import { APIPromise } from '../../core/api-promise';
|
7
7
|
import { LimitOffset, type LimitOffsetParams, PagePromise } from '../../core/pagination';
|
8
8
|
import { RequestOptions } from '../../internal/request-options';
|
9
|
-
import { path } from '../../internal/utils/path';
|
10
9
|
import * as polling from '../../lib/polling';
|
11
10
|
import { Uploadable } from '../../uploads';
|
11
|
+
import { path } from '../../internal/utils/path';
|
12
12
|
|
13
13
|
export class Files extends APIResource {
|
14
14
|
/**
|
15
15
|
* Upload a new file to a vector store for indexing.
|
16
16
|
*
|
17
|
-
* Args:
|
18
|
-
* upload and index
|
17
|
+
* Args: vector_store_identifier: The ID or name of the vector store to upload to
|
18
|
+
* file: The file to upload and index
|
19
19
|
*
|
20
20
|
* Returns: VectorStoreFile: Details of the uploaded and indexed file
|
21
21
|
*/
|
22
22
|
create(
|
23
|
-
|
23
|
+
vectorStoreIdentifier: string,
|
24
24
|
body: FileCreateParams,
|
25
25
|
options?: RequestOptions,
|
26
26
|
): APIPromise<VectorStoreFile> {
|
27
|
-
return this._client.post(path`/v1/vector_stores/${
|
27
|
+
return this._client.post(path`/v1/vector_stores/${vectorStoreIdentifier}/files`, { body, ...options });
|
28
28
|
}
|
29
29
|
|
30
30
|
/**
|
31
31
|
* Get details of a specific file in a vector store.
|
32
32
|
*
|
33
|
-
* Args:
|
33
|
+
* Args: vector_store_identifier: The ID or name of the vector store file_id: The
|
34
|
+
* ID of the file
|
34
35
|
*
|
35
36
|
* Returns: VectorStoreFile: Details of the vector store file
|
36
37
|
*/
|
@@ -39,25 +40,25 @@ export class Files extends APIResource {
|
|
39
40
|
params: FileRetrieveParams,
|
40
41
|
options?: RequestOptions,
|
41
42
|
): APIPromise<VectorStoreFile> {
|
42
|
-
const {
|
43
|
-
return this._client.get(path`/v1/vector_stores/${
|
43
|
+
const { vector_store_identifier } = params;
|
44
|
+
return this._client.get(path`/v1/vector_stores/${vector_store_identifier}/files/${fileID}`, options);
|
44
45
|
}
|
45
46
|
|
46
47
|
/**
|
47
48
|
* List files indexed in a vector store with pagination.
|
48
49
|
*
|
49
|
-
* Args:
|
50
|
-
* parameters
|
50
|
+
* Args: vector_store_identifier: The ID or name of the vector store pagination:
|
51
|
+
* Pagination parameters
|
51
52
|
*
|
52
53
|
* Returns: VectorStoreFileListResponse: Paginated list of vector store files
|
53
54
|
*/
|
54
55
|
list(
|
55
|
-
|
56
|
+
vectorStoreIdentifier: string,
|
56
57
|
query: FileListParams | null | undefined = {},
|
57
58
|
options?: RequestOptions,
|
58
59
|
): PagePromise<VectorStoreFilesLimitOffset, VectorStoreFile> {
|
59
60
|
return this._client.getAPIList(
|
60
|
-
path`/v1/vector_stores/${
|
61
|
+
path`/v1/vector_stores/${vectorStoreIdentifier}/files`,
|
61
62
|
LimitOffset<VectorStoreFile>,
|
62
63
|
{ query, ...options },
|
63
64
|
);
|
@@ -66,14 +67,14 @@ export class Files extends APIResource {
|
|
66
67
|
/**
|
67
68
|
* Delete a file from a vector store.
|
68
69
|
*
|
69
|
-
* Args:
|
70
|
-
* delete
|
70
|
+
* Args: vector_store_identifier: The ID or name of the vector store file_id: The
|
71
|
+
* ID of the file to delete
|
71
72
|
*
|
72
73
|
* Returns: VectorStoreFileDeleted: The deleted file
|
73
74
|
*/
|
74
75
|
delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse> {
|
75
|
-
const {
|
76
|
-
return this._client.delete(path`/v1/vector_stores/${
|
76
|
+
const { vector_store_identifier } = params;
|
77
|
+
return this._client.delete(path`/v1/vector_stores/${vector_store_identifier}/files/${fileID}`, options);
|
77
78
|
}
|
78
79
|
|
79
80
|
/**
|
@@ -119,9 +120,9 @@ export class Files extends APIResource {
|
|
119
120
|
const pollingTimeoutMs = pollTimeoutMs;
|
120
121
|
|
121
122
|
return polling.poll({
|
122
|
-
fn: () => this.retrieve(fileId, {
|
123
|
+
fn: () => this.retrieve(fileId, { vector_store_identifier: vectorStoreId, ...options }),
|
123
124
|
condition: (result) =>
|
124
|
-
result.status === 'completed' || result.status === 'failed' || result.status === '
|
125
|
+
result.status === 'completed' || result.status === 'failed' || result.status === 'cancelled',
|
125
126
|
intervalSeconds: pollingIntervalMs / 1000,
|
126
127
|
...(pollingTimeoutMs && { timeoutSeconds: pollingTimeoutMs / 1000 }),
|
127
128
|
});
|
@@ -224,7 +225,7 @@ export interface ScoredVectorStoreFile {
|
|
224
225
|
/**
|
225
226
|
* Processing status of the file
|
226
227
|
*/
|
227
|
-
status?:
|
228
|
+
status?: 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
228
229
|
|
229
230
|
/**
|
230
231
|
* Last error message if processing failed
|
@@ -294,7 +295,7 @@ export interface VectorStoreFile {
|
|
294
295
|
/**
|
295
296
|
* Processing status of the file
|
296
297
|
*/
|
297
|
-
status?:
|
298
|
+
status?: 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
298
299
|
|
299
300
|
/**
|
300
301
|
* Last error message if processing failed
|
@@ -395,18 +396,18 @@ export namespace FileCreateParams {
|
|
395
396
|
|
396
397
|
export interface FileRetrieveParams {
|
397
398
|
/**
|
398
|
-
* The ID of the vector store
|
399
|
+
* The ID or name of the vector store
|
399
400
|
*/
|
400
|
-
|
401
|
+
vector_store_identifier: string;
|
401
402
|
}
|
402
403
|
|
403
404
|
export interface FileListParams extends LimitOffsetParams {}
|
404
405
|
|
405
406
|
export interface FileDeleteParams {
|
406
407
|
/**
|
407
|
-
* The ID of the vector store
|
408
|
+
* The ID or name of the vector store
|
408
409
|
*/
|
409
|
-
|
410
|
+
vector_store_identifier: string;
|
410
411
|
}
|
411
412
|
|
412
413
|
export interface FileSearchParams {
|
@@ -416,9 +417,14 @@ export interface FileSearchParams {
|
|
416
417
|
query: string;
|
417
418
|
|
418
419
|
/**
|
419
|
-
* IDs of vector stores to search
|
420
|
+
* IDs or names of vector stores to search
|
420
421
|
*/
|
421
|
-
|
422
|
+
vector_store_identifiers?: Array<string> | null;
|
423
|
+
|
424
|
+
/**
|
425
|
+
* @deprecated
|
426
|
+
*/
|
427
|
+
vector_store_ids?: Array<string> | null;
|
422
428
|
|
423
429
|
/**
|
424
430
|
* Number of results to return
|
@@ -434,6 +440,11 @@ export interface FileSearchParams {
|
|
434
440
|
| Array<Shared.SearchFilter | Shared.SearchFilterCondition>
|
435
441
|
| null;
|
436
442
|
|
443
|
+
/**
|
444
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
445
|
+
*/
|
446
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
447
|
+
|
437
448
|
/**
|
438
449
|
* Search configuration options
|
439
450
|
*/
|
@@ -455,6 +466,11 @@ export namespace FileSearchParams {
|
|
455
466
|
*/
|
456
467
|
rewrite_query?: boolean;
|
457
468
|
|
469
|
+
/**
|
470
|
+
* Whether to rerank results and optional reranking configuration
|
471
|
+
*/
|
472
|
+
rerank?: boolean | SearchOptions.RerankConfig | null;
|
473
|
+
|
458
474
|
/**
|
459
475
|
* Whether to return file metadata
|
460
476
|
*/
|
@@ -470,6 +486,29 @@ export namespace FileSearchParams {
|
|
470
486
|
*/
|
471
487
|
chunks_per_file?: number;
|
472
488
|
}
|
489
|
+
|
490
|
+
export namespace SearchOptions {
|
491
|
+
/**
|
492
|
+
* Represents a reranking configuration.
|
493
|
+
*/
|
494
|
+
export interface RerankConfig {
|
495
|
+
/**
|
496
|
+
* The name of the reranking model
|
497
|
+
*/
|
498
|
+
model?: string;
|
499
|
+
|
500
|
+
/**
|
501
|
+
* Whether to include metadata in the reranked results
|
502
|
+
*/
|
503
|
+
with_metadata?: boolean | Array<string>;
|
504
|
+
|
505
|
+
/**
|
506
|
+
* Maximum number of results to return after reranking. If None, returns all
|
507
|
+
* reranked results.
|
508
|
+
*/
|
509
|
+
top_k?: number | null;
|
510
|
+
}
|
511
|
+
}
|
473
512
|
}
|
474
513
|
|
475
514
|
export declare namespace Files {
|
@@ -37,37 +37,38 @@ export class VectorStores extends APIResource {
|
|
37
37
|
}
|
38
38
|
|
39
39
|
/**
|
40
|
-
* Get a vector store by ID.
|
40
|
+
* Get a vector store by ID or name.
|
41
41
|
*
|
42
|
-
* Args:
|
42
|
+
* Args: vector_store_identifier: The ID or name of the vector store to retrieve.
|
43
43
|
*
|
44
44
|
* Returns: VectorStore: The response containing the vector store details.
|
45
45
|
*/
|
46
|
-
retrieve(
|
47
|
-
return this._client.get(path`/v1/vector_stores/${
|
46
|
+
retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore> {
|
47
|
+
return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
48
48
|
}
|
49
49
|
|
50
50
|
/**
|
51
|
-
* Update a vector store by ID.
|
51
|
+
* Update a vector store by ID or name.
|
52
52
|
*
|
53
|
-
* Args:
|
53
|
+
* Args: vector_store_identifier: The ID or name of the vector store to update.
|
54
54
|
* vector_store_update: VectorStoreCreate object containing the name, description,
|
55
55
|
* and metadata.
|
56
56
|
*
|
57
57
|
* Returns: VectorStore: The response containing the updated vector store details.
|
58
58
|
*/
|
59
59
|
update(
|
60
|
-
|
60
|
+
vectorStoreIdentifier: string,
|
61
61
|
body: VectorStoreUpdateParams,
|
62
62
|
options?: RequestOptions,
|
63
63
|
): APIPromise<VectorStore> {
|
64
|
-
return this._client.put(path`/v1/vector_stores/${
|
64
|
+
return this._client.put(path`/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
|
65
65
|
}
|
66
66
|
|
67
67
|
/**
|
68
|
-
* List all vector stores.
|
68
|
+
* List all vector stores with optional search.
|
69
69
|
*
|
70
|
-
* Args: pagination: The pagination options.
|
70
|
+
* Args: pagination: The pagination options. q: Optional search query to filter
|
71
|
+
* vector stores.
|
71
72
|
*
|
72
73
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
73
74
|
*/
|
@@ -79,14 +80,14 @@ export class VectorStores extends APIResource {
|
|
79
80
|
}
|
80
81
|
|
81
82
|
/**
|
82
|
-
* Delete a vector store by ID.
|
83
|
+
* Delete a vector store by ID or name.
|
83
84
|
*
|
84
|
-
* Args:
|
85
|
+
* Args: vector_store_identifier: The ID or name of the vector store to delete.
|
85
86
|
*
|
86
87
|
* Returns: VectorStore: The response containing the deleted vector store details.
|
87
88
|
*/
|
88
|
-
delete(
|
89
|
-
return this._client.delete(path`/v1/vector_stores/${
|
89
|
+
delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
|
90
|
+
return this._client.delete(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
90
91
|
}
|
91
92
|
|
92
93
|
/**
|
@@ -107,7 +108,9 @@ export class VectorStores extends APIResource {
|
|
107
108
|
* relevance-scored results.
|
108
109
|
*
|
109
110
|
* Args: search_params: Search configuration including: - query text or
|
110
|
-
* embeddings -
|
111
|
+
* embeddings - vector_store_ids: List of vector stores to search - file_ids:
|
112
|
+
* Optional list of file IDs to filter chunks by (or tuple of list and condition
|
113
|
+
* operator) - metadata filters - pagination parameters - sorting preferences
|
111
114
|
* \_state: API state dependency \_ctx: Service context dependency
|
112
115
|
*
|
113
116
|
* Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
|
@@ -283,6 +286,11 @@ export namespace ScoredImageURLInputChunk {
|
|
283
286
|
* The image URL. Can be either a URL or a Data URI.
|
284
287
|
*/
|
285
288
|
url: string;
|
289
|
+
|
290
|
+
/**
|
291
|
+
* The image format/mimetype
|
292
|
+
*/
|
293
|
+
format?: string;
|
286
294
|
}
|
287
295
|
}
|
288
296
|
|
@@ -487,6 +495,11 @@ export namespace VectorStore {
|
|
487
495
|
* Counts of files in different states
|
488
496
|
*/
|
489
497
|
export interface FileCounts {
|
498
|
+
/**
|
499
|
+
* Number of files waiting to be processed
|
500
|
+
*/
|
501
|
+
pending?: number;
|
502
|
+
|
490
503
|
/**
|
491
504
|
* Number of files currently being processed
|
492
505
|
*/
|
@@ -528,12 +541,40 @@ export interface VectorStoreChunkSearchOptions {
|
|
528
541
|
*/
|
529
542
|
rewrite_query?: boolean;
|
530
543
|
|
544
|
+
/**
|
545
|
+
* Whether to rerank results and optional reranking configuration
|
546
|
+
*/
|
547
|
+
rerank?: boolean | VectorStoreChunkSearchOptions.RerankConfig | null;
|
548
|
+
|
531
549
|
/**
|
532
550
|
* Whether to return file metadata
|
533
551
|
*/
|
534
552
|
return_metadata?: boolean;
|
535
553
|
}
|
536
554
|
|
555
|
+
export namespace VectorStoreChunkSearchOptions {
|
556
|
+
/**
|
557
|
+
* Represents a reranking configuration.
|
558
|
+
*/
|
559
|
+
export interface RerankConfig {
|
560
|
+
/**
|
561
|
+
* The name of the reranking model
|
562
|
+
*/
|
563
|
+
model?: string;
|
564
|
+
|
565
|
+
/**
|
566
|
+
* Whether to include metadata in the reranked results
|
567
|
+
*/
|
568
|
+
with_metadata?: boolean | Array<string>;
|
569
|
+
|
570
|
+
/**
|
571
|
+
* Maximum number of results to return after reranking. If None, returns all
|
572
|
+
* reranked results.
|
573
|
+
*/
|
574
|
+
top_k?: number | null;
|
575
|
+
}
|
576
|
+
}
|
577
|
+
|
537
578
|
/**
|
538
579
|
* Response model for vector store deletion.
|
539
580
|
*/
|
@@ -634,7 +675,12 @@ export interface VectorStoreUpdateParams {
|
|
634
675
|
metadata?: unknown;
|
635
676
|
}
|
636
677
|
|
637
|
-
export interface VectorStoreListParams extends LimitOffsetParams {
|
678
|
+
export interface VectorStoreListParams extends LimitOffsetParams {
|
679
|
+
/**
|
680
|
+
* Search query for fuzzy matching over name and description fields
|
681
|
+
*/
|
682
|
+
q?: string | null;
|
683
|
+
}
|
638
684
|
|
639
685
|
export interface VectorStoreQuestionAnsweringParams {
|
640
686
|
/**
|
@@ -644,9 +690,14 @@ export interface VectorStoreQuestionAnsweringParams {
|
|
644
690
|
query?: string;
|
645
691
|
|
646
692
|
/**
|
647
|
-
* IDs of vector stores to search
|
693
|
+
* IDs or names of vector stores to search
|
694
|
+
*/
|
695
|
+
vector_store_identifiers?: Array<string> | null;
|
696
|
+
|
697
|
+
/**
|
698
|
+
* @deprecated
|
648
699
|
*/
|
649
|
-
vector_store_ids
|
700
|
+
vector_store_ids?: Array<string> | null;
|
650
701
|
|
651
702
|
/**
|
652
703
|
* Number of results to return
|
@@ -662,6 +713,11 @@ export interface VectorStoreQuestionAnsweringParams {
|
|
662
713
|
| Array<Shared.SearchFilter | Shared.SearchFilterCondition>
|
663
714
|
| null;
|
664
715
|
|
716
|
+
/**
|
717
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
718
|
+
*/
|
719
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
720
|
+
|
665
721
|
/**
|
666
722
|
* Search configuration options
|
667
723
|
*/
|
@@ -702,9 +758,14 @@ export interface VectorStoreSearchParams {
|
|
702
758
|
query: string;
|
703
759
|
|
704
760
|
/**
|
705
|
-
* IDs of vector stores to search
|
761
|
+
* IDs or names of vector stores to search
|
706
762
|
*/
|
707
|
-
|
763
|
+
vector_store_identifiers?: Array<string> | null;
|
764
|
+
|
765
|
+
/**
|
766
|
+
* @deprecated
|
767
|
+
*/
|
768
|
+
vector_store_ids?: Array<string> | null;
|
708
769
|
|
709
770
|
/**
|
710
771
|
* Number of results to return
|
@@ -720,6 +781,11 @@ export interface VectorStoreSearchParams {
|
|
720
781
|
| Array<Shared.SearchFilter | Shared.SearchFilterCondition>
|
721
782
|
| null;
|
722
783
|
|
784
|
+
/**
|
785
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
786
|
+
*/
|
787
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
788
|
+
|
723
789
|
/**
|
724
790
|
* Search configuration options
|
725
791
|
*/
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.7.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.7.2";
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.7.2";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.7.2'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/resources/chat.d.mts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
4
|
-
export declare class Chat extends APIResource {
|
5
|
-
/**
|
6
|
-
* Create a chat completion using the provided parameters.
|
7
|
-
*
|
8
|
-
* Generates a completion response based on the chat messages and model parameters
|
9
|
-
* provided. The response can be either a full completion or streamed chunks
|
10
|
-
* depending on the request parameters.
|
11
|
-
*
|
12
|
-
* Args: params: Parameters for creating the chat completion including messages,
|
13
|
-
* model selection, and generation settings user: The authenticated user making the
|
14
|
-
* request
|
15
|
-
*
|
16
|
-
* Returns: Either a ChatCompletion containing the full response, or
|
17
|
-
* ChatCompletionChunk for streaming
|
18
|
-
*
|
19
|
-
* Raises: HTTPException: If there is an error creating the completion (500)
|
20
|
-
*/
|
21
|
-
createCompletion(options?: RequestOptions): APIPromise<unknown>;
|
22
|
-
}
|
23
|
-
export type ChatCreateCompletionResponse = unknown;
|
24
|
-
export declare namespace Chat {
|
25
|
-
export { type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
26
|
-
}
|
27
|
-
//# sourceMappingURL=chat.d.mts.map
|
package/resources/chat.d.mts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAGhE;AAED,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEnD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,CAAC;CAC9E"}
|
package/resources/chat.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
4
|
-
export declare class Chat extends APIResource {
|
5
|
-
/**
|
6
|
-
* Create a chat completion using the provided parameters.
|
7
|
-
*
|
8
|
-
* Generates a completion response based on the chat messages and model parameters
|
9
|
-
* provided. The response can be either a full completion or streamed chunks
|
10
|
-
* depending on the request parameters.
|
11
|
-
*
|
12
|
-
* Args: params: Parameters for creating the chat completion including messages,
|
13
|
-
* model selection, and generation settings user: The authenticated user making the
|
14
|
-
* request
|
15
|
-
*
|
16
|
-
* Returns: Either a ChatCompletion containing the full response, or
|
17
|
-
* ChatCompletionChunk for streaming
|
18
|
-
*
|
19
|
-
* Raises: HTTPException: If there is an error creating the completion (500)
|
20
|
-
*/
|
21
|
-
createCompletion(options?: RequestOptions): APIPromise<unknown>;
|
22
|
-
}
|
23
|
-
export type ChatCreateCompletionResponse = unknown;
|
24
|
-
export declare namespace Chat {
|
25
|
-
export { type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
26
|
-
}
|
27
|
-
//# sourceMappingURL=chat.d.ts.map
|
package/resources/chat.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAGhE;AAED,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEnD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,CAAC;CAC9E"}
|
package/resources/chat.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.Chat = void 0;
|
5
|
-
const resource_1 = require("../core/resource.js");
|
6
|
-
class Chat extends resource_1.APIResource {
|
7
|
-
/**
|
8
|
-
* Create a chat completion using the provided parameters.
|
9
|
-
*
|
10
|
-
* Generates a completion response based on the chat messages and model parameters
|
11
|
-
* provided. The response can be either a full completion or streamed chunks
|
12
|
-
* depending on the request parameters.
|
13
|
-
*
|
14
|
-
* Args: params: Parameters for creating the chat completion including messages,
|
15
|
-
* model selection, and generation settings user: The authenticated user making the
|
16
|
-
* request
|
17
|
-
*
|
18
|
-
* Returns: Either a ChatCompletion containing the full response, or
|
19
|
-
* ChatCompletionChunk for streaming
|
20
|
-
*
|
21
|
-
* Raises: HTTPException: If there is an error creating the completion (500)
|
22
|
-
*/
|
23
|
-
createCompletion(options) {
|
24
|
-
return this._client.post('/v1/chat/completions', options);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
exports.Chat = Chat;
|
28
|
-
//# sourceMappingURL=chat.js.map
|
package/resources/chat.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF;AApBD,oBAoBC"}
|
package/resources/chat.mjs
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
3
|
-
export class Chat extends APIResource {
|
4
|
-
/**
|
5
|
-
* Create a chat completion using the provided parameters.
|
6
|
-
*
|
7
|
-
* Generates a completion response based on the chat messages and model parameters
|
8
|
-
* provided. The response can be either a full completion or streamed chunks
|
9
|
-
* depending on the request parameters.
|
10
|
-
*
|
11
|
-
* Args: params: Parameters for creating the chat completion including messages,
|
12
|
-
* model selection, and generation settings user: The authenticated user making the
|
13
|
-
* request
|
14
|
-
*
|
15
|
-
* Returns: Either a ChatCompletion containing the full response, or
|
16
|
-
* ChatCompletionChunk for streaming
|
17
|
-
*
|
18
|
-
* Raises: HTTPException: If there is an error creating the completion (500)
|
19
|
-
*/
|
20
|
-
createCompletion(options) {
|
21
|
-
return this._client.post('/v1/chat/completions', options);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
//# sourceMappingURL=chat.mjs.map
|
package/resources/chat.mjs.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Shims for types that we can't always rely on being available globally.
|
5
|
-
*
|
6
|
-
* Note: these only exist at the type-level, there is no corresponding runtime
|
7
|
-
* version for any of these symbols.
|
8
|
-
*/
|
9
|
-
|
10
|
-
/**
|
11
|
-
* In order to properly access the global `NodeJS` type, if it's available, we
|
12
|
-
* need to make use of declaration shadowing. Without this, any checks for the
|
13
|
-
* presence of `NodeJS.ReadableStream` will fail.
|
14
|
-
*/
|
15
|
-
declare namespace NodeJS {
|
16
|
-
interface ReadableStream {}
|
17
|
-
}
|
18
|
-
|
19
|
-
type HasProperties<T> = keyof T extends never ? false : true;
|
20
|
-
|
21
|
-
// @ts-ignore
|
22
|
-
type _ReadableStream<R = any> =
|
23
|
-
// @ts-ignore
|
24
|
-
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
25
|
-
|
26
|
-
// @ts-ignore
|
27
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
28
|
-
export { _ReadableStream as ReadableStream };
|
package/src/resources/chat.ts
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
import { APIResource } from '../core/resource';
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
6
|
-
|
7
|
-
export class Chat extends APIResource {
|
8
|
-
/**
|
9
|
-
* Create a chat completion using the provided parameters.
|
10
|
-
*
|
11
|
-
* Generates a completion response based on the chat messages and model parameters
|
12
|
-
* provided. The response can be either a full completion or streamed chunks
|
13
|
-
* depending on the request parameters.
|
14
|
-
*
|
15
|
-
* Args: params: Parameters for creating the chat completion including messages,
|
16
|
-
* model selection, and generation settings user: The authenticated user making the
|
17
|
-
* request
|
18
|
-
*
|
19
|
-
* Returns: Either a ChatCompletion containing the full response, or
|
20
|
-
* ChatCompletionChunk for streaming
|
21
|
-
*
|
22
|
-
* Raises: HTTPException: If there is an error creating the completion (500)
|
23
|
-
*/
|
24
|
-
createCompletion(options?: RequestOptions): APIPromise<unknown> {
|
25
|
-
return this._client.post('/v1/chat/completions', options);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
export type ChatCreateCompletionResponse = unknown;
|
30
|
-
|
31
|
-
export declare namespace Chat {
|
32
|
-
export { type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
33
|
-
}
|