Class: Openai::Client::Completions
- Inherits:
-
Object
- Object
- Openai::Client::Completions
- Defined in:
- lib/openai/client/completions.rb
Constant Summary collapse
- PATH =
'completions'
Instance Method Summary collapse
-
#create(body) ⇒ Hash
Public: Makes an API call to create a completion.
Instance Method Details
#create(body) ⇒ Hash
Public: Makes an API call to create a completion.
14 15 16 17 18 |
# File 'lib/openai/client/completions.rb', line 14 def create(body) Http.new.post(PATH, body).body rescue Faraday::Error nil end |