Archives‎ > ‎AI_Tutorials‎ > ‎

Creating a chatbot - Adding a plugin mechanism

posted Dec 7, 2014, 6:20 AM by Leroy Dyer   [ updated Dec 13, 2014, 9:35 AM ]


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. 



ċ
Creating a Chatbot - 4 - Plugins.zip
(542k)
Leroy Dyer,
Dec 7, 2014, 6:20 AM
Comments