pinecone.control.langchain_import_warnings

1from pinecone.utils import docslinks
2
3KB_ARTICLE = docslinks["LANGCHAIN_IMPORT_KB_ARTICLE"]
4GITHUB_REPO = docslinks["GITHUB_REPO"]
5
6
7def _build_langchain_attribute_error_message(method_name: str):
8    return f"""{method_name} is not a top-level attribute of the Pinecone class provided by pinecone's official python package developed at {GITHUB_REPO}. You may have a name collision with an export from another dependency in your project that wraps Pinecone functionality and exports a similarly named class. Please refer to the following knowledge base article for more information: {KB_ARTICLE}
9"""
KB_ARTICLE = 'https://docspinecone.control.pinecone.io/troubleshooting/pinecone-attribute-errors-with-langchain'
GITHUB_REPO = 'https://github.com/pinecone-io/pinecone-python-client'