Answer the question
In order to leave comments, you need to log in
How to store dialogue schemes for a chatbot?
Good afternoon!
Please tell me how and in which database (RDBMS or NoSQL) to store schemas for many chatbots. By schema, I mean the dialogue graph, the relationships between options and next/previous messages. Well, i.e. pre-designed a dialogue for the bot and launched it, there can be many such bots / dialogues.
As a first approximation, I thought that a JSON type field in Postgreql with something like this would be a normal option:
{
1:{
"answer1":{
"text":"blah blah",
"photo":"picture.jpg",
"to":2
},
"answer1":{
"text":"blah blah",
"photo":"picture.jpg",
"to":3
},
"answer1":{
"text":"blah blah",
"photo":"picture.jpg",
"to":4
}
},
2:{
"answer1":{
"text":"blah blah",
"photo":"picture.jpg",
"to":5
}
}
}
bot_id | description | token_hash | schema(вот про это поле я и говорю)
Answer the question
In order to leave comments, you need to log in
Normally, ORM works with JSON, but it’s not clear why you need a relational database if you actually abandoned normalization and joins.
For your this option, NoSQL is also suitable.
there can be many such bots/dialogs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question