diff --git a/examples/package.json b/examples/package.json index 78650c720e21..ea7efb95cbad 100644 --- a/examples/package.json +++ b/examples/package.json @@ -70,7 +70,7 @@ "@upstash/vector": "^1.1.1", "@vercel/kv": "^0.2.3", "@xata.io/client": "^0.28.0", - "@zilliz/milvus2-sdk-node": "^2.2.7", + "@zilliz/milvus2-sdk-node": "^2.3.5", "axios": "^0.26.0", "chromadb": "^1.5.3", "convex": "^1.3.1", diff --git a/libs/langchain-community/package.json b/libs/langchain-community/package.json index 9432a52c6830..ebc2747f5210 100644 --- a/libs/langchain-community/package.json +++ b/libs/langchain-community/package.json @@ -130,7 +130,7 @@ "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", "@xenova/transformers": "^2.5.4", - "@zilliz/milvus2-sdk-node": ">=2.2.11", + "@zilliz/milvus2-sdk-node": ">=2.3.5", "apify-client": "^2.7.1", "assemblyai": "^4.0.0", "better-sqlite3": ">=9.4.0 <12.0.0", @@ -270,7 +270,7 @@ "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", "@xenova/transformers": "^2.5.4", - "@zilliz/milvus2-sdk-node": ">=2.2.7", + "@zilliz/milvus2-sdk-node": ">=2.3.5", "apify-client": "^2.7.1", "assemblyai": "^4.0.0", "better-sqlite3": ">=9.4.0 <12.0.0", diff --git a/libs/langchain-community/src/indexes/tests/indexing.milvus.int.test.ts b/libs/langchain-community/src/indexes/tests/indexing.milvus.int.test.ts new file mode 100644 index 000000000000..607e22f9566c --- /dev/null +++ b/libs/langchain-community/src/indexes/tests/indexing.milvus.int.test.ts @@ -0,0 +1,440 @@ +import { Document } from "@langchain/core/documents"; +import { index } from "@langchain/core/indexing"; +import { BaseDocumentLoader } from "@langchain/core/document_loaders/base"; + +import { OpenAIEmbeddings } from "@langchain/openai"; +import { InMemoryRecordManager } from "../memory.js"; +import { sleep } from "../../utils/time.js"; +import { Milvus } from "../../vectorstores/milvus.js"; + +let collectionName: string; +let embeddings: OpenAIEmbeddings; +// https://docs.zilliz.com/docs/quick-start-1#create-a-collection +const MILVUS_ADDRESS = ""; +const MILVUS_TOKEN = ""; + +const OPEN_AI_API_KEY = ""; + +class MockLoader extends BaseDocumentLoader { + constructor(public docs: Document[]) { + super(); + } + + async load(): Promise { + return this.docs; + } +} + +describe.skip("Indexing API", () => { + let recordManager: InMemoryRecordManager; + let vectorstore: Milvus; + + beforeAll(async () => { + embeddings = new OpenAIEmbeddings({ + openAIApiKey: OPEN_AI_API_KEY, + }); + collectionName = `test_collection_${Math.random() + .toString(36) + .substring(7)}`; + recordManager = new InMemoryRecordManager(); + + await recordManager.createSchema(); + + vectorstore = await new Milvus(embeddings, { + collectionName, + autoId: false, + clientConfig: { + address: MILVUS_ADDRESS, + token: MILVUS_TOKEN, + }, + }); + }); + + afterEach(async () => { + recordManager.records.clear(); + await index({ + docsSource: [], + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + // Because the indexing API relies on timestamps, without this the tests are flaky. + await sleep(1000); + }); + + test("Test indexing sanity", async () => { + const docs = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + const initialIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + }); + + expect(initialIndexingResult.numAdded).toEqual(3); + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + }); + expect(secondIndexingResult.numAdded).toEqual(0); + expect(secondIndexingResult.numSkipped).toEqual(3); + + const query = "Document"; + const result = await vectorstore.similaritySearch(query, 3); + expect(recordManager.records.size).toEqual(3); + const resultMetadatas = result.map(({ metadata }) => metadata); + expect(resultMetadatas.length).toBe(3); + }); + + test("Test indexing with cleanup full", async () => { + const docs = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { cleanup: "full" }, + }); + + const secondIndexingResult = await index({ + docsSource: [], + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + expect(secondIndexingResult.numAdded).toEqual(0); + expect(secondIndexingResult.numSkipped).toEqual(0); + expect(secondIndexingResult.numDeleted).toEqual(3); + + expect(recordManager.records.size).toEqual(0); + }); + + test("Test indexing with updated page content (full)", async () => { + const docs = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + + docs[0].pageContent = "Document 0 Content"; + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + expect(secondIndexingResult.numAdded).toEqual(1); + expect(secondIndexingResult.numDeleted).toEqual(1); + expect(secondIndexingResult.numSkipped).toEqual(2); + + const query = "Document"; + const result = await vectorstore.similaritySearch(query, 3); + expect(recordManager.records.size).toEqual(3); + const resultMetadatas = result.map(({ metadata }) => metadata); + expect(resultMetadatas.length).toBe(3); + }); + + test("Test indexing with updated metadata (full)", async () => { + const docs: Document[] = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + + docs[0].metadata.field = "value"; + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + expect(secondIndexingResult.numAdded).toEqual(1); + expect(secondIndexingResult.numDeleted).toEqual(1); + expect(secondIndexingResult.numSkipped).toEqual(2); + }); + + test("Test indexing with updated page content (incremental)", async () => { + const docs = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "incremental", + sourceIdKey: "source", + }, + }); + + docs[0].pageContent = "Document 0 Content"; + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "incremental", + sourceIdKey: "source", + }, + }); + expect(secondIndexingResult.numAdded).toEqual(1); + expect(secondIndexingResult.numDeleted).toEqual(1); + expect(secondIndexingResult.numSkipped).toEqual(2); + + const query = "Document"; + const result = await vectorstore.similaritySearch(query, 3); + expect(recordManager.records.size).toEqual(3); + const resultMetadatas = result.map(({ metadata }) => metadata); + expect(resultMetadatas.length).toBe(3); + }); + + test("Test indexing with updated metadata (incremental)", async () => { + const docs: Document[] = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "incremental", + sourceIdKey: "source", + }, + }); + + docs[0].metadata.field = "value"; + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "incremental", + sourceIdKey: "source", + }, + }); + expect(secondIndexingResult.numAdded).toEqual(1); + expect(secondIndexingResult.numDeleted).toEqual(1); + expect(secondIndexingResult.numSkipped).toEqual(2); + }); + + test("Test indexing with updated page content without cleanup", async () => { + const docs: Document[] = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ docsSource: docs, recordManager, vectorStore: vectorstore }); + + docs[0].pageContent = "Document 0 Content"; + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + }); + expect(secondIndexingResult.numAdded).toEqual(1); + expect(secondIndexingResult.numDeleted).toEqual(0); + expect(secondIndexingResult.numSkipped).toEqual(2); + }); + + test("Test indexing with forced update", async () => { + const docs: Document[] = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]; + + await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + }, + }); + + // Force update is mostly useful when you are re-indexing with updated embeddings. + // Some vector stores (such as Milvus) do not support overwriting records + // and will throw an error if you try to do so. We must therefore delete the records + // before re-indexing. + await vectorstore.delete({ ids: Array.from(recordManager.records.keys()) }); + + const secondIndexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + options: { + cleanup: "full", + forceUpdate: true, + }, + }); + + expect(secondIndexingResult.numAdded).toEqual(0); + expect(secondIndexingResult.numDeleted).toEqual(0); + expect(secondIndexingResult.numUpdated).toEqual(3); + }); + + test("Test indexing with duplicate documents", async () => { + const docs: Document[] = [ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + ]; + + const indexingResult = await index({ + docsSource: docs, + recordManager, + vectorStore: vectorstore, + }); + + expect(indexingResult.numAdded).toEqual(1); + expect(indexingResult.numSkipped).toEqual(0); + }); + + test("Test indexing with doc loader", async () => { + const mockLoader = new MockLoader([ + { + pageContent: "Document 1 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 2 Content", + metadata: { source: "test" }, + }, + { + pageContent: "Document 3 Content", + metadata: { source: "test" }, + }, + ]); + const indexingResult = await index({ + docsSource: mockLoader, + recordManager, + vectorStore: vectorstore, + }); + expect(indexingResult.numAdded).toEqual(3); + }); +}); diff --git a/libs/langchain-community/src/vectorstores/milvus.ts b/libs/langchain-community/src/vectorstores/milvus.ts index 74201f9d5edf..986216c157df 100644 --- a/libs/langchain-community/src/vectorstores/milvus.ts +++ b/libs/langchain-community/src/vectorstores/milvus.ts @@ -163,13 +163,18 @@ export class Milvus extends VectorStore { /** * Adds documents to the Milvus database. * @param documents Array of Document instances to be added to the database. + * @param options Optional parameter that can include specific IDs for the documents. * @returns Promise resolving to void. */ - async addDocuments(documents: Document[]): Promise { + async addDocuments( + documents: Document[], + options?: { ids?: string[] } + ): Promise { const texts = documents.map(({ pageContent }) => pageContent); await this.addVectors( await this.embeddings.embedDocuments(texts), - documents + documents, + options ); } @@ -177,9 +182,14 @@ export class Milvus extends VectorStore { * Adds vectors to the Milvus database. * @param vectors Array of vectors to be added to the database. * @param documents Array of Document instances associated with the vectors. + * @param options Optional parameter that can include specific IDs for the documents. * @returns Promise resolving to void. */ - async addVectors(vectors: number[][], documents: Document[]): Promise { + async addVectors( + vectors: number[][], + documents: Document[], + options?: { ids?: string[] } + ): Promise { if (vectors.length === 0) { return; } @@ -188,6 +198,8 @@ export class Milvus extends VectorStore { await this.ensurePartition(); } + const documentIds = options?.ids ?? []; + const insertDatas: InsertRow[] = []; // eslint-disable-next-line no-plusplus for (let index = 0; index < vectors.length; index++) { @@ -200,7 +212,9 @@ export class Milvus extends VectorStore { this.fields.forEach((field) => { switch (field) { case this.primaryField: - if (!this.autoId) { + if (documentIds[index] !== undefined) { + data[field] = documentIds[index]; + } else if (!this.autoId) { if (doc.metadata[this.primaryField] === undefined) { throw new Error( `The Collection's primaryField is configured with autoId=false, thus its value must be provided through metadata.` @@ -239,9 +253,9 @@ export class Milvus extends VectorStore { if (this.partitionName !== undefined) { params.partition_name = this.partitionName; } - const insertResp = await this.client.insert(params); + const insertResp = await this.client.upsert(params); if (insertResp.status.error_code !== ErrorCode.SUCCESS) { - throw new Error(`Error inserting data: ${JSON.stringify(insertResp)}`); + throw new Error(`Error upserting data: ${JSON.stringify(insertResp)}`); } await this.client.flushSync({ collection_names: [this.collectionName] }); } @@ -396,14 +410,26 @@ export class Milvus extends VectorStore { fieldList.push(...createFieldTypeForMetadata(documents, this.primaryField)); - fieldList.push( - { + if (this.autoId) { + fieldList.push({ name: this.primaryField, description: "Primary key", data_type: DataType.Int64, is_primary_key: true, - autoID: this.autoId, - }, + autoID: true, + }); + } else { + fieldList.push({ + name: this.primaryField, + description: "Primary key", + data_type: DataType.VarChar, + is_primary_key: true, + autoID: false, + max_length: 65535, + }); + } + + fieldList.push( { name: this.textField, description: "Text field", @@ -437,7 +463,6 @@ export class Milvus extends VectorStore { }); if (createRes.error_code !== ErrorCode.SUCCESS) { - console.log(createRes); throw new Error(`Failed to create collection: ${createRes}`); } @@ -558,7 +583,7 @@ export class Milvus extends VectorStore { * @param params Object containing a filter to apply to the deletion. * @returns Promise resolving to void. */ - async delete(params: { filter: string }): Promise { + async delete(params: { filter?: string; ids?: string[] }): Promise { const hasColResp = await this.client.hasCollection({ collection_name: this.collectionName, }); @@ -571,15 +596,28 @@ export class Milvus extends VectorStore { ); } - const { filter } = params; + const { filter, ids } = params; - const deleteResp = await this.client.deleteEntities({ - collection_name: this.collectionName, - expr: filter, - }); + if (filter && !ids) { + const deleteResp = await this.client.deleteEntities({ + collection_name: this.collectionName, + expr: filter, + }); - if (deleteResp.status.error_code !== ErrorCode.SUCCESS) { - throw new Error(`Error deleting data: ${JSON.stringify(deleteResp)}`); + if (deleteResp.status.error_code !== ErrorCode.SUCCESS) { + throw new Error(`Error deleting data: ${JSON.stringify(deleteResp)}`); + } + } else if (!filter && ids && ids.length > 0) { + const deleteResp = await this.client.delete({ + collection_name: this.collectionName, + ids, + }); + + if (deleteResp.status.error_code !== ErrorCode.SUCCESS) { + throw new Error( + `Error deleting data with ids: ${JSON.stringify(deleteResp)}` + ); + } } } } diff --git a/libs/langchain-community/src/vectorstores/tests/milvus.int.test.ts b/libs/langchain-community/src/vectorstores/tests/milvus.int.test.ts index bc328304ddbf..a0d213c75401 100644 --- a/libs/langchain-community/src/vectorstores/tests/milvus.int.test.ts +++ b/libs/langchain-community/src/vectorstores/tests/milvus.int.test.ts @@ -92,7 +92,10 @@ Harmonic Labyrinth of the dreaded Majotaur?`, ]; const milvus = await Milvus.fromTexts(texts, metadatas, embeddings, { collectionName, - url: MILVUS_ADDRESS, + clientConfig: { + address: MILVUS_ADDRESS, + token: MILVUS_TOKEN, + }, }); const query = "who is achilles?"; @@ -116,6 +119,10 @@ Harmonic Labyrinth of the dreaded Majotaur?`, test.skip("Test Milvus.fromExistingCollection", async () => { const milvus = await Milvus.fromExistingCollection(embeddings, { collectionName, + clientConfig: { + address: MILVUS_ADDRESS, + token: MILVUS_TOKEN, + }, }); const query = "who is achilles?"; @@ -137,25 +144,56 @@ test.skip("Test Milvus.fromExistingCollection", async () => { expect(resultThreeMetadatas[0].id).toEqual(1); }); -test.skip("Test Milvus.deleteData", async () => { +test.skip("Test Milvus.deleteData with filter", async () => { const milvus = await Milvus.fromExistingCollection(embeddings, { collectionName, + clientConfig: { + address: MILVUS_ADDRESS, + token: MILVUS_TOKEN, + }, }); const query = "who is achilles?"; const result = await milvus.similaritySearch(query, 1); const resultMetadatas = result.map(({ metadata }) => metadata); - const primaryId = resultMetadatas[0].langchain_primaryid; + const primaryId = resultMetadatas[0].id; expect(resultMetadatas.length).toBe(1); expect(resultMetadatas[0].id).toEqual(1); - await milvus.delete({ filter: `langchain_primaryid in [${primaryId}]` }); + await milvus.delete({ filter: `id in [${primaryId}]` }); const resultTwo = await milvus.similaritySearch(query, 1); const resultTwoMetadatas = resultTwo.map(({ metadata }) => metadata); expect(resultTwoMetadatas[0].id).not.toEqual(1); }); +test.skip("Test Milvus.deleteData with ids", async () => { + const milvus = await Milvus.fromExistingCollection(embeddings, { + collectionName, + clientConfig: { + address: MILVUS_ADDRESS, + token: MILVUS_TOKEN, + }, + }); + + const query = "who is tortoise?"; + const result = await milvus.similaritySearch(query, 3); + const resultMetadatas = result.map(({ metadata }) => metadata); + const primaryIds = resultMetadatas.map((rm) => rm.id); + expect(resultMetadatas.length).toBe(3); + expect(resultMetadatas[0].id).toEqual(3); + expect(resultMetadatas[1].id).toEqual(2); + expect(resultMetadatas[2].id).toEqual(5); + + await milvus.delete({ ids: primaryIds }); + + const resultTwo = await milvus.similaritySearch(query, 3); + const resultTwoMetadatas = resultTwo.map(({ metadata }) => metadata); + expect(resultTwoMetadatas[0].id).not.toEqual(3); + expect(resultTwoMetadatas[0].id).not.toEqual(2); + expect(resultTwoMetadatas[0].id).not.toEqual(5); +}); + afterAll(async () => { // eslint-disable-next-line no-process-env if (!process.env.MILVUS_URL) return; diff --git a/yarn.lock b/yarn.lock index 3d1d999e0e10..f4e789326048 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8753,17 +8753,7 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:1.8.17": - version: 1.8.17 - resolution: "@grpc/grpc-js@npm:1.8.17" - dependencies: - "@grpc/proto-loader": ^0.7.0 - "@types/node": ">=12.12.47" - checksum: 0ac8cd7342a33d7e507ec0ebb470721ae84eb964fd164e4b7b829cb35774c09df158124cbce859d9398c9a015f0e29d2308a3a17be35d54e030a7dc091e7e9a4 - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:1.9.0, @grpc/grpc-js@npm:^1.8.14": +"@grpc/grpc-js@npm:1.9.0": version: 1.9.0 resolution: "@grpc/grpc-js@npm:1.9.0" dependencies: @@ -8773,7 +8763,7 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:~1.10.3": +"@grpc/grpc-js@npm:^1.10.1, @grpc/grpc-js@npm:~1.10.3": version: 1.10.8 resolution: "@grpc/grpc-js@npm:1.10.8" dependencies: @@ -8793,22 +8783,7 @@ __metadata: languageName: node linkType: hard -"@grpc/proto-loader@npm:0.7.7": - version: 0.7.7 - resolution: "@grpc/proto-loader@npm:0.7.7" - dependencies: - "@types/long": ^4.0.1 - lodash.camelcase: ^4.3.0 - long: ^4.0.0 - protobufjs: ^7.0.0 - yargs: ^17.7.2 - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 6015d99d36d0451075a53e5c5842e8912235973a515677afca038269969ad84f22a4c9fbc9badf52f034736b3f1bf864739f7c4238ba8a7e6fd3bba75cfce0ee - languageName: node - linkType: hard - -"@grpc/proto-loader@npm:^0.7.0, @grpc/proto-loader@npm:^0.7.6": +"@grpc/proto-loader@npm:^0.7.0": version: 0.7.6 resolution: "@grpc/proto-loader@npm:0.7.6" dependencies: @@ -8823,7 +8798,7 @@ __metadata: languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.13": +"@grpc/proto-loader@npm:^0.7.10, @grpc/proto-loader@npm:^0.7.13": version: 0.7.13 resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: @@ -9651,7 +9626,7 @@ __metadata: "@writerai/writer-sdk": ^0.40.2 "@xata.io/client": ^0.28.0 "@xenova/transformers": ^2.5.4 - "@zilliz/milvus2-sdk-node": ">=2.2.11" + "@zilliz/milvus2-sdk-node": ">=2.3.5" apify-client: ^2.7.1 assemblyai: ^4.0.0 better-sqlite3: ">=9.4.0 <12.0.0" @@ -9799,7 +9774,7 @@ __metadata: "@writerai/writer-sdk": ^0.40.2 "@xata.io/client": ^0.28.0 "@xenova/transformers": ^2.5.4 - "@zilliz/milvus2-sdk-node": ">=2.2.7" + "@zilliz/milvus2-sdk-node": ">=2.3.5" apify-client: ^2.7.1 assemblyai: ^4.0.0 better-sqlite3: ">=9.4.0 <12.0.0" @@ -11686,6 +11661,13 @@ __metadata: languageName: node linkType: hard +"@petamoriken/float16@npm:^3.8.6": + version: 3.8.7 + resolution: "@petamoriken/float16@npm:3.8.7" + checksum: 0e4c12e9d88aac08f125a2e804a28207bafd1ea0cdc2ddbde95cc9a3b19c155747f5001a5d5b42f9dca18f697df553d42680067817ce5dc4e3456f9c605a6d88 + languageName: node + linkType: hard + "@pinecone-database/pinecone@npm:^1.1.0": version: 1.1.0 resolution: "@pinecone-database/pinecone@npm:1.1.0" @@ -17245,28 +17227,19 @@ __metadata: languageName: node linkType: hard -"@zilliz/milvus2-sdk-node@npm:>=2.2.11": - version: 2.2.24 - resolution: "@zilliz/milvus2-sdk-node@npm:2.2.24" +"@zilliz/milvus2-sdk-node@npm:>=2.3.5, @zilliz/milvus2-sdk-node@npm:^2.3.5": + version: 2.4.2 + resolution: "@zilliz/milvus2-sdk-node@npm:2.4.2" dependencies: - "@grpc/grpc-js": 1.8.17 - "@grpc/proto-loader": 0.7.7 + "@grpc/grpc-js": ^1.10.1 + "@grpc/proto-loader": ^0.7.10 + "@petamoriken/float16": ^3.8.6 dayjs: ^1.11.7 + generic-pool: ^3.9.0 lru-cache: ^9.1.2 - protobufjs: 7.2.4 + protobufjs: ^7.2.6 winston: ^3.9.0 - checksum: 0ec3c5af5732770c64cbafc0eee48ded5861d88793d14e93d8f61ef4436a680bfaf488248e804f116e1fe987c2a0ac8ebda8402aa33524b0c473cb63987a1159 - languageName: node - linkType: hard - -"@zilliz/milvus2-sdk-node@npm:^2.2.7": - version: 2.2.10 - resolution: "@zilliz/milvus2-sdk-node@npm:2.2.10" - dependencies: - "@grpc/grpc-js": ^1.8.14 - "@grpc/proto-loader": ^0.7.6 - protobufjs: ^7.2.3 - checksum: 895404192618831cfe2ca5dd0c26d6b04110e62af7edca591c4477d6241f4be9c4b0c0569e0a8903fb9513d58b5cf743cf6c2322d5becc0893bf590a808148d1 + checksum: ac3b7bf06a6d79b7797e11ce117831f81b8b2f07868f6b6aa134a7d890f20c6d3b8682d98c0bb31add4cb6ab82668fd8b4c9e91602586e195bed0bc56ca1e775 languageName: node linkType: hard @@ -23410,7 +23383,7 @@ __metadata: "@upstash/vector": ^1.1.1 "@vercel/kv": ^0.2.3 "@xata.io/client": ^0.28.0 - "@zilliz/milvus2-sdk-node": ^2.2.7 + "@zilliz/milvus2-sdk-node": ^2.3.5 axios: ^0.26.0 chromadb: ^1.5.3 convex: ^1.3.1 @@ -24661,7 +24634,7 @@ __metadata: languageName: node linkType: hard -"generic-pool@npm:3.9.0": +"generic-pool@npm:3.9.0, generic-pool@npm:^3.9.0": version: 3.9.0 resolution: "generic-pool@npm:3.9.0" checksum: 3d89e9b2018d2e3bbf44fec78c76b2b7d56d6a484237aa9daf6ff6eedb14b0899dadd703b5d810219baab2eb28e5128fb18b29e91e602deb2eccac14492d8ca8 @@ -33151,26 +33124,6 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:7.2.4": - version: 7.2.4 - resolution: "protobufjs@npm:7.2.4" - dependencies: - "@protobufjs/aspromise": ^1.1.2 - "@protobufjs/base64": ^1.1.2 - "@protobufjs/codegen": ^2.0.4 - "@protobufjs/eventemitter": ^1.1.0 - "@protobufjs/fetch": ^1.1.0 - "@protobufjs/float": ^1.0.2 - "@protobufjs/inquire": ^1.1.0 - "@protobufjs/path": ^1.1.2 - "@protobufjs/pool": ^1.1.0 - "@protobufjs/utf8": ^1.1.0 - "@types/node": ">=13.7.0" - long: ^5.0.0 - checksum: a952cdf2a5e5250c16ae651b570849b6f5b20a5475c3eef63ffb290ad239aa2916adfc1cc676f7fc93c69f48113df268761c0c246f7f023118c85bdd1a170044 - languageName: node - linkType: hard - "protobufjs@npm:7.2.6, protobufjs@npm:^7.2.4, protobufjs@npm:^7.2.5": version: 7.2.6 resolution: "protobufjs@npm:7.2.6" @@ -33215,7 +33168,7 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^7.0.0, protobufjs@npm:^7.2.3": +"protobufjs@npm:^7.0.0": version: 7.2.3 resolution: "protobufjs@npm:7.2.3" dependencies: @@ -33235,6 +33188,26 @@ __metadata: languageName: node linkType: hard +"protobufjs@npm:^7.2.6": + version: 7.3.0 + resolution: "protobufjs@npm:7.3.0" + dependencies: + "@protobufjs/aspromise": ^1.1.2 + "@protobufjs/base64": ^1.1.2 + "@protobufjs/codegen": ^2.0.4 + "@protobufjs/eventemitter": ^1.1.0 + "@protobufjs/fetch": ^1.1.0 + "@protobufjs/float": ^1.0.2 + "@protobufjs/inquire": ^1.1.0 + "@protobufjs/path": ^1.1.2 + "@protobufjs/pool": ^1.1.0 + "@protobufjs/utf8": ^1.1.0 + "@types/node": ">=13.7.0" + long: ^5.0.0 + checksum: bc7008ec736b0ab68677ced957b7ccbfc96ccd31f10d8a09d41408d8bf432a6132387acca71e657c652d98aaf7bd2a373f355a377762cff1ed04f0def8477c69 + languageName: node + linkType: hard + "protoc-gen-ts@npm:^0.8.6": version: 0.8.7 resolution: "protoc-gen-ts@npm:0.8.7"