Module: LLM::Anthropic::Format

Included in:
LLM::Anthropic
Defined in:
lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format.rb,
lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format/completion_format.rb

Defined Under Namespace

Classes: CompletionFormat

Instance Method Summary collapse

Instance Method Details

#format(messages) ⇒ Array<Hash>

Parameters:

Returns:

  • (Array<Hash>)


13
14
15
16
17
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format.rb', line 13

def format(messages)
  messages.filter_map do
    CompletionFormat.new(_1).format
  end
end