Class: LLM::Ollama::Format::CompletionFormat
- Inherits:
-
Object
- Object
- LLM::Ollama::Format::CompletionFormat
- Defined in:
- lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/format/completion_format.rb
Instance Method Summary collapse
-
#format ⇒ Hash
Returns the message for the Ollama chat completions API.
-
#initialize(message) ⇒ CompletionFormat
constructor
A new instance of CompletionFormat.
Constructor Details
#initialize(message) ⇒ CompletionFormat
Returns a new instance of CompletionFormat.
10 11 12 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/format/completion_format.rb', line 10 def initialize() = end |
Instance Method Details
#format ⇒ Hash
Returns the message for the Ollama chat completions API
17 18 19 20 21 22 23 24 25 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/format/completion_format.rb', line 17 def format catch(:abort) do if Hash === {role: [:role]}.merge(format_content([:content])) else end end end |