Class: LLM::Transformer::Null

Inherits:
LLM::Transformer show all
Defined in:
lib/llm/transformer/null.rb

Overview

An LLM::Transformer::Null is a transformer that does nothing. It is used as the default when no transformer strategy is configured.

It returns the given message unchanged.

Instance Attribute Summary

Attributes inherited from LLM::Transformer

#ctx

Instance Method Summary collapse

Methods inherited from LLM::Transformer

#initialize

Constructor Details

This class inherits a constructor from LLM::Transformer

Instance Method Details

#call(message:, **opts) ⇒ LLM::Message

Parameters:

  • message (LLM::Message)

    The message to transform

  • opts (Hash)

    Ignored

Returns:



17
18
19
# File 'lib/llm/transformer/null.rb', line 17

def call(message:, **opts)
  message
end