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
Google\Cloud\DiscoveryEngine\V1\AnswerQueryRequest\RelatedQuestionsSpec
Related questions specification.
↳ answer_generation_spec
Google\Cloud\DiscoveryEngine\V1\AnswerQueryRequest\AnswerGenerationSpec
Answer generation specification.
↳ search_spec
↳ query_understanding_spec
Google\Cloud\DiscoveryEngine\V1\AnswerQueryRequest\QueryUnderstandingSpec
Query understanding specification.
↳ asynchronous_mode
bool
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.
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
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
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