@azure/search-documents 12.1.0-alpha.20240513.1 → 12.1.0-beta.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.
- package/dist/index.js +626 -216
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js +42 -22
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +127 -0
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +74 -74
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +8 -8
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js +53 -9
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js +159 -16
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generatedStringLiteralUnions.js.map +1 -1
- package/dist-esm/src/index.js +2 -2
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/searchClient.js +2 -5
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +2 -1
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serialization.js +34 -70
- package/dist-esm/src/serialization.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +38 -12
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/walk.js +79 -0
- package/dist-esm/src/walk.js.map +1 -0
- package/package.json +9 -9
- package/types/search-documents.d.ts +275 -28
- package/dist-esm/src/constants.js +0 -5
- package/dist-esm/src/constants.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
|
8
8
|
var coreHttpCompat = require('@azure/core-http-compat');
|
|
9
9
|
var coreClient = require('@azure/core-client');
|
|
10
10
|
var logger$1 = require('@azure/logger');
|
|
11
|
+
var coreUtil = require('@azure/core-util');
|
|
11
12
|
var coreTracing = require('@azure/core-tracing');
|
|
12
13
|
var EventEmitter = require('events');
|
|
13
14
|
var fs = require('fs');
|
|
@@ -41,12 +42,12 @@ var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
|
41
42
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
42
43
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
43
44
|
*/
|
|
44
|
-
/** Known values of {@link
|
|
45
|
-
var
|
|
46
|
-
(function (
|
|
47
|
-
/** Api Version '2024-
|
|
48
|
-
|
|
49
|
-
})(
|
|
45
|
+
/** Known values of {@link ApiVersion20240501Preview} that the service accepts. */
|
|
46
|
+
var KnownApiVersion20240501Preview$1;
|
|
47
|
+
(function (KnownApiVersion20240501Preview) {
|
|
48
|
+
/** Api Version '2024-05-01-preview' */
|
|
49
|
+
KnownApiVersion20240501Preview["TwoThousandTwentyFour0501Preview"] = "2024-05-01-preview";
|
|
50
|
+
})(KnownApiVersion20240501Preview$1 || (KnownApiVersion20240501Preview$1 = {}));
|
|
50
51
|
/** Known values of {@link SemanticErrorMode} that the service accepts. */
|
|
51
52
|
exports.KnownSemanticErrorMode = void 0;
|
|
52
53
|
(function (KnownSemanticErrorMode) {
|
|
@@ -55,6 +56,22 @@ exports.KnownSemanticErrorMode = void 0;
|
|
|
55
56
|
/** If there is an exception during the semantic processing step, the query will fail and return the appropriate HTTP code depending on the error. */
|
|
56
57
|
KnownSemanticErrorMode["Fail"] = "fail";
|
|
57
58
|
})(exports.KnownSemanticErrorMode || (exports.KnownSemanticErrorMode = {}));
|
|
59
|
+
/** Known values of {@link QueryAnswerType} that the service accepts. */
|
|
60
|
+
var KnownQueryAnswerType;
|
|
61
|
+
(function (KnownQueryAnswerType) {
|
|
62
|
+
/** Do not return answers for the query. */
|
|
63
|
+
KnownQueryAnswerType["None"] = "none";
|
|
64
|
+
/** Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language. */
|
|
65
|
+
KnownQueryAnswerType["Extractive"] = "extractive";
|
|
66
|
+
})(KnownQueryAnswerType || (KnownQueryAnswerType = {}));
|
|
67
|
+
/** Known values of {@link QueryCaptionType} that the service accepts. */
|
|
68
|
+
var KnownQueryCaptionType;
|
|
69
|
+
(function (KnownQueryCaptionType) {
|
|
70
|
+
/** Do not return captions for the query. */
|
|
71
|
+
KnownQueryCaptionType["None"] = "none";
|
|
72
|
+
/** Extracts captions from the matching documents that contain passages relevant to the search query. */
|
|
73
|
+
KnownQueryCaptionType["Extractive"] = "extractive";
|
|
74
|
+
})(KnownQueryCaptionType || (KnownQueryCaptionType = {}));
|
|
58
75
|
/** Known values of {@link QueryDebugMode} that the service accepts. */
|
|
59
76
|
exports.KnownQueryDebugMode = void 0;
|
|
60
77
|
(function (KnownQueryDebugMode) {
|
|
@@ -219,22 +236,6 @@ exports.KnownSpeller = void 0;
|
|
|
219
236
|
/** Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. */
|
|
220
237
|
KnownSpeller["Lexicon"] = "lexicon";
|
|
221
238
|
})(exports.KnownSpeller || (exports.KnownSpeller = {}));
|
|
222
|
-
/** Known values of {@link QueryAnswerType} that the service accepts. */
|
|
223
|
-
var KnownQueryAnswerType;
|
|
224
|
-
(function (KnownQueryAnswerType) {
|
|
225
|
-
/** Do not return answers for the query. */
|
|
226
|
-
KnownQueryAnswerType["None"] = "none";
|
|
227
|
-
/** Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language. */
|
|
228
|
-
KnownQueryAnswerType["Extractive"] = "extractive";
|
|
229
|
-
})(KnownQueryAnswerType || (KnownQueryAnswerType = {}));
|
|
230
|
-
/** Known values of {@link QueryCaptionType} that the service accepts. */
|
|
231
|
-
var KnownQueryCaptionType;
|
|
232
|
-
(function (KnownQueryCaptionType) {
|
|
233
|
-
/** Do not return captions for the query. */
|
|
234
|
-
KnownQueryCaptionType["None"] = "none";
|
|
235
|
-
/** Extracts captions from the matching documents that contain passages relevant to the search query. */
|
|
236
|
-
KnownQueryCaptionType["Extractive"] = "extractive";
|
|
237
|
-
})(KnownQueryCaptionType || (KnownQueryCaptionType = {}));
|
|
238
239
|
/** Known values of {@link QuerySpellerType} that the service accepts. */
|
|
239
240
|
exports.KnownQuerySpellerType = void 0;
|
|
240
241
|
(function (KnownQuerySpellerType) {
|
|
@@ -250,7 +251,19 @@ exports.KnownVectorQueryKind = void 0;
|
|
|
250
251
|
KnownVectorQueryKind["Vector"] = "vector";
|
|
251
252
|
/** Vector query where a text value that needs to be vectorized is provided. */
|
|
252
253
|
KnownVectorQueryKind["Text"] = "text";
|
|
254
|
+
/** Vector query where an url that represents an image value that needs to be vectorized is provided. */
|
|
255
|
+
KnownVectorQueryKind["ImageUrl"] = "imageUrl";
|
|
256
|
+
/** Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. */
|
|
257
|
+
KnownVectorQueryKind["ImageBinary"] = "imageBinary";
|
|
253
258
|
})(exports.KnownVectorQueryKind || (exports.KnownVectorQueryKind = {}));
|
|
259
|
+
/** Known values of {@link VectorThresholdKind} that the service accepts. */
|
|
260
|
+
exports.KnownVectorThresholdKind = void 0;
|
|
261
|
+
(function (KnownVectorThresholdKind) {
|
|
262
|
+
/** The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. */
|
|
263
|
+
KnownVectorThresholdKind["VectorSimilarity"] = "vectorSimilarity";
|
|
264
|
+
/** The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. */
|
|
265
|
+
KnownVectorThresholdKind["SearchScore"] = "searchScore";
|
|
266
|
+
})(exports.KnownVectorThresholdKind || (exports.KnownVectorThresholdKind = {}));
|
|
254
267
|
/** Known values of {@link VectorFilterMode} that the service accepts. */
|
|
255
268
|
var KnownVectorFilterMode;
|
|
256
269
|
(function (KnownVectorFilterMode) {
|
|
@@ -259,6 +272,14 @@ var KnownVectorFilterMode;
|
|
|
259
272
|
/** The filter will be applied before the search query. */
|
|
260
273
|
KnownVectorFilterMode["PreFilter"] = "preFilter";
|
|
261
274
|
})(KnownVectorFilterMode || (KnownVectorFilterMode = {}));
|
|
275
|
+
/** Known values of {@link HybridCountAndFacetMode} that the service accepts. */
|
|
276
|
+
exports.KnownHybridCountAndFacetMode = void 0;
|
|
277
|
+
(function (KnownHybridCountAndFacetMode) {
|
|
278
|
+
/** Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'. */
|
|
279
|
+
KnownHybridCountAndFacetMode["CountRetrievableResults"] = "countRetrievableResults";
|
|
280
|
+
/** Include all documents that were matched by the search query when computing 'count' and 'facets', regardless of whether or not those documents are within the 'maxTextRecallSize' retrieval window. */
|
|
281
|
+
KnownHybridCountAndFacetMode["CountAllResults"] = "countAllResults";
|
|
282
|
+
})(exports.KnownHybridCountAndFacetMode || (exports.KnownHybridCountAndFacetMode = {}));
|
|
262
283
|
/** Known values of {@link SemanticErrorReason} that the service accepts. */
|
|
263
284
|
exports.KnownSemanticErrorReason = void 0;
|
|
264
285
|
(function (KnownSemanticErrorReason) {
|
|
@@ -295,12 +316,12 @@ exports.KnownSemanticFieldState = void 0;
|
|
|
295
316
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
296
317
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
297
318
|
*/
|
|
298
|
-
/** Known values of {@link
|
|
299
|
-
var
|
|
300
|
-
(function (
|
|
301
|
-
/** Api Version '2024-
|
|
302
|
-
|
|
303
|
-
})(
|
|
319
|
+
/** Known values of {@link ApiVersion20240501Preview} that the service accepts. */
|
|
320
|
+
var KnownApiVersion20240501Preview;
|
|
321
|
+
(function (KnownApiVersion20240501Preview) {
|
|
322
|
+
/** Api Version '2024-05-01-preview' */
|
|
323
|
+
KnownApiVersion20240501Preview["TwoThousandTwentyFour0501Preview"] = "2024-05-01-preview";
|
|
324
|
+
})(KnownApiVersion20240501Preview || (KnownApiVersion20240501Preview = {}));
|
|
304
325
|
/** Known values of {@link SearchIndexerDataSourceType} that the service accepts. */
|
|
305
326
|
exports.KnownSearchIndexerDataSourceType = void 0;
|
|
306
327
|
(function (KnownSearchIndexerDataSourceType) {
|
|
@@ -316,6 +337,8 @@ exports.KnownSearchIndexerDataSourceType = void 0;
|
|
|
316
337
|
KnownSearchIndexerDataSourceType["MySql"] = "mysql";
|
|
317
338
|
/** Indicates an ADLS Gen2 datasource. */
|
|
318
339
|
KnownSearchIndexerDataSourceType["AdlsGen2"] = "adlsgen2";
|
|
340
|
+
/** Indicates a Microsoft Fabric OneLake datasource. */
|
|
341
|
+
KnownSearchIndexerDataSourceType["OneLake"] = "onelake";
|
|
319
342
|
})(exports.KnownSearchIndexerDataSourceType || (exports.KnownSearchIndexerDataSourceType = {}));
|
|
320
343
|
/** Known values of {@link BlobIndexerParsingMode} that the service accepts. */
|
|
321
344
|
exports.KnownBlobIndexerParsingMode = void 0;
|
|
@@ -418,6 +441,8 @@ var KnownSearchFieldDataType;
|
|
|
418
441
|
KnownSearchFieldDataType["Int16"] = "Edm.Int16";
|
|
419
442
|
/** Indicates that a field contains a 8-bit signed integer. This is only valid when used with Collection(Edm.SByte). */
|
|
420
443
|
KnownSearchFieldDataType["SByte"] = "Edm.SByte";
|
|
444
|
+
/** Indicates that a field contains a 8-bit unsigned integer. This is only valid when used with Collection(Edm.Byte). */
|
|
445
|
+
KnownSearchFieldDataType["Byte"] = "Edm.Byte";
|
|
421
446
|
})(KnownSearchFieldDataType || (KnownSearchFieldDataType = {}));
|
|
422
447
|
/** Known values of {@link LexicalAnalyzerName} that the service accepts. */
|
|
423
448
|
exports.KnownLexicalAnalyzerName = void 0;
|
|
@@ -623,6 +648,12 @@ exports.KnownNormalizerNames = void 0;
|
|
|
623
648
|
/** Normalizes token text to uppercase. See https:\//lucene.apache.org\/core\/6_6_1\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/UpperCaseFilter.html */
|
|
624
649
|
KnownLexicalNormalizerName["Uppercase"] = "uppercase";
|
|
625
650
|
})(exports.KnownNormalizerNames || (exports.KnownNormalizerNames = {}));
|
|
651
|
+
/** Known values of {@link VectorEncodingFormat} that the service accepts. */
|
|
652
|
+
exports.KnownVectorEncodingFormat = void 0;
|
|
653
|
+
(function (KnownVectorEncodingFormat) {
|
|
654
|
+
/** Encoding format representing bits packed into a wider data type. */
|
|
655
|
+
KnownVectorEncodingFormat["PackedBit"] = "packedBit";
|
|
656
|
+
})(exports.KnownVectorEncodingFormat || (exports.KnownVectorEncodingFormat = {}));
|
|
626
657
|
/** Known values of {@link VectorSearchAlgorithmKind} that the service accepts. */
|
|
627
658
|
var KnownVectorSearchAlgorithmKind;
|
|
628
659
|
(function (KnownVectorSearchAlgorithmKind) {
|
|
@@ -638,6 +669,10 @@ exports.KnownVectorSearchVectorizerKind = void 0;
|
|
|
638
669
|
KnownVectorSearchVectorizerKind["AzureOpenAI"] = "azureOpenAI";
|
|
639
670
|
/** Generate embeddings using a custom web endpoint at query time. */
|
|
640
671
|
KnownVectorSearchVectorizerKind["CustomWebApi"] = "customWebApi";
|
|
672
|
+
/** Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. */
|
|
673
|
+
KnownVectorSearchVectorizerKind["AIServicesVision"] = "aiServicesVision";
|
|
674
|
+
/** Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog at query time. */
|
|
675
|
+
KnownVectorSearchVectorizerKind["AML"] = "aml";
|
|
641
676
|
})(exports.KnownVectorSearchVectorizerKind || (exports.KnownVectorSearchVectorizerKind = {}));
|
|
642
677
|
/** Known values of {@link VectorSearchCompressionKind} that the service accepts. */
|
|
643
678
|
exports.KnownVectorSearchCompressionKind = void 0;
|
|
@@ -726,12 +761,14 @@ exports.KnownCharFilterName = void 0;
|
|
|
726
761
|
/** Known values of {@link VectorSearchAlgorithmMetric} that the service accepts. */
|
|
727
762
|
var KnownVectorSearchAlgorithmMetric;
|
|
728
763
|
(function (KnownVectorSearchAlgorithmMetric) {
|
|
729
|
-
/**
|
|
764
|
+
/** Measures the angle between vectors to quantify their similarity, disregarding magnitude. The smaller the angle, the closer the similarity. */
|
|
730
765
|
KnownVectorSearchAlgorithmMetric["Cosine"] = "cosine";
|
|
731
|
-
/**
|
|
766
|
+
/** Computes the straight-line distance between vectors in a multi-dimensional space. The smaller the distance, the closer the similarity. */
|
|
732
767
|
KnownVectorSearchAlgorithmMetric["Euclidean"] = "euclidean";
|
|
733
|
-
/**
|
|
768
|
+
/** Calculates the sum of element-wise products to gauge alignment and magnitude similarity. The larger and more positive, the closer the similarity. */
|
|
734
769
|
KnownVectorSearchAlgorithmMetric["DotProduct"] = "dotProduct";
|
|
770
|
+
/** Only applicable to bit-packed binary data types. Determines dissimilarity by counting differing positions in binary vectors. The fewer differences, the closer the similarity. */
|
|
771
|
+
KnownVectorSearchAlgorithmMetric["Hamming"] = "hamming";
|
|
735
772
|
})(KnownVectorSearchAlgorithmMetric || (KnownVectorSearchAlgorithmMetric = {}));
|
|
736
773
|
/** Known values of {@link VectorSearchCompressionTargetDataType} that the service accepts. */
|
|
737
774
|
exports.KnownVectorSearchCompressionTargetDataType = void 0;
|
|
@@ -739,6 +776,34 @@ exports.KnownVectorSearchCompressionTargetDataType = void 0;
|
|
|
739
776
|
/** Int8 */
|
|
740
777
|
KnownVectorSearchCompressionTargetDataType["Int8"] = "int8";
|
|
741
778
|
})(exports.KnownVectorSearchCompressionTargetDataType || (exports.KnownVectorSearchCompressionTargetDataType = {}));
|
|
779
|
+
/** Known values of {@link AzureOpenAIModelName} that the service accepts. */
|
|
780
|
+
exports.KnownAzureOpenAIModelName = void 0;
|
|
781
|
+
(function (KnownAzureOpenAIModelName) {
|
|
782
|
+
/** TextEmbeddingAda002 */
|
|
783
|
+
KnownAzureOpenAIModelName["TextEmbeddingAda002"] = "text-embedding-ada-002";
|
|
784
|
+
/** TextEmbedding3Large */
|
|
785
|
+
KnownAzureOpenAIModelName["TextEmbedding3Large"] = "text-embedding-3-large";
|
|
786
|
+
/** TextEmbedding3Small */
|
|
787
|
+
KnownAzureOpenAIModelName["TextEmbedding3Small"] = "text-embedding-3-small";
|
|
788
|
+
/** Experimental */
|
|
789
|
+
KnownAzureOpenAIModelName["Experimental"] = "experimental";
|
|
790
|
+
})(exports.KnownAzureOpenAIModelName || (exports.KnownAzureOpenAIModelName = {}));
|
|
791
|
+
/** Known values of {@link AIStudioModelCatalogName} that the service accepts. */
|
|
792
|
+
exports.KnownAIStudioModelCatalogName = void 0;
|
|
793
|
+
(function (KnownAIStudioModelCatalogName) {
|
|
794
|
+
/** OpenAIClipImageTextEmbeddingsVitBasePatch32 */
|
|
795
|
+
KnownAIStudioModelCatalogName["OpenAIClipImageTextEmbeddingsVitBasePatch32"] = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32";
|
|
796
|
+
/** OpenAIClipImageTextEmbeddingsViTLargePatch14336 */
|
|
797
|
+
KnownAIStudioModelCatalogName["OpenAIClipImageTextEmbeddingsViTLargePatch14336"] = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336";
|
|
798
|
+
/** FacebookDinoV2ImageEmbeddingsViTBase */
|
|
799
|
+
KnownAIStudioModelCatalogName["FacebookDinoV2ImageEmbeddingsViTBase"] = "Facebook-DinoV2-Image-Embeddings-ViT-Base";
|
|
800
|
+
/** FacebookDinoV2ImageEmbeddingsViTGiant */
|
|
801
|
+
KnownAIStudioModelCatalogName["FacebookDinoV2ImageEmbeddingsViTGiant"] = "Facebook-DinoV2-Image-Embeddings-ViT-Giant";
|
|
802
|
+
/** CohereEmbedV3English */
|
|
803
|
+
KnownAIStudioModelCatalogName["CohereEmbedV3English"] = "Cohere-embed-v3-english";
|
|
804
|
+
/** CohereEmbedV3Multilingual */
|
|
805
|
+
KnownAIStudioModelCatalogName["CohereEmbedV3Multilingual"] = "Cohere-embed-v3-multilingual";
|
|
806
|
+
})(exports.KnownAIStudioModelCatalogName || (exports.KnownAIStudioModelCatalogName = {}));
|
|
742
807
|
/** Known values of {@link KeyPhraseExtractionSkillLanguage} that the service accepts. */
|
|
743
808
|
exports.KnownKeyPhraseExtractionSkillLanguage = void 0;
|
|
744
809
|
(function (KnownKeyPhraseExtractionSkillLanguage) {
|
|
@@ -2314,6 +2379,13 @@ const SearchRequest = {
|
|
|
2314
2379
|
name: "String",
|
|
2315
2380
|
},
|
|
2316
2381
|
},
|
|
2382
|
+
hybridSearch: {
|
|
2383
|
+
serializedName: "hybridSearch",
|
|
2384
|
+
type: {
|
|
2385
|
+
name: "Composite",
|
|
2386
|
+
className: "HybridSearch",
|
|
2387
|
+
},
|
|
2388
|
+
},
|
|
2317
2389
|
},
|
|
2318
2390
|
},
|
|
2319
2391
|
};
|
|
@@ -2358,6 +2430,59 @@ const VectorQuery = {
|
|
|
2358
2430
|
name: "Number",
|
|
2359
2431
|
},
|
|
2360
2432
|
},
|
|
2433
|
+
weight: {
|
|
2434
|
+
serializedName: "weight",
|
|
2435
|
+
type: {
|
|
2436
|
+
name: "Number",
|
|
2437
|
+
},
|
|
2438
|
+
},
|
|
2439
|
+
threshold: {
|
|
2440
|
+
serializedName: "threshold",
|
|
2441
|
+
type: {
|
|
2442
|
+
name: "Composite",
|
|
2443
|
+
className: "VectorThreshold",
|
|
2444
|
+
},
|
|
2445
|
+
},
|
|
2446
|
+
},
|
|
2447
|
+
},
|
|
2448
|
+
};
|
|
2449
|
+
const VectorThreshold = {
|
|
2450
|
+
type: {
|
|
2451
|
+
name: "Composite",
|
|
2452
|
+
className: "VectorThreshold",
|
|
2453
|
+
uberParent: "VectorThreshold",
|
|
2454
|
+
polymorphicDiscriminator: {
|
|
2455
|
+
serializedName: "kind",
|
|
2456
|
+
clientName: "kind",
|
|
2457
|
+
},
|
|
2458
|
+
modelProperties: {
|
|
2459
|
+
kind: {
|
|
2460
|
+
serializedName: "kind",
|
|
2461
|
+
required: true,
|
|
2462
|
+
type: {
|
|
2463
|
+
name: "String",
|
|
2464
|
+
},
|
|
2465
|
+
},
|
|
2466
|
+
},
|
|
2467
|
+
},
|
|
2468
|
+
};
|
|
2469
|
+
const HybridSearch = {
|
|
2470
|
+
type: {
|
|
2471
|
+
name: "Composite",
|
|
2472
|
+
className: "HybridSearch",
|
|
2473
|
+
modelProperties: {
|
|
2474
|
+
maxTextRecallSize: {
|
|
2475
|
+
serializedName: "maxTextRecallSize",
|
|
2476
|
+
type: {
|
|
2477
|
+
name: "Number",
|
|
2478
|
+
},
|
|
2479
|
+
},
|
|
2480
|
+
countAndFacetMode: {
|
|
2481
|
+
serializedName: "countAndFacetMode",
|
|
2482
|
+
type: {
|
|
2483
|
+
name: "String",
|
|
2484
|
+
},
|
|
2485
|
+
},
|
|
2361
2486
|
},
|
|
2362
2487
|
},
|
|
2363
2488
|
};
|
|
@@ -2944,10 +3069,77 @@ const VectorizableTextQuery = {
|
|
|
2944
3069
|
} }),
|
|
2945
3070
|
},
|
|
2946
3071
|
};
|
|
3072
|
+
const VectorizableImageUrlQuery = {
|
|
3073
|
+
serializedName: "imageUrl",
|
|
3074
|
+
type: {
|
|
3075
|
+
name: "Composite",
|
|
3076
|
+
className: "VectorizableImageUrlQuery",
|
|
3077
|
+
uberParent: "VectorQuery",
|
|
3078
|
+
polymorphicDiscriminator: VectorQuery.type.polymorphicDiscriminator,
|
|
3079
|
+
modelProperties: Object.assign(Object.assign({}, VectorQuery.type.modelProperties), { url: {
|
|
3080
|
+
serializedName: "url",
|
|
3081
|
+
type: {
|
|
3082
|
+
name: "String",
|
|
3083
|
+
},
|
|
3084
|
+
} }),
|
|
3085
|
+
},
|
|
3086
|
+
};
|
|
3087
|
+
const VectorizableImageBinaryQuery = {
|
|
3088
|
+
serializedName: "imageBinary",
|
|
3089
|
+
type: {
|
|
3090
|
+
name: "Composite",
|
|
3091
|
+
className: "VectorizableImageBinaryQuery",
|
|
3092
|
+
uberParent: "VectorQuery",
|
|
3093
|
+
polymorphicDiscriminator: VectorQuery.type.polymorphicDiscriminator,
|
|
3094
|
+
modelProperties: Object.assign(Object.assign({}, VectorQuery.type.modelProperties), { base64Image: {
|
|
3095
|
+
serializedName: "base64Image",
|
|
3096
|
+
type: {
|
|
3097
|
+
name: "String",
|
|
3098
|
+
},
|
|
3099
|
+
} }),
|
|
3100
|
+
},
|
|
3101
|
+
};
|
|
3102
|
+
const VectorSimilarityThreshold = {
|
|
3103
|
+
serializedName: "vectorSimilarity",
|
|
3104
|
+
type: {
|
|
3105
|
+
name: "Composite",
|
|
3106
|
+
className: "VectorSimilarityThreshold",
|
|
3107
|
+
uberParent: "VectorThreshold",
|
|
3108
|
+
polymorphicDiscriminator: VectorThreshold.type.polymorphicDiscriminator,
|
|
3109
|
+
modelProperties: Object.assign(Object.assign({}, VectorThreshold.type.modelProperties), { value: {
|
|
3110
|
+
serializedName: "value",
|
|
3111
|
+
required: true,
|
|
3112
|
+
type: {
|
|
3113
|
+
name: "Number",
|
|
3114
|
+
},
|
|
3115
|
+
} }),
|
|
3116
|
+
},
|
|
3117
|
+
};
|
|
3118
|
+
const SearchScoreThreshold = {
|
|
3119
|
+
serializedName: "searchScore",
|
|
3120
|
+
type: {
|
|
3121
|
+
name: "Composite",
|
|
3122
|
+
className: "SearchScoreThreshold",
|
|
3123
|
+
uberParent: "VectorThreshold",
|
|
3124
|
+
polymorphicDiscriminator: VectorThreshold.type.polymorphicDiscriminator,
|
|
3125
|
+
modelProperties: Object.assign(Object.assign({}, VectorThreshold.type.modelProperties), { value: {
|
|
3126
|
+
serializedName: "value",
|
|
3127
|
+
required: true,
|
|
3128
|
+
type: {
|
|
3129
|
+
name: "Number",
|
|
3130
|
+
},
|
|
3131
|
+
} }),
|
|
3132
|
+
},
|
|
3133
|
+
};
|
|
2947
3134
|
let discriminators$1 = {
|
|
2948
3135
|
VectorQuery: VectorQuery,
|
|
3136
|
+
VectorThreshold: VectorThreshold,
|
|
2949
3137
|
"VectorQuery.vector": VectorizedQuery,
|
|
2950
3138
|
"VectorQuery.text": VectorizableTextQuery,
|
|
3139
|
+
"VectorQuery.imageUrl": VectorizableImageUrlQuery,
|
|
3140
|
+
"VectorQuery.imageBinary": VectorizableImageBinaryQuery,
|
|
3141
|
+
"VectorThreshold.vectorSimilarity": VectorSimilarityThreshold,
|
|
3142
|
+
"VectorThreshold.searchScore": SearchScoreThreshold,
|
|
2951
3143
|
};
|
|
2952
3144
|
|
|
2953
3145
|
var Mappers$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -2960,6 +3152,7 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
|
|
|
2960
3152
|
ErrorDetail: ErrorDetail$1,
|
|
2961
3153
|
ErrorResponse: ErrorResponse$1,
|
|
2962
3154
|
FacetResult: FacetResult,
|
|
3155
|
+
HybridSearch: HybridSearch,
|
|
2963
3156
|
IndexAction: IndexAction,
|
|
2964
3157
|
IndexBatch: IndexBatch,
|
|
2965
3158
|
IndexDocumentsResult: IndexDocumentsResult,
|
|
@@ -2971,11 +3164,16 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
|
|
|
2971
3164
|
SearchDocumentsResult: SearchDocumentsResult,
|
|
2972
3165
|
SearchRequest: SearchRequest,
|
|
2973
3166
|
SearchResult: SearchResult,
|
|
3167
|
+
SearchScoreThreshold: SearchScoreThreshold,
|
|
2974
3168
|
SemanticDebugInfo: SemanticDebugInfo,
|
|
2975
3169
|
SuggestDocumentsResult: SuggestDocumentsResult,
|
|
2976
3170
|
SuggestRequest: SuggestRequest,
|
|
2977
3171
|
SuggestResult: SuggestResult,
|
|
2978
3172
|
VectorQuery: VectorQuery,
|
|
3173
|
+
VectorSimilarityThreshold: VectorSimilarityThreshold,
|
|
3174
|
+
VectorThreshold: VectorThreshold,
|
|
3175
|
+
VectorizableImageBinaryQuery: VectorizableImageBinaryQuery,
|
|
3176
|
+
VectorizableImageUrlQuery: VectorizableImageUrlQuery,
|
|
2979
3177
|
VectorizableTextQuery: VectorizableTextQuery,
|
|
2980
3178
|
VectorizedQuery: VectorizedQuery,
|
|
2981
3179
|
discriminators: discriminators$1
|
|
@@ -3163,58 +3361,54 @@ const scoringProfile = {
|
|
|
3163
3361
|
},
|
|
3164
3362
|
},
|
|
3165
3363
|
};
|
|
3166
|
-
const
|
|
3167
|
-
parameterPath: ["options", "searchOptions", "
|
|
3168
|
-
mapper: {
|
|
3169
|
-
serializedName: "semanticQuery",
|
|
3170
|
-
type: {
|
|
3171
|
-
name: "String",
|
|
3172
|
-
},
|
|
3173
|
-
},
|
|
3174
|
-
};
|
|
3175
|
-
const semanticConfiguration = {
|
|
3176
|
-
parameterPath: ["options", "searchOptions", "semanticConfiguration"],
|
|
3364
|
+
const searchFields = {
|
|
3365
|
+
parameterPath: ["options", "searchOptions", "searchFields"],
|
|
3177
3366
|
mapper: {
|
|
3178
|
-
serializedName: "
|
|
3367
|
+
serializedName: "searchFields",
|
|
3179
3368
|
type: {
|
|
3180
|
-
name: "
|
|
3369
|
+
name: "Sequence",
|
|
3370
|
+
element: {
|
|
3371
|
+
type: {
|
|
3372
|
+
name: "String",
|
|
3373
|
+
},
|
|
3374
|
+
},
|
|
3181
3375
|
},
|
|
3182
3376
|
},
|
|
3377
|
+
collectionFormat: "CSV",
|
|
3183
3378
|
};
|
|
3184
|
-
const
|
|
3185
|
-
parameterPath: ["options", "searchOptions", "
|
|
3379
|
+
const searchMode = {
|
|
3380
|
+
parameterPath: ["options", "searchOptions", "searchMode"],
|
|
3186
3381
|
mapper: {
|
|
3187
|
-
serializedName: "
|
|
3382
|
+
serializedName: "searchMode",
|
|
3188
3383
|
type: {
|
|
3189
|
-
name: "
|
|
3384
|
+
name: "Enum",
|
|
3385
|
+
allowedValues: ["any", "all"],
|
|
3190
3386
|
},
|
|
3191
3387
|
},
|
|
3192
3388
|
};
|
|
3193
|
-
const
|
|
3194
|
-
parameterPath: ["options", "searchOptions", "
|
|
3389
|
+
const scoringStatistics = {
|
|
3390
|
+
parameterPath: ["options", "searchOptions", "scoringStatistics"],
|
|
3195
3391
|
mapper: {
|
|
3196
|
-
|
|
3197
|
-
InclusiveMinimum: 700,
|
|
3198
|
-
},
|
|
3199
|
-
serializedName: "semanticMaxWaitInMilliseconds",
|
|
3392
|
+
serializedName: "scoringStatistics",
|
|
3200
3393
|
type: {
|
|
3201
|
-
name: "
|
|
3394
|
+
name: "Enum",
|
|
3395
|
+
allowedValues: ["local", "global"],
|
|
3202
3396
|
},
|
|
3203
3397
|
},
|
|
3204
3398
|
};
|
|
3205
|
-
const
|
|
3206
|
-
parameterPath: ["options", "searchOptions", "
|
|
3399
|
+
const sessionId = {
|
|
3400
|
+
parameterPath: ["options", "searchOptions", "sessionId"],
|
|
3207
3401
|
mapper: {
|
|
3208
|
-
serializedName: "
|
|
3402
|
+
serializedName: "sessionId",
|
|
3209
3403
|
type: {
|
|
3210
3404
|
name: "String",
|
|
3211
3405
|
},
|
|
3212
3406
|
},
|
|
3213
3407
|
};
|
|
3214
|
-
const
|
|
3215
|
-
parameterPath: ["options", "searchOptions", "
|
|
3408
|
+
const select$1 = {
|
|
3409
|
+
parameterPath: ["options", "searchOptions", "select"],
|
|
3216
3410
|
mapper: {
|
|
3217
|
-
serializedName: "
|
|
3411
|
+
serializedName: "$select",
|
|
3218
3412
|
type: {
|
|
3219
3413
|
name: "Sequence",
|
|
3220
3414
|
element: {
|
|
@@ -3226,99 +3420,103 @@ const searchFields = {
|
|
|
3226
3420
|
},
|
|
3227
3421
|
collectionFormat: "CSV",
|
|
3228
3422
|
};
|
|
3229
|
-
const
|
|
3230
|
-
parameterPath: ["options", "searchOptions", "
|
|
3423
|
+
const skip = {
|
|
3424
|
+
parameterPath: ["options", "searchOptions", "skip"],
|
|
3231
3425
|
mapper: {
|
|
3232
|
-
serializedName: "
|
|
3426
|
+
serializedName: "$skip",
|
|
3233
3427
|
type: {
|
|
3234
|
-
name: "
|
|
3428
|
+
name: "Number",
|
|
3235
3429
|
},
|
|
3236
3430
|
},
|
|
3237
3431
|
};
|
|
3238
|
-
const
|
|
3239
|
-
parameterPath: ["options", "searchOptions", "
|
|
3432
|
+
const top = {
|
|
3433
|
+
parameterPath: ["options", "searchOptions", "top"],
|
|
3240
3434
|
mapper: {
|
|
3241
|
-
serializedName: "
|
|
3435
|
+
serializedName: "$top",
|
|
3436
|
+
type: {
|
|
3437
|
+
name: "Number",
|
|
3438
|
+
},
|
|
3439
|
+
},
|
|
3440
|
+
};
|
|
3441
|
+
const semanticConfiguration = {
|
|
3442
|
+
parameterPath: ["options", "searchOptions", "semanticConfiguration"],
|
|
3443
|
+
mapper: {
|
|
3444
|
+
serializedName: "semanticConfiguration",
|
|
3242
3445
|
type: {
|
|
3243
3446
|
name: "String",
|
|
3244
3447
|
},
|
|
3245
3448
|
},
|
|
3246
3449
|
};
|
|
3247
|
-
const
|
|
3248
|
-
parameterPath: ["options", "searchOptions", "
|
|
3450
|
+
const semanticErrorHandling = {
|
|
3451
|
+
parameterPath: ["options", "searchOptions", "semanticErrorHandling"],
|
|
3249
3452
|
mapper: {
|
|
3250
|
-
serializedName: "
|
|
3453
|
+
serializedName: "semanticErrorHandling",
|
|
3251
3454
|
type: {
|
|
3252
3455
|
name: "String",
|
|
3253
3456
|
},
|
|
3254
3457
|
},
|
|
3255
3458
|
};
|
|
3256
|
-
const
|
|
3257
|
-
parameterPath: ["options", "searchOptions", "
|
|
3459
|
+
const semanticMaxWaitInMilliseconds = {
|
|
3460
|
+
parameterPath: ["options", "searchOptions", "semanticMaxWaitInMilliseconds"],
|
|
3258
3461
|
mapper: {
|
|
3259
|
-
|
|
3462
|
+
constraints: {
|
|
3463
|
+
InclusiveMinimum: 700,
|
|
3464
|
+
},
|
|
3465
|
+
serializedName: "semanticMaxWaitInMilliseconds",
|
|
3260
3466
|
type: {
|
|
3261
|
-
name: "
|
|
3262
|
-
allowedValues: ["any", "all"],
|
|
3467
|
+
name: "Number",
|
|
3263
3468
|
},
|
|
3264
3469
|
},
|
|
3265
3470
|
};
|
|
3266
|
-
const
|
|
3267
|
-
parameterPath: ["options", "searchOptions", "
|
|
3471
|
+
const answers = {
|
|
3472
|
+
parameterPath: ["options", "searchOptions", "answers"],
|
|
3268
3473
|
mapper: {
|
|
3269
|
-
serializedName: "
|
|
3474
|
+
serializedName: "answers",
|
|
3270
3475
|
type: {
|
|
3271
|
-
name: "
|
|
3272
|
-
allowedValues: ["local", "global"],
|
|
3476
|
+
name: "String",
|
|
3273
3477
|
},
|
|
3274
3478
|
},
|
|
3275
3479
|
};
|
|
3276
|
-
const
|
|
3277
|
-
parameterPath: ["options", "searchOptions", "
|
|
3480
|
+
const captions = {
|
|
3481
|
+
parameterPath: ["options", "searchOptions", "captions"],
|
|
3278
3482
|
mapper: {
|
|
3279
|
-
serializedName: "
|
|
3483
|
+
serializedName: "captions",
|
|
3280
3484
|
type: {
|
|
3281
3485
|
name: "String",
|
|
3282
3486
|
},
|
|
3283
3487
|
},
|
|
3284
3488
|
};
|
|
3285
|
-
const
|
|
3286
|
-
parameterPath: ["options", "searchOptions", "
|
|
3489
|
+
const semanticQuery = {
|
|
3490
|
+
parameterPath: ["options", "searchOptions", "semanticQuery"],
|
|
3287
3491
|
mapper: {
|
|
3288
|
-
serializedName: "
|
|
3492
|
+
serializedName: "semanticQuery",
|
|
3289
3493
|
type: {
|
|
3290
|
-
name: "
|
|
3291
|
-
element: {
|
|
3292
|
-
type: {
|
|
3293
|
-
name: "String",
|
|
3294
|
-
},
|
|
3295
|
-
},
|
|
3494
|
+
name: "String",
|
|
3296
3495
|
},
|
|
3297
3496
|
},
|
|
3298
|
-
collectionFormat: "CSV",
|
|
3299
3497
|
};
|
|
3300
|
-
const
|
|
3301
|
-
parameterPath: ["options", "searchOptions", "
|
|
3498
|
+
const debug = {
|
|
3499
|
+
parameterPath: ["options", "searchOptions", "debug"],
|
|
3302
3500
|
mapper: {
|
|
3303
|
-
serializedName: "
|
|
3501
|
+
serializedName: "debug",
|
|
3304
3502
|
type: {
|
|
3305
|
-
name: "
|
|
3503
|
+
name: "String",
|
|
3306
3504
|
},
|
|
3307
3505
|
},
|
|
3308
3506
|
};
|
|
3309
|
-
const
|
|
3310
|
-
parameterPath: ["options", "searchOptions", "
|
|
3507
|
+
const queryLanguage = {
|
|
3508
|
+
parameterPath: ["options", "searchOptions", "queryLanguage"],
|
|
3311
3509
|
mapper: {
|
|
3312
|
-
serializedName: "
|
|
3510
|
+
serializedName: "queryLanguage",
|
|
3313
3511
|
type: {
|
|
3314
|
-
name: "
|
|
3512
|
+
name: "String",
|
|
3315
3513
|
},
|
|
3316
3514
|
},
|
|
3317
3515
|
};
|
|
3318
|
-
const
|
|
3319
|
-
parameterPath: ["options", "searchOptions", "
|
|
3516
|
+
const speller = {
|
|
3517
|
+
parameterPath: ["options", "searchOptions", "speller"],
|
|
3320
3518
|
mapper: {
|
|
3321
|
-
serializedName: "
|
|
3519
|
+
serializedName: "speller",
|
|
3322
3520
|
type: {
|
|
3323
3521
|
name: "String",
|
|
3324
3522
|
},
|
|
@@ -3725,22 +3923,22 @@ const searchGetOperationSpec = {
|
|
|
3725
3923
|
queryType,
|
|
3726
3924
|
scoringParameters,
|
|
3727
3925
|
scoringProfile,
|
|
3728
|
-
semanticQuery,
|
|
3729
|
-
semanticConfiguration,
|
|
3730
|
-
semanticErrorHandling,
|
|
3731
|
-
semanticMaxWaitInMilliseconds,
|
|
3732
|
-
debug,
|
|
3733
3926
|
searchFields,
|
|
3734
|
-
queryLanguage,
|
|
3735
|
-
speller,
|
|
3736
|
-
answers,
|
|
3737
3927
|
searchMode,
|
|
3738
3928
|
scoringStatistics,
|
|
3739
3929
|
sessionId,
|
|
3740
3930
|
select$1,
|
|
3741
3931
|
skip,
|
|
3742
3932
|
top,
|
|
3933
|
+
semanticConfiguration,
|
|
3934
|
+
semanticErrorHandling,
|
|
3935
|
+
semanticMaxWaitInMilliseconds,
|
|
3936
|
+
answers,
|
|
3743
3937
|
captions,
|
|
3938
|
+
semanticQuery,
|
|
3939
|
+
debug,
|
|
3940
|
+
queryLanguage,
|
|
3941
|
+
speller,
|
|
3744
3942
|
semanticFields,
|
|
3745
3943
|
],
|
|
3746
3944
|
urlParameters: [endpoint$1, indexName$1],
|
|
@@ -4019,97 +4217,138 @@ function createSearchApiKeyCredentialPolicy(credential) {
|
|
|
4019
4217
|
};
|
|
4020
4218
|
}
|
|
4021
4219
|
|
|
4220
|
+
// Copyright (c) Microsoft Corporation.
|
|
4221
|
+
// Licensed under the MIT license.
|
|
4222
|
+
function walk(v, fn) {
|
|
4223
|
+
var _a;
|
|
4224
|
+
const seen = new Set();
|
|
4225
|
+
const mutated = new Map();
|
|
4226
|
+
deepLazyApply(v);
|
|
4227
|
+
for (const value of mutated.values()) {
|
|
4228
|
+
replaceChildren(value);
|
|
4229
|
+
}
|
|
4230
|
+
return (_a = mutated.get(v)) !== null && _a !== void 0 ? _a : v;
|
|
4231
|
+
function deepLazyApply(value) {
|
|
4232
|
+
var _a, _b;
|
|
4233
|
+
if (seen.has(value)) {
|
|
4234
|
+
return;
|
|
4235
|
+
}
|
|
4236
|
+
seen.add(value);
|
|
4237
|
+
const children = getChildren((_a = cachedApply(value)) !== null && _a !== void 0 ? _a : value);
|
|
4238
|
+
children === null || children === void 0 ? void 0 : children.forEach(deepLazyApply);
|
|
4239
|
+
if (children === null || children === void 0 ? void 0 : children.some((node) => mutated.has(node))) {
|
|
4240
|
+
mutated.set(value, (_b = mutated.get(value)) !== null && _b !== void 0 ? _b : shallowCopy(value));
|
|
4241
|
+
}
|
|
4242
|
+
}
|
|
4243
|
+
function cachedApply(value) {
|
|
4244
|
+
const cached = mutated.get(value);
|
|
4245
|
+
if (coreUtil.isDefined(cached)) {
|
|
4246
|
+
return cached;
|
|
4247
|
+
}
|
|
4248
|
+
const applied = fn(value);
|
|
4249
|
+
if (value !== applied) {
|
|
4250
|
+
mutated.set(value, applied);
|
|
4251
|
+
}
|
|
4252
|
+
return mutated.get(value);
|
|
4253
|
+
}
|
|
4254
|
+
function replaceChildren(applied) {
|
|
4255
|
+
if (!isComplex(applied)) {
|
|
4256
|
+
return;
|
|
4257
|
+
}
|
|
4258
|
+
else if (Array.isArray(applied)) {
|
|
4259
|
+
applied.forEach((e, i) => {
|
|
4260
|
+
var _a;
|
|
4261
|
+
applied[i] = (_a = mutated.get(e)) !== null && _a !== void 0 ? _a : e;
|
|
4262
|
+
});
|
|
4263
|
+
}
|
|
4264
|
+
else if (typeof applied === "object" && applied !== null) {
|
|
4265
|
+
Object.keys(applied).forEach((key) => {
|
|
4266
|
+
var _a;
|
|
4267
|
+
applied[key] = (_a = mutated.get(applied[key])) !== null && _a !== void 0 ? _a : applied[key];
|
|
4268
|
+
});
|
|
4269
|
+
}
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Array inputs SHOULD not have both complex and non-complex elements. This function determines
|
|
4274
|
+
* whether an array is complex based solely on the first element.
|
|
4275
|
+
*/
|
|
4276
|
+
function isComplex(v) {
|
|
4277
|
+
return Array.isArray(v) ? isComplex(v[0]) : typeof v === "object" && v !== null;
|
|
4278
|
+
}
|
|
4279
|
+
function getChildren(v) {
|
|
4280
|
+
if (!isComplex(v)) {
|
|
4281
|
+
return;
|
|
4282
|
+
}
|
|
4283
|
+
if (Array.isArray(v)) {
|
|
4284
|
+
return v;
|
|
4285
|
+
}
|
|
4286
|
+
return Object.values(v);
|
|
4287
|
+
}
|
|
4288
|
+
function shallowCopy(value) {
|
|
4289
|
+
const maybeCopy = Array.isArray(value)
|
|
4290
|
+
? value.map((v) => v)
|
|
4291
|
+
: typeof value === "object" && value !== null
|
|
4292
|
+
? Object.assign({}, value) : value;
|
|
4293
|
+
return value === maybeCopy
|
|
4294
|
+
? value
|
|
4295
|
+
: Object.setPrototypeOf(maybeCopy, Object.getPrototypeOf(value));
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4022
4298
|
// Copyright (c) Microsoft Corporation.
|
|
4023
4299
|
// Licensed under the MIT license.
|
|
4024
4300
|
const ISO8601DateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$/i;
|
|
4025
4301
|
const GeoJSONPointTypeName = "Point";
|
|
4026
4302
|
const WorldGeodeticSystem1984 = "EPSG:4326"; // See https://epsg.io/4326
|
|
4303
|
+
const [serializeValue, deserializeValue] = [
|
|
4304
|
+
[serializeSpecialNumbers, serializeDates, serializeGeoPoint],
|
|
4305
|
+
[deserializeSpecialNumbers, deserializeDates, deserializeGeoPoint],
|
|
4306
|
+
].map((fns) => (value) => fns.reduceRight((acc, fn) => fn(acc), value));
|
|
4027
4307
|
function serialize(obj) {
|
|
4028
|
-
return walk(obj,
|
|
4029
|
-
const result = serializeSpecialNumbers(value);
|
|
4030
|
-
return result;
|
|
4031
|
-
});
|
|
4308
|
+
return walk(obj, serializeValue);
|
|
4032
4309
|
}
|
|
4033
4310
|
function deserialize(obj) {
|
|
4034
|
-
return walk(obj,
|
|
4035
|
-
let result = deserializeSpecialNumbers(value);
|
|
4036
|
-
result = deserializeDates(result);
|
|
4037
|
-
result = deserializeGeoPoint(result);
|
|
4038
|
-
return result;
|
|
4039
|
-
});
|
|
4040
|
-
}
|
|
4041
|
-
function walk(start, mapper) {
|
|
4042
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
4043
|
-
const seenMarker = new WeakMap();
|
|
4044
|
-
const result = { value: undefined };
|
|
4045
|
-
const queue = [
|
|
4046
|
-
{ value: start, parent: result, key: "value" },
|
|
4047
|
-
];
|
|
4048
|
-
while (queue.length) {
|
|
4049
|
-
const current = queue.shift();
|
|
4050
|
-
if (typeof current.value === "object" && current.value !== null) {
|
|
4051
|
-
if (seenMarker.has(current.value)) {
|
|
4052
|
-
continue;
|
|
4053
|
-
}
|
|
4054
|
-
else {
|
|
4055
|
-
seenMarker.set(current.value, true);
|
|
4056
|
-
}
|
|
4057
|
-
}
|
|
4058
|
-
const mapped = mapper(current.value);
|
|
4059
|
-
if ((current === null || current === void 0 ? void 0 : current.parent) && current.key) {
|
|
4060
|
-
current.parent[current.key] = mapped;
|
|
4061
|
-
}
|
|
4062
|
-
if (typeof mapped === "object" && mapped !== null) {
|
|
4063
|
-
for (const key of Object.keys(mapped)) {
|
|
4064
|
-
queue.push({
|
|
4065
|
-
value: mapped[key],
|
|
4066
|
-
parent: mapped,
|
|
4067
|
-
key,
|
|
4068
|
-
});
|
|
4069
|
-
}
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
return result.value;
|
|
4311
|
+
return walk(obj, deserializeValue);
|
|
4073
4312
|
}
|
|
4074
4313
|
function serializeSpecialNumbers(input) {
|
|
4075
|
-
if (typeof input === "number") {
|
|
4076
|
-
|
|
4077
|
-
return "NaN";
|
|
4078
|
-
}
|
|
4079
|
-
else if (input === Infinity) {
|
|
4080
|
-
return "INF";
|
|
4081
|
-
}
|
|
4082
|
-
else if (input === -Infinity) {
|
|
4083
|
-
return "-INF";
|
|
4084
|
-
}
|
|
4314
|
+
if (typeof input === "number" && isNaN(input)) {
|
|
4315
|
+
return "NaN";
|
|
4085
4316
|
}
|
|
4086
|
-
|
|
4317
|
+
else if (input === Infinity) {
|
|
4318
|
+
return "INF";
|
|
4319
|
+
}
|
|
4320
|
+
else if (input === -Infinity) {
|
|
4321
|
+
return "-INF";
|
|
4322
|
+
}
|
|
4323
|
+
else {
|
|
4324
|
+
return input;
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4327
|
+
function serializeDates(input) {
|
|
4328
|
+
return input instanceof Date ? input.toISOString() : input;
|
|
4329
|
+
}
|
|
4330
|
+
function serializeGeoPoint(input) {
|
|
4331
|
+
return input instanceof GeographyPoint ? input.toJSON() : input;
|
|
4087
4332
|
}
|
|
4088
4333
|
function deserializeSpecialNumbers(input) {
|
|
4089
|
-
|
|
4090
|
-
|
|
4334
|
+
switch (input) {
|
|
4335
|
+
case "NaN":
|
|
4091
4336
|
return NaN;
|
|
4092
|
-
|
|
4093
|
-
else if (input === "INF") {
|
|
4094
|
-
return Infinity;
|
|
4095
|
-
}
|
|
4096
|
-
else if (input === "-INF") {
|
|
4337
|
+
case "-INF":
|
|
4097
4338
|
return -Infinity;
|
|
4098
|
-
|
|
4339
|
+
case "INF":
|
|
4340
|
+
return Infinity;
|
|
4341
|
+
default:
|
|
4342
|
+
return input;
|
|
4099
4343
|
}
|
|
4100
|
-
return input;
|
|
4101
4344
|
}
|
|
4102
4345
|
function deserializeDates(input) {
|
|
4103
|
-
|
|
4104
|
-
if (ISO8601DateRegex.test(input)) {
|
|
4105
|
-
return new Date(input);
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
return input;
|
|
4346
|
+
return typeof input === "string" && ISO8601DateRegex.test(input) ? new Date(input) : input;
|
|
4109
4347
|
}
|
|
4110
4348
|
function deserializeGeoPoint(input) {
|
|
4111
4349
|
if (isGeoJSONPoint(input)) {
|
|
4112
|
-
|
|
4350
|
+
const [longitude, latitude] = input.coordinates;
|
|
4351
|
+
return new GeographyPoint({ longitude, latitude });
|
|
4113
4352
|
}
|
|
4114
4353
|
return input;
|
|
4115
4354
|
}
|
|
@@ -4849,6 +5088,7 @@ exports.KnownAnalyzerNames = void 0;
|
|
|
4849
5088
|
|
|
4850
5089
|
// Copyright (c) Microsoft Corporation.
|
|
4851
5090
|
// Licensed under the MIT license.
|
|
5091
|
+
const defaultServiceVersion = "2024-05-01-Preview";
|
|
4852
5092
|
function convertSkillsToPublic(skills) {
|
|
4853
5093
|
if (!skills) {
|
|
4854
5094
|
return skills;
|
|
@@ -5138,6 +5378,7 @@ function generatedIndexToPublicIndex(generatedIndex) {
|
|
|
5138
5378
|
};
|
|
5139
5379
|
}
|
|
5140
5380
|
function generatedVectorSearchVectorizerToPublicVectorizer(generatedVectorizer) {
|
|
5381
|
+
var _a;
|
|
5141
5382
|
if (!generatedVectorizer) {
|
|
5142
5383
|
return generatedVectorizer;
|
|
5143
5384
|
}
|
|
@@ -5154,9 +5395,42 @@ function generatedVectorSearchVectorizerToPublicVectorizer(generatedVectorizer)
|
|
|
5154
5395
|
const vectorizer = Object.assign(Object.assign({}, generatedVectorizer), { customVectorizerParameters: Object.assign(Object.assign({}, customWebApiParameters), { authIdentity }) });
|
|
5155
5396
|
return vectorizer;
|
|
5156
5397
|
}
|
|
5157
|
-
|
|
5158
|
-
|
|
5398
|
+
case "aiServicesVision": {
|
|
5399
|
+
const generatedVisionVectorizer = generatedVectorizer;
|
|
5400
|
+
const { aIServicesVisionParameters: generatedParameters } = generatedVisionVectorizer;
|
|
5401
|
+
const aIServicesVisionParameters = generatedParameters
|
|
5402
|
+
? Object.assign(Object.assign({}, generatedParameters), { modelVersion: (_a = generatedParameters.modelVersion) !== null && _a !== void 0 ? _a : undefined, resourceUri: generatedParameters.resourceUri, authIdentity: convertSearchIndexerDataIdentityToPublic(generatedParameters.authIdentity) }) : undefined;
|
|
5403
|
+
const vectorizer = Object.assign(Object.assign({}, generatedVisionVectorizer), { aIServicesVisionParameters });
|
|
5404
|
+
return vectorizer;
|
|
5405
|
+
}
|
|
5406
|
+
case "aml": {
|
|
5407
|
+
const generatedAMLVectorizer = generatedVectorizer;
|
|
5408
|
+
const vectorizer = Object.assign(Object.assign({}, generatedAMLVectorizer), { amlParameters: generatedAzureMachineLearningVectorizerParametersToPublicAzureMachineLearningVectorizerParameters(generatedAMLVectorizer.aMLParameters) });
|
|
5409
|
+
return vectorizer;
|
|
5410
|
+
}
|
|
5159
5411
|
}
|
|
5412
|
+
logger.warning(`Unsupported vectorizer kind: ${generatedVectorizer.kind}`);
|
|
5413
|
+
return generatedVectorizer;
|
|
5414
|
+
}
|
|
5415
|
+
function generatedAzureMachineLearningVectorizerParametersToPublicAzureMachineLearningVectorizerParameters(aMLParameters) {
|
|
5416
|
+
if (!aMLParameters) {
|
|
5417
|
+
return aMLParameters;
|
|
5418
|
+
}
|
|
5419
|
+
const { resourceId, authenticationKey, scoringUri } = aMLParameters;
|
|
5420
|
+
// Sensitive to case order
|
|
5421
|
+
switch (true) {
|
|
5422
|
+
case resourceId !== undefined && resourceId !== null: {
|
|
5423
|
+
return Object.assign(Object.assign({}, aMLParameters), { authKind: "token" });
|
|
5424
|
+
}
|
|
5425
|
+
case authenticationKey !== undefined && authenticationKey !== null: {
|
|
5426
|
+
return Object.assign(Object.assign({}, aMLParameters), { authKind: "key" });
|
|
5427
|
+
}
|
|
5428
|
+
case scoringUri !== undefined && scoringUri !== null: {
|
|
5429
|
+
return Object.assign(Object.assign({}, aMLParameters), { authKind: "none" });
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
logger.warning("Unknown AML parameter kind");
|
|
5433
|
+
return aMLParameters;
|
|
5160
5434
|
}
|
|
5161
5435
|
function generatedVectorSearchAlgorithmConfigurationToPublicVectorSearchAlgorithmConfiguration(generatedAlgorithmConfiguration) {
|
|
5162
5436
|
var _a;
|
|
@@ -5328,15 +5602,6 @@ function getRandomIntegerInclusive(min, max) {
|
|
|
5328
5602
|
const offset = Math.floor(Math.random() * (max - min + 1));
|
|
5329
5603
|
return offset + min;
|
|
5330
5604
|
}
|
|
5331
|
-
/**
|
|
5332
|
-
* A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.
|
|
5333
|
-
* @param timeInMs - The number of milliseconds to be delayed.
|
|
5334
|
-
* @returns Promise that is resolved after timeInMs
|
|
5335
|
-
*/
|
|
5336
|
-
function delay(timeInMs) {
|
|
5337
|
-
return new Promise((resolve) => setTimeout(() => resolve(), timeInMs));
|
|
5338
|
-
}
|
|
5339
|
-
const defaultServiceVersion = "2024-03-01-Preview";
|
|
5340
5605
|
function convertKnowledgeStoreToPublic(knowledgeStore) {
|
|
5341
5606
|
if (!knowledgeStore) {
|
|
5342
5607
|
return knowledgeStore;
|
|
@@ -5538,10 +5803,10 @@ class SearchClient {
|
|
|
5538
5803
|
}
|
|
5539
5804
|
}
|
|
5540
5805
|
async searchDocuments(searchText, options = {}, nextPageParameters = {}) {
|
|
5541
|
-
const _a = options, { includeTotalCount, orderBy, searchFields, select, vectorSearchOptions, semanticSearchOptions } = _a, restOptions = tslib.__rest(_a, ["includeTotalCount", "orderBy", "searchFields", "select", "vectorSearchOptions", "semanticSearchOptions"]);
|
|
5806
|
+
const _a = options, { includeTotalCount, orderBy, searchFields, select, vectorSearchOptions, semanticSearchOptions, hybridSearch } = _a, restOptions = tslib.__rest(_a, ["includeTotalCount", "orderBy", "searchFields", "select", "vectorSearchOptions", "semanticSearchOptions", "hybridSearch"]);
|
|
5542
5807
|
const _b = semanticSearchOptions !== null && semanticSearchOptions !== void 0 ? semanticSearchOptions : {}, { semanticFields, configurationName, errorMode, answers, captions, debugMode } = _b, restSemanticOptions = tslib.__rest(_b, ["semanticFields", "configurationName", "errorMode", "answers", "captions", "debugMode"]);
|
|
5543
5808
|
const _c = vectorSearchOptions !== null && vectorSearchOptions !== void 0 ? vectorSearchOptions : {}, { queries, filterMode } = _c, restVectorOptions = tslib.__rest(_c, ["queries", "filterMode"]);
|
|
5544
|
-
const fullOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, restSemanticOptions), restVectorOptions), restOptions), nextPageParameters), { searchFields: this.convertSearchFields(searchFields), semanticFields: this.convertSemanticFields(semanticFields), select: this.convertSelect(select) || "*", orderBy: this.convertOrderBy(orderBy), includeTotalResultCount: includeTotalCount, vectorQueries: queries === null || queries === void 0 ? void 0 : queries.map(this.convertVectorQuery.bind(this)), answers: this.convertQueryAnswers(answers), captions: this.convertQueryCaptions(captions), semanticErrorHandling: errorMode, semanticConfigurationName: configurationName, debug: debugMode, vectorFilterMode: filterMode });
|
|
5809
|
+
const fullOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, restSemanticOptions), restVectorOptions), restOptions), nextPageParameters), { searchFields: this.convertSearchFields(searchFields), semanticFields: this.convertSemanticFields(semanticFields), select: this.convertSelect(select) || "*", orderBy: this.convertOrderBy(orderBy), includeTotalResultCount: includeTotalCount, vectorQueries: queries === null || queries === void 0 ? void 0 : queries.map(this.convertVectorQuery.bind(this)), answers: this.convertQueryAnswers(answers), captions: this.convertQueryCaptions(captions), semanticErrorHandling: errorMode, semanticConfigurationName: configurationName, debug: debugMode, vectorFilterMode: filterMode, hybridSearch: hybridSearch });
|
|
5545
5810
|
const { span, updatedOptions } = createSpan("SearchClient-searchDocuments", options);
|
|
5546
5811
|
try {
|
|
5547
5812
|
const result = await this.client.documents.searchPost(Object.assign(Object.assign({}, fullOptions), { searchText: searchText }), updatedOptions);
|
|
@@ -5971,9 +6236,6 @@ class SearchClient {
|
|
|
5971
6236
|
return output;
|
|
5972
6237
|
}
|
|
5973
6238
|
convertVectorQuery(vectorQuery) {
|
|
5974
|
-
if (!vectorQuery) {
|
|
5975
|
-
return vectorQuery;
|
|
5976
|
-
}
|
|
5977
6239
|
return Object.assign(Object.assign({}, vectorQuery), { fields: this.convertVectorQueryFields(vectorQuery === null || vectorQuery === void 0 ? void 0 : vectorQuery.fields) });
|
|
5978
6240
|
}
|
|
5979
6241
|
}
|
|
@@ -7919,6 +8181,13 @@ const SearchField = {
|
|
|
7919
8181
|
name: "String",
|
|
7920
8182
|
},
|
|
7921
8183
|
},
|
|
8184
|
+
vectorEncodingFormat: {
|
|
8185
|
+
serializedName: "vectorEncoding",
|
|
8186
|
+
nullable: true,
|
|
8187
|
+
type: {
|
|
8188
|
+
name: "String",
|
|
8189
|
+
},
|
|
8190
|
+
},
|
|
7922
8191
|
synonymMaps: {
|
|
7923
8192
|
serializedName: "synonymMaps",
|
|
7924
8193
|
type: {
|
|
@@ -8926,6 +9195,13 @@ const ServiceLimits = {
|
|
|
8926
9195
|
name: "Number",
|
|
8927
9196
|
},
|
|
8928
9197
|
},
|
|
9198
|
+
maxStoragePerIndex: {
|
|
9199
|
+
serializedName: "maxStoragePerIndex",
|
|
9200
|
+
nullable: true,
|
|
9201
|
+
type: {
|
|
9202
|
+
name: "Number",
|
|
9203
|
+
},
|
|
9204
|
+
},
|
|
8929
9205
|
},
|
|
8930
9206
|
},
|
|
8931
9207
|
};
|
|
@@ -9040,6 +9316,12 @@ const AzureOpenAIParameters = {
|
|
|
9040
9316
|
className: "SearchIndexerDataIdentity",
|
|
9041
9317
|
},
|
|
9042
9318
|
},
|
|
9319
|
+
modelName: {
|
|
9320
|
+
serializedName: "modelName",
|
|
9321
|
+
type: {
|
|
9322
|
+
name: "String",
|
|
9323
|
+
},
|
|
9324
|
+
},
|
|
9043
9325
|
},
|
|
9044
9326
|
},
|
|
9045
9327
|
};
|
|
@@ -9090,6 +9372,92 @@ const CustomWebApiParameters = {
|
|
|
9090
9372
|
},
|
|
9091
9373
|
},
|
|
9092
9374
|
};
|
|
9375
|
+
const AIServicesVisionParameters = {
|
|
9376
|
+
type: {
|
|
9377
|
+
name: "Composite",
|
|
9378
|
+
className: "AIServicesVisionParameters",
|
|
9379
|
+
modelProperties: {
|
|
9380
|
+
modelVersion: {
|
|
9381
|
+
serializedName: "modelVersion",
|
|
9382
|
+
required: true,
|
|
9383
|
+
nullable: true,
|
|
9384
|
+
type: {
|
|
9385
|
+
name: "String",
|
|
9386
|
+
},
|
|
9387
|
+
},
|
|
9388
|
+
resourceUri: {
|
|
9389
|
+
serializedName: "resourceUri",
|
|
9390
|
+
required: true,
|
|
9391
|
+
type: {
|
|
9392
|
+
name: "String",
|
|
9393
|
+
},
|
|
9394
|
+
},
|
|
9395
|
+
apiKey: {
|
|
9396
|
+
serializedName: "apiKey",
|
|
9397
|
+
type: {
|
|
9398
|
+
name: "String",
|
|
9399
|
+
},
|
|
9400
|
+
},
|
|
9401
|
+
authIdentity: {
|
|
9402
|
+
serializedName: "authIdentity",
|
|
9403
|
+
type: {
|
|
9404
|
+
name: "Composite",
|
|
9405
|
+
className: "SearchIndexerDataIdentity",
|
|
9406
|
+
},
|
|
9407
|
+
},
|
|
9408
|
+
},
|
|
9409
|
+
},
|
|
9410
|
+
};
|
|
9411
|
+
const AMLParameters = {
|
|
9412
|
+
type: {
|
|
9413
|
+
name: "Composite",
|
|
9414
|
+
className: "AMLParameters",
|
|
9415
|
+
modelProperties: {
|
|
9416
|
+
scoringUri: {
|
|
9417
|
+
serializedName: "uri",
|
|
9418
|
+
required: true,
|
|
9419
|
+
nullable: true,
|
|
9420
|
+
type: {
|
|
9421
|
+
name: "String",
|
|
9422
|
+
},
|
|
9423
|
+
},
|
|
9424
|
+
authenticationKey: {
|
|
9425
|
+
serializedName: "key",
|
|
9426
|
+
nullable: true,
|
|
9427
|
+
type: {
|
|
9428
|
+
name: "String",
|
|
9429
|
+
},
|
|
9430
|
+
},
|
|
9431
|
+
resourceId: {
|
|
9432
|
+
serializedName: "resourceId",
|
|
9433
|
+
nullable: true,
|
|
9434
|
+
type: {
|
|
9435
|
+
name: "String",
|
|
9436
|
+
},
|
|
9437
|
+
},
|
|
9438
|
+
timeout: {
|
|
9439
|
+
serializedName: "timeout",
|
|
9440
|
+
nullable: true,
|
|
9441
|
+
type: {
|
|
9442
|
+
name: "TimeSpan",
|
|
9443
|
+
},
|
|
9444
|
+
},
|
|
9445
|
+
region: {
|
|
9446
|
+
serializedName: "region",
|
|
9447
|
+
nullable: true,
|
|
9448
|
+
type: {
|
|
9449
|
+
name: "String",
|
|
9450
|
+
},
|
|
9451
|
+
},
|
|
9452
|
+
modelName: {
|
|
9453
|
+
serializedName: "modelName",
|
|
9454
|
+
type: {
|
|
9455
|
+
name: "String",
|
|
9456
|
+
},
|
|
9457
|
+
},
|
|
9458
|
+
},
|
|
9459
|
+
},
|
|
9460
|
+
};
|
|
9093
9461
|
const DistanceScoringParameters = {
|
|
9094
9462
|
type: {
|
|
9095
9463
|
name: "Composite",
|
|
@@ -10009,27 +10377,29 @@ const AzureOpenAIEmbeddingSkill = {
|
|
|
10009
10377
|
className: "AzureOpenAIEmbeddingSkill",
|
|
10010
10378
|
uberParent: "SearchIndexerSkill",
|
|
10011
10379
|
polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator,
|
|
10012
|
-
modelProperties: Object.assign(Object.assign({}, SearchIndexerSkill.type.modelProperties), {
|
|
10013
|
-
serializedName: "
|
|
10014
|
-
|
|
10015
|
-
name: "String",
|
|
10016
|
-
},
|
|
10017
|
-
}, deploymentId: {
|
|
10018
|
-
serializedName: "deploymentId",
|
|
10380
|
+
modelProperties: Object.assign(Object.assign(Object.assign({}, SearchIndexerSkill.type.modelProperties), AzureOpenAIParameters.type.modelProperties), { dimensions: {
|
|
10381
|
+
serializedName: "dimensions",
|
|
10382
|
+
nullable: true,
|
|
10019
10383
|
type: {
|
|
10020
|
-
name: "
|
|
10384
|
+
name: "Number",
|
|
10021
10385
|
},
|
|
10022
|
-
},
|
|
10023
|
-
|
|
10386
|
+
} }),
|
|
10387
|
+
},
|
|
10388
|
+
};
|
|
10389
|
+
const VisionVectorizeSkill = {
|
|
10390
|
+
serializedName: "#Microsoft.Skills.Vision.VectorizeSkill",
|
|
10391
|
+
type: {
|
|
10392
|
+
name: "Composite",
|
|
10393
|
+
className: "VisionVectorizeSkill",
|
|
10394
|
+
uberParent: "SearchIndexerSkill",
|
|
10395
|
+
polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator,
|
|
10396
|
+
modelProperties: Object.assign(Object.assign({}, SearchIndexerSkill.type.modelProperties), { modelVersion: {
|
|
10397
|
+
serializedName: "modelVersion",
|
|
10398
|
+
required: true,
|
|
10399
|
+
nullable: true,
|
|
10024
10400
|
type: {
|
|
10025
10401
|
name: "String",
|
|
10026
10402
|
},
|
|
10027
|
-
}, authIdentity: {
|
|
10028
|
-
serializedName: "authIdentity",
|
|
10029
|
-
type: {
|
|
10030
|
-
name: "Composite",
|
|
10031
|
-
className: "SearchIndexerDataIdentity",
|
|
10032
|
-
},
|
|
10033
10403
|
} }),
|
|
10034
10404
|
},
|
|
10035
10405
|
};
|
|
@@ -11705,6 +12075,38 @@ const CustomVectorizer = {
|
|
|
11705
12075
|
} }),
|
|
11706
12076
|
},
|
|
11707
12077
|
};
|
|
12078
|
+
const AIServicesVisionVectorizer = {
|
|
12079
|
+
serializedName: "aiServicesVision",
|
|
12080
|
+
type: {
|
|
12081
|
+
name: "Composite",
|
|
12082
|
+
className: "AIServicesVisionVectorizer",
|
|
12083
|
+
uberParent: "VectorSearchVectorizer",
|
|
12084
|
+
polymorphicDiscriminator: VectorSearchVectorizer.type.polymorphicDiscriminator,
|
|
12085
|
+
modelProperties: Object.assign(Object.assign({}, VectorSearchVectorizer.type.modelProperties), { aIServicesVisionParameters: {
|
|
12086
|
+
serializedName: "aiServicesVisionParameters",
|
|
12087
|
+
type: {
|
|
12088
|
+
name: "Composite",
|
|
12089
|
+
className: "AIServicesVisionParameters",
|
|
12090
|
+
},
|
|
12091
|
+
} }),
|
|
12092
|
+
},
|
|
12093
|
+
};
|
|
12094
|
+
const AMLVectorizer = {
|
|
12095
|
+
serializedName: "aml",
|
|
12096
|
+
type: {
|
|
12097
|
+
name: "Composite",
|
|
12098
|
+
className: "AMLVectorizer",
|
|
12099
|
+
uberParent: "VectorSearchVectorizer",
|
|
12100
|
+
polymorphicDiscriminator: VectorSearchVectorizer.type.polymorphicDiscriminator,
|
|
12101
|
+
modelProperties: Object.assign(Object.assign({}, VectorSearchVectorizer.type.modelProperties), { aMLParameters: {
|
|
12102
|
+
serializedName: "amlParameters",
|
|
12103
|
+
type: {
|
|
12104
|
+
name: "Composite",
|
|
12105
|
+
className: "AMLParameters",
|
|
12106
|
+
},
|
|
12107
|
+
} }),
|
|
12108
|
+
},
|
|
12109
|
+
};
|
|
11708
12110
|
const ScalarQuantizationCompressionConfiguration = {
|
|
11709
12111
|
serializedName: "scalarQuantization",
|
|
11710
12112
|
type: {
|
|
@@ -11779,6 +12181,7 @@ let discriminators = {
|
|
|
11779
12181
|
"SearchIndexerSkill.#Microsoft.Skills.Custom.WebApiSkill": WebApiSkill,
|
|
11780
12182
|
"SearchIndexerSkill.#Microsoft.Skills.Custom.AmlSkill": AzureMachineLearningSkill,
|
|
11781
12183
|
"SearchIndexerSkill.#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": AzureOpenAIEmbeddingSkill,
|
|
12184
|
+
"SearchIndexerSkill.#Microsoft.Skills.Vision.VectorizeSkill": VisionVectorizeSkill,
|
|
11782
12185
|
"CognitiveServicesAccount.#Microsoft.Azure.Search.DefaultCognitiveServices": DefaultCognitiveServicesAccount,
|
|
11783
12186
|
"CognitiveServicesAccount.#Microsoft.Azure.Search.CognitiveServicesByKey": CognitiveServicesAccountKey,
|
|
11784
12187
|
"ScoringFunction.distance": DistanceScoringFunction,
|
|
@@ -11835,11 +12238,17 @@ let discriminators = {
|
|
|
11835
12238
|
"VectorSearchAlgorithmConfiguration.exhaustiveKnn": ExhaustiveKnnAlgorithmConfiguration,
|
|
11836
12239
|
"VectorSearchVectorizer.azureOpenAI": AzureOpenAIVectorizer,
|
|
11837
12240
|
"VectorSearchVectorizer.customWebApi": CustomVectorizer,
|
|
12241
|
+
"VectorSearchVectorizer.aiServicesVision": AIServicesVisionVectorizer,
|
|
12242
|
+
"VectorSearchVectorizer.aml": AMLVectorizer,
|
|
11838
12243
|
"BaseVectorSearchCompressionConfiguration.scalarQuantization": ScalarQuantizationCompressionConfiguration,
|
|
11839
12244
|
};
|
|
11840
12245
|
|
|
11841
12246
|
var Mappers = /*#__PURE__*/Object.freeze({
|
|
11842
12247
|
__proto__: null,
|
|
12248
|
+
AIServicesVisionParameters: AIServicesVisionParameters,
|
|
12249
|
+
AIServicesVisionVectorizer: AIServicesVisionVectorizer,
|
|
12250
|
+
AMLParameters: AMLParameters,
|
|
12251
|
+
AMLVectorizer: AMLVectorizer,
|
|
11843
12252
|
AnalyzeRequest: AnalyzeRequest,
|
|
11844
12253
|
AnalyzeResult: AnalyzeResult,
|
|
11845
12254
|
AnalyzedTokenInfo: AnalyzedTokenInfo,
|
|
@@ -12012,6 +12421,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
12012
12421
|
VectorSearchAlgorithmConfiguration: VectorSearchAlgorithmConfiguration,
|
|
12013
12422
|
VectorSearchProfile: VectorSearchProfile,
|
|
12014
12423
|
VectorSearchVectorizer: VectorSearchVectorizer,
|
|
12424
|
+
VisionVectorizeSkill: VisionVectorizeSkill,
|
|
12015
12425
|
WebApiSkill: WebApiSkill,
|
|
12016
12426
|
WordDelimiterTokenFilter: WordDelimiterTokenFilter,
|
|
12017
12427
|
discriminators: discriminators
|
|
@@ -14952,7 +15362,7 @@ class SearchIndexingBufferedSender {
|
|
|
14952
15362
|
// Allow the final value to have some "jitter" (within 50% of the delay size) so
|
|
14953
15363
|
// that retries across multiple clients don't occur simultaneously.
|
|
14954
15364
|
const delayWithJitter = clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2);
|
|
14955
|
-
await delay(delayWithJitter);
|
|
15365
|
+
await coreUtil.delay(delayWithJitter);
|
|
14956
15366
|
await this.submitDocuments(actionsToSend, options, retryAttempt + 1);
|
|
14957
15367
|
}
|
|
14958
15368
|
else {
|