Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Turn.
Represents a turn, including a query from the user and a answer from service.
Generated from protobuf message google.cloud.discoveryengine.v1.Session.Turn
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ SessionMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ query
Google\Cloud\DiscoveryEngine\V1\Query
Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
↳ answer
string
Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
↳ detailed_answer
Google\Cloud\DiscoveryEngine\V1\Answer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
↳ detailed_assist_answer
Google\Cloud\DiscoveryEngine\V1\AssistAnswer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
↳ query_config
array| Google\Protobuf\Internal\MapField
Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix "google." is reserved for Google-developed functionality.
getQuery
Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
hasQuery
clearQuery
setQuery
Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
$this
getAnswer
Optional. The resource name of the answer to the user query.
Only set if the answer generation (/answer API call) happened in this turn.
string
setAnswer
Optional. The resource name of the answer to the user query.
Only set if the answer generation (/answer API call) happened in this turn.
var
string
$this
getDetailedAnswer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
hasDetailedAnswer
clearDetailedAnswer
setDetailedAnswer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
$this
getDetailedAssistAnswer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
hasDetailedAssistAnswer
clearDetailedAssistAnswer
setDetailedAssistAnswer
Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
$this
getQueryConfig
Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix "google." is reserved for Google-developed functionality.
setQueryConfig
Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix "google." is reserved for Google-developed functionality.
$this

