Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harrison/from keys redis #4653

Merged
merged 2 commits into from May 14, 2023
Merged

Harrison/from keys redis #4653

merged 2 commits into from May 14, 2023

Conversation

hwchase17
Copy link
Contributor

No description provided.

ChrKahl and others added 2 commits May 13, 2023 20:24
In order to be able to delete the entries in the Redis database again,
you need the keys/ids of the individual entries. These are already
returned in the `add_texts`, but ignored in the `from_texts`.
@hwchase17 hwchase17 merged commit 9ba3a79 into master May 14, 2023
13 checks passed
@hwchase17 hwchase17 deleted the harrison/from-keys-redis branch May 14, 2023 04:45
@jakobsa
Copy link

jakobsa commented May 17, 2023

please check if cls=cls is really intended. According to my interpreter this leads to:
Redis.from_texts_return_keys() got multiple values for argument 'cls'

449: cls.from_texts_return_keys(
450:            cls=cls

the cls might be added automatically on classmethods

dev2049 pushed a commit that referenced this pull request May 17, 2023
# 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:
#4653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants