pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
284 stars 78 forks source link

Add better error messages for mistaken `from_texts` and `from_documents` #342

Closed jhamon closed 3 months ago

jhamon commented 3 months ago

Problem

Sometimes people using Pinecone with Langchain accidentally try to invoke from_texts and from_documents methods on our Pinecone class even though these are not methods by us. This is mostly name-related confusion because Langchain used to have an export called Pinecone that later got renamed to the less ambiguous PineconeVectorStore.

Solution

Add some stub methods to the Pinecone class to guide users in the right direction.

Screenshot 2024-05-13 at 2 36 51 PM

Type of Change

Test Plan

Added unit tests. And also an integration test to verify the docs link resolves to a valid page.