Class: Langchain::Processors::JSON
- Defined in:
- lib/langchain/processors/json.rb
Constant Summary collapse
- EXTENSIONS =
[".json"]
- CONTENT_TYPES =
["application/json"]
Instance Method Summary collapse
-
#parse(data) ⇒ Hash
Parse the document and return the text.
Methods inherited from Base
Methods included from DependencyHelper
Constructor Details
This class inherits a constructor from Langchain::Processors::Base
Instance Method Details
#parse(data) ⇒ Hash
Parse the document and return the text
12 13 14 |
# File 'lib/langchain/processors/json.rb', line 12 def parse(data) ::JSON.parse(data.read) end |