Required. The resource name of the servingConfigs.search serving config, such as projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config, or projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config. This field is used to identify the serving configuration name, set of models used to make the search.
Request body
The request body contains data with the following structure:
Deprecated: This field is deprecated. Streaming Answer API will be supported.
Asynchronous mode control.
If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
userPseudoId
string
A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.
This field should NOT have a fixed value such as unknown_visitor.
The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
userLabels
map (key: string, value: string)
The user labels applied to a resource must meet the following requirements:
Each resource can have multiple labels, up to a maximum of 64.
Each label must be a key-value pair.
Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
The key portion of a label must be unique. However, you can use the same key with multiple resources.
Keys must start with a lowercase letter or international character.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-30 UTC."],[[["\u003cp\u003eThis API endpoint utilizes a \u003ccode\u003ePOST\u003c/code\u003e request to the URL \u003ccode\u003ehttps://discoveryengine.googleapis.com/v1/{servingConfig=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer\u003c/code\u003e and adheres to gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eservingConfig\u003c/code\u003e path parameter is required, specifying the serving configuration resource name used to identify the set of models for the answer.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003equery\u003c/code\u003e object containing the current user query, and it may include fields such as \u003ccode\u003esession\u003c/code\u003e, \u003ccode\u003esafetySpec\u003c/code\u003e, \u003ccode\u003erelatedQuestionsSpec\u003c/code\u003e, \u003ccode\u003egroundingSpec\u003c/code\u003e, \u003ccode\u003eanswerGenerationSpec\u003c/code\u003e, \u003ccode\u003esearchSpec\u003c/code\u003e, \u003ccode\u003equeryUnderstandingSpec\u003c/code\u003e, \u003ccode\u003euserPseudoId\u003c/code\u003e, \u003ccode\u003euserLabels\u003c/code\u003e, and \u003ccode\u003eendUserSpec\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses will contain an instance of the \u003ccode\u003eAnswerQueryResponse\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this endpoint requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003ediscoveryengine.servingConfigs.answer\u003c/code\u003e on the \u003ccode\u003eservingConfig\u003c/code\u003e resource.\u003c/p\u003e\n"]]],[],null,[]]