diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md b/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md index 84b966ff39b1..b7d962fc0f5e 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md @@ -50,7 +50,8 @@ msRestNodeAuth.interactiveLogin().then((creds) => { strictFilters: [{ name: "testname", value: "testvalue" - }] + }], + strictFiltersCompoundOperationType: "AND" }; client.runtime.generateAnswer(kbId, generateAnswerPayload).then((result) => { console.log("The result is:"); @@ -110,7 +111,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to strictFilters: [{ name: "testname", value: "testvalue" - }] + }], + strictFiltersCompoundOperationType: "AND" }; client.runtime.generateAnswer(kbId, generateAnswerPayload).then((result) => { console.log("The result is:"); diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts index f76840a2b675..3a406c48e0b2 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts @@ -227,6 +227,11 @@ export interface QueryDTO { * Find only answers that contain these metadata. */ strictFilters?: MetadataDTO[]; + /** + * Optional field. Set to OR for using OR as Operation for Strict Filters. Possible values + * include: 'AND', 'OR' + */ + strictFiltersCompoundOperationType?: StrictFiltersCompoundOperationType; } /** @@ -317,6 +322,14 @@ export interface FeedbackRecordsDTO { */ export type ErrorCodeType = 'BadArgument' | 'Forbidden' | 'NotFound' | 'KbNotFound' | 'Unauthorized' | 'Unspecified' | 'EndpointKeysError' | 'QuotaExceeded' | 'QnaRuntimeError' | 'SKULimitExceeded' | 'OperationNotFound' | 'ServiceError' | 'ValidationFailure' | 'ExtractionFailure'; +/** + * Defines values for StrictFiltersCompoundOperationType. + * Possible values include: 'AND', 'OR' + * @readonly + * @enum {string} + */ +export type StrictFiltersCompoundOperationType = 'AND' | 'OR'; + /** * Contains response data for the generateAnswer operation. */ diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts index fa90543d3f62..0b94a70a762e 100644 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts @@ -397,6 +397,12 @@ export const QueryDTO: msRest.CompositeMapper = { } } } + }, + strictFiltersCompoundOperationType: { + serializedName: "strictFiltersCompoundOperationType", + type: { + name: "String" + } } } }