From 6a9cdc43f5019431444112d2abafa1c5a4c0a59c Mon Sep 17 00:00:00 2001 From: Ryan Culligan Date: Wed, 17 May 2023 12:48:09 -0500 Subject: [PATCH] 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 --- langchain/vectorstores/redis.py | 1 - 1 file changed, 1 deletion(-) diff --git a/langchain/vectorstores/redis.py b/langchain/vectorstores/redis.py index d8c2d05afc..54feecda0c 100644 --- a/langchain/vectorstores/redis.py +++ b/langchain/vectorstores/redis.py @@ -446,7 +446,6 @@ class Redis(VectorStore): ) """ instance, _ = cls.from_texts_return_keys( - cls=cls, texts=texts, embedding=embedding, metadatas=metadatas,