fix error message (#22437)

Was confusing when language is in Enum but not implemented
This commit is contained in:
Harrison Chase 2024-06-03 08:48:26 -07:00 committed by GitHub
parent 678a19a5f7
commit 8fad2e209a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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! "