Closed poovarasanvasudevan closed 5 years ago
Is the leanf file being created or not picked up on restart ?
It is not created,
One thing i noticed is in conversation.convo file when we chat it maintains properties
"properties": {
"topic": "SERVICE",
"positivity": "0.0",
"subjectivity": "0.5",
"category": "AD",
"mcontext": "ASKQ",
"active": "true",
"dayphase": "Night",
"name": "poovarasan"
}
when i restart the server all properties are gone, this is my config.yaml file config.yaml.txt
I've just added a new test grammar to y-bot which allows me to test learnf in live and its all appears to be working. File is created and when I restart the server it picks it up again.
Have you checked the log file for any errors in file creation?
If you could stop your server, delete your log file, and then restart and only ask the question which creates the learnf file I can try and debug it for you
Would be useful to also send me the AIML that you are iusing to create the learnf file too.
Hi, Thanks for the response , Now i able to create learnf file, but now, it was not picked by the bot
Scenario :
My name is xxxxx OK, I will remember your name is xxxxx what is my name YOUR NAME IS xxxxx
Now i restarted the server
what is my name I`ve no idea
AIML file i am using
Created Learnf file poovarasan.aiml.txt
My config config.yaml.txt
Thanks
You are creating a duplicate grammar when your learnf file is created, it clashes with
Did this solve your issue ?
Actually Not, May be, aiml is for Global Bot, Not for Specific user, As per my context, For each user bot has to reply their context aiml
user A >> My name is A BOT >> OK, I will remember your name is A user A >> what is my name BOT >> YOUR NAME IS A
it created A.aiml file Now user B comes
user B >> what is my name BOT >> YOUR NAME IS A
I can`t able to store aiml on user specific, but anyway i achieved through custom service
Created a service
from programy.services.service import Service
from programy.utils.logging.ylogger import YLogger
import json
class ClientService(Service):
def __init__(self, config=None, api=None):
Service.__init__(self, config)
def ask_question(self, client_context, question: str):
` using client_context.userid fetch user from database `
return "Your name is " + client_context.userid
another thing i want to ask is is i able to set user properties from my custom services
Thanks Poovarasan Vasudevan
Closing this, Achived Different way,
Thanks Poovarasan Vasudevan
I am using Y bot, in windows 10 , Problem i am facing is
HUMAN > My name is xxx BOT > xxx nice name HUMAN > what is my name BOT > xxx
the bot replies and remembers xxx , When i restart the server HUMAN > what is my name BOT > I've no idea.
How can i Persist the response , so that bot will learn based on the conversation with the user earlier , on start, I heared about and , I modified my config.yaml to this
The Problem is on Conversation it was not creating learn file
Context (Environment)