Reference documentation and code samples for the Google Cloud Retail V2 Client class ConversationalSearchSpec.
This field specifies all conversational related parameters addition to traditional retail search.
Generated from protobuf message google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec
Namespace
Google \ Cloud \ Retail \ V2 \ SearchRequestMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ followup_conversation_requested |
bool
This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc. |
↳ conversation_id |
string
This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty. |
↳ user_answer |
ConversationalSearchSpec\UserAnswer
This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text. |
getFollowupConversationRequested
This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.
Returns | |
---|---|
Type | Description |
bool |
setFollowupConversationRequested
This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getConversationId
This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.
Returns | |
---|---|
Type | Description |
string |
setConversationId
This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUserAnswer
This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.
Returns | |
---|---|
Type | Description |
ConversationalSearchSpec\UserAnswer|null |
hasUserAnswer
clearUserAnswer
setUserAnswer
This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.
Parameter | |
---|---|
Name | Description |
var |
ConversationalSearchSpec\UserAnswer
|
Returns | |
---|---|
Type | Description |
$this |