Upgrade the declarative pipeline for cleaner interface (#51)
This commit is contained in:
committed by
GitHub
parent
aab982ddc4
commit
9035e25666
@@ -1,7 +1,7 @@
|
||||
from haystack.schema import Document as HaystackDocument
|
||||
|
||||
from kotaemon.documents.base import Document, RetrievedDocument
|
||||
|
||||
from .conftest import skip_when_haystack_not_installed
|
||||
|
||||
|
||||
def test_document_constructor_with_builtin_types():
|
||||
for value in ["str", 1, {}, set(), [], tuple, None]:
|
||||
@@ -19,7 +19,10 @@ def test_document_constructor_with_document():
|
||||
assert doc2.content == doc1.content
|
||||
|
||||
|
||||
@skip_when_haystack_not_installed
|
||||
def test_document_to_haystack_format():
|
||||
from haystack.schema import Document as HaystackDocument
|
||||
|
||||
text = "Sample text"
|
||||
metadata = {"filename": "sample.txt"}
|
||||
doc = Document(text, metadata=metadata)
|
||||
|
Reference in New Issue
Block a user