Skip to content
Discussion options

You must be logged in to vote

Answer generated by a 🤖

Hello,

The error you're encountering is due to a mismatch between the dimension of the embeddings generated by the OpenAIEmbeddings (1536) and the dimension of the Pinecone index (2048).

In the LangChain framework, when creating a new Pinecone index, the default dimension is set to 1536 to match the OpenAI embedding model text-embedding-ada-002 which uses 1536 dimensions. If you are using an existing Pinecone index with a different dimension, you will need to ensure that the dimension matches the dimension of the embeddings.

Here is the relevant code:

def add_texts(
    self,
    texts: Iterable[str],
    metadatas: Optional[List[dict]] = None,
    ids: Optional[List[

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rmccorkl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant