akryldigital commited on
Commit
383ecc7
·
verified ·
1 Parent(s): f82207a
Files changed (1) hide show
  1. src/llm/loader.py +5 -1
src/llm/loader.py CHANGED
@@ -3,7 +3,11 @@
3
  import json
4
  from pathlib import Path
5
  from typing import List, Dict, Any
6
- from langchain.docstore.document import Document
 
 
 
 
7
 
8
 
9
  def load_json(filepath: Path | str) -> List[Dict[str, Any]]:
 
3
  import json
4
  from pathlib import Path
5
  from typing import List, Dict, Any
6
+
7
+ try:
8
+ from langchain.docstore.document import Document
9
+ except:
10
+ from langchain_core.documents import Document
11
 
12
 
13
  def load_json(filepath: Path | str) -> List[Dict[str, Any]]: