Usage
Parameters
str
required
Pinecone index name. First positional argument.
str | None
default:"None"
Pinecone API key. Falls back to
PINECONE_API_KEY.str | None
default:"None"
OpenAI API key used for creating embeddings. Falls back to
OPENAI_API_KEY.str
default:"text-embedding-3-large"
OpenAI embedding model for both indexing and retrieval.
Environment variables
Embedding models
Change the embedding model:
Creating a Pinecone index
- Go to app.pinecone.io
- Create a Serverless index:
- Dimensions:
3072(fortext-embedding-3-large) - Metric:
cosine - Cloud/Region: choose based on your API server location
- Dimensions:
- Copy the index name and your API key to
.env
Namespaces
Use namespaces to partition a single index into logical sections:Pinecone instance. For multi-namespace retrieval, you need separate LangChat instances or a custom adapter.