Class: Langchain::Processors::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/langchain/processors/text.rb

Constant Summary collapse

EXTENSIONS =
[".txt"]
CONTENT_TYPES =
["text/plain"]

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from DependencyHelper

#depends_on

Constructor Details

This class inherits a constructor from Langchain::Processors::Base

Instance Method Details

#parse(data) ⇒ String

Parse the document and return the text

Parameters:

  • data (File)

Returns:

  • (String)


12
13
14
# File 'lib/langchain/processors/text.rb', line 12

def parse(data)
  data.read
end