-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoKnowledgeAdapter always return message with confidence=1 #1273
Comments
It is not currently possible to disable the NoKnowledgeAdapter. Have you made sure that you chat bot has been trained? The NoKnowledgeAdapter will only return a confidence of 1 if there is no responses for the chat bot to reply with. |
I have my own model, I implemented a logic adapter which store trained data in my own table, so the statement table was empty. Since NoKnowledgeAdapter would return confidence=1 if self.chatbot.storage.count() == 0, so my own logic adapter would be ignore even it return a response with confidence==1. If it is possible, I hope that I can pass a default adapter to replace NoKnowledgeAdapter when I new a ChatBot object. Ex: |
Just curios, Could you please let me know what are the use case your trying achieving using above scenario? |
I use ChatterBot as the engine to implement a questionnaire survey bot. The bot will ask question to user, and then user response their answer. User's answers are privacy, others should not have chance to know the answer, so it is better to prevent chatbot reply those message, I disabled to store message and keep statement table as empty. |
Just curios, how you are managing, could you please elaborate this situation with more information. I think it should be a separate usecase or feature that needs to separate user based conversations. I think this can achieved by using conversation_id http://chatterbot.readthedocs.io/en/stable/conversations.html#conversation-scope? did you tried this method, instead disabled training process. @gunthercox Master, do you have any comments? |
I run in read-only mode not only for separate user conversations, but also prevent bot learn wrong conversions. For example, below are normal situation: If the bot learned from this conversation, it might have below scenario: It might reply incorrect message "28 years old" since it learned before. The bot can return correct message in read-only mode: If ChatterBot can enable/disable learning dynamically, it will be suitable in my case. |
@tomliau33 I'm glad to see that you created your own model, that's awesome! I think I can make a small code change that will make it easier for you to disable the Let me know if you think that would solve this. |
That's awesome. |
PR #1296 can solve this. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I created ChatterBot instance in read-only mode with a customized logic adapter, but I found that the default adapter NoKnowledgeAdapter always return message with confidence=1, and then the message returned from my logic adapter always be skipped because of NoKnowledgeAdapter has higher priority.
Is it possible to disable NoKnowledgeAdapter when I create a ChatterBot object?
The text was updated successfully, but these errors were encountered: