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