embed_array


Description:

public async Embed embed_array (string model, ArrayList<string> input_array, int dimensions = -1, bool truncate = false, Options? options = null, Cancellable? cancellable = null) throws Error

Generates embeddings for an array of input texts.

Creates vector embeddings representing the input texts using the specified model. Returns a single Response.Embed object containing the embeddings and metadata.

Parameters:

model

The model name to use for generating embeddings

input_array

The array of texts to generate embeddings for

dimensions

Optional number of dimensions to generate embeddings for (default: -1, not set)

truncate

Optional whether to truncate inputs that exceed context window (default: false)

options

Optional Call.Options for the embed request

cancellable

Optional cancellable for cancelling the request

Returns:

Response.Embed object with embeddings and timing information

Since:

1.0