llama-stack-client 0.2.10 → 0.2.11-rc1
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/index.d.mts +9 -0
- package/index.d.ts +9 -0
- package/index.d.ts.map +1 -1
- package/index.js +9 -0
- package/index.js.map +1 -1
- package/index.mjs +9 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/completions.d.ts +4 -0
- package/resources/completions.d.ts.map +1 -1
- package/resources/datasets.d.ts +4 -0
- package/resources/datasets.d.ts.map +1 -1
- package/resources/embeddings.d.ts +94 -0
- package/resources/embeddings.d.ts.map +1 -0
- package/resources/embeddings.js +16 -0
- package/resources/embeddings.js.map +1 -0
- package/resources/embeddings.mjs +12 -0
- package/resources/embeddings.mjs.map +1 -0
- package/resources/files.d.ts +130 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +68 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +41 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +8 -1
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +391 -6
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.ts +37 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/vector-io.d.ts +29 -3
- package/resources/vector-io.d.ts.map +1 -1
- package/resources/vector-stores/files.d.ts +74 -0
- package/resources/vector-stores/files.d.ts.map +1 -0
- package/resources/vector-stores/files.js +15 -0
- package/resources/vector-stores/files.js.map +1 -0
- package/resources/vector-stores/files.mjs +11 -0
- package/resources/vector-stores/files.mjs.map +1 -0
- package/resources/vector-stores/index.d.ts +3 -0
- package/resources/vector-stores/index.d.ts.map +1 -0
- package/resources/vector-stores/index.js +9 -0
- package/resources/vector-stores/index.js.map +1 -0
- package/resources/vector-stores/index.mjs +4 -0
- package/resources/vector-stores/index.mjs.map +1 -0
- package/resources/vector-stores/vector-stores.d.ts +198 -0
- package/resources/vector-stores/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores/vector-stores.js +77 -0
- package/resources/vector-stores/vector-stores.js.map +1 -0
- package/resources/vector-stores/vector-stores.mjs +50 -0
- package/resources/vector-stores/vector-stores.mjs.map +1 -0
- package/resources/vector-stores.d.ts +2 -0
- package/resources/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores.js +19 -0
- package/resources/vector-stores.js.map +1 -0
- package/resources/vector-stores.mjs +3 -0
- package/resources/vector-stores.mjs.map +1 -0
- package/src/index.ts +55 -0
- package/src/resource.ts +1 -1
- package/src/resources/completions.ts +5 -0
- package/src/resources/datasets.ts +5 -0
- package/src/resources/embeddings.ts +119 -0
- package/src/resources/files.ts +184 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/responses/input-items.ts +13 -0
- package/src/resources/responses/responses.ts +616 -1
- package/src/resources/shared.ts +42 -1
- package/src/resources/vector-io.ts +31 -3
- package/src/resources/vector-stores/files.ts +111 -0
- package/src/resources/vector-stores/index.ts +14 -0
- package/src/resources/vector-stores/vector-stores.ts +306 -0
- package/src/resources/vector-stores.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -507,9 +507,50 @@ export interface QueryConfig {
|
|
|
507
507
|
query_generator_config: QueryGeneratorConfig;
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
|
-
* Search mode for retrieval—either "vector"
|
|
510
|
+
* Search mode for retrieval—either "vector", "keyword", or "hybrid". Default
|
|
511
|
+
* "vector".
|
|
511
512
|
*/
|
|
512
513
|
mode?: string;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Configuration for the ranker to use in hybrid search. Defaults to RRF ranker.
|
|
517
|
+
*/
|
|
518
|
+
ranker?: QueryConfig.RrfRanker | QueryConfig.WeightedRanker;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export namespace QueryConfig {
|
|
522
|
+
/**
|
|
523
|
+
* Reciprocal Rank Fusion (RRF) ranker configuration.
|
|
524
|
+
*/
|
|
525
|
+
export interface RrfRanker {
|
|
526
|
+
/**
|
|
527
|
+
* The impact factor for RRF scoring. Higher values give more weight to
|
|
528
|
+
* higher-ranked results. Must be greater than 0. Default of 60 is from the
|
|
529
|
+
* original RRF paper (Cormack et al., 2009).
|
|
530
|
+
*/
|
|
531
|
+
impact_factor: number;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* The type of ranker, always "rrf"
|
|
535
|
+
*/
|
|
536
|
+
type: 'rrf';
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Weighted ranker configuration that combines vector and keyword scores.
|
|
541
|
+
*/
|
|
542
|
+
export interface WeightedRanker {
|
|
543
|
+
/**
|
|
544
|
+
* Weight factor between 0 and 1. 0 means only use keyword scores, 1 means only use
|
|
545
|
+
* vector scores, values in between blend both scores.
|
|
546
|
+
*/
|
|
547
|
+
alpha: number;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The type of ranker, always "weighted"
|
|
551
|
+
*/
|
|
552
|
+
type: 'weighted';
|
|
553
|
+
}
|
|
513
554
|
}
|
|
514
555
|
|
|
515
556
|
export type QueryGeneratorConfig =
|
|
@@ -31,19 +31,35 @@ export interface QueryChunksResponse {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export namespace QueryChunksResponse {
|
|
34
|
+
/**
|
|
35
|
+
* A chunk of content that can be inserted into a vector database.
|
|
36
|
+
*/
|
|
34
37
|
export interface Chunk {
|
|
35
38
|
/**
|
|
36
|
-
*
|
|
39
|
+
* The content of the chunk, which can be interleaved text, images, or other types.
|
|
37
40
|
*/
|
|
38
41
|
content: Shared.InterleavedContent;
|
|
39
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Metadata associated with the chunk, such as document ID, source, or other
|
|
45
|
+
* relevant information.
|
|
46
|
+
*/
|
|
40
47
|
metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Optional embedding for the chunk. If not provided, it will be computed later.
|
|
51
|
+
*/
|
|
52
|
+
embedding?: Array<number>;
|
|
41
53
|
}
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
export interface VectorIoInsertParams {
|
|
45
57
|
/**
|
|
46
|
-
* The chunks to insert.
|
|
58
|
+
* The chunks to insert. Each `Chunk` should contain content which can be
|
|
59
|
+
* interleaved text, images, or other types. `metadata`: `dict[str, Any]` and
|
|
60
|
+
* `embedding`: `List[float]` are optional. If `metadata` is provided, you
|
|
61
|
+
* configure how Llama Stack formats the chunk during generation. If `embedding` is
|
|
62
|
+
* not provided, it will be computed later.
|
|
47
63
|
*/
|
|
48
64
|
chunks: Array<VectorIoInsertParams.Chunk>;
|
|
49
65
|
|
|
@@ -59,13 +75,25 @@ export interface VectorIoInsertParams {
|
|
|
59
75
|
}
|
|
60
76
|
|
|
61
77
|
export namespace VectorIoInsertParams {
|
|
78
|
+
/**
|
|
79
|
+
* A chunk of content that can be inserted into a vector database.
|
|
80
|
+
*/
|
|
62
81
|
export interface Chunk {
|
|
63
82
|
/**
|
|
64
|
-
*
|
|
83
|
+
* The content of the chunk, which can be interleaved text, images, or other types.
|
|
65
84
|
*/
|
|
66
85
|
content: Shared.InterleavedContent;
|
|
67
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Metadata associated with the chunk, such as document ID, source, or other
|
|
89
|
+
* relevant information.
|
|
90
|
+
*/
|
|
68
91
|
metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Optional embedding for the chunk. If not provided, it will be computed later.
|
|
95
|
+
*/
|
|
96
|
+
embedding?: Array<number>;
|
|
69
97
|
}
|
|
70
98
|
}
|
|
71
99
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Files extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Attach a file to a vector store.
|
|
9
|
+
*/
|
|
10
|
+
create(
|
|
11
|
+
vectorStoreId: string,
|
|
12
|
+
body: FileCreateParams,
|
|
13
|
+
options?: Core.RequestOptions,
|
|
14
|
+
): Core.APIPromise<VectorStoreFile> {
|
|
15
|
+
return this._client.post(`/v1/openai/v1/vector_stores/${vectorStoreId}/files`, { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* OpenAI Vector Store File object.
|
|
21
|
+
*/
|
|
22
|
+
export interface VectorStoreFile {
|
|
23
|
+
id: string;
|
|
24
|
+
|
|
25
|
+
attributes: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
26
|
+
|
|
27
|
+
chunking_strategy:
|
|
28
|
+
| VectorStoreFile.VectorStoreChunkingStrategyAuto
|
|
29
|
+
| VectorStoreFile.VectorStoreChunkingStrategyStatic;
|
|
30
|
+
|
|
31
|
+
created_at: number;
|
|
32
|
+
|
|
33
|
+
object: string;
|
|
34
|
+
|
|
35
|
+
status: 'completed' | 'in_progress' | 'cancelled' | 'failed';
|
|
36
|
+
|
|
37
|
+
usage_bytes: number;
|
|
38
|
+
|
|
39
|
+
vector_store_id: string;
|
|
40
|
+
|
|
41
|
+
last_error?: VectorStoreFile.LastError;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace VectorStoreFile {
|
|
45
|
+
export interface VectorStoreChunkingStrategyAuto {
|
|
46
|
+
type: 'auto';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface VectorStoreChunkingStrategyStatic {
|
|
50
|
+
static: VectorStoreChunkingStrategyStatic.Static;
|
|
51
|
+
|
|
52
|
+
type: 'static';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace VectorStoreChunkingStrategyStatic {
|
|
56
|
+
export interface Static {
|
|
57
|
+
chunk_overlap_tokens: number;
|
|
58
|
+
|
|
59
|
+
max_chunk_size_tokens: number;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface LastError {
|
|
64
|
+
code: 'server_error' | 'rate_limit_exceeded';
|
|
65
|
+
|
|
66
|
+
message: string;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface FileCreateParams {
|
|
71
|
+
/**
|
|
72
|
+
* The ID of the file to attach to the vector store.
|
|
73
|
+
*/
|
|
74
|
+
file_id: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The key-value attributes stored with the file, which can be used for filtering.
|
|
78
|
+
*/
|
|
79
|
+
attributes?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The chunking strategy to use for the file.
|
|
83
|
+
*/
|
|
84
|
+
chunking_strategy?:
|
|
85
|
+
| FileCreateParams.VectorStoreChunkingStrategyAuto
|
|
86
|
+
| FileCreateParams.VectorStoreChunkingStrategyStatic;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export namespace FileCreateParams {
|
|
90
|
+
export interface VectorStoreChunkingStrategyAuto {
|
|
91
|
+
type: 'auto';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface VectorStoreChunkingStrategyStatic {
|
|
95
|
+
static: VectorStoreChunkingStrategyStatic.Static;
|
|
96
|
+
|
|
97
|
+
type: 'static';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export namespace VectorStoreChunkingStrategyStatic {
|
|
101
|
+
export interface Static {
|
|
102
|
+
chunk_overlap_tokens: number;
|
|
103
|
+
|
|
104
|
+
max_chunk_size_tokens: number;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare namespace Files {
|
|
110
|
+
export { type VectorStoreFile as VectorStoreFile, type FileCreateParams as FileCreateParams };
|
|
111
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Files, type VectorStoreFile, type FileCreateParams } from './files';
|
|
4
|
+
export {
|
|
5
|
+
VectorStores,
|
|
6
|
+
type ListVectorStoresResponse,
|
|
7
|
+
type VectorStore,
|
|
8
|
+
type VectorStoreDeleteResponse,
|
|
9
|
+
type VectorStoreSearchResponse,
|
|
10
|
+
type VectorStoreCreateParams,
|
|
11
|
+
type VectorStoreUpdateParams,
|
|
12
|
+
type VectorStoreListParams,
|
|
13
|
+
type VectorStoreSearchParams,
|
|
14
|
+
} from './vector-stores';
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as FilesAPI from './files';
|
|
7
|
+
import { FileCreateParams, Files, VectorStoreFile } from './files';
|
|
8
|
+
|
|
9
|
+
export class VectorStores extends APIResource {
|
|
10
|
+
files: FilesAPI.Files = new FilesAPI.Files(this._client);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates a vector store.
|
|
14
|
+
*/
|
|
15
|
+
create(body: VectorStoreCreateParams, options?: Core.RequestOptions): Core.APIPromise<VectorStore> {
|
|
16
|
+
return this._client.post('/v1/openai/v1/vector_stores', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a vector store.
|
|
21
|
+
*/
|
|
22
|
+
retrieve(vectorStoreId: string, options?: Core.RequestOptions): Core.APIPromise<VectorStore> {
|
|
23
|
+
return this._client.get(`/v1/openai/v1/vector_stores/${vectorStoreId}`, options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Updates a vector store.
|
|
28
|
+
*/
|
|
29
|
+
update(
|
|
30
|
+
vectorStoreId: string,
|
|
31
|
+
body: VectorStoreUpdateParams,
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): Core.APIPromise<VectorStore> {
|
|
34
|
+
return this._client.post(`/v1/openai/v1/vector_stores/${vectorStoreId}`, { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns a list of vector stores.
|
|
39
|
+
*/
|
|
40
|
+
list(
|
|
41
|
+
query?: VectorStoreListParams,
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Core.APIPromise<ListVectorStoresResponse>;
|
|
44
|
+
list(options?: Core.RequestOptions): Core.APIPromise<ListVectorStoresResponse>;
|
|
45
|
+
list(
|
|
46
|
+
query: VectorStoreListParams | Core.RequestOptions = {},
|
|
47
|
+
options?: Core.RequestOptions,
|
|
48
|
+
): Core.APIPromise<ListVectorStoresResponse> {
|
|
49
|
+
if (isRequestOptions(query)) {
|
|
50
|
+
return this.list({}, query);
|
|
51
|
+
}
|
|
52
|
+
return this._client.get('/v1/openai/v1/vector_stores', { query, ...options });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Delete a vector store.
|
|
57
|
+
*/
|
|
58
|
+
delete(vectorStoreId: string, options?: Core.RequestOptions): Core.APIPromise<VectorStoreDeleteResponse> {
|
|
59
|
+
return this._client.delete(`/v1/openai/v1/vector_stores/${vectorStoreId}`, options);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Search for chunks in a vector store. Searches a vector store for relevant chunks
|
|
64
|
+
* based on a query and optional file attribute filters.
|
|
65
|
+
*/
|
|
66
|
+
search(
|
|
67
|
+
vectorStoreId: string,
|
|
68
|
+
body: VectorStoreSearchParams,
|
|
69
|
+
options?: Core.RequestOptions,
|
|
70
|
+
): Core.APIPromise<VectorStoreSearchResponse> {
|
|
71
|
+
return this._client.post(`/v1/openai/v1/vector_stores/${vectorStoreId}/search`, { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Response from listing vector stores.
|
|
77
|
+
*/
|
|
78
|
+
export interface ListVectorStoresResponse {
|
|
79
|
+
data: Array<VectorStore>;
|
|
80
|
+
|
|
81
|
+
has_more: boolean;
|
|
82
|
+
|
|
83
|
+
object: string;
|
|
84
|
+
|
|
85
|
+
first_id?: string;
|
|
86
|
+
|
|
87
|
+
last_id?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* OpenAI Vector Store object.
|
|
92
|
+
*/
|
|
93
|
+
export interface VectorStore {
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
created_at: number;
|
|
97
|
+
|
|
98
|
+
file_counts: Record<string, number>;
|
|
99
|
+
|
|
100
|
+
metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
101
|
+
|
|
102
|
+
object: string;
|
|
103
|
+
|
|
104
|
+
status: string;
|
|
105
|
+
|
|
106
|
+
usage_bytes: number;
|
|
107
|
+
|
|
108
|
+
expires_after?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
109
|
+
|
|
110
|
+
expires_at?: number;
|
|
111
|
+
|
|
112
|
+
last_active_at?: number;
|
|
113
|
+
|
|
114
|
+
name?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Response from deleting a vector store.
|
|
119
|
+
*/
|
|
120
|
+
export interface VectorStoreDeleteResponse {
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
deleted: boolean;
|
|
124
|
+
|
|
125
|
+
object: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Response from searching a vector store.
|
|
130
|
+
*/
|
|
131
|
+
export interface VectorStoreSearchResponse {
|
|
132
|
+
data: Array<VectorStoreSearchResponse.Data>;
|
|
133
|
+
|
|
134
|
+
has_more: boolean;
|
|
135
|
+
|
|
136
|
+
object: string;
|
|
137
|
+
|
|
138
|
+
search_query: string;
|
|
139
|
+
|
|
140
|
+
next_page?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export namespace VectorStoreSearchResponse {
|
|
144
|
+
/**
|
|
145
|
+
* Response from searching a vector store.
|
|
146
|
+
*/
|
|
147
|
+
export interface Data {
|
|
148
|
+
content: Array<Data.Content>;
|
|
149
|
+
|
|
150
|
+
file_id: string;
|
|
151
|
+
|
|
152
|
+
filename: string;
|
|
153
|
+
|
|
154
|
+
score: number;
|
|
155
|
+
|
|
156
|
+
attributes?: Record<string, string | number | boolean>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export namespace Data {
|
|
160
|
+
export interface Content {
|
|
161
|
+
text: string;
|
|
162
|
+
|
|
163
|
+
type: 'text';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface VectorStoreCreateParams {
|
|
169
|
+
/**
|
|
170
|
+
* A name for the vector store.
|
|
171
|
+
*/
|
|
172
|
+
name: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
176
|
+
* strategy.
|
|
177
|
+
*/
|
|
178
|
+
chunking_strategy?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The dimension of the embedding vectors (default: 384).
|
|
182
|
+
*/
|
|
183
|
+
embedding_dimension?: number;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The embedding model to use for this vector store.
|
|
187
|
+
*/
|
|
188
|
+
embedding_model?: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The expiration policy for a vector store.
|
|
192
|
+
*/
|
|
193
|
+
expires_after?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* A list of File IDs that the vector store should use. Useful for tools like
|
|
197
|
+
* `file_search` that can access files.
|
|
198
|
+
*/
|
|
199
|
+
file_ids?: Array<string>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Set of 16 key-value pairs that can be attached to an object.
|
|
203
|
+
*/
|
|
204
|
+
metadata?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The ID of the provider to use for this vector store.
|
|
208
|
+
*/
|
|
209
|
+
provider_id?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The provider-specific vector database ID.
|
|
213
|
+
*/
|
|
214
|
+
provider_vector_db_id?: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface VectorStoreUpdateParams {
|
|
218
|
+
/**
|
|
219
|
+
* The expiration policy for a vector store.
|
|
220
|
+
*/
|
|
221
|
+
expires_after?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Set of 16 key-value pairs that can be attached to an object.
|
|
225
|
+
*/
|
|
226
|
+
metadata?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The name of the vector store.
|
|
230
|
+
*/
|
|
231
|
+
name?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface VectorStoreListParams {
|
|
235
|
+
/**
|
|
236
|
+
* A cursor for use in pagination. `after` is an object ID that defines your place
|
|
237
|
+
* in the list.
|
|
238
|
+
*/
|
|
239
|
+
after?: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
243
|
+
* in the list.
|
|
244
|
+
*/
|
|
245
|
+
before?: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and
|
|
249
|
+
* 100, and the default is 20.
|
|
250
|
+
*/
|
|
251
|
+
limit?: number;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
255
|
+
* order and `desc` for descending order.
|
|
256
|
+
*/
|
|
257
|
+
order?: string;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface VectorStoreSearchParams {
|
|
261
|
+
/**
|
|
262
|
+
* The query string or array for performing the search.
|
|
263
|
+
*/
|
|
264
|
+
query: string | Array<string>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Filters based on file attributes to narrow the search results.
|
|
268
|
+
*/
|
|
269
|
+
filters?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Maximum number of results to return (1 to 50 inclusive, default 10).
|
|
273
|
+
*/
|
|
274
|
+
max_num_results?: number;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Ranking options for fine-tuning the search results.
|
|
278
|
+
*/
|
|
279
|
+
ranking_options?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Whether to rewrite the natural language query for vector search (default false)
|
|
283
|
+
*/
|
|
284
|
+
rewrite_query?: boolean;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
VectorStores.Files = Files;
|
|
288
|
+
|
|
289
|
+
export declare namespace VectorStores {
|
|
290
|
+
export {
|
|
291
|
+
type ListVectorStoresResponse as ListVectorStoresResponse,
|
|
292
|
+
type VectorStore as VectorStore,
|
|
293
|
+
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
|
|
294
|
+
type VectorStoreSearchResponse as VectorStoreSearchResponse,
|
|
295
|
+
type VectorStoreCreateParams as VectorStoreCreateParams,
|
|
296
|
+
type VectorStoreUpdateParams as VectorStoreUpdateParams,
|
|
297
|
+
type VectorStoreListParams as VectorStoreListParams,
|
|
298
|
+
type VectorStoreSearchParams as VectorStoreSearchParams,
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export {
|
|
302
|
+
Files as Files,
|
|
303
|
+
type VectorStoreFile as VectorStoreFile,
|
|
304
|
+
type FileCreateParams as FileCreateParams,
|
|
305
|
+
};
|
|
306
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.11rc1';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.2.
|
|
1
|
+
export declare const VERSION = "0.2.11rc1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.11rc1';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"}
|