TsgcAIDatabaseVectorPinecone › Methods › BeginAddData
Opens a batch of vectors that will be sent to Pinecone in a single upsert call.
procedure BeginAddData;
Allocates the internal upsert request object. Subsequent AddData calls accumulate vectors in memory, and EndAddData sends them to Pinecone in one HTTP request, which is far more efficient than upserting one vector at a time.
oDB.BeginAddData;
try
for i := 0 to oList.Count - 1 do
oDB.AddData(oList[i], oEmbeddings.GetEmbedding(oList[i]));
finally
oDB.EndAddData;
end;