1

I want to be able to store context variables into a text file. Im using this code:

"context" : {
    "number_extract" : "<? input.text.extract('[\\d]+',0) ?>"
}

to extract variables into and store in context variable. But now i want to be able to extract it from Watson Assistant for e.g. store it into a text file or any other format. Is this possible or is there another way?

data_henrik
  • 16,724
  • 2
  • 28
  • 49
pepefrog69
  • 27
  • 1
  • 7

1 Answers1

1

Yes, you can store the context from variables in text files or in a database. Watson Assistant allows to make programmatic calls from within a dialog. The code that is invoked would then take care of writing the extracted information to the file or database.

I wrote a tutorial that uses the extracted information to store it in a database or to search in that database with extracted search terms. The code is on GitHub, so you can see how it is done.

data_henrik
  • 16,724
  • 2
  • 28
  • 49
  • Thank you for your answer. I want to know if there are any other methods of extracting variables and storing them into a text file or any other format? – pepefrog69 May 10 '18 at 06:47