nlpcloud 1.0.25 → 1.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nlpcloud.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a760805d316c66fd4e45b7fe061a85b0fea798da1da42261d462578710c3fe1b
|
4
|
+
data.tar.gz: 903426e5d75ebcc811369493c9864ae933824476dc60a0573e900e35668800a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
50
|
+
def chatbot(text, context: nil, history: nil)
|
51
51
|
payload = {
|
52
|
-
'text' =>
|
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)
|