mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
add check for lower bound of lark (#4287)
This commit is contained in:
parent
c8b0b6e6c1
commit
f510940bde
@ -1,6 +1,13 @@
|
|||||||
from typing import Any, Optional, Sequence, Union
|
from typing import Any, Optional, Sequence, Union
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import lark
|
||||||
|
from packaging import version
|
||||||
|
|
||||||
|
if version.parse(lark.__version__) < version.parse("1.1.5"):
|
||||||
|
raise ValueError(
|
||||||
|
f"Lark should be at least version 1.1.5, got {lark.__version__}"
|
||||||
|
)
|
||||||
from lark import Lark, Transformer, v_args
|
from lark import Lark, Transformer, v_args
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user