Make the handle a template parameter
parent
53b53d9495
commit
b1f367cc81
|
@ -17,9 +17,9 @@ zci is_cached => 1;
|
||||||
triggers any => 'triggerword', 'trigger phrase';
|
triggers any => 'triggerword', 'trigger phrase';
|
||||||
|
|
||||||
# Handle statement
|
# Handle statement
|
||||||
handle remainder => sub {
|
handle <: $ia_handler :> => sub {
|
||||||
|
|
||||||
my $remainder = $_;
|
my <: $ia_handler_var :><: $ia_handler :> = <: $ia_handler_var :>_;
|
||||||
|
|
||||||
# Optional - Guard against no remainder
|
# Optional - Guard against no remainder
|
||||||
# I.E. the query is only 'triggerWord' or 'trigger phrase'
|
# I.E. the query is only 'triggerWord' or 'trigger phrase'
|
||||||
|
|
|
@ -16,7 +16,7 @@ zci is_cached => 1;
|
||||||
triggers any => 'triggerword', 'trigger phrase';
|
triggers any => 'triggerword', 'trigger phrase';
|
||||||
|
|
||||||
# Handle statement
|
# Handle statement
|
||||||
handle remainder => sub {
|
handle <: $ia_handler :> => sub {
|
||||||
|
|
||||||
return "plain text response",
|
return "plain text response",
|
||||||
structured_answer => {
|
structured_answer => {
|
||||||
|
@ -31,7 +31,7 @@ handle remainder => sub {
|
||||||
name => 'Answer',
|
name => 'Answer',
|
||||||
|
|
||||||
data => {
|
data => {
|
||||||
remainder => $_
|
<: $ia_handler :> => \<: $ia_handler_var :>_
|
||||||
},
|
},
|
||||||
|
|
||||||
templates => {
|
templates => {
|
||||||
|
|
Loading…
Reference in New Issue