Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class FaqAnswer.
Represents answer from "frequently asked questions".
Generated from protobuf messagegoogle.cloud.dialogflow.v2.FaqAnswer
Namespace
Google \ Cloud \ Dialogflow \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ answer
string
The piece of text from thesourceknowledge 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>.
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 thesourceknowledge base document.
Returns
Type
Description
string
setAnswer
The piece of text from thesourceknowledge base document.
Parameter
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
float
Returns
Type
Description
$this
getQuestion
The corresponding FAQ question.
Returns
Type
Description
string
setQuestion
The corresponding FAQ question.
Parameter
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
string
Returns
Type
Description
$this
getMetadata
A map that contains metadata about the answer and the
document from which it originates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow V2 Client - Class FaqAnswer (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-dialogflow/latest/V2.FaqAnswer)\n- [2.1.1](/php/docs/reference/cloud-dialogflow/2.1.1/V2.FaqAnswer)\n- [2.0.1](/php/docs/reference/cloud-dialogflow/2.0.1/V2.FaqAnswer)\n- [1.17.2](/php/docs/reference/cloud-dialogflow/1.17.2/V2.FaqAnswer)\n- [1.16.0](/php/docs/reference/cloud-dialogflow/1.16.0/V2.FaqAnswer)\n- [1.15.1](/php/docs/reference/cloud-dialogflow/1.15.1/V2.FaqAnswer)\n- [1.14.0](/php/docs/reference/cloud-dialogflow/1.14.0/V2.FaqAnswer)\n- [1.13.0](/php/docs/reference/cloud-dialogflow/1.13.0/V2.FaqAnswer)\n- [1.12.3](/php/docs/reference/cloud-dialogflow/1.12.3/V2.FaqAnswer)\n- [1.11.0](/php/docs/reference/cloud-dialogflow/1.11.0/V2.FaqAnswer)\n- [1.10.2](/php/docs/reference/cloud-dialogflow/1.10.2/V2.FaqAnswer)\n- [1.9.0](/php/docs/reference/cloud-dialogflow/1.9.0/V2.FaqAnswer)\n- [1.8.0](/php/docs/reference/cloud-dialogflow/1.8.0/V2.FaqAnswer)\n- [1.7.2](/php/docs/reference/cloud-dialogflow/1.7.2/V2.FaqAnswer)\n- [1.6.0](/php/docs/reference/cloud-dialogflow/1.6.0/V2.FaqAnswer)\n- [1.5.0](/php/docs/reference/cloud-dialogflow/1.5.0/V2.FaqAnswer)\n- [1.4.0](/php/docs/reference/cloud-dialogflow/1.4.0/V2.FaqAnswer)\n- [1.3.2](/php/docs/reference/cloud-dialogflow/1.3.2/V2.FaqAnswer)\n- [1.2.0](/php/docs/reference/cloud-dialogflow/1.2.0/V2.FaqAnswer)\n- [1.1.1](/php/docs/reference/cloud-dialogflow/1.1.1/V2.FaqAnswer)\n- [1.0.1](/php/docs/reference/cloud-dialogflow/1.0.1/V2.FaqAnswer) \nReference documentation and code samples for the Google Cloud Dialogflow V2 Client class FaqAnswer.\n\nRepresents answer from \"frequently asked questions\".\n\nGenerated from protobuf message `google.cloud.dialogflow.v2.FaqAnswer`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAnswer\n\nThe piece of text from the `source` knowledge base document.\n\n### setAnswer\n\nThe piece of text from the `source` knowledge base document.\n\n### getConfidence\n\nThe system's confidence score that this Knowledge answer is a good match\nfor this conversational query, range from 0.0 (completely uncertain)\nto 1.0 (completely certain).\n\n### setConfidence\n\nThe system's confidence score that this Knowledge answer is a good match\nfor this conversational query, range from 0.0 (completely uncertain)\nto 1.0 (completely certain).\n\n### getQuestion\n\nThe corresponding FAQ question.\n\n### setQuestion\n\nThe corresponding FAQ question.\n\n### getSource\n\nIndicates which Knowledge Document this answer was extracted\nfrom.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/agent/knowledgeBases/\u003cKnowledge Base ID\u003e/documents/\u003cDocument ID\u003e`.\n\n### setSource\n\nIndicates which Knowledge Document this answer was extracted\nfrom.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/agent/knowledgeBases/\u003cKnowledge Base ID\u003e/documents/\u003cDocument ID\u003e`.\n\n### getMetadata\n\nA map that contains metadata about the answer and the\ndocument from which it originates.\n\n### setMetadata\n\nA map that contains metadata about the answer and the\ndocument from which it originates.\n\n### getAnswerRecord\n\nThe name of answer record, in the format of\n\"projects/\n\n\n### setAnswerRecord\n\nThe name of answer record, in the format of\n\"projects/"]]