Commit
•
e2023ab
1
Parent(s):
860239d
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -31,7 +31,7 @@ class EndpointHandler:
|
|
31 |
isinstance(document, dict) for document in documents
|
32 |
), "Expected each document in documents to be a dictionary"
|
33 |
|
34 |
-
documents = [Document(
|
35 |
return self.document_embedder.run(documents)
|
36 |
|
37 |
raise ValueError("Expected either text or documents")
|
|
|
31 |
isinstance(document, dict) for document in documents
|
32 |
), "Expected each document in documents to be a dictionary"
|
33 |
|
34 |
+
documents = [Document.from_dict(document) for document in documents]
|
35 |
return self.document_embedder.run(documents)
|
36 |
|
37 |
raise ValueError("Expected either text or documents")
|