Update version to v0.0.74 (#825)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from embedchain.chunkers.docs_site import DocsSiteChunker
|
||||
from embedchain.chunkers.docx_file import DocxFileChunker
|
||||
from embedchain.chunkers.json import JSONChunker
|
||||
from embedchain.chunkers.mdx import MdxChunker
|
||||
from embedchain.chunkers.notion import NotionChunker
|
||||
from embedchain.chunkers.pdf_file import PdfFileChunker
|
||||
@@ -10,7 +11,6 @@ from embedchain.chunkers.text import TextChunker
|
||||
from embedchain.chunkers.web_page import WebPageChunker
|
||||
from embedchain.chunkers.xml import XmlChunker
|
||||
from embedchain.chunkers.youtube_video import YoutubeVideoChunker
|
||||
from embedchain.chunkers.json import JSONChunker
|
||||
from embedchain.config.add_config import ChunkerConfig
|
||||
|
||||
chunker_config = ChunkerConfig(chunk_size=500, chunk_overlap=0, length_function=len)
|
||||
|
||||
@@ -2,7 +2,8 @@ import hashlib
|
||||
from unittest.mock import patch
|
||||
|
||||
from langchain.docstore.document import Document
|
||||
from langchain.document_loaders.json_loader import JSONLoader as LcJSONLoader
|
||||
from langchain.document_loaders.json_loader import \
|
||||
JSONLoader as LangchainJSONLoader
|
||||
|
||||
from embedchain.loaders.json import JSONLoader
|
||||
|
||||
@@ -12,10 +13,10 @@ def test_load_data():
|
||||
Document(page_content="content1", metadata={"seq_num": 1}),
|
||||
Document(page_content="content2", metadata={"seq_num": 2}),
|
||||
]
|
||||
with patch.object(LcJSONLoader, "load", return_value=mock_document):
|
||||
with patch.object(LangchainJSONLoader, "load", return_value=mock_document):
|
||||
content = "temp.json"
|
||||
|
||||
result = JsonLoader.load_data(content)
|
||||
result = JSONLoader.load_data(content)
|
||||
|
||||
assert "doc_id" in result
|
||||
assert "data" in result
|
||||
|
||||
Reference in New Issue
Block a user