nlpcloud 1.0.38 → 1.0.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nlpcloud.rb +13 -2
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb244750c675028af5479e001343ae06f48adef84c15e6ac16987aac07e74f60
4
- data.tar.gz: ece3a2bc871c7352f2e792ebba49aec2a3eb39d53ac342460eb078fe7ff14fe8
3
+ metadata.gz: 64685ed4b295b167ab3c6fc9a9e58457fc977de7ff9aa139058fff708f640b32
4
+ data.tar.gz: 403f83f4bf769784f9bc24efc666fc207716064547e66e0262eb5d0995c7a4bd
5
5
  SHA512:
6
- metadata.gz: 653ff47c033a35a665635ad1ab1199681493b5a231111661e570e5702608a582afa7ef32a02b10baf2d8fc185f1947a98dc8a74446056759cdf0a81487f7caea
7
- data.tar.gz: 41231b42f394af13662a354941892e7b7a1cabb69d005536481f6fe4a5fda707e49ec9b17e783db258fdd22657994ebf493ef654733314d8dfe56add3bd1d6d4
6
+ metadata.gz: ad01d8ff341c56a4c47fa061c0385f5ad3c585693bffceb8c30b8a9faeb928e6759d0948d4da68516dcd9a7ef03a09a2d698015eb1efe1bc6c1512be53347a5f
7
+ data.tar.gz: de1007facb5017657422c44aa20cd2cc57588e5ae448a53eb22430fce1bdeb10fd256773427f67f08d8c41906e91128438cbc566ce1e18bf24c2f69e50940b1c
data/lib/nlpcloud.rb CHANGED
@@ -125,7 +125,8 @@ module NLPCloud
125
125
  def generation(text, min_length: nil, max_length: nil, length_no_input: nil,
126
126
  end_sequence: nil, remove_input: nil, do_sample: nil, num_beams: nil, early_stopping: nil,
127
127
  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)
129
130
  payload = {
130
131
  'text' => text,
131
132
  'min_length' => min_length,
@@ -144,7 +145,8 @@ module NLPCloud
144
145
  'repetition_penalty' => repetition_penalty,
145
146
  'length_penalty' => length_penalty,
146
147
  'bad_words' => bad_words,
147
- 'remove_end_sequence' => remove_end_sequence
148
+ 'remove_end_sequence' => remove_end_sequence,
149
+ 'is_instruct' => is_instruct
148
150
  }
149
151
  response = RestClient.post("#{@root_url}/generation", payload.to_json, @headers)
150
152
  JSON.parse(response.body)
@@ -245,6 +247,15 @@ module NLPCloud
245
247
  JSON.parse(response.body)
246
248
  end
247
249
 
250
+ def speech_synthesis(text, voice: nil)
251
+ payload = {
252
+ 'text' => text,
253
+ 'voice' => voice
254
+ }
255
+ response = RestClient.post("#{@root_url}/speech-synthesis", payload.to_json, @headers)
256
+ JSON.parse(response.body)
257
+ end
258
+
248
259
  def summarization(text, size: nil)
249
260
  payload = {
250
261
  'text' => text,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nlpcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.38
4
+ version: 1.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Salinas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -29,10 +29,10 @@ description: 'NLP Cloud serves high performance pre-trained or custom models for
29
29
  correction, keywords and keyphrases extraction, chatbot, product description and
30
30
  ad generation, intent classification, text generation, image generation, code generation,
31
31
  blog post generation, question answering, automatic speech recognition, machine
32
- translation, language detection, semantic search, semantic similarity, tokenization,
33
- POS tagging, embeddings, and dependency parsing. It is ready for production, served
34
- through a REST API. This is the Ruby client for the API. More details here: https://nlpcloud.io.
35
- Documentation: https://docs.nlpcloud.io.'
32
+ translation, language detection, semantic search, semantic similarity, speech synthesis,
33
+ tokenization, POS tagging, embeddings, and dependency parsing. It is ready for production,
34
+ served through a REST API. This is the Ruby client for the API. More details here:
35
+ https://nlpcloud.io. Documentation: https://docs.nlpcloud.io.'
36
36
  email: all@juliensalinas.com
37
37
  executables: []
38
38
  extensions: []