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

Please add how to get responses in readme file #14

Open
FATCAT47 opened this issue Aug 27, 2021 · 1 comment
Open

Please add how to get responses in readme file #14

FATCAT47 opened this issue Aug 27, 2021 · 1 comment

Comments

@FATCAT47
Copy link

I can code my own function that randomizes response based on tag but it would be easier to use yours. The issue is I'm having trouble figuring out what to pass instead of "messages".

@FATCAT47
Copy link
Author

FATCAT47 commented Aug 28, 2021

It's this easy to get random greeting responses but it would be messy

`
import random
import json

json = json.loads(open("intents.json").read())

greetings = json["intents"][0]["responses"]

result = random.choice(greetings)

print(result)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant