nlpcloud/nlpcloud-js

ReferenceError: params is not defined

UtterDonkey opened this issue · 1 comments

Running the example for question answering:

const NLPCloudClient = require('nlpcloud');

const client = new NLPCloudClient({ model: 'finetuned-llama-2-70b', token: '<redacted>', gpu: true })
client.question({
    question: `How many threats are blocked per day?`,
    context: `We have built security into every component of the network. Cloudflare’s 155 Tbps network blocks an average of 70 billion threats per day, including some of the largest DDoS attacks ever recorded. Each and every login, request, and response that goes through our network strengthens the machine learning that we apply to detect and block threats at the edge, before they ever reach your organization.`
}).then(function (response) {
    console.log(response.data);
}).catch(function (err) {
    console.error(err.response.status);
    console.error(err.response.data.detail);
});

throws the following error:

ReferenceError: params is not defined
    at Client.question (C:\Users\user\Documents\AI Answering\node_modules\nlpcloud\index.js:244:20)
    at Object.<anonymous> (C:\Users\user\Documents\AI Answering\index.js:4:8)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Hello @UtterDonkey thank you for raising this issue.
We just fixed the problem.
Could you please update your npm package and let me know if it now works on your end?

Looking forward to hearing from you.

Julien