AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Are there any restrictions when an AIML topic cant be set?
 
 

Hello.
Are there any restrictions when the topic cant be set? I have a problem where the category gets activated via <srai> the text shows up, half of the <think> order are done but the topic which is set in the <think> part as well doesnt get changed. And I cant see why. It works in other examples with the same conidtions.

 

 
  [ # 1 ]

Hi, Robert. I’ve split your post into it’s own thread, just to keep it separate from the original. Can you show us examples of both code that does work, as well as the offending code? That will help us out a lot to figure out what’s going on. Thanks.

 

 
  [ # 2 ]

Ok. Thanks a lot for the fast reply.

Here it works:

<category>
    <
pattern>Next</pattern>
    <
template>
        <
condition name="reihenfolgefragen1">
            <
li value="0">
                <
think><set name="reihenfolgefragen1">1</set></think>
                <
srai>Frage3</srai>
            </
li>
            <
li value="1">
                <
think><set name="reihenfolgefragen1">2</set></think>
                <
srai>Frage4</srai>
            </
li>
            <
li>
                <
think><set name="reihenfolgefragen1">0</set></think>
                <
srai>Frage2</srai>
            </
li>
        </
condition>
    </
template>
</
category>

    <
category>
        <
pattern>Frage2</pattern>
        <
template>Frage 2Aus wievielen Mitgliedern besteht der Ständerat? <br></br>
        
A26 <br></brB46 <br></brC36 <br></brD56
        
<think>
        <
set name="topic">Legislative frage2</set>
        <
set name="hilfezufrage">Legislative frage2</set>    
        </
think>
        </
template>
    </
category

I use the <srai>Frage2</srai> to get to that category and the topic will be set just fine.

But then theres this:

<category>
        <
pattern>*</pattern><that> * oder möchtest du ein spezifisches Subthema behandeln</that>
        <
template>
        <
think><set name="themenwahl"><star/></set></think>
        <
condition name="themenwahl">
        <
li value="STAATSKUNDE">Willst du lieber Fragen über Staatskunde im Allgemeinen beantworten?</li>
        <
li value="Legislative"><srai>FragerundeLegislative</srai></li>
        <
li value="* Legislative"><srai>FragerundeLegislative</srai></li>
        <
li value="Legislative *"><srai>FragerundeLegislative</srai></li>
        <
li value="Exekutive"><srai>FragerundeExekutive</srai></li>
        <
li value="* Exekutive"><srai>FragerundeExekutive</srai></li>
        <
li value="Exekutive *"><srai>FragerundeExekutive</srai></li>
        <
li value="Judikative *"><srai>FragerundeJudikative</srai></li>
        <
li value="Judikative"><srai>FragerundeJudikative</srai></li>
        <
li value="* Judikative"><srai>FragerundeJudikative</srai></li>
        <
li>Tut mir Leid mit diesem Thema kann ich dir noch nicht helfen.</li>
        </
condition>
        <
think><set name="topic">STAATSKUNDE</set></think>
        </
template>
    </
category>

    <
category>
        <
pattern>FragerundeLegislative</pattern>
        <
template>Sehr gutFrage 1Wieviele Abgeordnete sind im Nationalrat? <br></br>
        
A200 <br></brB160 <br></brC120 <br></brD220
        
<think>
        <
set name="TOPIC">Legislative frage1</set>
        <
set name="hilfezufrage">Legislative frage1</set>    
        </
think>
        </
template>
    </
category

The really werid thing is that the <set name=“hilfezufrage”>Legislative frage1</set> works, the text works too just the topic doesnt work. (Its all caps because i thought maybe it would help, I tried everything I could think of ^^)

I hope this helps even though the text is in german.

 

 
  [ # 3 ]

The language doesn’t matter, and even if it were necessary to understand it, Google Translate will at least give me the gist of what it means. Out of curiosity, which chatbot platform are you using (e.g. Pandorabots, Program O, etc.)? I ask because I think that, depending on the platform, the wildcards in the <li> attributes in your non-working example may well be the cause of your issue. I really can’t be sure without knowing what chatbot platform you’re using.

 

 
  [ # 4 ]

Ah yes of course, Im using Pandorabots. I dont know if its relevant but the code that doesnt work is split in two different files. Could that be a problem?

 

 
  [ # 5 ]

That being the case, take a look at this thread for some suggestions on how to handle wildcards in <condition> tags. I don’t believe that Pandorabots allows wildcards in attributes (I could be wrong, though - Steve will correct me if I’m wrong, I’m sure), but there are ways to work around it.

 

 
  [ # 6 ]

Sadly thats not it. I removed all the wildcards and even moved the code to the same file and it still doesnt work… (Also I use wildcards like that in conditions in other places and that works just fine, as far as I know the ^ wildcard doesnt work in <li> but the * does.)

 

 
  [ # 7 ]

This may be a bug in Pandorabots. If you change Legislative frage1 to Legislative frage2 for the topic name, it works! As a workaround, use this:

<category>
        <
pattern>FragerundeLegislative</pattern>
        <
template>Sehr gutFrage 1Wieviele Abgeordnete sind im Nationalrat? <br></br>
        
A200 <br></brB160 <br></brC120 <br></brD220
        
<think>
        <
set name="topic">
        <
set name="hilfezufrage">Legislative frage1</set>    
        </
set>
        </
think>
        </
template>
    </
category

Tip:

Did you know you can use <br/> instead of <br></br>? 
 

 
  [ # 8 ]

Ah thank you for the tip!

Yes it really seemed to be a bug because now it works just fine! But thank you both for the help!

 

 
  [ # 9 ]

that’s what we’re here for, Robert. Best of luck with your project, and if you have any more questions, please don’t hesitate to ask. smile

 

 
  login or register to react