Class: A3rt::Client
- Inherits:
-
Object
- Object
- A3rt::Client
- Defined in:
- lib/a3rt_client/a3rt_client.rb
Constant Summary collapse
- DOMAIN =
"https://api.a3rt.recruit-tech.co.jp"
Class Method Summary collapse
- .image_search(apikey:, query:) ⇒ Object
- .proofreading(apikey:, sentence:, callback: nil, sensitivity: nil) ⇒ Object
- .sql_suggest(apikey:, model_id:, text:) ⇒ Object
- .talk_api(apikey:, query:, callback: nil) ⇒ Object
- .text_suggest(apikey:, previous_description:, callback: nil, style: nil, separation: nil) ⇒ Object
- .text_summarization(apikey:, sentences:, linenumber: nil, separation: nil) ⇒ Object
Class Method Details
.image_search(apikey:, query:) ⇒ Object
24 25 26 27 |
# File 'lib/a3rt_client/a3rt_client.rb', line 24 def image_search(apikey: , query: ) params = make_params(apikey: apikey, query: query) http_request("/image_search/v1/search_by_text", :get, params) end |
.proofreading(apikey:, sentence:, callback: nil, sensitivity: nil) ⇒ Object
29 30 31 32 |
# File 'lib/a3rt_client/a3rt_client.rb', line 29 def proofreading(apikey: , sentence: , callback: nil, sensitivity: nil) params = make_params(apikey: apikey, sentence: sentence, callback: callback, sensitivity: sensitivity) http_request("/proofreading/v2/typo", :get, params) end |
.sql_suggest(apikey:, model_id:, text:) ⇒ Object
34 35 36 37 |
# File 'lib/a3rt_client/a3rt_client.rb', line 34 def sql_suggest(apikey: , model_id: , text: ) params = make_params(apikey: apikey, model_id: model_id, text: text) http_request("/sql_suggest/v1/predict", :get, params) end |
.talk_api(apikey:, query:, callback: nil) ⇒ Object
9 10 11 12 |
# File 'lib/a3rt_client/a3rt_client.rb', line 9 def talk_api(apikey: , query: , callback: nil) params = make_params(apikey: apikey, query: query, callback: callback) http_request("/talk/v1/smalltalk", :post, params) end |
.text_suggest(apikey:, previous_description:, callback: nil, style: nil, separation: nil) ⇒ Object
14 15 16 17 |
# File 'lib/a3rt_client/a3rt_client.rb', line 14 def text_suggest(apikey: , previous_description: , callback: nil, style: nil, separation: nil) params = make_params(apikey: apikey, previous_description: previous_description, callback: callback, style: style, separation: separation) http_request("/text_suggest/v2/predict", :get, params) end |
.text_summarization(apikey:, sentences:, linenumber: nil, separation: nil) ⇒ Object
19 20 21 22 |
# File 'lib/a3rt_client/a3rt_client.rb', line 19 def text_summarization(apikey: , sentences: , linenumber: nil, separation: nil) params = make_params(apikey: apikey, sentences: sentences, linenumber: linenumber, separation: separation) http_request("/text_summarization/v1", :post, params) end |