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 uses the \u003ccode\u003estreamAnswer\u003c/code\u003e method to return multiple \u003ccode\u003eAnswerQueryResponse\u003c/code\u003e messages in a stream.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003ePOST\u003c/code\u003e to a specific URL with a required \u003ccode\u003eservingConfig\u003c/code\u003e path parameter to identify the serving configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe request body contains structured data, including a required \u003ccode\u003equery\u003c/code\u003e, and optional fields for \u003ccode\u003esession\u003c/code\u003e, \u003ccode\u003esafetySpec\u003c/code\u003e, \u003ccode\u003egroundingSpec\u003c/code\u003e, \u003ccode\u003eanswerGenerationSpec\u003c/code\u003e, and other specific settings.\u003c/p\u003e\n"],["\u003cp\u003eThe API 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 for authorization.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003easynchronousMode\u003c/code\u003e field in the request body is deprecated, and the streaming Answer API is supported.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.collections.engines.servingConfigs.streamAnswer\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nAnswer query method (streaming).\n\nIt takes one `AnswerQueryRequest` and returns multiple [AnswerQueryResponse](/generative-ai-app-builder/docs/reference/rest/v1alpha/AnswerQueryResponse) messages in a stream.\n\n### HTTP request\n\n`POST https://discoveryengine.googleapis.com/v1alpha/{servingConfig=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains a stream of [AnswerQueryResponse](/generative-ai-app-builder/docs/reference/rest/v1alpha/AnswerQueryResponse) instances.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `servingConfig` resource:\n\n- `discoveryengine.servingConfigs.answer`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]