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

Chatscript postgre
 
 

Hello, I am struggling with connecting ChatScript with Postgre. I’ve followed the instructions in ChatScript-PostgreSQL, so basically i’ve run “make pgserver” in SRC, and it seemed fine. So I run ./Chatscriptpg in my BINARIES folder, and it’s good. But when i try to “:build postgres” i get “:CALL-1 Call to function not yet defined ^dbinit”. How can it be not defined if I’m running postgre version of ChatScript? I don’t have postgre running locally, i have it in another container, i also tried it with hostaddr set, but it gives me the same issue. Could you please point me to what could be my issue? I’m running chatscript in a docker debian container, and also have another container for postgre

 

 
  [ # 1 ]

Okay so i figured it out the problem was my previous “make standalone” , so i just removed Chatcript, ChatscriptX, Chatscriptpg from BINARIES and /SRC/*.o and made another “make pgserver” and it worked

 

 
  [ # 2 ]

Hello. i have a same problem. i download chatscript-6.9, and then unzip -> /SRC/make standalone -> remove files -> make pg server -> ./BINARY/LinuxChatScript64 -> :build posgres reset
but same problem occurred.
can i help you?

 

 
  [ # 3 ]

You have to be standing in the SRC directory when you do make in order to have file accessing correct. And it’s “make pgserver”  with no spaces.  and it makes BINARIES/ChatScriptpg, so you then go to the BINARIES directory and do ./ChatScriptpg.  Then you do :build postgres.

 

 
  [ # 4 ]

thanks Bruce! i solved it. but i can’t find the “^myfunc” function.

that mean…  when i call query of selection in postgresql, how to get selected values?

for example. i have made chatting script, like this

    ?: ( how is weather today ) ^getweather()


^getweather()
[
    # execute selection query in postgresql
    # and return values for weather
]


i want to answer using posgresql or local files.
Have I mistaken something?

 

 
  [ # 5 ]

Thanks. I figured out the problem. but I don’t know that what is better for flexible answer.

How about like that:

  3 patternmacro: ^myfunc(^db)
  4   ^db
  5  
  6 outputmacro: ^getvalue()
  7   ^dbexecute(^“SELECT * FROM s limit 1;” ‘^myfunc)
  8
  9 ?: ( how is weather today ) the weather is ^getweather()


can anyone help me?

 

 
  [ # 6 ]

Simpletopic of the postgres folder in rawdata illustrates code.  ^myfunc is an outputmacro, not a pattern macro.

 

 
  [ # 7 ]
Bruce Wilcox - Dec 20, 2016:

You have to be standing in the SRC directory when you do make in order to have file accessing correct. And it’s “make pgserver”  with no spaces.  and it makes BINARIES/ChatScriptpg, so you then go to the BINARIES directory and do ./ChatScriptpg.  Then you do :build postgres.

I trying to implement the postgres chatbot on mac os. While running the instructions as mentioned in the above quote, firstly it doesnt respond to the previous mentioned commands. I am attaching a pic showing the output of commands. Also when I run ‘make pgserver’ it shows some 27 warnings. Please shed some light on it.

In the present documentation there is no mention of the step involving BINARIES/ChatScriptpg. If i avoid this step and then run ‘make pgserver’ followed by :build postgres, it says the ^dbinit function not defined. I have installed a postgres (PostgreSQL) 9.6.5 version on mac through ‘brew install postgres’

Image Attachments
Screen_Shot_2017-09-20_at_2.19.58_PM.png
 

 
  login or register to react