Class: LLM::Spell::Text

Inherits:
Object
  • Object
show all
Includes:
Engine
Defined in:
lib/llm/spell/text.rb

Overview

The LLM::Spell::Text class can analyze a given piece of text and return any spelling mistakes it found – along with suggested corrections.

Instance Method Summary collapse

Methods included from Engine

#corrections, #inspect, #mistakes

Constructor Details

#initialize(input, llm) ⇒ Text



16
17
18
19
20
# File 'lib/llm/spell/text.rb', line 16

def initialize(input, llm)
  @input = input
  @llm = llm
  @bot = LLM::Bot.new(llm, schema:)
end

Instance Method Details

#to_sObject



22
# File 'lib/llm/spell/text.rb', line 22

def to_s = input

#to_strObject



23
# File 'lib/llm/spell/text.rb', line 23

def to_str = input