import { IEmbeddingFunction } from './embeddings/IEmbeddingFunction'; import { Api } from "./generated"; import { Collection } from './Collection'; import { CollectionMetadata, CollectionType } from './types'; export declare class ChromaClient { /** * @ignore */ private api; /** * Creates a new ChromaClient instance. * @param {Object} params - The parameters for creating a new client * @param {string} [params.path] - The base path for the Chroma API. * @returns {ChromaClient} A new ChromaClient instance. * * @example * ```typescript * const client = new ChromaClient({ * path: "http://localhost:27018" * }); * ``` */ constructor({ path }?: { path?: string; }); /** * Resets the state of the object by making an API call to the reset endpoint. * * @returns {Promise} A promise that resolves when the reset operation is complete. * @throws {Error} If there is an issue resetting the state. * * @example * ```typescript * await client.reset(); * ``` */ reset(): Promise; /** * Returns the version of the Chroma API. * @returns {Promise} A promise that resolves to the version of the Chroma API. * * @example * ```typescript * const version = await client.version(); * ``` */ version(): Promise; /** * Returns a heartbeat from the Chroma API. * @returns {Promise} A promise that resolves to the heartbeat from the Chroma API. * * @example * ```typescript * const heartbeat = await client.heartbeat(); * ``` */ heartbeat(): Promise; /** * @ignore */ persist(): Promise; /** * Creates a new collection with the specified properties. * * @param {Object} params - The parameters for creating a new collection. * @param {string} params.name - The name of the collection. * @param {CollectionMetadata} [params.metadata] - Optional metadata associated with the collection. * @param {IEmbeddingFunction} [params.embeddingFunction] - Optional custom embedding function for the collection. * * @returns {Promise} A promise that resolves to the created collection. * @throws {Error} If there is an issue creating the collection. * * @example * ```typescript * const collection = await client.createCollection({ * name: "my_collection", * metadata: { * "description": "My first collection" * } * }); * ``` */ createCollection({ name, metadata, embeddingFunction }: { name: string; metadata?: CollectionMetadata; embeddingFunction?: IEmbeddingFunction; }): Promise; /** * Gets or creates a collection with the specified properties. * * @param {Object} params - The parameters for creating a new collection. * @param {string} params.name - The name of the collection. * @param {CollectionMetadata} [params.metadata] - Optional metadata associated with the collection. * @param {IEmbeddingFunction} [params.embeddingFunction] - Optional custom embedding function for the collection. * * @returns {Promise} A promise that resolves to the got or created collection. * @throws {Error} If there is an issue getting or creating the collection. * * @example * ```typescript * const collection = await client.getOrCreateCollection({ * name: "my_collection", * metadata: { * "description": "My first collection" * } * }); * ``` */ getOrCreateCollection({ name, metadata, embeddingFunction }: { name: string; metadata?: CollectionMetadata; embeddingFunction?: IEmbeddingFunction; }): Promise; /** * Lists all collections. * * @returns {Promise} A promise that resolves to a list of collection names. * @throws {Error} If there is an issue listing the collections. * * @example * ```typescript * const collections = await client.listCollections(); * ``` */ listCollections(): Promise; /** * Gets a collection with the specified name. * @param {Object} params - The parameters for getting a collection. * @param {string} params.name - The name of the collection. * @param {IEmbeddingFunction} [params.embeddingFunction] - Optional custom embedding function for the collection. * @returns {Promise} A promise that resolves to the collection. * @throws {Error} If there is an issue getting the collection. * * @example * ```typescript * const collection = await client.getCollection({ * name: "my_collection" * }); * ``` */ getCollection({ name, embeddingFunction }: { name: string; embeddingFunction?: IEmbeddingFunction; }): Promise; /** * Deletes a collection with the specified name. * @param {Object} params - The parameters for deleting a collection. * @param {string} params.name - The name of the collection. * @returns {Promise} A promise that resolves when the collection is deleted. * @throws {Error} If there is an issue deleting the collection. * * @example * ```typescript * await client.deleteCollection({ * name: "my_collection" * }); * ``` */ deleteCollection({ name }: { name: string; }): Promise; } //# sourceMappingURL=ChromaClient.d.ts.map