-
Notifications
You must be signed in to change notification settings - Fork 67
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
Mandatory source and target parameters in the REST API throw errors #298
Comments
Hello @mzeidhassan, In recent release 2.0 we have changed our API due to the introduction of multilingual engines. Apparently the connector developed by Okapi to interact with MMT has not been updated yet, and this raises the problem you have encountered. Thanks for reporting this to us too, this is good to know! Best, Andrea |
Hi @mzeidhassan ! I think we can make somehow the API back-compatible: if the engine has only one language direction, it would be possible to omit the source&target languages. We're working on it, I'll let you know as soon as it will be ready! |
This would be great, @davidecaroselli ! Yes, please let me know when it's done so I can update my instance. Thanks a million! @AndRossi Thanks for the info about multilingual engines. I was not aware of this. I will read the wiki page. |
Hello again @mzeidhassan, We have restored the API back-compatibility: you can find the update in our Thanks for your support! Andrea |
Hi @mzeidhassan we have just release MMT v2.0.2 with the API backward compatibility. Please try it and let us know if everything worked as expected! I'm closing this issue for now but, as always, if you have any other question or problem please don't hesitate to re-open it! Cheers, |
It works just fine now! Thanks @davidecaroselli ! |
Hello MMT team,
It seems that there is a change in the REST API.
So, in the old SMT, I used to use this and it worked perfectly fine:
http://192.168.1.166:8045/translate?q=world&context=computer%22%20
Now, if I use the same URL with the new neural version, I get the following error:
{ status: 400, error: { type: "ParameterParsingException", message: "Missing parameter source" } }
If I add the source parameter 'source=en", I get the same error but for target this time.
{ status: 400, error: { type: "ParameterParsingException", message: "Missing parameter target" } }
Is there a reason for this change? I am asking because I was using Okapi framework with the SMT version of MMT and it was working just fine, now it no longer works due to this change. Here is the error I am getting from Okapi.
`ERROR: Error querying the server.
Error: response code 400
Bad Request
Error count: 1, Warning count: 0
Process duration: 0h 0m 0s 158ms
=== End process`
Please let me know what you think. For your information, I reported this to Okapi team.
Thanks,
Mohamed
The text was updated successfully, but these errors were encountered: