I am trying to insert the vectors into by pinecone database by this lines of code:
console.log('inserting vectors into Pinecone');
const namespace = pineconeIndex.namespace(convertToAscii(filekey));
console.log("inserting vectors into pinecone");
await namespace.upsert(vectors);
return documents[0];
But i am getting the error for 'vectors' in upsert method:
Argument of type 'Vector[]' is not assignable to parameter of type 'PineconeRecord<RecordMetadata>[]'. Type 'Vector' is not assignable to type 'PineconeRecord<RecordMetadata>'. Types of property 'metadata' are incompatible. Type 'object | undefined' is not assignable to type 'RecordMetadata | undefined'. Type 'object' is not assignable to type 'RecordMetadata'.
I am expecting to insert my vectors in pinecone database in next.js. If any others methods are known please let me know.