mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-09 17:18:31 +00:00
**Description:** Handle unsupported languages in same way as when none is provided **Issue:** The following line will throw a KeyError if the language is not supported. ```python self.Segmenter = LANGUAGE_SEGMENTERS[language] ``` E.g. when using `Language.CPP` we would get `KeyError: <Language.CPP: 'cpp'>` --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
||
---|---|---|
.. | ||
__init__.py | ||
cobol.py | ||
code_segmenter.py | ||
javascript.py | ||
language_parser.py | ||
python.py |