langchainjs: PineClient: Error calling upsert
As per the docs and latest Pinecone library, the code below should work. However, the function PineconStore.fromDocuments throws an error as per below. It appears there is an issue passing the vectors to Pinecone.
code:
const pinecone = new PineconeClient();
await pinecone.init({
environment: `${process.env.PINECONE_ENVIRONMENT}`,
apiKey: `${process.env.PINECONE_API_KEY}`,
});
const index = pinecone.Index("langchainjsfundamentals");
// this is the cause of the error
const vectorStore = await PineconeStore.fromDocuments(
index,
docs,
new OpenAIEmbeddings()
);
Error log: error PineconeClient: Error calling upsert: PineconeClient: Error calling upsertRaw: RequiredError: Required parameter requestParameters.upsertRequest was null or undefined when calling upsert.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
@mayooear yes thank you!