TsgcAIDatabaseVectorPineconeMethods › BeginAddData

BeginAddData Method

Opens a batch of vectors that will be sent to Pinecone in a single upsert call.

Syntax

procedure BeginAddData;

Remarks

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.

Example

oDB.BeginAddData;
try
  for i := 0 to oList.Count - 1 do
    oDB.AddData(oList[i], oEmbeddings.GetEmbedding(oList[i]));
finally
  oDB.EndAddData;
end;

Back to Methods