mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 17:08:47 +00:00
community[minor]: added support for C in RecursiveCharacterTextSplitter (#24091)
Description: Added support for C in RecursiveCharacterTextSplitter by reusing the separators for C++
This commit is contained in:
parent
3e454d7568
commit
ea3cd1ebba
@ -126,7 +126,7 @@ class RecursiveCharacterTextSplitter(TextSplitter):
|
||||
|
||||
@staticmethod
|
||||
def get_separators_for_language(language: Language) -> List[str]:
|
||||
if language == Language.CPP:
|
||||
if language == Language.C or language == Language.CPP:
|
||||
return [
|
||||
# Split along class definitions
|
||||
"\nclass ",
|
||||
|
Loading…
Reference in New Issue
Block a user