Google Cloud Dialogflow V2 Client - Class ReactiveModeResponse (2.8.0)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class ReactiveModeResponse.

The complete response generated by the reactive mode capturing the entire accumulated streaming response, grounding metadata, and tool calls.

Generated from protobuf message google.cloud.dialogflow.v2.StreamingReactiveCompanionSuggestionsResponse.ReactiveModeResponse

Namespace

Google \ Cloud \ Dialogflow \ V2 \ StreamingReactiveCompanionSuggestionsResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ response string

Optional. The full reactive suggestion generated by the Companion Agent. After the last streaming chunk is sent, this is the final response concatenating all the streaming response chunks together to represent the full reactive suggestion.

↳ grounding_metadata Google\Cloud\Dialogflow\V2\GroundingMetadata

Optional. Grounding metadata for the generated response.

↳ tool_calls array<Google\Cloud\Dialogflow\V2\ToolCallSuggestion>

Optional. Captures all the rich structured tool calls and their associated citations used by the reactive agent to generate the reactive suggestion.

getResponse

Optional. The full reactive suggestion generated by the Companion Agent.

After the last streaming chunk is sent, this is the final response concatenating all the streaming response chunks together to represent the full reactive suggestion.

Returns
Type Description
string

setResponse

Optional. The full reactive suggestion generated by the Companion Agent.

After the last streaming chunk is sent, this is the final response concatenating all the streaming response chunks together to represent the full reactive suggestion.

Parameter
Name Description
var string
Returns
Type Description
$this

getGroundingMetadata

Optional. Grounding metadata for the generated response.

Returns
Type Description
Google\Cloud\Dialogflow\V2\GroundingMetadata|null

hasGroundingMetadata

clearGroundingMetadata

setGroundingMetadata

Optional. Grounding metadata for the generated response.

Parameter
Name Description
var Google\Cloud\Dialogflow\V2\GroundingMetadata
Returns
Type Description
$this

getToolCalls

Optional. Captures all the rich structured tool calls and their associated citations used by the reactive agent to generate the reactive suggestion.

Returns
Type Description
Google\Protobuf\RepeatedField<Google\Cloud\Dialogflow\V2\ToolCallSuggestion>

setToolCalls

Optional. Captures all the rich structured tool calls and their associated citations used by the reactive agent to generate the reactive suggestion.

Parameter
Name Description
var array<Google\Cloud\Dialogflow\V2\ToolCallSuggestion>
Returns
Type Description
$this