Google Cloud Dialogflow V2 Client - Class Guidance (2.8.0)

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

Represents guidance for companion suggestion.

Generated from protobuf message google.cloud.dialogflow.v2.CompanionSuggestion.Guidance

Namespace

Google \ Cloud \ Dialogflow \ V2 \ CompanionSuggestion

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ suggested_reply string

Suggested reply for the agent to respond to the customer.

↳ suggested_action string

Suggested action to human agent. For example, "Ask the customer for their shipping address" or "Create a new case for the customer".

↳ instruction_source Google\Cloud\Dialogflow\V2\GuidanceInstruction

Guidance instruction source.

↳ knowledge_sources array<Guidance\KnowledgeSource>

Knowledge sources.

↳ explanation string

Optional. A brief explanation of why the action is suggested.

↳ grounding_metadata Google\Cloud\Dialogflow\V2\GroundingMetadata

Optional. Grounding metadata for the generated guidance.

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

Optional. Rich structured tool calls and their associated citations delivered directly as suggestions.

↳ triggering_tool_call_answer_records string[]

Optional. The AnswerRecords of the tool calls that triggered this guidance. Format: projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>.

getSuggestedReply

Suggested reply for the agent to respond to the customer.

Returns
Type Description
string

setSuggestedReply

Suggested reply for the agent to respond to the customer.

Parameter
Name Description
var string
Returns
Type Description
$this

getSuggestedAction

Suggested action to human agent. For example, "Ask the customer for their shipping address" or "Create a new case for the customer".

Returns
Type Description
string

setSuggestedAction

Suggested action to human agent. For example, "Ask the customer for their shipping address" or "Create a new case for the customer".

Parameter
Name Description
var string
Returns
Type Description
$this

getInstructionSource

Guidance instruction source.

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

hasInstructionSource

clearInstructionSource

setInstructionSource

Guidance instruction source.

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

getKnowledgeSources

Knowledge sources.

Returns
Type Description
Google\Protobuf\RepeatedField<Guidance\KnowledgeSource>

setKnowledgeSources

Knowledge sources.

Parameter
Name Description
var array<Guidance\KnowledgeSource>
Returns
Type Description
$this

getExplanation

Optional. A brief explanation of why the action is suggested.

Returns
Type Description
string

setExplanation

Optional. A brief explanation of why the action is suggested.

Parameter
Name Description
var string
Returns
Type Description
$this

getGroundingMetadata

Optional. Grounding metadata for the generated guidance.

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

hasGroundingMetadata

clearGroundingMetadata

setGroundingMetadata

Optional. Grounding metadata for the generated guidance.

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

getToolCalls

Optional. Rich structured tool calls and their associated citations delivered directly as suggestions.

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

setToolCalls

Optional. Rich structured tool calls and their associated citations delivered directly as suggestions.

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

getTriggeringToolCallAnswerRecords

Optional. The AnswerRecords of the tool calls that triggered this guidance.

Format: projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setTriggeringToolCallAnswerRecords

Optional. The AnswerRecords of the tool calls that triggered this guidance.

Format: projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>.

Parameter
Name Description
var string[]
Returns
Type Description
$this