Module: OpenAI::Internal::Transport::RequestBodyMerge Private
- Defined in:
- lib/openai/internal/transport/request_body_merge.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Reconciles exact string/symbol counterparts while preserving the existing deep-merge behavior for request body overrides.
Class Method Summary collapse
Class Method Details
.merge(body, extra_body) ⇒ Object?
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.
18 19 20 21 22 23 |
# File 'lib/openai/internal/transport/request_body_merge.rb', line 18 def merge(body, extra_body) values = [body, extra_body].compact return OpenAI::Internal::Util.deep_merge(*values) unless values.length == 2 merge_hashes(values.fetch(0), values.fetch(1)) end |