Google Cloud Dialogflow V2 Client - Class StreamingReactiveCompanionSuggestionsResponse (2.8.0)

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

The response message for Participants.StreamingReactiveCompanionSuggestions.

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ response_chunk string

Streamed response text chunks.

↳ status Google\Rpc\Status

Status of the response for the current query. If set and non-ok, indicates an error occurred during processing of the current query, or confirms that a requested cancellation has successfully completed (status code CANCELLED).

↳ reactive_mode_final_response StreamingReactiveCompanionSuggestionsResponse\ReactiveModeResponse

Output only. The final response from the reactive mode capturing the entire accumulated streaming response, grounding metadata, and tool calls. Only set when is_final is true and conversational processing for the query turn completes.

↳ intermediate_tool_call_events ToolCallEvents

Output only. Captures intermediate tool call events that occur during the execution of the reactive query turn. Note that conversational messages within tool calls are displayed within the tool cards and hence are not accumulated within the reactive_mode_final_response.response string.

↳ is_final bool

Output only. Indicates whether the client/UI can accept a new query for reactive chat. When is_final is true, the reactive chat interface is unblocked and ready to receive new human agent queries. For synchronous turns, this is set to true on the final response chunk. For asynchronous tool calls running in the background, this is set to true on the intermediate trigger chunk to unblock the UI while the background tool execution is in progress.

↳ answer_record string

Output only. Only set when is_final is true and conversational turn processing completes. The final answer record representing the completed suggestion. Only present in the last chunk of the completed response.

↳ text_message_id string

Required. The unique message identifier corresponding to the human agent query that generated this response chunk.

↳ send_time Google\Protobuf\Timestamp

The timestamp when the response chunk was sent by the service.

getResponseChunk

Streamed response text chunks.

Returns
Type Description
string

hasResponseChunk

setResponseChunk

Streamed response text chunks.

Parameter
Name Description
var string
Returns
Type Description
$this

getStatus

Status of the response for the current query. If set and non-ok, indicates an error occurred during processing of the current query, or confirms that a requested cancellation has successfully completed (status code CANCELLED).

Returns
Type Description
Google\Rpc\Status|null

hasStatus

setStatus

Status of the response for the current query. If set and non-ok, indicates an error occurred during processing of the current query, or confirms that a requested cancellation has successfully completed (status code CANCELLED).

Parameter
Name Description
var Google\Rpc\Status
Returns
Type Description
$this

getReactiveModeFinalResponse

Output only. The final response from the reactive mode capturing the entire accumulated streaming response, grounding metadata, and tool calls. Only set when is_final is true and conversational processing for the query turn completes.

Returns
Type Description
StreamingReactiveCompanionSuggestionsResponse\ReactiveModeResponse|null

hasReactiveModeFinalResponse

setReactiveModeFinalResponse

Output only. The final response from the reactive mode capturing the entire accumulated streaming response, grounding metadata, and tool calls. Only set when is_final is true and conversational processing for the query turn completes.

Parameter
Name Description
var StreamingReactiveCompanionSuggestionsResponse\ReactiveModeResponse
Returns
Type Description
$this

getIntermediateToolCallEvents

Output only. Captures intermediate tool call events that occur during the execution of the reactive query turn. Note that conversational messages within tool calls are displayed within the tool cards and hence are not accumulated within the reactive_mode_final_response.response string.

Returns
Type Description
ToolCallEvents|null

hasIntermediateToolCallEvents

setIntermediateToolCallEvents

Output only. Captures intermediate tool call events that occur during the execution of the reactive query turn. Note that conversational messages within tool calls are displayed within the tool cards and hence are not accumulated within the reactive_mode_final_response.response string.

Parameter
Name Description
var ToolCallEvents
Returns
Type Description
$this

getIsFinal

Output only. Indicates whether the client/UI can accept a new query for reactive chat. When is_final is true, the reactive chat interface is unblocked and ready to receive new human agent queries. For synchronous turns, this is set to true on the final response chunk. For asynchronous tool calls running in the background, this is set to true on the intermediate trigger chunk to unblock the UI while the background tool execution is in progress.

Returns
Type Description
bool

setIsFinal

Output only. Indicates whether the client/UI can accept a new query for reactive chat. When is_final is true, the reactive chat interface is unblocked and ready to receive new human agent queries. For synchronous turns, this is set to true on the final response chunk. For asynchronous tool calls running in the background, this is set to true on the intermediate trigger chunk to unblock the UI while the background tool execution is in progress.

Parameter
Name Description
var bool
Returns
Type Description
$this

getAnswerRecord

Output only. Only set when is_final is true and conversational turn processing completes. The final answer record representing the completed suggestion. Only present in the last chunk of the completed response.

Returns
Type Description
string

setAnswerRecord

Output only. Only set when is_final is true and conversational turn processing completes. The final answer record representing the completed suggestion. Only present in the last chunk of the completed response.

Parameter
Name Description
var string
Returns
Type Description
$this

getTextMessageId

Required. The unique message identifier corresponding to the human agent query that generated this response chunk.

Returns
Type Description
string

setTextMessageId

Required. The unique message identifier corresponding to the human agent query that generated this response chunk.

Parameter
Name Description
var string
Returns
Type Description
$this

getSendTime

The timestamp when the response chunk was sent by the service.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasSendTime

clearSendTime

setSendTime

The timestamp when the response chunk was sent by the service.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getResponse

Returns
Type Description
string