diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/ErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/ErrorCode.cs index 4181524ecbc5..91b951a1bc7b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/ErrorCode.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/ErrorCode.cs @@ -27,7 +27,13 @@ public ErrorCode(string value) private const string UnauthorizedValue = "Unauthorized"; private const string ForbiddenValue = "Forbidden"; private const string NotFoundValue = "NotFound"; + private const string ProjectNotFoundValue = "ProjectNotFound"; + private const string OperationNotFoundValue = "OperationNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchIndexNotFoundValue = "AzureCognitiveSearchIndexNotFound"; private const string TooManyRequestsValue = "TooManyRequests"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string AzureCognitiveSearchIndexLimitReachedValue = "AzureCognitiveSearchIndexLimitReached"; private const string InternalServerErrorValue = "InternalServerError"; private const string ServiceUnavailableValue = "ServiceUnavailable"; @@ -41,8 +47,20 @@ public ErrorCode(string value) public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); /// NotFound. public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); + /// ProjectNotFound. + public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); + /// OperationNotFound. + public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchIndexNotFound. + public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); /// TooManyRequests. public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); + /// AzureCognitiveSearchThrottling. + public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); + /// AzureCognitiveSearchIndexLimitReached. + public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); /// InternalServerError. public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); /// ServiceUnavailable. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswer.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswer.cs index d589e743c21e..b4491d51ade7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswer.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswer.cs @@ -21,8 +21,8 @@ internal KnowledgeBaseAnswer() } /// Initializes a new instance of KnowledgeBaseAnswer. - /// List of questions. - /// The Answer. + /// List of questions associated with the answer. + /// Answer text. /// Answer confidence score, value ranges from 0 to 1. /// ID of the QnA result. /// Source of QnA result. @@ -41,9 +41,9 @@ internal KnowledgeBaseAnswer(IReadOnlyList questions, string answer, dou AnswerSpan = answerSpan; } - /// List of questions. + /// List of questions associated with the answer. public IReadOnlyList Questions { get; } - /// The Answer. + /// Answer text. public string Answer { get; } /// Answer confidence score, value ranges from 0 to 1. public double? ConfidenceScore { get; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswerDialog.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswerDialog.cs index fb0f8bfdfa00..8697ddf24e58 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswerDialog.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/KnowledgeBaseAnswerDialog.cs @@ -21,7 +21,7 @@ internal KnowledgeBaseAnswerDialog() /// Initializes a new instance of KnowledgeBaseAnswerDialog. /// To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. - /// List of 0 to 20 prompts associated with the answer. + /// List of prompts associated with the answer. internal KnowledgeBaseAnswerDialog(bool? isContextOnly, IReadOnlyList prompts) { IsContextOnly = isContextOnly; @@ -30,7 +30,7 @@ internal KnowledgeBaseAnswerDialog(bool? isContextOnly, IReadOnlyList To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. public bool? IsContextOnly { get; } - /// List of 0 to 20 prompts associated with the answer. + /// List of prompts associated with the answer. public IReadOnlyList Prompts { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryFilters.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryFilters.cs index 3e6264239182..a244c2f5e018 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryFilters.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryFilters.cs @@ -21,9 +21,9 @@ public QueryFilters() /// Find QnAs that are associated with the given list of metadata. public MetadataFilter MetadataFilter { get; set; } - /// Find QnAs that are associated with the given list of sources in knowledge base. + /// Find QnAs that are associated with any of the given list of sources in knowledge base. public IList SourceFilter { get; } - /// Logical operation used to join metadata filters with source filters. + /// Logical operation used to join metadata filter with source filter. public LogicalOperationKind? LogicalOperation { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryKnowledgeBaseOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryKnowledgeBaseOptions.cs index 41e9cde0a771..d9d698456ca3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryKnowledgeBaseOptions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/QueryKnowledgeBaseOptions.cs @@ -9,7 +9,7 @@ namespace Azure.AI.Language.QuestionAnswering { - /// The question parameters to answer using a knowledge base. + /// Parameters to query a knowledge base. public partial class QueryKnowledgeBaseOptions { /// Max number of answers to be returned for the question. @@ -20,9 +20,9 @@ public partial class QueryKnowledgeBaseOptions public double? ConfidenceScoreThreshold { get; set; } /// Context object with previous QnA's information. public KnowledgeBaseAnswerRequestContext Context { get; set; } - /// (Optional) Set to 'QuestionOnly' for using a question only Ranker. + /// Type of ranker to be used. public RankerType? RankerType { get; set; } - /// Filter QnAs based on give metadata list and knowledge base source names. + /// Filter QnAs based on given metadata list and knowledge base sources. public QueryFilters Filters { get; set; } /// To configure Answer span prediction feature. public AnswerSpanRequest AnswerSpanRequest { get; set; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/RankerType.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/RankerType.cs index 16eaf726ced6..823fd25aa730 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/RankerType.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Models/RankerType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Language.QuestionAnswering.Models { - /// (Optional) Set to 'QuestionOnly' for using a question only Ranker. + /// Type of ranker to be used. public readonly partial struct RankerType : IEquatable { private readonly string _value; @@ -22,13 +22,13 @@ public RankerType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string DefaultValue = "Default"; private const string QuestionOnlyValue = "QuestionOnly"; + private const string DefaultValue = "Default"; - /// Default. - public static RankerType Default { get; } = new RankerType(DefaultValue); - /// QuestionOnly. + /// Question only ranker. public static RankerType QuestionOnly { get; } = new RankerType(QuestionOnlyValue); + /// Default ranker. + public static RankerType Default { get; } = new RankerType(DefaultValue); /// Determines if two values are the same. public static bool operator ==(RankerType left, RankerType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/QuestionAnsweringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/QuestionAnsweringModelFactory.cs index d66501af0cc6..2ace82769cdd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/QuestionAnsweringModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/QuestionAnsweringModelFactory.cs @@ -24,8 +24,8 @@ public static KnowledgeBaseAnswers KnowledgeBaseAnswers(IEnumerable Initializes a new instance of KnowledgeBaseAnswer. - /// List of questions. - /// The Answer. + /// List of questions associated with the answer. + /// Answer text. /// Answer confidence score, value ranges from 0 to 1. /// ID of the QnA result. /// Source of QnA result. @@ -43,7 +43,7 @@ public static KnowledgeBaseAnswer KnowledgeBaseAnswer(IEnumerable questi /// Initializes a new instance of KnowledgeBaseAnswerDialog. /// To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. - /// List of 0 to 20 prompts associated with the answer. + /// List of prompts associated with the answer. /// A new instance for mocking. public static KnowledgeBaseAnswerDialog KnowledgeBaseAnswerDialog(bool? isContextOnly = null, IEnumerable prompts = null) { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/autorest.md b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/autorest.md index a4add7f63a6c..bcf1e593e516 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/autorest.md +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/autorest.md @@ -8,7 +8,7 @@ title: Question Answering license-header: MICROSOFT_MIT_NO_VERSION batch: -- input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/68e7988aba481206f08019d3efb585683d5bc577/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json +- input-file: https://github.com/Azure/azure-rest-api-specs/blob/694fe69245024447f8d3647be1da88e9ad942058/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json clear-output-folder: true # TODO: Uncomment when we ship authoring support and remove ./QuestionAnsweringClientOptions.cs.