Google Cloud Dialogflow V2 Client - Class SuggestionQueryConfig (1.9.0)

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

Config for suggestion query.

Generated from protobuf message google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig

Namespace

Google \ Cloud \ Dialogflow \ V2 \ HumanAgentAssistantConfig

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ knowledge_base_query_source Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource

Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.

↳ document_query_source Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource

Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.

↳ dialogflow_query_source Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource

Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.

↳ max_results int

Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.

↳ confidence_threshold float

Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.

↳ context_filter_settings Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings

Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.

getKnowledgeBaseQuerySource

Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource|null

hasKnowledgeBaseQuerySource

setKnowledgeBaseQuerySource

Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\KnowledgeBaseQuerySource
Returns
TypeDescription
$this

getDocumentQuerySource

Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource|null

hasDocumentQuerySource

setDocumentQuerySource

Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DocumentQuerySource
Returns
TypeDescription
$this

getDialogflowQuerySource

Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource|null

hasDialogflowQuerySource

setDialogflowQuerySource

Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\DialogflowQuerySource
Returns
TypeDescription
$this

getMaxResults

Maximum number of results to return. Currently, if unset, defaults to 10.

And the max number is 20.

Returns
TypeDescription
int

setMaxResults

Maximum number of results to return. Currently, if unset, defaults to 10.

And the max number is 20.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getConfidenceThreshold

Confidence threshold of query result.

Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.

Returns
TypeDescription
float

setConfidenceThreshold

Confidence threshold of query result.

Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getContextFilterSettings

Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings|null

hasContextFilterSettings

clearContextFilterSettings

setContextFilterSettings

Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\HumanAgentAssistantConfig\SuggestionQueryConfig\ContextFilterSettings
Returns
TypeDescription
$this

getQuerySource

Returns
TypeDescription
string