nlpcloud 1.0.25 → 1.0.26

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 +4 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9f78fc814311ca5dbf1de43d42cba079fe11642a0bac4e6ad45438f2bf7c56a
4
- data.tar.gz: 8fd473b787f85d8e51f0cdf3fd8c1c76e06e40619846aa261613c319e86b9f7d
3
+ metadata.gz: a760805d316c66fd4e45b7fe061a85b0fea798da1da42261d462578710c3fe1b
4
+ data.tar.gz: 903426e5d75ebcc811369493c9864ae933824476dc60a0573e900e35668800a6
5
5
  SHA512:
6
- metadata.gz: ae66cb895e78e0ad0879b1aa089fd850e701a0e6366c51a084749314d2948ea45ebb192dbc106774d71716a93004c57c275b968e830a3922e99291ce9ab61fa3
7
- data.tar.gz: 3425a1d03d3028d3d096c1fc3facc088629bdb6119f6afca1db9148b782f7aae5f116ed3fa6ee85de92eb58577f83f613f12b60a23cb0e826b49b3a0a5d28019
6
+ metadata.gz: 250b393eb22965bd7807e8aa4f87d0a9ae8c1ecabd2f1d627d0713824c2ea0eec83445a630b9012d2a41e8fc103ff144b362321be9e3d08d3c6820afdca1bd64
7
+ data.tar.gz: 2d4fead9c8452e021feb97c4fc24f0b664d9113ebdb41191f110b31cffe86fe57eaf51c7de658264d27ba0c229692d5f6b5ea4a6a5f8e4d74314a258d38e6154
data/lib/nlpcloud.rb CHANGED
@@ -47,9 +47,11 @@ module NLPCloud
47
47
  JSON.parse(response.body)
48
48
  end
49
49
 
50
- def chatbot(_text, history: nil)
50
+ def chatbot(text, context: nil, history: nil)
51
51
  payload = {
52
- 'text' => history
52
+ 'text' => text,
53
+ 'context' => context,
54
+ 'history' => history
53
55
  }
54
56
  response = RestClient.post("#{@root_url}/chatbot", payload.to_json, @headers)
55
57
  JSON.parse(response.body)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nlpcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.25
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Salinas