Skip to content

Conversation

Shades-en
Copy link

What is happening?

When below conditions are met -

  1. I Initialise EmbeddingCache with async_redis_client only.
  2. I then use get method of EmbeddingCache - cache.get(text=text, model_name=model_name)

It defaults to using local redis client instead of the supplied async_redis_client without any warnings. Which in turn results to empty cache always.

It gets worse when we use SemanticCache and use EmbeddingCache with async_redis_client in its vectorizer

Since SemanticCache only accepts synchronous redis_client we may tend to use check method or store method instead of astore or acheck method, which in turn again calls cache.get(text=text, model_name=model_name) and it return EMPTY CACHE

Hence warning logs become neccessary.

What is done?

I have added some warning logs in case if developer supplies async_redis_client but uses get/ mget/set/mset methods.

…ed with get method of embedding cache when async redis client is provided
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.

1 participant