chromadb 2.3.0 → 2.4.2

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.
@@ -301,35 +301,35 @@ declare namespace Api {
301
301
  }
302
302
  interface HnswConfiguration {
303
303
  /**
304
- * @type {number}
304
+ * @type {number | null}
305
305
  * @memberof HnswConfiguration
306
306
  * minimum: 0
307
307
  */
308
- ef_construction?: number;
308
+ ef_construction?: number | null;
309
309
  /**
310
- * @type {number}
310
+ * @type {number | null}
311
311
  * @memberof HnswConfiguration
312
312
  * minimum: 0
313
313
  */
314
- ef_search?: number;
314
+ ef_search?: number | null;
315
315
  /**
316
- * @type {number}
316
+ * @type {number | null}
317
317
  * @memberof HnswConfiguration
318
318
  * minimum: 0
319
319
  */
320
- max_neighbors?: number;
320
+ max_neighbors?: number | null;
321
321
  /**
322
- * @type {number}
322
+ * @type {number | null}
323
323
  * @memberof HnswConfiguration
324
324
  */
325
- resize_factor?: number;
325
+ resize_factor?: number | null;
326
326
  space?: Api.HnswSpace;
327
327
  /**
328
- * @type {number}
328
+ * @type {number | null}
329
329
  * @memberof HnswConfiguration
330
330
  * minimum: 0
331
331
  */
332
- sync_threshold?: number;
332
+ sync_threshold?: number | null;
333
333
  }
334
334
  enum HnswSpace {
335
335
  L2 = "l2",
@@ -371,54 +371,54 @@ declare namespace Api {
371
371
  }
372
372
  interface SpannConfiguration {
373
373
  /**
374
- * @type {number}
374
+ * @type {number | null}
375
375
  * @memberof SpannConfiguration
376
376
  * minimum: 0
377
377
  */
378
- ef_construction?: number;
378
+ ef_construction?: number | null;
379
379
  /**
380
- * @type {number}
380
+ * @type {number | null}
381
381
  * @memberof SpannConfiguration
382
382
  * minimum: 0
383
383
  */
384
- ef_search?: number;
384
+ ef_search?: number | null;
385
385
  /**
386
- * @type {number}
386
+ * @type {number | null}
387
387
  * @memberof SpannConfiguration
388
388
  * minimum: 0
389
389
  */
390
- max_neighbors?: number;
390
+ max_neighbors?: number | null;
391
391
  /**
392
- * @type {number}
392
+ * @type {number | null}
393
393
  * @memberof SpannConfiguration
394
394
  * minimum: 0
395
395
  */
396
- merge_threshold?: number;
396
+ merge_threshold?: number | null;
397
397
  /**
398
- * @type {number}
398
+ * @type {number | null}
399
399
  * @memberof SpannConfiguration
400
400
  * minimum: 0
401
401
  */
402
- reassign_neighbor_count?: number;
402
+ reassign_neighbor_count?: number | null;
403
403
  /**
404
- * @type {number}
404
+ * @type {number | null}
405
405
  * @memberof SpannConfiguration
406
406
  * minimum: 0
407
407
  */
408
- search_nprobe?: number;
408
+ search_nprobe?: number | null;
409
409
  space?: Api.HnswSpace;
410
410
  /**
411
- * @type {number}
411
+ * @type {number | null}
412
412
  * @memberof SpannConfiguration
413
413
  * minimum: 0
414
414
  */
415
- split_threshold?: number;
415
+ split_threshold?: number | null;
416
416
  /**
417
- * @type {number}
417
+ * @type {number | null}
418
418
  * @memberof SpannConfiguration
419
419
  * minimum: 0
420
420
  */
421
- write_nprobe?: number;
421
+ write_nprobe?: number | null;
422
422
  }
423
423
  interface UpdateCollectionConfiguration {
424
424
  embedding_function?: Api.EmbeddingFunctionConfiguration | null;
@@ -968,6 +968,7 @@ type ForkCollectionParams = {
968
968
  newName: string;
969
969
  };
970
970
  type BaseQueryParams = {
971
+ ids?: ID | IDs;
971
972
  nResults?: PositiveInteger;
972
973
  where?: Where;
973
974
  queryTexts?: string | string[];
@@ -1122,6 +1123,7 @@ declare class Collection {
1122
1123
  * @param {string | string[]} [params.queryTexts] - Optional query text(s) to search for in the collection.
1123
1124
  * @param {WhereDocument} [params.whereDocument] - Optional query condition to filter results based on document content.
1124
1125
  * @param {IncludeEnum[]} [params.include] - Optional array of fields to include in the result, such as "metadata" and "document".
1126
+ * @param {IDs} [params.ids] - Optional IDs to filter on before querying.
1125
1127
  *
1126
1128
  * @returns {Promise<QueryResponse>} A promise that resolves to the query results.
1127
1129
  * @throws {Error} If there is an issue executing the query.
@@ -1145,7 +1147,7 @@ declare class Collection {
1145
1147
  * ```
1146
1148
  *
1147
1149
  */
1148
- query({ nResults, where, whereDocument, include, queryTexts, queryEmbeddings, }: QueryRecordsParams): Promise<MultiQueryResponse>;
1150
+ query({ nResults, where, whereDocument, include, queryTexts, queryEmbeddings, ids, }: QueryRecordsParams): Promise<MultiQueryResponse>;
1149
1151
  /**
1150
1152
  * Modify the collection name or metadata
1151
1153
  * @param {Object} params - The parameters for the query.
@@ -1633,7 +1635,7 @@ declare class CloudClient extends ChromaClient {
1633
1635
  constructor({ apiKey, database, tenant, cloudHost, cloudPort, }: CloudClientParams);
1634
1636
  }
1635
1637
 
1636
- interface StoredConfig$8 {
1638
+ interface StoredConfig$a {
1637
1639
  model_name: string;
1638
1640
  api_key_env_var: string;
1639
1641
  }
@@ -1661,15 +1663,15 @@ declare class CohereEmbeddingFunction implements IEmbeddingFunction {
1661
1663
  });
1662
1664
  private initCohereClient;
1663
1665
  generate(texts: string[]): Promise<number[][]>;
1664
- buildFromConfig(config: StoredConfig$8): CohereEmbeddingFunction;
1665
- getConfig(): StoredConfig$8;
1666
- validateConfigUpdate(oldConfig: StoredConfig$8, newConfig: StoredConfig$8): void;
1667
- validateConfig(config: StoredConfig$8): void;
1666
+ buildFromConfig(config: StoredConfig$a): CohereEmbeddingFunction;
1667
+ getConfig(): StoredConfig$a;
1668
+ validateConfigUpdate(oldConfig: StoredConfig$a, newConfig: StoredConfig$a): void;
1669
+ validateConfig(config: StoredConfig$a): void;
1668
1670
  supportedSpaces(): EmbeddingFunctionSpace[];
1669
1671
  defaultSpace(): EmbeddingFunctionSpace;
1670
1672
  }
1671
1673
 
1672
- interface StoredConfig$7 {
1674
+ interface StoredConfig$9 {
1673
1675
  model_name: string;
1674
1676
  revision: string;
1675
1677
  quantized: boolean;
@@ -1697,10 +1699,10 @@ declare class DefaultEmbeddingFunction implements IEmbeddingFunction {
1697
1699
  progress_callback?: Function | null;
1698
1700
  });
1699
1701
  generate(texts: string[]): Promise<number[][]>;
1700
- getConfig(): StoredConfig$7;
1701
- buildFromConfig(config: StoredConfig$7): DefaultEmbeddingFunction;
1702
- validateConfigUpdate(oldConfig: StoredConfig$7, newConfig: StoredConfig$7): void;
1703
- validateConfig(config: StoredConfig$7): void;
1702
+ getConfig(): StoredConfig$9;
1703
+ buildFromConfig(config: StoredConfig$9): DefaultEmbeddingFunction;
1704
+ validateConfigUpdate(oldConfig: StoredConfig$9, newConfig: StoredConfig$9): void;
1705
+ validateConfig(config: StoredConfig$9): void;
1704
1706
  private loadClient;
1705
1707
  /** @ignore */
1706
1708
  static import(): Promise<{
@@ -1708,7 +1710,7 @@ declare class DefaultEmbeddingFunction implements IEmbeddingFunction {
1708
1710
  }>;
1709
1711
  }
1710
1712
 
1711
- interface StoredConfig$6 {
1713
+ interface StoredConfig$8 {
1712
1714
  api_key_env_var: string;
1713
1715
  model_name: string;
1714
1716
  task_type: string;
@@ -1732,29 +1734,34 @@ declare class GoogleGenerativeAiEmbeddingFunction implements IEmbeddingFunction
1732
1734
  static import(): Promise<{
1733
1735
  googleGenAi: typeof _google_generative_ai;
1734
1736
  }>;
1735
- buildFromConfig(config: StoredConfig$6): GoogleGenerativeAiEmbeddingFunction;
1736
- getConfig(): StoredConfig$6;
1737
+ buildFromConfig(config: StoredConfig$8): GoogleGenerativeAiEmbeddingFunction;
1738
+ getConfig(): StoredConfig$8;
1737
1739
  validateConfigUpdate(oldConfig: Record<string, any>, newConfig: Record<string, any>): void;
1738
1740
  validateConfig(config: Record<string, any>): void;
1739
1741
  }
1740
1742
 
1741
- type StoredConfig$5 = {
1743
+ type StoredConfig$7 = {
1742
1744
  url: string;
1745
+ api_key_env_var?: string;
1743
1746
  };
1744
1747
  declare class HuggingFaceEmbeddingServerFunction implements IEmbeddingFunction {
1745
1748
  name: string;
1746
1749
  private url;
1747
- constructor({ url }: {
1750
+ private api_key_env_var?;
1751
+ private headers?;
1752
+ constructor({ api_key, url, api_key_env_var, }: {
1748
1753
  url: string;
1754
+ api_key?: string;
1755
+ api_key_env_var?: string;
1749
1756
  });
1750
1757
  generate(texts: string[]): Promise<any>;
1751
- buildFromConfig(config: StoredConfig$5): HuggingFaceEmbeddingServerFunction;
1752
- getConfig(): StoredConfig$5;
1758
+ buildFromConfig(config: StoredConfig$7): HuggingFaceEmbeddingServerFunction;
1759
+ getConfig(): StoredConfig$7;
1753
1760
  validateConfigUpdate(oldConfig: Record<string, any>, newConfig: Record<string, any>): void;
1754
1761
  validateConfig(config: Record<string, any>): void;
1755
1762
  }
1756
1763
 
1757
- type StoredConfig$4 = {
1764
+ type StoredConfig$6 = {
1758
1765
  api_key_env_var: string;
1759
1766
  model_name: string;
1760
1767
  task?: string;
@@ -1788,12 +1795,12 @@ declare class JinaEmbeddingFunction implements IEmbeddingFunction {
1788
1795
  normalized?: boolean;
1789
1796
  });
1790
1797
  generate(texts: string[]): Promise<any[]>;
1791
- buildFromConfig(config: StoredConfig$4): JinaEmbeddingFunction;
1792
- getConfig(): StoredConfig$4;
1793
- validateConfig(config: StoredConfig$4): void;
1798
+ buildFromConfig(config: StoredConfig$6): JinaEmbeddingFunction;
1799
+ getConfig(): StoredConfig$6;
1800
+ validateConfig(config: StoredConfig$6): void;
1794
1801
  }
1795
1802
 
1796
- type StoredConfig$3 = {
1803
+ type StoredConfig$5 = {
1797
1804
  url: string;
1798
1805
  model_name: string;
1799
1806
  };
@@ -1812,12 +1819,12 @@ declare class OllamaEmbeddingFunction implements IEmbeddingFunction {
1812
1819
  ollama: typeof ollama;
1813
1820
  }>;
1814
1821
  generate(texts: string[]): Promise<any>;
1815
- buildFromConfig(config: StoredConfig$3): OllamaEmbeddingFunction;
1816
- getConfig(): StoredConfig$3;
1817
- validateConfig(config: StoredConfig$3): void;
1822
+ buildFromConfig(config: StoredConfig$5): OllamaEmbeddingFunction;
1823
+ getConfig(): StoredConfig$5;
1824
+ validateConfig(config: StoredConfig$5): void;
1818
1825
  }
1819
1826
 
1820
- type StoredConfig$2 = {
1827
+ type StoredConfig$4 = {
1821
1828
  api_key_env_var: string;
1822
1829
  model_name: string;
1823
1830
  organization_id: string;
@@ -1844,13 +1851,13 @@ declare class OpenAIEmbeddingFunction implements IEmbeddingFunction {
1844
1851
  openai: typeof openai;
1845
1852
  version: string;
1846
1853
  }>;
1847
- buildFromConfig(config: StoredConfig$2): OpenAIEmbeddingFunction;
1848
- getConfig(): StoredConfig$2;
1849
- validateConfigUpdate(oldConfig: StoredConfig$2, newConfig: StoredConfig$2): void;
1850
- validateConfig(config: StoredConfig$2): void;
1854
+ buildFromConfig(config: StoredConfig$4): OpenAIEmbeddingFunction;
1855
+ getConfig(): StoredConfig$4;
1856
+ validateConfigUpdate(oldConfig: StoredConfig$4, newConfig: StoredConfig$4): void;
1857
+ validateConfig(config: StoredConfig$4): void;
1851
1858
  }
1852
1859
 
1853
- type StoredConfig$1 = {
1860
+ type StoredConfig$3 = {
1854
1861
  model: string;
1855
1862
  revision: string;
1856
1863
  quantized: boolean;
@@ -1883,13 +1890,13 @@ declare class TransformersEmbeddingFunction implements IEmbeddingFunction {
1883
1890
  static import(): Promise<{
1884
1891
  pipeline: typeof _xenova_transformers;
1885
1892
  }>;
1886
- buildFromConfig(config: StoredConfig$1): TransformersEmbeddingFunction;
1887
- getConfig(): StoredConfig$1;
1888
- validateConfigUpdate(oldConfig: StoredConfig$1, newConfig: StoredConfig$1): void;
1889
- validateConfig(config: StoredConfig$1): void;
1893
+ buildFromConfig(config: StoredConfig$3): TransformersEmbeddingFunction;
1894
+ getConfig(): StoredConfig$3;
1895
+ validateConfigUpdate(oldConfig: StoredConfig$3, newConfig: StoredConfig$3): void;
1896
+ validateConfig(config: StoredConfig$3): void;
1890
1897
  }
1891
1898
 
1892
- type StoredConfig = {
1899
+ type StoredConfig$2 = {
1893
1900
  api_key_env_var: string;
1894
1901
  model_name: string;
1895
1902
  };
@@ -1906,9 +1913,56 @@ declare class VoyageAIEmbeddingFunction implements IEmbeddingFunction {
1906
1913
  });
1907
1914
  private initClient;
1908
1915
  generate(texts: string[]): Promise<number[][]>;
1909
- buildFromConfig(config: StoredConfig): VoyageAIEmbeddingFunction;
1916
+ buildFromConfig(config: StoredConfig$2): VoyageAIEmbeddingFunction;
1917
+ getConfig(): StoredConfig$2;
1918
+ validateConfigUpdate(oldConfig: StoredConfig$2, newConfig: StoredConfig$2): void;
1919
+ validateConfig(config: StoredConfig$2): void;
1920
+ }
1921
+
1922
+ type StoredConfig$1 = {
1923
+ account_id: string;
1924
+ model_name: string;
1925
+ api_key_env_var: string;
1926
+ gateway_id?: string;
1927
+ };
1928
+ declare class CloudflareWorkersAIEmbeddingFunction implements IEmbeddingFunction {
1929
+ name: string;
1930
+ private account_id;
1931
+ private model_name;
1932
+ private api_key_env_var;
1933
+ private gateway_id?;
1934
+ private api_url;
1935
+ private headers;
1936
+ constructor({ cloudflare_api_key, model_name, account_id, api_key_env_var, gateway_id, }: {
1937
+ cloudflare_api_key?: string;
1938
+ model_name: string;
1939
+ account_id: string;
1940
+ api_key_env_var: string;
1941
+ gateway_id?: string;
1942
+ });
1943
+ generate(texts: string[]): Promise<any>;
1944
+ buildFromConfig(config: StoredConfig$1): CloudflareWorkersAIEmbeddingFunction;
1945
+ getConfig(): StoredConfig$1;
1946
+ validateConfig(config: StoredConfig$1): void;
1947
+ }
1948
+
1949
+ type StoredConfig = {
1950
+ model_name: string;
1951
+ api_key_env_var: string;
1952
+ };
1953
+ declare class TogetherAIEmbeddingFunction implements IEmbeddingFunction {
1954
+ name: string;
1955
+ private model_name;
1956
+ private api_key_env_var;
1957
+ private headers;
1958
+ constructor({ together_ai_api_key, model_name, api_key_env_var, }: {
1959
+ together_ai_api_key?: string;
1960
+ model_name: string;
1961
+ api_key_env_var: string;
1962
+ });
1963
+ generate(texts: string[]): Promise<number[][]>;
1964
+ buildFromConfig(config: StoredConfig): IEmbeddingFunction;
1910
1965
  getConfig(): StoredConfig;
1911
- validateConfigUpdate(oldConfig: StoredConfig, newConfig: StoredConfig): void;
1912
1966
  validateConfig(config: StoredConfig): void;
1913
1967
  }
1914
1968
 
@@ -1945,6 +1999,8 @@ declare const schemaMap: {
1945
1999
  text2vec: Schema;
1946
2000
  transformers: Schema;
1947
2001
  voyageai: Schema;
2002
+ cloudflare_workers_ai: Schema;
2003
+ together_ai: Schema;
1948
2004
  };
1949
2005
  /**
1950
2006
  * Load a JSON schema.
@@ -2053,4 +2109,4 @@ declare class ChromaUniqueError extends Error {
2053
2109
  }
2054
2110
  declare function createErrorByType(type: string, message: string): InvalidCollectionError | InvalidArgumentError | undefined;
2055
2111
 
2056
- export { type AddRecordsParams, AdminClient, ChromaClient, ChromaClientError, type ChromaClientParams, ChromaConnectionError, ChromaError, ChromaForbiddenError, ChromaNotFoundError, ChromaServerError, ChromaUnauthorizedError, ChromaUniqueError, ChromaValueError, CloudClient, CohereEmbeddingFunction, Collection, type CollectionMetadata, type CollectionParams, type CreateCollectionParams, DefaultEmbeddingFunction, type DeleteCollectionParams, type DeleteParams, type Document, type Documents, type Embedding, type Embeddings, type GetCollectionParams, type GetOrCreateCollectionParams, type GetParams, type GetResponse, GoogleGenerativeAiEmbeddingFunction, HuggingFaceEmbeddingServerFunction, type ID, type IDs, type IEmbeddingFunction, IncludeEnum, InvalidArgumentError, InvalidCollectionError, JinaEmbeddingFunction, type ListCollectionsParams, type Metadata, type Metadatas, type ModifyCollectionParams, OllamaEmbeddingFunction, OpenAIEmbeddingFunction, type PeekParams, type QueryRecordsParams, type QueryResponse, TransformersEmbeddingFunction, type UpdateRecordsParams, type UpsertRecordsParams, VoyageAIEmbeddingFunction, type Where, type WhereDocument, createErrorByType, getAvailableSchemas, getSchemaInfo, getSchemaVersion, loadSchema, validateConfigSchema };
2112
+ export { type AddRecordsParams, AdminClient, ChromaClient, ChromaClientError, type ChromaClientParams, ChromaConnectionError, ChromaError, ChromaForbiddenError, ChromaNotFoundError, ChromaServerError, ChromaUnauthorizedError, ChromaUniqueError, ChromaValueError, CloudClient, CloudflareWorkersAIEmbeddingFunction, CohereEmbeddingFunction, Collection, type CollectionMetadata, type CollectionParams, type CreateCollectionParams, DefaultEmbeddingFunction, type DeleteCollectionParams, type DeleteParams, type Document, type Documents, type Embedding, type Embeddings, type GetCollectionParams, type GetOrCreateCollectionParams, type GetParams, type GetResponse, GoogleGenerativeAiEmbeddingFunction, HuggingFaceEmbeddingServerFunction, type ID, type IDs, type IEmbeddingFunction, IncludeEnum, InvalidArgumentError, InvalidCollectionError, JinaEmbeddingFunction, type ListCollectionsParams, type Metadata, type Metadatas, type ModifyCollectionParams, OllamaEmbeddingFunction, OpenAIEmbeddingFunction, type PeekParams, type QueryRecordsParams, type QueryResponse, TogetherAIEmbeddingFunction, TransformersEmbeddingFunction, type UpdateRecordsParams, type UpsertRecordsParams, VoyageAIEmbeddingFunction, type Where, type WhereDocument, createErrorByType, getAvailableSchemas, getSchemaInfo, getSchemaVersion, loadSchema, validateConfigSchema };