chromadb 2.4.2 → 2.4.4

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.
@@ -1672,7 +1672,7 @@ declare class CohereEmbeddingFunction implements IEmbeddingFunction {
1672
1672
  }
1673
1673
 
1674
1674
  interface StoredConfig$9 {
1675
- model_name: string;
1675
+ model: string;
1676
1676
  revision: string;
1677
1677
  quantized: boolean;
1678
1678
  }
@@ -6772,7 +6772,7 @@ var require_ajv = __commonJS({
6772
6772
  });
6773
6773
 
6774
6774
  // ../chromadb-core/package.json
6775
- var version = "2.4.2";
6775
+ var version = "2.4.4";
6776
6776
 
6777
6777
  // ../chromadb-core/src/generated/runtime.ts
6778
6778
  import "isomorphic-fetch";
@@ -11436,22 +11436,22 @@ var DefaultEmbeddingFunction = class _DefaultEmbeddingFunction {
11436
11436
  }
11437
11437
  getConfig() {
11438
11438
  return {
11439
- model_name: this.model,
11439
+ model: this.model,
11440
11440
  revision: this.revision,
11441
11441
  quantized: this.quantized
11442
11442
  };
11443
11443
  }
11444
11444
  buildFromConfig(config) {
11445
11445
  return new _DefaultEmbeddingFunction({
11446
- model: config.model_name,
11446
+ model: config.model,
11447
11447
  revision: config.revision,
11448
11448
  quantized: config.quantized
11449
11449
  });
11450
11450
  }
11451
11451
  validateConfigUpdate(oldConfig, newConfig) {
11452
- if (oldConfig.model_name !== newConfig.model_name) {
11452
+ if (oldConfig.model !== newConfig.model) {
11453
11453
  throw new Error(
11454
- "DefaultEmbeddingFunction model_name cannot be changed after initialization."
11454
+ "DefaultEmbeddingFunction model cannot be changed after initialization."
11455
11455
  );
11456
11456
  }
11457
11457
  }
@@ -11645,6 +11645,12 @@ var ChromaClient = class {
11645
11645
  configuration
11646
11646
  }) {
11647
11647
  await this.init();
11648
+ if (!configuration) {
11649
+ configuration = {};
11650
+ }
11651
+ if (embeddingFunction && !configuration.embedding_function) {
11652
+ configuration.embedding_function = embeddingFunction;
11653
+ }
11648
11654
  let collectionConfiguration = void 0;
11649
11655
  if (configuration) {
11650
11656
  collectionConfiguration = loadApiCollectionConfigurationFromCreateCollectionConfiguration(
@@ -11705,6 +11711,12 @@ var ChromaClient = class {
11705
11711
  configuration
11706
11712
  }) {
11707
11713
  await this.init();
11714
+ if (!configuration) {
11715
+ configuration = {};
11716
+ }
11717
+ if (embeddingFunction && !configuration.embedding_function) {
11718
+ configuration.embedding_function = embeddingFunction;
11719
+ }
11708
11720
  let collectionConfiguration = void 0;
11709
11721
  if (configuration) {
11710
11722
  collectionConfiguration = loadApiCollectionConfigurationFromCreateCollectionConfiguration(
package/dist/chromadb.mjs CHANGED
@@ -6772,7 +6772,7 @@ var require_ajv = __commonJS({
6772
6772
  });
6773
6773
 
6774
6774
  // ../chromadb-core/package.json
6775
- var version = "2.4.2";
6775
+ var version = "2.4.4";
6776
6776
 
6777
6777
  // ../chromadb-core/src/generated/runtime.ts
6778
6778
  import "isomorphic-fetch";
@@ -11436,22 +11436,22 @@ var DefaultEmbeddingFunction = class _DefaultEmbeddingFunction {
11436
11436
  }
11437
11437
  getConfig() {
11438
11438
  return {
11439
- model_name: this.model,
11439
+ model: this.model,
11440
11440
  revision: this.revision,
11441
11441
  quantized: this.quantized
11442
11442
  };
11443
11443
  }
11444
11444
  buildFromConfig(config) {
11445
11445
  return new _DefaultEmbeddingFunction({
11446
- model: config.model_name,
11446
+ model: config.model,
11447
11447
  revision: config.revision,
11448
11448
  quantized: config.quantized
11449
11449
  });
11450
11450
  }
11451
11451
  validateConfigUpdate(oldConfig, newConfig) {
11452
- if (oldConfig.model_name !== newConfig.model_name) {
11452
+ if (oldConfig.model !== newConfig.model) {
11453
11453
  throw new Error(
11454
- "DefaultEmbeddingFunction model_name cannot be changed after initialization."
11454
+ "DefaultEmbeddingFunction model cannot be changed after initialization."
11455
11455
  );
11456
11456
  }
11457
11457
  }
@@ -11645,6 +11645,12 @@ var ChromaClient = class {
11645
11645
  configuration
11646
11646
  }) {
11647
11647
  await this.init();
11648
+ if (!configuration) {
11649
+ configuration = {};
11650
+ }
11651
+ if (embeddingFunction && !configuration.embedding_function) {
11652
+ configuration.embedding_function = embeddingFunction;
11653
+ }
11648
11654
  let collectionConfiguration = void 0;
11649
11655
  if (configuration) {
11650
11656
  collectionConfiguration = loadApiCollectionConfigurationFromCreateCollectionConfiguration(
@@ -11705,6 +11711,12 @@ var ChromaClient = class {
11705
11711
  configuration
11706
11712
  }) {
11707
11713
  await this.init();
11714
+ if (!configuration) {
11715
+ configuration = {};
11716
+ }
11717
+ if (embeddingFunction && !configuration.embedding_function) {
11718
+ configuration.embedding_function = embeddingFunction;
11719
+ }
11708
11720
  let collectionConfiguration = void 0;
11709
11721
  if (configuration) {
11710
11722
  collectionConfiguration = loadApiCollectionConfigurationFromCreateCollectionConfiguration(