Skip to content

Commit c76240f

Browse files
try to make it work with python 3.11 for wdoc
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
1 parent a058251 commit c76240f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wdoc/wdoc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
from beartype.door import is_bearable
1717
from beartype.typing import Any, Callable, Dict, List, Literal, Optional, Union
18-
from langchain.docstore.document import Document
18+
19+
try:
20+
from langchain.docstore.document import Document
21+
except ImportError:
22+
from langchain_core.documents import Document
1923
from langchain.globals import set_debug, set_llm_cache, set_verbose
2024
from langchain_core.runnables import RunnablePassthrough, chain
2125
from langchain_core.runnables.base import RunnableEach

0 commit comments

Comments
 (0)