TsgcAIOpenAIEmbeddings › Properties › EmbeddingsOptions
Parameters used when generating embeddings (model, chunk size, user and throttling).
property EmbeddingsOptions: TsgcOpenAI_Embeddings_Options read FEmbeddingsOptions write SetEmbeddingsOptions;
—
Controls how the input text is split and sent to the OpenAI embeddings endpoint. Model selects the embedding model (defaults to text-embedding-3-small). ChunkSize is the maximum length, in characters, of each chunk passed to the model (defaults to 4096); the input is split sequentially into chunks of that size. User is an optional end-user identifier forwarded to OpenAI. WaitStoringData is the delay, in milliseconds, applied between chunks; use it on trial accounts to stay under the requests-per-minute limit.
oEmbeddings.EmbeddingsOptions.Model := 'text-embedding-3-small';
oEmbeddings.EmbeddingsOptions.ChunkSize := 2048;
oEmbeddings.EmbeddingsOptions.User := 'user-123';
oEmbeddings.EmbeddingsOptions.WaitStoringData := 250;