Method: answerQuery

Answers a query using grounded generation.

HTTP request

POST https://developerknowledge.googleapis.com/v1alpha:answerQuery

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": string
}
Fields
query

string

Required. The query to answer.

Response body

Response message for DeveloperKnowledge.AnswerQuery.

If successful, the response body contains data with the following structure:

JSON representation
{
  "answer": {
    object (Answer)
  }
}
Fields
answer

object (Answer)

The answer to the query.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devprofiles.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the OAuth 2.0 Overview.

Answer

An answer to a query.

JSON representation
{
  "answerText": string
}
Fields
answerText

string

The text of the answer.