langchain/libs
bachr b3ed98dec0
community[patch]: avoid KeyError when language not in LANGUAGE_SEGMENTERS (#15212)
**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>
2024-01-23 21:09:43 -08:00
..
cli cli[patch]: add integration tests to default makefile (#16479) 2024-01-23 16:09:16 -07:00
community community[patch]: avoid KeyError when language not in LANGUAGE_SEGMENTERS (#15212) 2024-01-23 21:09:43 -08:00
core Remove double line (#16426) 2024-01-23 20:22:37 -08:00
experimental core[patch]: simple prompt pretty printing (#15968) 2024-01-12 21:08:51 -05:00
langchain langchain[patch]: Minor Fix: Enable Passing custom_headers for Authentication in GraphQL Agent/Tool (#16413) 2024-01-23 19:19:53 -08:00
partners cli[patch], google-vertexai[patch]: readme template (#16470) 2024-01-23 12:08:17 -07:00