mirror of
https://github.com/hwchase17/langchain
synced 2024-11-02 09:40:22 +00:00
community[patch]: fix import in language parser (#17538)
- **Description:** Resolving import error in language_parser.py during "from langchain.langchain.text_splitter import Language - **Issue:** the issue #17536 - **Dependencies:** NO - **Twitter handle:** @iRakibHosen --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
685d62b032
commit
5ce1827d31
@ -27,10 +27,10 @@ from langchain_community.document_loaders.parsers.language.typescript import (
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langchain.langchain.text_splitter import Language
|
||||
from langchain.text_splitter import Language
|
||||
|
||||
try:
|
||||
from langchain.langchain.text_splitter import Language
|
||||
from langchain.text_splitter import Language
|
||||
|
||||
LANGUAGE_EXTENSIONS: Dict[str, str] = {
|
||||
"py": Language.PYTHON,
|
||||
|
@ -843,6 +843,9 @@ class Language(str, Enum):
|
||||
SOL = "sol"
|
||||
CSHARP = "csharp"
|
||||
COBOL = "cobol"
|
||||
C = "c"
|
||||
LUA = "lua"
|
||||
PERL = "perl"
|
||||
|
||||
|
||||
class RecursiveCharacterTextSplitter(TextSplitter):
|
||||
|
Loading…
Reference in New Issue
Block a user