Spaces:
Sleeping
Sleeping
fix old "Document" import
Browse files- src/pipeline.py +5 -1
src/pipeline.py
CHANGED
|
@@ -4,7 +4,11 @@ from pathlib import Path
|
|
| 4 |
from dataclasses import dataclass
|
| 5 |
from typing import Dict, Any, List, Optional
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
from .logging import log_error
|
| 10 |
from .llm.adapters import LLMRegistry
|
|
|
|
| 4 |
from dataclasses import dataclass
|
| 5 |
from typing import Dict, Any, List, Optional
|
| 6 |
|
| 7 |
+
try:
|
| 8 |
+
from langchain.docstore.document import Document
|
| 9 |
+
except ModuleNotFoundError as me:
|
| 10 |
+
print(me.__str__())
|
| 11 |
+
from langchain.schema import Document
|
| 12 |
|
| 13 |
from .logging import log_error
|
| 14 |
from .llm.adapters import LLMRegistry
|