Skip to content

Commit 254ab76

Browse files
author
Julien Salinas
committed
Implement num results in semantic search.
1 parent 5fd3aa1 commit 254ab76

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

nlpcloud/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,10 @@ def question(self, question, context=None):
368368

369369
return r.json()
370370

371-
def semantic_search(self, text):
371+
def semantic_search(self, text, num_results=None):
372372
payload = {
373-
"text": text
373+
"text": text,
374+
"num_results": num_results
374375
}
375376

376377
r = requests.post(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='nlpcloud',
5-
version='1.0.38',
5+
version='1.0.39',
66
description='Python client for the NLP Cloud API',
77
long_description="NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, grammar and spelling correction, keywords and keyphrases extraction, chatbot, product description and ad generation, intent classification, text generation, image generation, blog post generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, embeddings, and dependency parsing. It is ready for production, served through a REST API.\n\nThis is the Python client for the API.\n\nMore details here: https://nlpcloud.io\n\nDocumentation: https://docs.nlpcloud.io\n\nGithub: https://github.com/nlpcloud/nlpcloud-python",
88
packages=['nlpcloud'],

0 commit comments

Comments
 (0)