Parameters for the createEmbeddings operation.

interface CreateEmbeddingsParams {
    dimensions?: number;
    encodingFormat?: string;
    headers?: OutgoingHttpHeaders;
    input: EmbeddingsInput;
    model: string;
    signal?: AbortSignal;
    user?: string;
}

Hierarchy (view full)

Properties

dimensions?: number

Number of dimensions the resulting output embeddings should have. For OpenAI, only supported in text-embedding-3 and later models.

encodingFormat?: string

Format to return the embeddings in. Can be either "float" or "base64".

headers?: OutgoingHttpHeaders

Input text to embed, encoded as a string, array of strings, array of integers, or array of integer arrays. The input must not exceed the max input tokens for the model (8192 tokens for OpenAI's text-embedding-ada-002) and cannot be an empty string. Any array must be 2048 dimensions or less. Some models may also impose a limit on total number of tokens summed across inputs.

model: string

ID of the model to use.

signal?: AbortSignal
user?: string

A unique identifier representing your end-user.