Skip to content

Commit 7d5b410

Browse files
author
Julien Salinas
committed
Fix bug in question answering and semantic search:
- add "params" as a function parameter
1 parent 16bc89f commit 7d5b410

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class Client {
240240
return axios.post(this.rootURL + '/' + 'paraphrasing', payload, { headers: this.headers })
241241
}
242242

243-
question(question, context = null) {
243+
question(params) {
244244
var question = params.question
245245
var context = params.context ?? null
246246

@@ -252,7 +252,7 @@ class Client {
252252
return axios.post(this.rootURL + '/' + 'question', payload, { headers: this.headers })
253253
}
254254

255-
semanticSearch() {
255+
semanticSearch(params) {
256256
var text = params.text
257257
var numResults = params.numResults ?? null
258258

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nlpcloud",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, text generation, image generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, speech synthesis, embeddings, and dependency parsing. It is ready for production, served through a REST API.\n\nThis is the Node.js client for the NLP Cloud API.\n\nMore details here: https://nlpcloud.io\n\nDocumentation: https://docs.nlpcloud.io",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)