Question api returns 404 for fast-gpt-j
andreivinaga opened this issue · 3 comments
andreivinaga commented
Tried out the API like this and it fails with 404 Request failed with status code 404
.
It works if I change the model to roberta-base-squad2
.
const NLPCloudClient = require('nlpcloud');
const apiToken = 'token';
const client = new NLPCloudClient('fast-gpt-j',apiToken);
async function test11() {
const response = await client.question(`When can plans be stopped?`,
`All NLP Cloud plans can be stopped anytime. You only pay for the time you used the service. In case of a downgrade, you will get a discount on your next invoice.`)
console.log('response', response);
}
test11().catch(console.error);
juliensalinas commented
Hello @andreiv1992 this is because Fast GPT-J is only available on a GPU, so you would need to initialize the client like this:
const client = new NLPCloudClient('fast-gpt-j',apiToken,true);
Let me know if it's still not working!
andreivinaga commented
Thanks a lot, this works perfectly. Sorry if this was a bad issue, hopefully other people might stumble on this and find the solution
juliensalinas commented
We'll try to make this less confusing by improving our error messages 👍🏻