CacheBackedEmbeddings don't hash keys, resulting in error with LocalFileStore #29496
Open
5 tasks done
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
investigate
Flagged for investigation.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm trying to cache embeddings locally, and I thought the above code should work with arbitrary document text, since CacheBackedEmbeddings documentation says, "The text is hashed and the hash is used as the key in the cache."
However, it seems that the text is not hashed at all, and the cache attempts to use the raw text as a key, which raises an error for any disallowed characters including spaces and non-ASCII characters.
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: