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.
Generated from protobuf message google.cloud.dialogflow.v2.FewShotExample
Namespace
Google \ Cloud \ Dialogflow \ V2Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ conversation_context |
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 |
SummarizationSectionList
Summarization sections. |
↳ output |
GeneratorSuggestion
Required. Example output of the model. |
getConversationContext
Optional. Conversation transcripts.
Returns | |
---|---|
Type | Description |
ConversationContext|null |
hasConversationContext
clearConversationContext
setConversationContext
Optional. Conversation transcripts.
Parameter | |
---|---|
Name | Description |
var |
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 |
SummarizationSectionList|null |
hasSummarizationSectionList
setSummarizationSectionList
Summarization sections.
Parameter | |
---|---|
Name | Description |
var |
SummarizationSectionList
|
Returns | |
---|---|
Type | Description |
$this |
getOutput
Required. Example output of the model.
Returns | |
---|---|
Type | Description |
GeneratorSuggestion|null |
hasOutput
clearOutput
setOutput
Required. Example output of the model.
Parameter | |
---|---|
Name | Description |
var |
GeneratorSuggestion
|
Returns | |
---|---|
Type | Description |
$this |
getInstructionList
Returns | |
---|---|
Type | Description |
string |