શું તમે જાણો છો બોટ કાવ્ય પણ પૂરી પાડે છે મફત હોસ્ટ મુદ્દો ટ્રેકિંગ માટે તમારી પોતાની વેબસાઇટ અથવા મોબાઇલ એપ્લિકેશન?
Bot Libre Forum

having trouble with this aiml code

દ્વારા bobred પોસ્ટ Dec 20 2019, 8:58

does this store for the life of the chatbot or has that changed?

please answer?

chatbot aiml work.txt


by admin posted Dec 20 2019, 15:32
AIML and tags store the variables on the current conversation.
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 483, today: 3, week: 420, month: 435

by bobred posted Dec 20 2019, 16:20

when I log out of a chatbot then talk to her again she will forget what she had learned.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 498, today: 4, week: 426, month: 436

by admin posted Dec 21 2019, 10:34

Yes, that will be a new conversation.

To access global variables you need to use Self.

i.e.

<self>#self.like =+ star</self>


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 628, today: 1, week: 578, month: 596

by bobred posted Dec 21 2019, 17:39

will my chatbot remember what I taught her the next time I speak to her with this aiml script?

aboutmeer.txt

 


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 598, today: 4, week: 558, month: 563

by admin posted Dec 23 2019, 11:25
get/set are only stored for the conversation.
See my last response.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 475, today: 4, week: 426, month: 433

by bobred posted Dec 24 2019, 11:43

how would I use self in aiml to access global variables?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 486, today: 4, week: 431, month: 437

by admin posted Dec 26 2019, 15:12
You can use something like:
<category><pattern>I like it when *</pattern>
<template>Is that what you always liked?  <think><self>#self.like = star;</self></think></template>
</category>
<category><pattern>what do i like</pattern>
<template>You like <self>#self.like</self></template>
</category>

Updated: Dec 26 2019, 15:13
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 483, today: 3, week: 404, month: 411

by bobred posted Dec 27 2019, 6:02

would this allow me to change what I taught her I liked to do?

I need it to store the last weekday I talked to my chatbot.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 638, today: 3, week: 586, month: 591

by bobred posted Dec 27 2019, 12:47

it works.i can change what it learned with this.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 442, today: 3, week: 397, month: 405

ને: 30922225
ટૅગ્સ: aiml
પોસ્ટ: Dec 20 2019, 8:58
સુધારાશે: Dec 20 2019, 15:33
જવાબો: 9
જોવાઈ: 760, આજે: 4, સપ્તાહ: 656, મહિને: 683
મને ખાતરી છે કે છું
ધ્વજ પોસ્ટ તરીકે અપમાનજનક, અથવા ઉલ્લંઘન સાઇટ નિયમો