diff --git a/package-lock.json b/package-lock.json index 54d66bca..ddf7c504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,19 +157,6 @@ "node": ">=14.0.0" } }, - "node_modules/@azure/core-http-compat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.0.1.tgz", - "integrity": "sha512-xpQZz/q7E0jSW4rckrTo2mDFDQgo6I69hBU4voMQi7REi6JRW5a+KfVkbJCFCWnkFmP6cAJ0IbuudTdf/MEBOQ==", - "dependencies": { - "@azure/abort-controller": "^1.0.4", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.3.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { "version": "1.0.0-preview.13", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", @@ -414,25 +401,6 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@azure/search-documents": { - "version": "12.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@azure/search-documents/-/search-documents-12.0.0-beta.4.tgz", - "integrity": "sha512-t4fExKXnbBBCQCStJLt+QoIyb0NGvyqfPO5p9ZlwU89HTyky+2A9vxc/DMPtl4DAM6YrZPUT2ky0uqXFHpADIQ==", - "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.3.0", - "@azure/core-http-compat": "^2.0.1", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.3.0", - "@azure/core-tracing": "^1.0.0", - "@azure/logger": "^1.0.0", - "events": "^3.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/@azure/storage-blob": { "version": "12.16.0", "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.16.0.tgz", @@ -13544,7 +13512,7 @@ "dependencies": { "@azure/identity": "^3.3.0", "@azure/monitor-opentelemetry": "^1.0.0-beta.2", - "@azure/search-documents": "~12.0.0-beta.4", + "@azure/search-documents": "12.0.0-beta.3", "@azure/storage-blob": "^12.15.0", "@dqbd/tiktoken": "^1.0.7", "@fastify/autoload": "^5.0.0", @@ -13574,6 +13542,38 @@ "typescript": "^5.1.6" } }, + "packages/indexer/node_modules/@azure/core-http-compat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-1.3.0.tgz", + "integrity": "sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA==", + "dependencies": { + "@azure/abort-controller": "^1.0.4", + "@azure/core-client": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "packages/indexer/node_modules/@azure/search-documents": { + "version": "12.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@azure/search-documents/-/search-documents-12.0.0-beta.3.tgz", + "integrity": "sha512-if8NmeRtg1sU8MdzPKWPSVi77NhY4ZeInvg8zYXIrPIUzNtEy3LRYYJonH/MyImGJkQqn76vxHjjpHENycNuxA==", + "dependencies": { + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.3.0", + "@azure/core-http-compat": "^1.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-rest-pipeline": "^1.3.0", + "@azure/core-tracing": "^1.0.0", + "@azure/logger": "^1.0.0", + "events": "^3.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "packages/indexer/node_modules/@types/node": { "version": "18.18.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.5.tgz", @@ -13585,7 +13585,7 @@ "dependencies": { "@azure/identity": "^3.3.0", "@azure/monitor-opentelemetry": "^1.0.0-beta.2", - "@azure/search-documents": "~12.0.0-beta.4", + "@azure/search-documents": "12.0.0-beta.3", "@azure/storage-blob": "^12.15.0", "@dqbd/tiktoken": "^1.0.7", "@fastify/autoload": "^5.0.0", @@ -13612,6 +13612,38 @@ "typescript": "^5.1.6" } }, + "packages/search/node_modules/@azure/core-http-compat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-1.3.0.tgz", + "integrity": "sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA==", + "dependencies": { + "@azure/abort-controller": "^1.0.4", + "@azure/core-client": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "packages/search/node_modules/@azure/search-documents": { + "version": "12.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@azure/search-documents/-/search-documents-12.0.0-beta.3.tgz", + "integrity": "sha512-if8NmeRtg1sU8MdzPKWPSVi77NhY4ZeInvg8zYXIrPIUzNtEy3LRYYJonH/MyImGJkQqn76vxHjjpHENycNuxA==", + "dependencies": { + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.3.0", + "@azure/core-http-compat": "^1.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-rest-pipeline": "^1.3.0", + "@azure/core-tracing": "^1.0.0", + "@azure/logger": "^1.0.0", + "events": "^3.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "packages/search/node_modules/@types/node": { "version": "18.18.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.5.tgz", diff --git a/packages/indexer/package.json b/packages/indexer/package.json index 7c53a09a..0eabeade 100644 --- a/packages/indexer/package.json +++ b/packages/indexer/package.json @@ -26,7 +26,7 @@ "dependencies": { "@azure/identity": "^3.3.0", "@azure/monitor-opentelemetry": "^1.0.0-beta.2", - "@azure/search-documents": "~12.0.0-beta.4", + "@azure/search-documents": "12.0.0-beta.3", "@azure/storage-blob": "^12.15.0", "@dqbd/tiktoken": "^1.0.7", "@fastify/autoload": "^5.0.0", diff --git a/packages/indexer/src/lib/indexer.ts b/packages/indexer/src/lib/indexer.ts index 29bc4b6d..ffe7165e 100644 --- a/packages/indexer/src/lib/indexer.ts +++ b/packages/indexer/src/lib/indexer.ts @@ -71,7 +71,7 @@ export class Indexer { sortable: false, facetable: false, vectorSearchDimensions: 1536, - vectorSearchProfile: 'default', + vectorSearchConfiguration: 'default', }, { name: 'category', @@ -103,7 +103,7 @@ export class Indexer { ], }, vectorSearch: { - algorithms: [ + algorithmConfigurations: [ { name: 'default', kind: 'hnsw', diff --git a/packages/search/package.json b/packages/search/package.json index 35695688..4c0d4436 100644 --- a/packages/search/package.json +++ b/packages/search/package.json @@ -23,7 +23,7 @@ "dependencies": { "@azure/identity": "^3.3.0", "@azure/monitor-opentelemetry": "^1.0.0-beta.2", - "@azure/search-documents": "~12.0.0-beta.4", + "@azure/search-documents": "12.0.0-beta.3", "@azure/storage-blob": "^12.15.0", "@dqbd/tiktoken": "^1.0.7", "@fastify/autoload": "^5.0.0", diff --git a/packages/search/src/lib/approaches/approach-base.ts b/packages/search/src/lib/approaches/approach-base.ts index f9b72a64..b5796f5f 100644 --- a/packages/search/src/lib/approaches/approach-base.ts +++ b/packages/search/src/lib/approaches/approach-base.ts @@ -51,10 +51,9 @@ export class ApproachBase { semanticConfiguration: 'default', top, captions: useSemanticCaption ? 'extractive|highlight-false' : undefined, - vectorQueries: [ + vectors: [ { - vector: queryVector, - kind: 'vector', + value: queryVector, kNearestNeighborsCount: queryVector ? 50 : undefined, fields: queryVector ? ['embedding'] : undefined, }, @@ -63,10 +62,9 @@ export class ApproachBase { : this.search.search(queryText, { filter, top, - vectorQueries: [ + vectors: [ { - vector: queryVector, - kind: 'vector', + value: queryVector, kNearestNeighborsCount: queryVector ? 50 : undefined, fields: queryVector ? ['embedding'] : undefined, },