Google Cloud Dialogflow V2 Client - Class FewShotExample (1.15.0)

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

Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response.

NEXT_ID: 10

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ conversation_context Google\Cloud\Dialogflow\V2\ConversationContext

Optional. Conversation transcripts.

↳ extra_info array|Google\Protobuf\Internal\MapField

Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <"price", "10">

↳ summarization_section_list Google\Cloud\Dialogflow\V2\SummarizationSectionList

Summarization sections.

↳ output Google\Cloud\Dialogflow\V2\GeneratorSuggestion

Required. Example output of the model.

getConversationContext

Optional. Conversation transcripts.

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

hasConversationContext

clearConversationContext

setConversationContext

Optional. Conversation transcripts.

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

getExtraInfo

Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <"price", "10">

Returns
Type Description
Google\Protobuf\Internal\MapField

setExtraInfo

Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <"price", "10">

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getSummarizationSectionList

Summarization sections.

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

hasSummarizationSectionList

setSummarizationSectionList

Summarization sections.

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

getOutput

Required. Example output of the model.

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

hasOutput

clearOutput

setOutput

Required. Example output of the model.

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

getInstructionList

Returns
Type Description
string