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

[Feature Request]: Pick a answer(s) from a intent. #1289

Open
MarketingPip opened this issue Feb 26, 2023 · 0 comments
Open

[Feature Request]: Pick a answer(s) from a intent. #1289

MarketingPip opened this issue Feb 26, 2023 · 0 comments

Comments

@MarketingPip
Copy link

It would be more than ideal if the API could expose a way to choose a random answer from the / a corpus via intent name from provided string.

I know I can get the answer via OnIntent.answer tho not sure - can't seem to find where keys are stored for corpus.

I tried looking through the source code to see if I could make any progress on this but could not seem to figure it out! With some guidance I could possibly make a PR for this.

Ideally it would look something like nlp.getIntent(`name`) with a returned object of something like

{
intent:IntentName,
answer:Random, // random via length etc.. 
answers:[
ALL ANSWERS
].
}

I will try to suggest any other features / suggestions when they come to mind! 👍

Off topic: I also seen the it was asked about for support to export corpus data via web. If I can get a pointer / snippet of where the JSON gets created so I can work off that I will try to add a feature / tool to export corpus via browser. I seen where things get sent to the file system module to export. But could not see where the model was turned into JSON. Would be great if I can get the line to where to find the JSON only so I can work with that etc.

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