Udostępnij za pośrednictwem


QuestionAnsweringModelFactory.KnowledgeBaseAnswer Method

Definition

Initializes a new instance of KnowledgeBaseAnswer.

public static Azure.AI.Language.QuestionAnswering.KnowledgeBaseAnswer KnowledgeBaseAnswer (System.Collections.Generic.IEnumerable<string> questions = default, string answer = default, double? confidence = default, int? qnaId = default, string source = default, System.Collections.Generic.IReadOnlyDictionary<string,string> metadata = default, Azure.AI.Language.QuestionAnswering.KnowledgeBaseAnswerDialog dialog = default, Azure.AI.Language.QuestionAnswering.AnswerSpan shortAnswer = default);
static member KnowledgeBaseAnswer : seq<string> * string * Nullable<double> * Nullable<int> * string * System.Collections.Generic.IReadOnlyDictionary<string, string> * Azure.AI.Language.QuestionAnswering.KnowledgeBaseAnswerDialog * Azure.AI.Language.QuestionAnswering.AnswerSpan -> Azure.AI.Language.QuestionAnswering.KnowledgeBaseAnswer
Public Shared Function KnowledgeBaseAnswer (Optional questions As IEnumerable(Of String) = Nothing, Optional answer As String = Nothing, Optional confidence As Nullable(Of Double) = Nothing, Optional qnaId As Nullable(Of Integer) = Nothing, Optional source As String = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional dialog As KnowledgeBaseAnswerDialog = Nothing, Optional shortAnswer As AnswerSpan = Nothing) As KnowledgeBaseAnswer

Parameters

questions
IEnumerable<String>

List of questions associated with the answer.

answer
String

Answer text.

confidence
Nullable<Double>

Answer confidence score, value ranges from 0 to 1.

qnaId
Nullable<Int32>

ID of the QnA result.

source
String

Source of QnA result.

metadata
IReadOnlyDictionary<String,String>

Metadata associated with the answer, useful to categorize or filter question answers.

dialog
KnowledgeBaseAnswerDialog

Dialog associated with Answer.

shortAnswer
AnswerSpan

Answer span object of QnA with respect to user's question.

Returns

A new KnowledgeBaseAnswer instance for mocking.

Applies to