TsgcAIOpenAIEmbeddingsEvents › OnCreateEmbeddingsStop

OnCreateEmbeddingsStop Event

Fired once when the batch of embeddings has finished.

Syntax

property OnCreateEmbeddingsStop: TsgcOpenAICreateEmbeddingsStop;
// TsgcOpenAICreateEmbeddingsStop = procedure(Sender: TObject) of object

Default Value

Remarks

Triggered once at the end of a call to CreateEmbeddings or CreateEmbeddingsFromFile, after the last chunk has been processed and the database storage has been closed. It fires in a finally block, so it is raised both on a successful run and when an exception aborts the batch; it is the right place to hide a progress dialog or reset UI state.

Example

procedure TForm1.oEmbeddingsCreateEmbeddingsStop(Sender: TObject);
begin
  ProgressBar1.Position := ProgressBar1.Max;
  Status.Caption := 'Embeddings batch completed';
end;

Back to Events