AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Using a sentence as outputmacro parameter
 
 

Hi,

the code works the following way:

outputmacro: ^mymac(^testsentence)
^
testsentence

topic
: ~introductions []
u
: (macrotest) ^mymac(^"hello, how are you?"

I find it more intuitive to call

^mymac("hello, how are you?"

so without the ‘^’ before the quotation.

Is there I way I could handle this parameter in mymac?
So remove the quotation marks afterwards?

Thank you

 

 
  [ # 1 ]

if you know the sentence has no quotations in it, you could pass the sentence in in quotes, and then substitute the quotes away. Alternatively, you can use ^print(OUTPUT_NOQUOTES ^testsentence)  to not print the quotes.

 

 
  login or register to react