本页还没有译文
本页 4 段还没译成한국어,下面显示的是英文原文。Jsonlines files - integration
还没翻译译自英文(docs.langchain.com)本页 4 段都还没译
This example goes over how to load data from JSONLines or JSONL files. The second argument is a JSONPointer to the property to extract from each JSON object in the file. One document will be created for each JSON object in the file.
Example JSONLines file:
{"html": "This is a sentence."}
{"html": "This is another sentence."}Example code:
import { JSONLinesLoader } from "@langchain/classic/document_loaders/fs/json";
const loader = new JSONLinesLoader(
"src/document_loaders/example_data/example.jsonl",
"/html"
);
const docs = await loader.load();
/*
[
Document {
"metadata": {
"blobType": "application/jsonl+json",
"line": 1,
"source": "blob",
},
"pageContent": "This is a sentence.",
},
Document {
"metadata": {
"blobType": "application/jsonl+json",
"line": 2,
"source": "blob",
},
"pageContent": "This is another sentence.",
},
]
*/AI 翻译查看英文原文