Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class AnswerQueryRequest.
Request message for ConversationalSearchService.AnswerQuery method.
Generated from protobuf message google.cloud.discoveryengine.v1beta.AnswerQueryRequest
Namespace
Google \ Cloud \ DiscoveryEngine \ V1betaMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ serving_config |
string
Required. The resource name of the Search serving config, such as |
↳ query |
Google\Cloud\DiscoveryEngine\V1beta\Query
Required. Current user 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 |
↳ safety_spec |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec
Model specification. |
↳ related_questions_spec |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec
Related questions specification. |
↳ answer_generation_spec |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec
Answer generation specification. |
↳ search_spec |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec
Search specification. |
↳ query_understanding_spec |
Google\Cloud\DiscoveryEngine\V1beta\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 |
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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getQuery
Required. Current user query.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\Query|null |
hasQuery
clearQuery
setQuery
Required. Current user query.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\Query
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSafetySpec
Model specification.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec|null |
hasSafetySpec
clearSafetySpec
setSafetySpec
Model specification.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec
|
Returns | |
---|---|
Type | Description |
$this |
getRelatedQuestionsSpec
Related questions specification.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec|null |
hasRelatedQuestionsSpec
clearRelatedQuestionsSpec
setRelatedQuestionsSpec
Related questions specification.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec
|
Returns | |
---|---|
Type | Description |
$this |
getAnswerGenerationSpec
Answer generation specification.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec|null |
hasAnswerGenerationSpec
clearAnswerGenerationSpec
setAnswerGenerationSpec
Answer generation specification.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec
|
Returns | |
---|---|
Type | Description |
$this |
getSearchSpec
Search specification.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec|null |
hasSearchSpec
clearSearchSpec
setSearchSpec
Search specification.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec
|
Returns | |
---|---|
Type | Description |
$this |
getQueryUnderstandingSpec
Query understanding specification.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec|null |
hasQueryUnderstandingSpec
clearQueryUnderstandingSpec
setQueryUnderstandingSpec
Query understanding specification.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |