fix error message (#22437)

Was confusing when language is in Enum but not implemented
pull/22438/head
Harrison Chase 4 months ago committed by GitHub
parent 678a19a5f7
commit 8fad2e209a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save