mirror of
https://github.com/hwchase17/langchain
synced 2024-11-18 09:25:54 +00:00
fix error message (#22437)
Was confusing when language is in Enum but not implemented
This commit is contained in:
parent
678a19a5f7
commit
8fad2e209a
@ -635,6 +635,8 @@ class RecursiveCharacterTextSplitter(TextSplitter):
|
|||||||
" ",
|
" ",
|
||||||
"",
|
"",
|
||||||
]
|
]
|
||||||
|
elif language in Language._value2member_map_:
|
||||||
|
raise ValueError(f"Language {language} is not implemented yet!")
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Language {language} is not supported! "
|
f"Language {language} is not supported! "
|
||||||
|
Loading…
Reference in New Issue
Block a user