Okay, I'm the author of the code for using CSV files in a dynamic way.
You will need to download the CSV handling kb if you haven't already done so.
Note: this is quite different to the "phonebook" type idea.
this is one (possible) way to do it.
Let us suppose that you have a (small) csv file called(e.g.)"info".
Logically, you will load this at Verbot start-up and your Verbot will process the file as you want (well, as you've written anyway
Now, if an external program alters the data in "info", then if the Verbot re-reads this file, it will have the updated info to use.
Similarly, if the Verbot changes the data in "info" and then saves the file, the external program can (in theory at least) access this changed data also.
So, to take your example:
If you have a rule with the input: ""what is the temperature?"
then the output would contain the following:<?csharp
vars["info"] = CSV.Open(vars["csvpath"],"info.csv");
vars["temperature"] = CSV.GetElement(CSV.GetRow(vars["info"], "temperature", true,0),"2");
the temperature is [temperature] degrees centigrade.
vars["csvpath"] is the vars-variable that holds the path (e.g. <mem.set csvpath C:\MyDocuments\Data\>).
the second line is the composite "call" needed to the CSV vcm suite.
I'm assuming that CSV file is in the form item,value
(thus temperature, 24 or day,monday) i.e. a two column csv where the first column is the "identifier" and the second the "value".
There are a few limitations that mean you can't fully "automate" this.
Firstly, the Verbot can only be made "aware" of the "new" data if you tell it to re-read the file (ditto the external program of course).
Thus, even if you do this using the global methods of VerbotStandard (so that it updates "info" each time a rule is used), you can't use a change in the data to "trigger" the Verbot.
Second: depending on the size of the "info" file and the amount of processing that it needs in order to determine the "state" of the Verbot you might find that re-processing the data each time a rule is fired slows the Verbot's response down too much.
If you are using a lot of data, you might want to make a sort of "checksum" for it.
What I mean is that if you "sum" up all the values for your data and store it in a separate "csv" file (which then has at most two elements of data, perhaps just one) then you could first re-load this tiny bit of data (therefore fast) and check if the "new" value is different to the old one. Only if the data has changed (i.e. the two "checksum"s do not agree) would you need to reload the data-file.
I'd write that in vcm as well and use that call to call everything else.
If you want help to write it, let us know.