mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 00:48:45 +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:
|
if TYPE_CHECKING:
|
||||||
from langchain.langchain.text_splitter import Language
|
from langchain.text_splitter import Language
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from langchain.langchain.text_splitter import Language
|
from langchain.text_splitter import Language
|
||||||
|
|
||||||
LANGUAGE_EXTENSIONS: Dict[str, str] = {
|
LANGUAGE_EXTENSIONS: Dict[str, str] = {
|
||||||
"py": Language.PYTHON,
|
"py": Language.PYTHON,
|
||||||
|
@ -843,6 +843,9 @@ class Language(str, Enum):
|
|||||||
SOL = "sol"
|
SOL = "sol"
|
||||||
CSHARP = "csharp"
|
CSHARP = "csharp"
|
||||||
COBOL = "cobol"
|
COBOL = "cobol"
|
||||||
|
C = "c"
|
||||||
|
LUA = "lua"
|
||||||
|
PERL = "perl"
|
||||||
|
|
||||||
|
|
||||||
class RecursiveCharacterTextSplitter(TextSplitter):
|
class RecursiveCharacterTextSplitter(TextSplitter):
|
||||||
|
Loading…
Reference in New Issue
Block a user