const client = await getPineconeClient()
const pineconeIndex = client.Index(‘pdfreadr’)
console.log(‘inserting vectors into pinecone’);
const namespace = convertToAscii(fileKey)
PineconeUtils.chunkedUpsert(pineconeIndex, vectors, namespace, 10)
getting an error on pineconeIndex: Type ‘Index’ is missing the following properties from type ‘VectorOperationsApi’: _deleteRaw, _delete, delete1Raw, delete1, and 16 more.ts(2345)
1 Like
I’m getting the same error! Have you figured it out?
1 Like
got the same error. the chunkedUpsert method is deprecated. instead you have to do
const client = await getPineconeClient();
const pineconeIndex = client.Index('chatpdf');
console.log("inserting vectors into pinecone");
pineconeIndex.upsert(vectors);
IMPORANT!
“vectors” has to be of type PineconeRecord and not of type Vector
so this could look like this then
return {
id: hash,
values: embeddings,
metadata: {
text: doc.metadata.text,
pageNumber: doc.metadata.pageNumber,
}
} as PineconeRecord
for details see here