Search Results for

    Show / Hide Table of Contents

    Class TextEmbeddingRequest

    Returns a list of embedding objects.

    Inheritance
    object
    TextEmbeddingRequest
    Implements
    IJsonRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.OpenAI
    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
    Type Description
    int?
    | 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
    Type Description
    EncodingFormat
    | 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
    Type Description
    string[]
    | Edit this page View Source

    Model

    Declaration
    [JsonProperty("model")]
    public string Model { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    User

    Declaration
    [JsonProperty("user")]
    public SafetyIdentifier User { get; set; }
    Property Value
    Type Description
    SafetyIdentifier

    Implements

    IJsonRequest

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation