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

step 7 of tutorial 1 #869

Open
vinith-reddy25 opened this issue Jan 18, 2022 · 5 comments
Open

step 7 of tutorial 1 #869

vinith-reddy25 opened this issue Jan 18, 2022 · 5 comments

Comments

@vinith-reddy25
Copy link

vinith-reddy25 commented Jan 18, 2022

By running

"$ genie server --nlu-model file://OUTPUTDIR --thingpedia thingpedia.tt -l en-US"

output is coming as:

"
I 220118 16:31:25 transformer_lstm:79] Initializing encoder and decoder embeddings
[I 220118 16:31:26 transformer_lstm:108] Vocabulary has 28997 tokens
[I 220118 16:31:27 util:555] TransformerLSTM has 125,656,333 parameters

"
After that when "localhost:8400" is tried to open in browser then "{"error":"Invalid endpoint"}" is coming. Can someone tell what to do??

Will it take too much time to deploy?? or some issue is there in my side??

@sileix
Copy link
Member

sileix commented Feb 2, 2022

It won't take long to deploy.
The only endpoint opened for the nlu server is /en/query. For example, if you want to get the result for utterance "get restaurants", you would go to localhost:8400/en/query?q=get restaurants

@vinith-reddy25
Copy link
Author

/en/query endpoint not working. Can you send any link where there is a discussion about api call

@sileix
Copy link
Member

sileix commented Feb 7, 2022

Here is some documentation about the API provided in our production server: https://wiki.genie.stanford.edu/en/api-references/nlp - it is the same as the self-served one here. And the endpoint is implemented here:

app.post('/:locale/query', qv.validatePOST(QUERY_PARAMS, { accept: 'application/json' }), (req, res, next) => {
.

Both en and en-US should work as the locale. An example on our production server: https://nlp.genie.stanford.edu/en/query?q=get%20restaurants

@vinith-reddy25
Copy link
Author

I was asking for http://localhost:8400 as it is giving error and not using https://nlp.genie.stanford.edu/

@sileix
Copy link
Member

sileix commented Feb 8, 2022

Both localhost and our production server share the same implementation of the API call. We don't have separate documentation for API for genie-server at the moment, but simply replace the URL from nlp.genie.stanford.edu to localhost:8400, everything else should be the same.

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

2 participants