Skip to content
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

Issue on created yml file #1640

Closed
mady143 opened this issue Feb 25, 2019 · 1 comment
Closed

Issue on created yml file #1640

mady143 opened this issue Feb 25, 2019 · 1 comment

Comments

@mady143
Copy link

mady143 commented Feb 25, 2019

Hi,

i had created the chat history in one the file named as chat.yml file but i am facing a problem could any one resolve it
Bellow is my code
userText = request.args.get('msg')
# print(userText)
text = str(english_bot.get_response(userText))

Chathistory = "chathistory"
a = {"categories":[Chathistory],"converstaions":[[userText,text]]}
	
with open("chat.yml","a") as outfile:
	yaml.dump(a,outfile,default_flow_style=False)

return text

Chat.yml

categories:

  • chathistory
    converstaions:
    • hi
    • Hi,Good Morning
      categories:
  • chathistory
    converstaions:
    • need help
    • yeah tell me how can i help you
      categories:
  • chathistory
    converstaions:

Actual yml file

categories:

  • food
    conversations:
    • electricity
    • electricity is nutrition for robots.
    • are you experiencing an energy shortage?
    • my processor requires very little power.

could any one help me to resolve this issue

Thanks in advance

Happy codding....

@lock
Copy link

lock bot commented Dec 22, 2019

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.

@lock lock bot locked and limited conversation to collaborators Dec 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant