Table of Contents

Class EmbeddingRequest

Returns a list of embedding objects.

public class EmbeddingRequest : OpenAIRequest
Inheritance
object
RESTRequestBody
EmbeddingRequest
Inherited Members
Extension Methods

Properties

Dimensions

The number of dimensions the resulting Output embeddings should have. Only supported in Text-embedding-3 and later models.

public int Dimensions { get; set; }

Property Value

int

EncodingFormat

The format to return the embeddings in. Can be either float or base64.

public EncodingFormat? EncodingFormat { get; set; }

Property Value

EncodingFormat?

Input

[Required] Input Text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for Text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens.

public StringOr<string> Input { get; set; }

Property Value

StringOr<string>