Replies: 2 comments 6 replies
-
Hey @alex1897! I'm here to help you with your LangChain Pinecone API Key issue. I'm a bot designed to assist with bug fixes, answer questions, and guide you on becoming a contributor. Let's work together to resolve your concern. Yes, you can use Pinecone without relying on environment variables by directly passing the API key and other necessary parameters when initializing the Here's how you can modify your code to include the Pinecone API key directly: from langchain_pinecone import PineconeVectorStore
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
index_name = "your_index_name"
namespace = "your_namespace"
docsearch = PineconeVectorStore.from_documents(
docs,
embeddings,
index_name=index_name,
pinecone_api_key="your_api_key"
) Replace |
Beta Was this translation helpful? Give feedback.
-
Just use os.environ['PINECONE_API_KEY'] = PINECONE_API_KEY |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
System Info
langchain==0.2.1
langchain-community==0.0.38
langchain-core==0.2.3
langchain-openai==0.1.8
langchain-pinecone==0.1.1
langchain-text-splitters==0.2.0
Beta Was this translation helpful? Give feedback.
All reactions