Module: LLM::DeepInfra::ResponseAdapter
- Defined in:
- lib/llm/providers/deepinfra/response_adapter.rb
Defined Under Namespace
Modules: Audio
Class Method Summary collapse
Class Method Details
.adapt(res, type:) ⇒ LLM::Response
21 22 23 24 25 |
# File 'lib/llm/providers/deepinfra/response_adapter.rb', line 21 def adapt(res, type:) response = (LLM::Response === res) ? res : LLM::Response.new(res) adapter = select(type) response.extend(adapter) end |
.select(type) ⇒ 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.
29 30 31 32 33 34 |
# File 'lib/llm/providers/deepinfra/response_adapter.rb', line 29 def select(type) case type when :audio then Audio else LLM::OpenAI::ResponseAdapter.select(type) end end |