Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class AnswerQueryRequest.
Request message for ConversationalSearchService.AnswerQuery method.
Generated from protobuf message google.cloud.discoveryengine.v1.AnswerQueryRequest
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ serving_config
string
Required. The resource name of the 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.
↳ query
↳ session
string
The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol -
as session ID. A new ID will be automatically generated and assigned.
↳ safety_spec
↳ related_questions_spec
↳ answer_generation_spec
↳ search_spec
↳ query_understanding_spec
↳ asynchronous_mode
bool
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.
↳ user_pseudo_id
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.
↳ user_labels
array| Google\Protobuf\Internal\MapField
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. See Google Cloud Document for more details.
getServingConfig
Required. The resource name of the 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.
string
setServingConfig
Required. The resource name of the 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.
var
string
$this
getQuery
Required. Current user query.
hasQuery
clearQuery
setQuery
Required. Current user query.
$this
getSession
The session resource name. Not required.
When session field is not set, the API is in sessionless mode.
We support auto session mode: users can use the wildcard symbol -
as
session ID. A new ID will be automatically generated and assigned.
string
setSession
The session resource name. Not required.
When session field is not set, the API is in sessionless mode.
We support auto session mode: users can use the wildcard symbol -
as
session ID. A new ID will be automatically generated and assigned.
var
string
$this
getSafetySpec
Model specification.
hasSafetySpec
clearSafetySpec
setSafetySpec
Model specification.
$this
getRelatedQuestionsSpec
Related questions specification.
hasRelatedQuestionsSpec
clearRelatedQuestionsSpec
setRelatedQuestionsSpec
Related questions specification.
$this
getAnswerGenerationSpec
Answer generation specification.
hasAnswerGenerationSpec
clearAnswerGenerationSpec
setAnswerGenerationSpec
Answer generation specification.
$this
getSearchSpec
Search specification.
hasSearchSpec
clearSearchSpec
setSearchSpec
Search specification.
$this
getQueryUnderstandingSpec
Query understanding specification.
hasQueryUnderstandingSpec
clearQueryUnderstandingSpec
setQueryUnderstandingSpec
Query understanding specification.
$this
getAsynchronousMode
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.
bool
setAsynchronousMode
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.
var
bool
$this
getUserPseudoId
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.
string
setUserPseudoId
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.
var
string
$this
getUserLabels
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. See Google Cloud Document for more details.
setUserLabels
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. See Google Cloud Document for more details.
$this