Search code examples
langchainpy-langchainpinecone

Passing in "embedding" as a Callable is deprecated


This piece of code seems to not work. Even though this is the way that Pinecone have stated in their documentation that it should look like.

vectorstore = Pinecone(index, embeddings.embed_query, text_field)

The error/warning is

C:\Users\ndira\casetext-test-server\Lib\site-packages\langchain\vectorstores\pinecone.py:59: UserWarning: Passing in "embedding" as a Callable is deprecated. Please pass in an Embeddings object instead. warnings.warn(

I don't know any other way of solving this. Kindly help thanks.


Solution

  • replace embeddings.embed_query with embeddings and the warning should clear. The documentation has not been updated it seems