Class: LLM::Anthropic::Format::CompletionFormat
- Inherits:
-
Object
- Object
- LLM::Anthropic::Format::CompletionFormat
- Defined in:
- lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format/completion_format.rb
Instance Method Summary collapse
-
#format ⇒ Hash
Formats the message for the Anthropic 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/anthropic/format/completion_format.rb', line 10 def initialize() @message = end |
Instance Method Details
#format ⇒ Hash
Formats the message for the Anthropic chat completions API
17 18 19 20 21 22 23 24 25 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format/completion_format.rb', line 17 def format catch(:abort) do if Hash === {role: [:role], content: format_content([:content])} else end end end |