Update version to v0.0.74 (#825)

This commit is contained in:
Deshraj Yadav
2023-10-18 17:12:51 -07:00
committed by GitHub
parent 8b64deab40
commit b47405e1bd
7 changed files with 13 additions and 14 deletions

View File

@@ -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)

View File

@@ -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