Class TextEmbeddingRequest
Returns a list of embedding objects.
Inheritance
TextEmbeddingRequest
Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
Syntax
public class TextEmbeddingRequest : IJsonRequest
Properties
|
Edit this page
View Source
Dimensions
The number of dimensions the resulting Output embeddings should have.
Only supported in Text-embedding-3 and later models.
Declaration
[JsonProperty("dimensions")]
public int? Dimensions { get; set; }
Property Value
|
Edit this page
View Source
EncodingFormat
The format to return the embeddings in.
Can be either float or base64.
Declaration
[JsonProperty("encoding_format")]
public EncodingFormat EncodingFormat { get; set; }
Property Value
|
Edit this page
View Source
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.
Declaration
[JsonProperty("input")]
public string[] Input { get; set; }
Property Value
|
Edit this page
View Source
Model
Declaration
[JsonProperty("model")]
public string Model { get; set; }
Property Value
|
Edit this page
View Source
User
Declaration
[JsonProperty("user")]
public SafetyIdentifier User { get; set; }
Property Value
Implements
Extension Methods