Module: LlmGateway::Adapters::Groq::OptionMapper
- Defined in:
- lib/llm_gateway/adapters/groq/option_mapper.rb
Class Method Summary collapse
Class Method Details
.map(options) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/llm_gateway/adapters/groq/option_mapper.rb', line 9 def map() = .dup [:temperature] ||= 0 [:max_completion_tokens] ||= 20480 [:response_format] = normalize_response_format([:response_format] || "text") end |
.normalize_response_format(response_format) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/llm_gateway/adapters/groq/option_mapper.rb', line 17 def normalize_response_format(response_format) if response_format.is_a?(String) { type: response_format } else response_format end end |