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..

CS within AWS connected to a separate MySQL instance
 
 

ChatScript question. Connected a Linux server running forked CS with success within AWS, connected to a separate H.A. MySql database server. It writes the TOPIC files to the MYSQl server, and this works great!  Very exciting. I plan to publish an image copy of this, so other people can reuse this setup.

Anyway, I am trying to setup a simple database call from CS. Basically, before quibbles are executed, CS will check if a word in within a concept list, which will have 180k individual words. If it is in the list, query mysql for a response.
I have the database loaded and ready. I am trying to fire the database call from CS.
Here is what I have and I am not able to build because of the t: line.
it hangs on this line “in introductions.top at 14:”

Any thoughts on what my syntax issue is?  I appreciate your help!

outputmacro: ^myfunc2(^db)
preprint(^db )

t: ($onetest?~dbase_quibble_01)
if (^dbexecute(^“SELECT response FROM quibble where quibble.word = ‘$onetest’;” ‘^myfunc2)) 
else {dbexecute failed tables - $$db_error} 

 

 
  [ # 1 ]

Error is on the last “if” line

 

 
  [ # 2 ]

Still stuck.  I figured out I was using the incorrect quotation marks.  I simplified the SQL, and I still get an error within the mysql build,

“error undefined function ^dbexecute”

I noticed that postgres and mongo have special folders in RAWDATA. Wondering if I might need the same for mysql?

outputmacro: ^myfunc3(^db)
preprint(^db)

topic: ~INTRODUCTIONS2 repeat keep (~largewordlist)
# next line is broken
t: ( ~largewordlist )  if (^dbexecute(^“SELECT * FROM quibble;” ‘^myfunc3 )) {table s created}


What this is trying to do: If a word is on a very large list of words, look it up in the database for a response and play the response out.

 

 
  login or register to react