Skip to content

Commit 9875e28

Browse files
author
Julien Salinas
committed
Implement Dolphin is_instruct parameter
1 parent 3fb62d4 commit 9875e28

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/nlpcloud.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def entities(text, searched_entity: nil)
125125
def generation(text, min_length: nil, max_length: nil, length_no_input: nil,
126126
end_sequence: nil, remove_input: nil, do_sample: nil, num_beams: nil, early_stopping: nil,
127127
no_repeat_ngram_size: nil, num_return_sequences: nil, top_k: nil, top_p: nil,
128-
temperature: nil, repetition_penalty: nil, length_penalty: nil, bad_words: nil, remove_end_sequence: nil)
128+
temperature: nil, repetition_penalty: nil, length_penalty: nil, bad_words: nil, remove_end_sequence: nil,
129+
is_instruct: nil)
129130
payload = {
130131
'text' => text,
131132
'min_length' => min_length,
@@ -144,7 +145,8 @@ def generation(text, min_length: nil, max_length: nil, length_no_input: nil,
144145
'repetition_penalty' => repetition_penalty,
145146
'length_penalty' => length_penalty,
146147
'bad_words' => bad_words,
147-
'remove_end_sequence' => remove_end_sequence
148+
'remove_end_sequence' => remove_end_sequence,
149+
'is_instruct' => is_instruct
148150
}
149151
response = RestClient.post("#{@root_url}/generation", payload.to_json, @headers)
150152
JSON.parse(response.body)

nlpcloud.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'nlpcloud'
3-
s.version = '1.0.38'
3+
s.version = '1.0.39'
44
s.summary = 'Ruby client for the NLP Cloud API'
55
s.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, code generation, blog post 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. This is the Ruby client for the API. More details here: https://nlpcloud.io. Documentation: https://docs.nlpcloud.io.'
66
s.authors = ['Julien Salinas']

0 commit comments

Comments
 (0)