Google Cloud Dialogflow V2 Client - Class FaqAnswer (1.0.1)

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

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.

Generated from protobuf field string answer = 1;

Returns
TypeDescription
string

setAnswer

The piece of text from the source knowledge base document.

Generated from protobuf field string answer = 1;

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).

Generated from protobuf field float confidence = 2;

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).

Generated from protobuf field float confidence = 2;

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getQuestion

The corresponding FAQ question.

Generated from protobuf field string question = 3;

Returns
TypeDescription
string

setQuestion

The corresponding FAQ question.

Generated from protobuf field string question = 3;

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>.

Generated from protobuf field string source = 4;

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>.

Generated from protobuf field string source = 4;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMetadata

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

Generated from protobuf field map<string, string> metadata = 5;

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMetadata

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

Generated from protobuf field map<string, string> metadata = 5;

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

getAnswerRecord

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

Generated from protobuf field string answer_record = 6;

Returns
TypeDescription
string

setAnswerRecord

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

Generated from protobuf field string answer_record = 6;

Parameter
NameDescription
var string
Returns
TypeDescription
$this