🐛 fix(loading.py): use 'is' instead of '==' to compare object types
The commit changes the comparison operator from '==' to 'is' to compare object types. This is because 'is' compares the object identity while '==' compares the object value. In this case, we want to compare the object identity, so 'is' is the correct operator to use.
This commit is contained in:
parent
7d415e62df
commit
6459a27777
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ def instantiate_textsplitter(
|
|||
"Try changing the chunk_size of the Text Splitter."
|
||||
) from exc
|
||||
|
||||
if type(class_object) == RecursiveCharacterTextSplitter:
|
||||
if class_object is RecursiveCharacterTextSplitter:
|
||||
if "separator_type" in params and params["separator_type"] == "Text":
|
||||
text_splitter = class_object(**params)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue