ai-getting-started
ai-getting-started copied to clipboard
Bumps langchain version, fixes upsert type error
I recently forked the repo, followed the Quickstart guide and received an error on step 4 ("Generate embeddings"):
PineconeArgumentError: The argument to upsert had type errors: argument must be array.
Did a little digging and think it may have been caused by the Pinecone and Langchain upgrade cycles:
- When the package.json file was bumped on Jun 7, the Pinecone major version was bumped from '0' to '2' (see commit log)
- As part of Pinecone's major version 1 release they made changes to upsert (see migration guide)
- Later versions of Langchain appear to be compatible with this change, but some of the interim versions (for example, 0.0.214) had dev dependency conflicts with Pinecone 2.2.2
- So even though the package.json file has minor version support via the semver notation -
"langchain": "^0.0.100",
- the package-lock.json file suggested it was still only using langchain version 0.0.100
Solution: Bumping the package.json dependency to
"langchain": "^0.1.37"
resolved the type error and allowed me to run the app in dev mode.
Not sure if anyone else had this issue or is able to replicate it but thought I would share what worked for me.