module RubyLLM::FileStore::Converters::Text
Reads a file as UTF-8 text, as it is. Text files are read without registering anything; register it for other types that hold plain text:
config.file_converters["application/x-subrip"] = RubyLLM::FileStore::Converters::Text
Public Instance Methods
Source
# File lib/ruby_llm/file_store/converters/text.rb, line 16 def call(attachment) attachment.content.to_s.dup.force_encoding(Encoding::UTF_8).scrub end
Returns the content of attachment as UTF-8 text.