@vectorstores/firestore 0.1.6 → 0.1.7

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/index.cjs CHANGED
@@ -39,8 +39,8 @@ function toFirestoreFilter(filters) {
39
39
  return filters.condition === "or" ? firestore.Filter.or(...firestoreFilters) : firestore.Filter.and(...firestoreFilters);
40
40
  }
41
41
  class FirestoreVectorStore extends core.BaseVectorStore {
42
- constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference, ...init }){
43
- super(init), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
42
+ constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference }){
43
+ super(), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
44
44
  this.collectionName = collectionName;
45
45
  this.batchSize = batchSize;
46
46
  this.distanceMeasure = distanceMeasure;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Firestore, Settings, CollectionReference } from '@google-cloud/firestore';
2
- import { BaseVectorStore, VectorStoreBaseParams, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
2
+ import { BaseVectorStore, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
3
3
 
4
4
  declare enum DistanceMeasure {
5
5
  COSINE = "COSINE",
@@ -21,7 +21,7 @@ type FirestoreParams = {
21
21
  metadataKey?: string;
22
22
  distanceMeasure?: DistanceMeasure;
23
23
  customCollectionReference?: (rootCollection: CollectionReference) => CollectionReference;
24
- } & VectorStoreBaseParams;
24
+ };
25
25
  declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
26
26
  storesText: boolean;
27
27
  isEmbeddingQuery?: boolean;
@@ -33,7 +33,7 @@ declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
33
33
  private metadataKey;
34
34
  private distanceMeasure;
35
35
  private customCollectionReference;
36
- constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, ...init }: FirestoreParams);
36
+ constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, }: FirestoreParams);
37
37
  client(): Firestore;
38
38
  /**
39
39
  * Adds nodes to the vector store
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Firestore, Settings, CollectionReference } from '@google-cloud/firestore';
2
- import { BaseVectorStore, VectorStoreBaseParams, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
2
+ import { BaseVectorStore, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
3
3
 
4
4
  declare enum DistanceMeasure {
5
5
  COSINE = "COSINE",
@@ -21,7 +21,7 @@ type FirestoreParams = {
21
21
  metadataKey?: string;
22
22
  distanceMeasure?: DistanceMeasure;
23
23
  customCollectionReference?: (rootCollection: CollectionReference) => CollectionReference;
24
- } & VectorStoreBaseParams;
24
+ };
25
25
  declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
26
26
  storesText: boolean;
27
27
  isEmbeddingQuery?: boolean;
@@ -33,7 +33,7 @@ declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
33
33
  private metadataKey;
34
34
  private distanceMeasure;
35
35
  private customCollectionReference;
36
- constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, ...init }: FirestoreParams);
36
+ constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, }: FirestoreParams);
37
37
  client(): Firestore;
38
38
  /**
39
39
  * Adds nodes to the vector store
@@ -1,5 +1,5 @@
1
1
  import { Firestore, Settings, CollectionReference } from '@google-cloud/firestore';
2
- import { BaseVectorStore, VectorStoreBaseParams, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
2
+ import { BaseVectorStore, BaseNode, Metadata, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
3
3
 
4
4
  declare enum DistanceMeasure {
5
5
  COSINE = "COSINE",
@@ -21,7 +21,7 @@ type FirestoreParams = {
21
21
  metadataKey?: string;
22
22
  distanceMeasure?: DistanceMeasure;
23
23
  customCollectionReference?: (rootCollection: CollectionReference) => CollectionReference;
24
- } & VectorStoreBaseParams;
24
+ };
25
25
  declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
26
26
  storesText: boolean;
27
27
  isEmbeddingQuery?: boolean;
@@ -33,7 +33,7 @@ declare class FirestoreVectorStore extends BaseVectorStore<Firestore> {
33
33
  private metadataKey;
34
34
  private distanceMeasure;
35
35
  private customCollectionReference;
36
- constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, ...init }: FirestoreParams);
36
+ constructor({ collectionName, client, clientOptions, batchSize, distanceMeasure, customCollectionReference, }: FirestoreParams);
37
37
  client(): Firestore;
38
38
  /**
39
39
  * Adds nodes to the vector store
@@ -37,8 +37,8 @@ function toFirestoreFilter(filters) {
37
37
  return filters.condition === "or" ? Filter.or(...firestoreFilters) : Filter.and(...firestoreFilters);
38
38
  }
39
39
  class FirestoreVectorStore extends BaseVectorStore {
40
- constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference, ...init }){
41
- super(init), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
40
+ constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference }){
41
+ super(), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
42
42
  this.collectionName = collectionName;
43
43
  this.batchSize = batchSize;
44
44
  this.distanceMeasure = distanceMeasure;
package/dist/index.js CHANGED
@@ -37,8 +37,8 @@ function toFirestoreFilter(filters) {
37
37
  return filters.condition === "or" ? Filter.or(...firestoreFilters) : Filter.and(...firestoreFilters);
38
38
  }
39
39
  class FirestoreVectorStore extends BaseVectorStore {
40
- constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference, ...init }){
41
- super(init), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
40
+ constructor({ collectionName = "vector_store", client, clientOptions, batchSize = DEFAULT_BATCH_SIZE, distanceMeasure = "COSINE", customCollectionReference }){
41
+ super(), this.storesText = true, this.isEmbeddingQuery = false, this.flatMetadata = true, this.embeddingKey = "embedding", this.metadataKey = "metadata", this.distanceMeasure = "COSINE";
42
42
  this.collectionName = collectionName;
43
43
  this.batchSize = batchSize;
44
44
  this.distanceMeasure = distanceMeasure;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vectorstores/firestore",
3
3
  "description": "Firestore Storage for vectorstores",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -34,11 +34,11 @@
34
34
  "directory": "packages/providers/storage/firestore"
35
35
  },
36
36
  "devDependencies": {
37
- "@vectorstores/core": "0.1.6",
37
+ "@vectorstores/core": "0.1.7",
38
38
  "@vectorstores/env": "0.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@vectorstores/core": "0.1.6",
41
+ "@vectorstores/core": "0.1.7",
42
42
  "@vectorstores/env": "0.1.0"
43
43
  },
44
44
  "dependencies": {