Fix TypeError in Vectorstore Redis class methods (#4857)

# Fix TypeError in Vectorstore Redis class methods

This change resolves a TypeError that was raised when invoking the
`from_texts_return_keys` method from the `from_texts` method in the
`Redis` class. The error was due to the `cls` argument being passed
explicitly, which led to it being provided twice since it's also
implicitly passed in class methods. No relevant tests were added as the
issue appeared to be better suited for linters to catch proactively.

Changes:
- Removed `cls=cls` from the call to `from_texts_return_keys` in the
`from_texts` method.

Related to:
https://github.com/hwchase17/langchain/pull/4653
This commit is contained in:
Ryan Culligan 2023-05-17 12:48:09 -05:00 committed by GitHub
parent 2d20a1196e
commit 6a9cdc43f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,7 +446,6 @@ class Redis(VectorStore):
) )
""" """
instance, _ = cls.from_texts_return_keys( instance, _ = cls.from_texts_return_keys(
cls=cls,
texts=texts, texts=texts,
embedding=embedding, embedding=embedding,
metadatas=metadatas, metadatas=metadatas,