Compartir a través de


QuestionAnsweringClient.GetAnswersAsync Método

Definición

Sobrecargas

GetAnswersAsync(Int32, QuestionAnsweringProject, AnswersOptions, CancellationToken)

Obtiene el QnA especificado.

GetAnswersAsync(String, QuestionAnsweringProject, AnswersOptions, CancellationToken)

Responde a la pregunta especificada mediante el knowledge base.

GetAnswersAsync(Int32, QuestionAnsweringProject, AnswersOptions, CancellationToken)

Source:
QuestionAnsweringClient.cs

Obtiene el QnA especificado.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>> GetAnswersAsync (int qnaId, Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject project, Azure.AI.Language.QuestionAnswering.AnswersOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnswersAsync : int * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>>
override this.GetAnswersAsync : int * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>>
Public Overridable Function GetAnswersAsync (qnaId As Integer, project As QuestionAnsweringProject, Optional options As AnswersOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnswersResult))

Parámetros

qnaId
Int32

Identificador exacto de QnA que se va a capturar del knowledge base.

project
QuestionAnsweringProject

QuestionAnsweringProject que se va a consultar.

options
AnswersOptions

Opcional AnswersOptions con opciones de consulta adicionales.

cancellationToken
CancellationToken

CancellationToken Opcional para cancelar la solicitud.

Devoluciones

que AnswersResult contiene respuestas de la knowledge base a la pregunta especificada.

Excepciones

project es null.

El servicio devolvió un error. La excepción contiene detalles del error del servicio.

Se aplica a

GetAnswersAsync(String, QuestionAnsweringProject, AnswersOptions, CancellationToken)

Source:
QuestionAnsweringClient.cs

Responde a la pregunta especificada mediante el knowledge base.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>> GetAnswersAsync (string question, Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject project, Azure.AI.Language.QuestionAnswering.AnswersOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnswersAsync : string * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>>
override this.GetAnswersAsync : string * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>>
Public Overridable Function GetAnswersAsync (question As String, project As QuestionAnsweringProject, Optional options As AnswersOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnswersResult))

Parámetros

question
String

La pregunta que se debe formular al knowledge base.

project
QuestionAnsweringProject

QuestionAnsweringProject que se va a consultar.

options
AnswersOptions

Opcional AnswersOptions con opciones de consulta adicionales.

cancellationToken
CancellationToken

CancellationToken Opcional para cancelar la solicitud.

Devoluciones

que AnswersResult contiene respuestas de la knowledge base a la pregunta especificada.

Excepciones

question es una cadena vacía.

question o project es null.

El servicio devolvió un error. La excepción contiene detalles del error del servicio.

Se aplica a