@mixedbread/sdk 0.6.0 → 0.8.0
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 +63 -0
- package/README.md +12 -24
- package/bin/migration-config.json +2 -2
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +2 -2
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- 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 +172 -35
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +172 -35
- 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/data-sources/index.d.mts +1 -1
- package/resources/data-sources/index.d.mts.map +1 -1
- package/resources/data-sources/index.d.ts +1 -1
- package/resources/data-sources/index.d.ts.map +1 -1
- package/resources/data-sources/index.js.map +1 -1
- package/resources/data-sources/index.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 +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/vector-stores/files.d.mts +59 -26
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +59 -26
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +32 -31
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +32 -31
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.mts +1 -1
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +53 -18
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +53 -18
- 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 +10 -4
- 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 +207 -37
- package/src/resources/data-sources/index.ts +3 -0
- package/src/resources/extractions/content.ts +5 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/vector-stores/files.ts +81 -39
- package/src/resources/vector-stores/index.ts +2 -0
- package/src/resources/vector-stores/vector-stores.ts +67 -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/src/internal/shim-types.d.ts +0 -28
@@ -12,8 +12,10 @@ import {
|
|
12
12
|
FileSearchParams,
|
13
13
|
FileSearchResponse,
|
14
14
|
Files,
|
15
|
+
RerankConfig,
|
15
16
|
ScoredVectorStoreFile,
|
16
17
|
VectorStoreFile,
|
18
|
+
VectorStoreFileStatus,
|
17
19
|
VectorStoreFilesLimitOffset,
|
18
20
|
} from './files';
|
19
21
|
import { APIPromise } from '../../core/api-promise';
|
@@ -37,37 +39,38 @@ export class VectorStores extends APIResource {
|
|
37
39
|
}
|
38
40
|
|
39
41
|
/**
|
40
|
-
* Get a vector store by ID.
|
42
|
+
* Get a vector store by ID or name.
|
41
43
|
*
|
42
|
-
* Args:
|
44
|
+
* Args: vector_store_identifier: The ID or name of the vector store to retrieve.
|
43
45
|
*
|
44
46
|
* Returns: VectorStore: The response containing the vector store details.
|
45
47
|
*/
|
46
|
-
retrieve(
|
47
|
-
return this._client.get(path`/v1/vector_stores/${
|
48
|
+
retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore> {
|
49
|
+
return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
48
50
|
}
|
49
51
|
|
50
52
|
/**
|
51
|
-
* Update a vector store by ID.
|
53
|
+
* Update a vector store by ID or name.
|
52
54
|
*
|
53
|
-
* Args:
|
55
|
+
* Args: vector_store_identifier: The ID or name of the vector store to update.
|
54
56
|
* vector_store_update: VectorStoreCreate object containing the name, description,
|
55
57
|
* and metadata.
|
56
58
|
*
|
57
59
|
* Returns: VectorStore: The response containing the updated vector store details.
|
58
60
|
*/
|
59
61
|
update(
|
60
|
-
|
62
|
+
vectorStoreIdentifier: string,
|
61
63
|
body: VectorStoreUpdateParams,
|
62
64
|
options?: RequestOptions,
|
63
65
|
): APIPromise<VectorStore> {
|
64
|
-
return this._client.put(path`/v1/vector_stores/${
|
66
|
+
return this._client.put(path`/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
|
65
67
|
}
|
66
68
|
|
67
69
|
/**
|
68
|
-
* List all vector stores.
|
70
|
+
* List all vector stores with optional search.
|
69
71
|
*
|
70
|
-
* Args: pagination: The pagination options.
|
72
|
+
* Args: pagination: The pagination options. q: Optional search query to filter
|
73
|
+
* vector stores.
|
71
74
|
*
|
72
75
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
73
76
|
*/
|
@@ -79,14 +82,14 @@ export class VectorStores extends APIResource {
|
|
79
82
|
}
|
80
83
|
|
81
84
|
/**
|
82
|
-
* Delete a vector store by ID.
|
85
|
+
* Delete a vector store by ID or name.
|
83
86
|
*
|
84
|
-
* Args:
|
87
|
+
* Args: vector_store_identifier: The ID or name of the vector store to delete.
|
85
88
|
*
|
86
89
|
* Returns: VectorStore: The response containing the deleted vector store details.
|
87
90
|
*/
|
88
|
-
delete(
|
89
|
-
return this._client.delete(path`/v1/vector_stores/${
|
91
|
+
delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
|
92
|
+
return this._client.delete(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
90
93
|
}
|
91
94
|
|
92
95
|
/**
|
@@ -107,7 +110,9 @@ export class VectorStores extends APIResource {
|
|
107
110
|
* relevance-scored results.
|
108
111
|
*
|
109
112
|
* Args: search_params: Search configuration including: - query text or
|
110
|
-
* embeddings -
|
113
|
+
* embeddings - vector_store_ids: List of vector stores to search - file_ids:
|
114
|
+
* Optional list of file IDs to filter chunks by (or tuple of list and condition
|
115
|
+
* operator) - metadata filters - pagination parameters - sorting preferences
|
111
116
|
* \_state: API state dependency \_ctx: Service context dependency
|
112
117
|
*
|
113
118
|
* Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
|
@@ -283,6 +288,11 @@ export namespace ScoredImageURLInputChunk {
|
|
283
288
|
* The image URL. Can be either a URL or a Data URI.
|
284
289
|
*/
|
285
290
|
url: string;
|
291
|
+
|
292
|
+
/**
|
293
|
+
* The image format/mimetype
|
294
|
+
*/
|
295
|
+
format?: string;
|
286
296
|
}
|
287
297
|
}
|
288
298
|
|
@@ -487,6 +497,11 @@ export namespace VectorStore {
|
|
487
497
|
* Counts of files in different states
|
488
498
|
*/
|
489
499
|
export interface FileCounts {
|
500
|
+
/**
|
501
|
+
* Number of files waiting to be processed
|
502
|
+
*/
|
503
|
+
pending?: number;
|
504
|
+
|
490
505
|
/**
|
491
506
|
* Number of files currently being processed
|
492
507
|
*/
|
@@ -528,6 +543,11 @@ export interface VectorStoreChunkSearchOptions {
|
|
528
543
|
*/
|
529
544
|
rewrite_query?: boolean;
|
530
545
|
|
546
|
+
/**
|
547
|
+
* Whether to rerank results and optional reranking configuration
|
548
|
+
*/
|
549
|
+
rerank?: boolean | FilesAPI.RerankConfig | null;
|
550
|
+
|
531
551
|
/**
|
532
552
|
* Whether to return file metadata
|
533
553
|
*/
|
@@ -634,7 +654,12 @@ export interface VectorStoreUpdateParams {
|
|
634
654
|
metadata?: unknown;
|
635
655
|
}
|
636
656
|
|
637
|
-
export interface VectorStoreListParams extends LimitOffsetParams {
|
657
|
+
export interface VectorStoreListParams extends LimitOffsetParams {
|
658
|
+
/**
|
659
|
+
* Search query for fuzzy matching over name and description fields
|
660
|
+
*/
|
661
|
+
q?: string | null;
|
662
|
+
}
|
638
663
|
|
639
664
|
export interface VectorStoreQuestionAnsweringParams {
|
640
665
|
/**
|
@@ -644,9 +669,14 @@ export interface VectorStoreQuestionAnsweringParams {
|
|
644
669
|
query?: string;
|
645
670
|
|
646
671
|
/**
|
647
|
-
* IDs of vector stores to search
|
672
|
+
* IDs or names of vector stores to search
|
648
673
|
*/
|
649
|
-
|
674
|
+
vector_store_identifiers?: Array<string> | null;
|
675
|
+
|
676
|
+
/**
|
677
|
+
* @deprecated
|
678
|
+
*/
|
679
|
+
vector_store_ids?: Array<string> | null;
|
650
680
|
|
651
681
|
/**
|
652
682
|
* Number of results to return
|
@@ -662,6 +692,11 @@ export interface VectorStoreQuestionAnsweringParams {
|
|
662
692
|
| Array<Shared.SearchFilter | Shared.SearchFilterCondition>
|
663
693
|
| null;
|
664
694
|
|
695
|
+
/**
|
696
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
697
|
+
*/
|
698
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
699
|
+
|
665
700
|
/**
|
666
701
|
* Search configuration options
|
667
702
|
*/
|
@@ -702,9 +737,14 @@ export interface VectorStoreSearchParams {
|
|
702
737
|
query: string;
|
703
738
|
|
704
739
|
/**
|
705
|
-
* IDs of vector stores to search
|
740
|
+
* IDs or names of vector stores to search
|
706
741
|
*/
|
707
|
-
|
742
|
+
vector_store_identifiers?: Array<string> | null;
|
743
|
+
|
744
|
+
/**
|
745
|
+
* @deprecated
|
746
|
+
*/
|
747
|
+
vector_store_ids?: Array<string> | null;
|
708
748
|
|
709
749
|
/**
|
710
750
|
* Number of results to return
|
@@ -720,6 +760,11 @@ export interface VectorStoreSearchParams {
|
|
720
760
|
| Array<Shared.SearchFilter | Shared.SearchFilterCondition>
|
721
761
|
| null;
|
722
762
|
|
763
|
+
/**
|
764
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
765
|
+
*/
|
766
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
767
|
+
|
723
768
|
/**
|
724
769
|
* Search configuration options
|
725
770
|
*/
|
@@ -750,7 +795,9 @@ export declare namespace VectorStores {
|
|
750
795
|
|
751
796
|
export {
|
752
797
|
Files as Files,
|
798
|
+
type RerankConfig as RerankConfig,
|
753
799
|
type ScoredVectorStoreFile as ScoredVectorStoreFile,
|
800
|
+
type VectorStoreFileStatus as VectorStoreFileStatus,
|
754
801
|
type VectorStoreFile as VectorStoreFile,
|
755
802
|
type FileDeleteResponse as FileDeleteResponse,
|
756
803
|
type FileSearchResponse as FileSearchResponse,
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.8.0'; // 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.8.0";
|
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.8.0";
|
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.8.0'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
@@ -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 };
|