Class: Ace::LLM::Molecules::FormatHandlers::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/ace/llm/molecules/format_handlers.rb

Overview

Plain text format handler

Instance Method Summary collapse

Methods inherited from Base

#build_cost_summary, #format_cost, #generate_summary

Instance Method Details

#format(response, **_options) ⇒ String

Format response as plain text (content only)

Parameters:

  • response (Hash)

    Response with :text and normalized metadata

  • options (Hash)

    Additional formatting options

Returns:

  • (String)

    Plain text output



153
154
155
156
# File 'lib/ace/llm/molecules/format_handlers.rb', line 153

def format(response, **_options)
  validate_response(response)
  response[:text]
end