chromadb 1.9.3 → 1.10.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/dist/chromadb.d.ts +3 -9
- package/dist/chromadb.legacy-esm.js +4 -2
- package/dist/chromadb.mjs +4 -2
- package/dist/chromadb.mjs.map +1 -1
- package/dist/cjs/chromadb.cjs +5 -2
- package/dist/cjs/chromadb.cjs.map +1 -1
- package/dist/cjs/chromadb.d.cts +3 -9
- package/package.json +1 -1
- package/src/ChromaClient.ts +5 -4
- package/src/index.ts +1 -1
- package/src/types.ts +0 -7
package/dist/chromadb.d.ts
CHANGED
|
@@ -58,12 +58,6 @@ type WhereDocumentOperator = "$contains" | "$not_contains" | LogicalOperator;
|
|
|
58
58
|
type WhereDocument = {
|
|
59
59
|
[key in WhereDocumentOperator]?: LiteralValue | LiteralNumber | WhereDocument[];
|
|
60
60
|
};
|
|
61
|
-
type CollectionType = {
|
|
62
|
-
name: string;
|
|
63
|
-
id: string;
|
|
64
|
-
metadata: Metadata | null;
|
|
65
|
-
configuration_json: any;
|
|
66
|
-
};
|
|
67
61
|
type MultiGetResponse = {
|
|
68
62
|
ids: IDs;
|
|
69
63
|
embeddings: Embeddings | null;
|
|
@@ -1253,7 +1247,7 @@ declare class ChromaClient {
|
|
|
1253
1247
|
/**
|
|
1254
1248
|
* Lists all collections.
|
|
1255
1249
|
*
|
|
1256
|
-
* @returns {Promise<
|
|
1250
|
+
* @returns {Promise<string[]>} A promise that resolves to a list of collection names.
|
|
1257
1251
|
* @param {PositiveInteger} [params.limit] - Optional limit on the number of items to get.
|
|
1258
1252
|
* @param {PositiveInteger} [params.offset] - Optional offset on the items to get.
|
|
1259
1253
|
* @throws {Error} If there is an issue listing the collections.
|
|
@@ -1266,7 +1260,7 @@ declare class ChromaClient {
|
|
|
1266
1260
|
* });
|
|
1267
1261
|
* ```
|
|
1268
1262
|
*/
|
|
1269
|
-
listCollections({ limit, offset }?: ListCollectionsParams): Promise<
|
|
1263
|
+
listCollections({ limit, offset }?: ListCollectionsParams): Promise<string[]>;
|
|
1270
1264
|
/**
|
|
1271
1265
|
* Counts all collections.
|
|
1272
1266
|
*
|
|
@@ -1620,4 +1614,4 @@ declare class OllamaEmbeddingFunction implements IEmbeddingFunction {
|
|
|
1620
1614
|
generate(texts: string[]): Promise<number[][]>;
|
|
1621
1615
|
}
|
|
1622
1616
|
|
|
1623
|
-
export { AddRecordsParams, AdminClient, ChromaClient, ChromaClientParams, CloudClient, CohereEmbeddingFunction, CollectionMetadata, CollectionParams,
|
|
1617
|
+
export { AddRecordsParams, AdminClient, ChromaClient, ChromaClientParams, CloudClient, CohereEmbeddingFunction, Collection, CollectionMetadata, CollectionParams, CreateCollectionParams, DefaultEmbeddingFunction, DeleteCollectionParams, DeleteParams, Document, Documents, Embedding, Embeddings, GetCollectionParams, GetOrCreateCollectionParams, GetParams, GetResponse, GoogleGenerativeAiEmbeddingFunction, HuggingFaceEmbeddingServerFunction, ID, IDs, IEmbeddingFunction, IncludeEnum, JinaEmbeddingFunction, ListCollectionsParams, Metadata, Metadatas, ModifyCollectionParams, OllamaEmbeddingFunction, OpenAIEmbeddingFunction, PeekParams, QueryRecordsParams, QueryResponse, TransformersEmbeddingFunction, UpdateRecordsParams, UpsertRecordsParams, Where, WhereDocument };
|
|
@@ -4438,7 +4438,7 @@ var ChromaClient = class {
|
|
|
4438
4438
|
/**
|
|
4439
4439
|
* Lists all collections.
|
|
4440
4440
|
*
|
|
4441
|
-
* @returns {Promise<
|
|
4441
|
+
* @returns {Promise<string[]>} A promise that resolves to a list of collection names.
|
|
4442
4442
|
* @param {PositiveInteger} [params.limit] - Optional limit on the number of items to get.
|
|
4443
4443
|
* @param {PositiveInteger} [params.offset] - Optional offset on the items to get.
|
|
4444
4444
|
* @throws {Error} If there is an issue listing the collections.
|
|
@@ -4453,13 +4453,14 @@ var ChromaClient = class {
|
|
|
4453
4453
|
*/
|
|
4454
4454
|
async listCollections({ limit, offset } = {}) {
|
|
4455
4455
|
await this.init();
|
|
4456
|
-
|
|
4456
|
+
const collections = await this.api.listCollections(
|
|
4457
4457
|
this.tenant,
|
|
4458
4458
|
this.database,
|
|
4459
4459
|
limit,
|
|
4460
4460
|
offset,
|
|
4461
4461
|
this.api.options
|
|
4462
4462
|
);
|
|
4463
|
+
return collections.map((collection) => collection.name);
|
|
4463
4464
|
}
|
|
4464
4465
|
/**
|
|
4465
4466
|
* Counts all collections.
|
|
@@ -4980,6 +4981,7 @@ export {
|
|
|
4980
4981
|
ChromaClient,
|
|
4981
4982
|
CloudClient,
|
|
4982
4983
|
CohereEmbeddingFunction,
|
|
4984
|
+
Collection,
|
|
4983
4985
|
DefaultEmbeddingFunction,
|
|
4984
4986
|
GoogleGenerativeAiEmbeddingFunction,
|
|
4985
4987
|
HuggingFaceEmbeddingServerFunction,
|
package/dist/chromadb.mjs
CHANGED
|
@@ -4438,7 +4438,7 @@ var ChromaClient = class {
|
|
|
4438
4438
|
/**
|
|
4439
4439
|
* Lists all collections.
|
|
4440
4440
|
*
|
|
4441
|
-
* @returns {Promise<
|
|
4441
|
+
* @returns {Promise<string[]>} A promise that resolves to a list of collection names.
|
|
4442
4442
|
* @param {PositiveInteger} [params.limit] - Optional limit on the number of items to get.
|
|
4443
4443
|
* @param {PositiveInteger} [params.offset] - Optional offset on the items to get.
|
|
4444
4444
|
* @throws {Error} If there is an issue listing the collections.
|
|
@@ -4453,13 +4453,14 @@ var ChromaClient = class {
|
|
|
4453
4453
|
*/
|
|
4454
4454
|
async listCollections({ limit, offset } = {}) {
|
|
4455
4455
|
await this.init();
|
|
4456
|
-
|
|
4456
|
+
const collections = await this.api.listCollections(
|
|
4457
4457
|
this.tenant,
|
|
4458
4458
|
this.database,
|
|
4459
4459
|
limit,
|
|
4460
4460
|
offset,
|
|
4461
4461
|
this.api.options
|
|
4462
4462
|
);
|
|
4463
|
+
return collections.map((collection) => collection.name);
|
|
4463
4464
|
}
|
|
4464
4465
|
/**
|
|
4465
4466
|
* Counts all collections.
|
|
@@ -4980,6 +4981,7 @@ export {
|
|
|
4980
4981
|
ChromaClient,
|
|
4981
4982
|
CloudClient,
|
|
4982
4983
|
CohereEmbeddingFunction,
|
|
4984
|
+
Collection,
|
|
4983
4985
|
DefaultEmbeddingFunction,
|
|
4984
4986
|
GoogleGenerativeAiEmbeddingFunction,
|
|
4985
4987
|
HuggingFaceEmbeddingServerFunction,
|