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

Add agent model name to request query #105

Merged
merged 2 commits into from
Aug 24, 2018
Merged

Conversation

Oceania2018
Copy link
Contributor

@Oceania2018 Oceania2018 commented Aug 23, 2018

localhost:5000/train?project=my_project&model=my_model_name

@paschmann
Copy link
Owner

@Oceania2018 - please validate why you need the agent name included in the request? Per the Rasa NLU HTTP API Docs, there is no param needed? https://www.rasa.com/docs/nlu/http/

@Oceania2018
Copy link
Contributor Author

Oceania2018 commented Aug 23, 2018

@paschmann Please see the note from HTTP API Docs, "The server will automatically generate a name for the trained model. If you want to set the name yourself, call the endpoint using localhost:5000/train?project=my_project&model=my_model_name". Actually, It's better if we change it to "&model=" + req.query.name, I just follow Rasa UI pattern, even it might not make sense.

I'm trying to make Rasa UI work with another bot engine BotSharp. It still work if you don't merge this change. But I noticed that Rasa UI already generated a model name from frontend. So I consider that we might use it.

@paschmann
Copy link
Owner

Thanks for the response @Oceania2018 - but please notice in your pull request your query param is called agent, it should be model, please update and I will merge. Thanks again for your commit/help.

global.rasanluendpoint + "/train?project=" + req.query.project + "&agent=" + req.query.name

@Oceania2018
Copy link
Contributor Author

Do you want me change the 40th line logRequest(req, "train", {project: req.query.project, agent: req.query.name, data: req.body}); to logRequest(req, "train", {project: req.query.project, model: req.query.name, data: req.body});

@paschmann
Copy link
Owner

@Oceania2018 - no, per the Rasa NLU HTTP API docs, this line should be model: https://github.com/paschmann/rasa-ui/pull/105/files#diff-9a38e7260de0e7afb6752be4607ed39cR53

@Oceania2018
Copy link
Contributor Author

Oceania2018 commented Aug 23, 2018

Current it's agent logRequest(req, "train", {project: req.query.project, agent: req.query.name, data: req.body}), not model.

@Oceania2018
Copy link
Contributor Author

@paschmann Hi Paul, are you going to merge the pull request?

@paschmann paschmann merged commit 6eb7a02 into paschmann:master Aug 24, 2018
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

Successfully merging this pull request may close these issues.

3 participants