@@ -239,6 +239,13 @@ See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfill
239
239
},
240
240
},
241
241
},
242
+ "enable_generative_fallback" : {
243
+ Type : schema .TypeBool ,
244
+ Optional : true ,
245
+ Description : `If the flag is true, the agent will utilize LLM to generate a text response.
246
+ If LLM generation fails, the defined responses in the fulfillment will be respected.
247
+ This flag is only useful for fulfillments associated with no-match event handlers.` ,
248
+ },
242
249
"messages" : {
243
250
Type : schema .TypeList ,
244
251
Optional : true ,
@@ -2093,6 +2100,8 @@ func flattenDialogflowCXFlowEventHandlersTriggerFulfillment(v interface{}, d *sc
2093
2100
flattenDialogflowCXFlowEventHandlersTriggerFulfillmentSetParameterActions (original ["setParameterActions" ], d , config )
2094
2101
transformed ["conditional_cases" ] =
2095
2102
flattenDialogflowCXFlowEventHandlersTriggerFulfillmentConditionalCases (original ["conditionalCases" ], d , config )
2103
+ transformed ["enable_generative_fallback" ] =
2104
+ flattenDialogflowCXFlowEventHandlersTriggerFulfillmentEnableGenerativeFallback (original ["enableGenerativeFallback" ], d , config )
2096
2105
return []interface {}{transformed }
2097
2106
}
2098
2107
func flattenDialogflowCXFlowEventHandlersTriggerFulfillmentMessages (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
@@ -2355,6 +2364,10 @@ func flattenDialogflowCXFlowEventHandlersTriggerFulfillmentConditionalCasesCases
2355
2364
return string (b )
2356
2365
}
2357
2366
2367
+ func flattenDialogflowCXFlowEventHandlersTriggerFulfillmentEnableGenerativeFallback (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2368
+ return v
2369
+ }
2370
+
2358
2371
func flattenDialogflowCXFlowEventHandlersTargetPage (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2359
2372
return v
2360
2373
}
@@ -3719,6 +3732,13 @@ func expandDialogflowCXFlowEventHandlersTriggerFulfillment(v interface{}, d tpgr
3719
3732
transformed ["conditionalCases" ] = transformedConditionalCases
3720
3733
}
3721
3734
3735
+ transformedEnableGenerativeFallback , err := expandDialogflowCXFlowEventHandlersTriggerFulfillmentEnableGenerativeFallback (original ["enable_generative_fallback" ], d , config )
3736
+ if err != nil {
3737
+ return nil , err
3738
+ } else if val := reflect .ValueOf (transformedEnableGenerativeFallback ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
3739
+ transformed ["enableGenerativeFallback" ] = transformedEnableGenerativeFallback
3740
+ }
3741
+
3722
3742
return transformed , nil
3723
3743
}
3724
3744
@@ -4098,6 +4118,10 @@ func expandDialogflowCXFlowEventHandlersTriggerFulfillmentConditionalCasesCases(
4098
4118
return j , nil
4099
4119
}
4100
4120
4121
+ func expandDialogflowCXFlowEventHandlersTriggerFulfillmentEnableGenerativeFallback (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
4122
+ return v , nil
4123
+ }
4124
+
4101
4125
func expandDialogflowCXFlowEventHandlersTargetPage (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
4102
4126
return v , nil
4103
4127
}
0 commit comments