Module: Openai::Client::Utils
- Defined in:
- lib/openai/client/utils.rb
Class Method Summary collapse
-
.upload_io(data, param_names, content_type) ⇒ Hash
private
Internal: Creates the open IO object for the uploaded file.
Class Method Details
.upload_io(data, param_names, content_type) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Internal: Creates the open IO object for the uploaded file.
15 16 17 18 19 20 |
# File 'lib/openai/client/utils.rb', line 15 def upload_io(data, param_names, content_type) param_names.each do |param| data[param] = Faraday::FilePart.new(data[param], content_type) if data[param] end data end |