Google Cloud Dialogflow V2 Client - Class FaqAnswer (1.6.0)

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

Represents answer from "frequently asked questions".

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ answer string

The piece of text from the source knowledge base document.

↳ confidence float

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

↳ question string

The corresponding FAQ question.

↳ source string

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

↳ metadata array|Google\Protobuf\Internal\MapField

A map that contains metadata about the answer and the document from which it originates.

↳ answer_record string

The name of answer record, in the format of "projects/

getAnswer

The piece of text from the source knowledge base document.

Returns
TypeDescription
string

setAnswer

The piece of text from the source knowledge base document.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfidence

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

Returns
TypeDescription
float

setConfidence

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getQuestion

The corresponding FAQ question.

Returns
TypeDescription
string

setQuestion

The corresponding FAQ question.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSource

Indicates which Knowledge Document this answer was extracted from.

Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

Returns
TypeDescription
string

setSource

Indicates which Knowledge Document this answer was extracted from.

Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMetadata

A map that contains metadata about the answer and the document from which it originates.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMetadata

A map that contains metadata about the answer and the document from which it originates.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getAnswerRecord

The name of answer record, in the format of "projects/

Returns
TypeDescription
string

setAnswerRecord

The name of answer record, in the format of "projects/

Parameter
NameDescription
var string
Returns
TypeDescription
$this