keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

Dynamic Templates Generation #269

Open SunilGudivada opened 4 years ago

SunilGudivada commented 4 years ago

Is there any way i can generate the template dynamically instead of loading from the AIML file by using the <extension>

What i mean to say is

<category>
    <pattern>CUSTOM EXTENSION</pattern>
    <template>
      <extension path="ClassPath">
          This is the Data that is Input to the custom extension
      </extension>
   </template>
 </category>

Extension will generate me the dynamic content from the class. This is just to handle the different outputs based on the properties that has been set till date. Extension may return Html or Rich Media Content.

Expected Output will be same the below template:

<category>
    <pattern>CUSTOM EXTENSION</pattern>
    <template>
      <b>Data</b> from the <i>extension</i>
   </template>
 </category>

Question: custom extension Answer: Data from the extension