QuestionAnsweringClient.GetAnswers Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
GetAnswers(Int32, QuestionAnsweringProject, AnswersOptions, CancellationToken) |
Obtiene el QnA especificado. |
GetAnswers(String, QuestionAnsweringProject, AnswersOptions, CancellationToken) |
Responde a la pregunta especificada mediante el knowledge base. |
GetAnswers(Int32, QuestionAnsweringProject, AnswersOptions, CancellationToken)
- Source:
- QuestionAnsweringClient.cs
Obtiene el QnA especificado.
public virtual Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult> GetAnswers (int qnaId, Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject project, Azure.AI.Language.QuestionAnswering.AnswersOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnswers : int * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>
override this.GetAnswers : int * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>
Public Overridable Function GetAnswers (qnaId As Integer, project As QuestionAnsweringProject, Optional options As AnswersOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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
GetAnswers(String, QuestionAnsweringProject, AnswersOptions, CancellationToken)
- Source:
- QuestionAnsweringClient.cs
Responde a la pregunta especificada mediante el knowledge base.
public virtual Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult> GetAnswers (string question, Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject project, Azure.AI.Language.QuestionAnswering.AnswersOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnswers : string * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>
override this.GetAnswers : string * Azure.AI.Language.QuestionAnswering.QuestionAnsweringProject * Azure.AI.Language.QuestionAnswering.AnswersOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.AnswersResult>
Public Overridable Function GetAnswers (question As String, project As QuestionAnsweringProject, Optional options As AnswersOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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
Azure SDK for .NET