Creating a chatbot - Adding a plugin mechanism

Post date: Dec 7, 2014 2:20:32 PM

In this lesson , you will be shown how to create an interface to allow for external plugins to be added to your AI, Compile on the fly. A DLL file is compiled an made available to the main script without reloading the application.

by creating an interface the AI can execute the Interface and all DLL's implementing the interface.

This feature enables for a release of the AI, Giving the ability to issue updates which can be placed in the designated plugins/updates folder.

Here: An interface Called Iplugin defines the shape of the "Class" or the plugin to be designed.

The main source code, can create an instance of the class and execute the "unknown class" extracting the "response" from the class to be used in the main script.

The load Plugins function, loads all dlls then only the classes which implement the interface.

This could provide a mechanism for the AI to Write its own code too. the implications for this can be futuristic, a computer writing its own code and executing the code without the need to recompile the code.