I am developing APIs/ Frontend to add new data, stories, responses, entities, add actions , train bot, deploy bot etc .
I am updating backend nlu.md, stories.md, domain.yml etc and then execute rasa train, rasa shell etc in the backend.
Is there any rasa command available to add nludata effectively? Currently, i am using python to add intents, entities etc to nlu.md file.
Logic has become complicated.
Below is sample code to add intents:
pathnlu = bot_name + "/data/nlu.md"
print("Bot id is", args['bot_id'])
if str(os.path.exists(pathnlu)):
f = open(pathnlu, "a")
f.write("\n")
f.write("## intent:")
f.write(intent.intent_name)
f.write("\n")
f.write("- ")
f.write(intent.intent_description)
f.close()
print("Intent ", intent.intent_name, " Created ")
else:
print("Unable to Create Intent")
Below is a sample code to add entities :
pathnlu = bot_name + "/data/nlu.md"
print("Bot id is", args['bot_id'])
if str(os.path.exists(pathnlu)):
f = open(pathnlu, "a")
f.write(intent.intent_description + "(" + entities + ")" + remaining_intent)
f.close()
print("entity", entities, " Added")
else:
print("Unable to add entities")
But, I am looking for some simple and robust way to accomplish it. Please help.
How to do it? - https://legacy-docs.rasa.com/docs/core/interactive_learning/