From b7f6501f3cf0d6b73c4f796d9ec920ec76c5c5fa Mon Sep 17 00:00:00 2001 From: Itai Smith Date: Wed, 20 Nov 2024 15:01:06 -0800 Subject: [PATCH] Export Collection type directly --- clients/js/src/ChromaClient.ts | 2 +- clients/js/src/index.ts | 2 +- clients/js/src/types.ts | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/clients/js/src/ChromaClient.ts b/clients/js/src/ChromaClient.ts index 415d72193a12..0df49dbe98a2 100644 --- a/clients/js/src/ChromaClient.ts +++ b/clients/js/src/ChromaClient.ts @@ -290,7 +290,7 @@ export class ChromaClient { /** * Lists all collections. * - * @returns {Promise} A promise that resolves to a list of collection names. + * @returns {Promise} A promise that resolves to a list of collection names. * @param {PositiveInteger} [params.limit] - Optional limit on the number of items to get. * @param {PositiveInteger} [params.offset] - Optional offset on the items to get. * @throws {Error} If there is an issue listing the collections. diff --git a/clients/js/src/index.ts b/clients/js/src/index.ts index 36c439ead7ba..fe9e64e2f185 100644 --- a/clients/js/src/index.ts +++ b/clients/js/src/index.ts @@ -1,6 +1,7 @@ export { ChromaClient } from "./ChromaClient"; export { AdminClient } from "./AdminClient"; export { CloudClient } from "./CloudClient"; +export { Collection } from "./Collection"; export type { IEmbeddingFunction } from "./embeddings/IEmbeddingFunction"; export { OpenAIEmbeddingFunction } from "./embeddings/OpenAIEmbeddingFunction"; export { CohereEmbeddingFunction } from "./embeddings/CohereEmbeddingFunction"; @@ -14,7 +15,6 @@ export { OllamaEmbeddingFunction } from "./embeddings/OllamaEmbeddingFunction"; export type { IncludeEnum, GetParams, - CollectionType, CollectionMetadata, Embedding, Embeddings, diff --git a/clients/js/src/types.ts b/clients/js/src/types.ts index 88ffa29da92d..67487b730498 100644 --- a/clients/js/src/types.ts +++ b/clients/js/src/types.ts @@ -54,13 +54,6 @@ export type WhereDocument = { | WhereDocument[]; }; -export type CollectionType = { - name: string; - id: string; - metadata: Metadata | null; - configuration_json: any; -}; - export type MultiGetResponse = { ids: IDs; embeddings: Embeddings | null;