You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been struggling with this a bit and feel like I'm right on the cusp but keep falling back to first base.
In the project I'm building, I want to be able to create many unique bots that can be queried using some sort of unique identifier. The bots name attribute seems irrelevant in this pursuit. Here is a simple example showing the current behavior:
./train-bots.py
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
bot1 = ChatBot("Bob")
bot2 = ChatBot("Jose")
bot1.set_trainer(ListTrainer)
bot2.set_trainer(ListTrainer)
bot1.train(['Hi', 'Bye'])
bot2.train(['Hola', 'Adios'])
Please note how one bot can respond with the others training data.
Ideally, using some sort of unique identifier, in the example I just shared I would be able to train each bot separately and persist them, so that in a following instance I could query the bot and not have it aware of other bots training data.
Is there a clean or standard way of creating bot objects that can be persisted along with their own unique knowledge graphs? I'm running my Django application with a Postgres database. My users will be communicating with bots the a REST API. So it's important that I'm able to retrieve the correct Bot in my controller (ideally something like, ChatBot.objects.get(pk=#)) where it could then be passed the incoming message and conversation_id.
Really would appreciate any thoughts or guidance on how to accomplish this (without creating a new/unique database for every new bot...).
If someone is able to help me solve this, I promise to write up some clean documentation for it!
Thank you!
The text was updated successfully, but these errors were encountered:
@pylobot nice to be chatting with a fellow emoji... 😄
Thanks for the idea. One thing I'm looking at now is if I can pass a parameter along with the database_uri (like: postgresql://something@localhost/test?BOT=) that can then either scope queries or be added as meta data to the relevant rows. I'm trying to avoid having multiple database files, being that managing multiple migrations would probably be a nightmare and also to continuing adding up and up doesn't seem practical.
A new Bot class that inherits from ChatBot but allows me to create ManyToMany relationships with its Statements/Responses is another idea I'm toying with. I'm still reading through the code base though to better understand exactly how it's working before I venture down that path.
I've been struggling with this a bit and feel like I'm right on the cusp but keep falling back to first base.
In the project I'm building, I want to be able to create many unique bots that can be queried using some sort of unique identifier. The bots name attribute seems irrelevant in this pursuit. Here is a simple example showing the current behavior:
./train-bots.py
./bots.py
Please note how one bot can respond with the others training data.
Ideally, using some sort of unique identifier, in the example I just shared I would be able to train each bot separately and persist them, so that in a following instance I could query the bot and not have it aware of other bots training data.
Is there a clean or standard way of creating bot objects that can be persisted along with their own unique knowledge graphs? I'm running my Django application with a Postgres database. My users will be communicating with bots the a REST API. So it's important that I'm able to retrieve the correct Bot in my controller (ideally something like, ChatBot.objects.get(pk=#)) where it could then be passed the incoming message and conversation_id.
Really would appreciate any thoughts or guidance on how to accomplish this (without creating a new/unique database for every new bot...).
If someone is able to help me solve this, I promise to write up some clean documentation for it!
Thank you!
The text was updated successfully, but these errors were encountered: