Module: LLM::Gemini::Format
- Included in:
- LLM::Gemini, Images
- Defined in:
- lib/llm/providers/gemini/format.rb
Instance Method Summary collapse
Instance Method Details
#format(messages) ⇒ Array<Hash>
11 12 13 14 15 16 17 18 19 |
# File 'lib/llm/providers/gemini/format.rb', line 11 def format() .map do if Hash === _1 {role: _1[:role], parts: [format_content(_1[:content])]} else {role: _1.role, parts: [format_content(_1.content)]} end end end |