AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class OpenRouterCompletionOptions

    Inheritance
    object
    OpenRouterCompletionOptions
    Implements
    ICompletionOptions
    IGENOptions
    Namespace: Glitch9.AIDevKit.OpenRouter
    Assembly: .dll
    Syntax
    public class OpenRouterCompletionOptions : ICompletionOptions, IGENOptions

    Properties

    Api

    Declaration
    public Api Api { get; }
    Property Value
    Type Description
    Api

    FrequencyPenalty

    Penalizes tokens that occur frequently across the generated content. Range: -2.0–2.0 (typical: 0–1.0).

    Declaration
    public float? FrequencyPenalty { get; set; }
    Property Value
    Type Description
    float?

    LogitBias

    Biases specific tokens by ID. Use to influence token selection. Key = token ID (as string), Value = bias (-100 to 100, 0 = no bias).

    Declaration
    public Dictionary<string, double> LogitBias { get; set; }
    Property Value
    Type Description
    Dictionary<string, double>

    Logprobs

    Whether to return log probabilities of the Output tokens or not. If true, returns the log probabilities of each Output token returned in the content of message. This option is currently not available on the gpt-4-vision-preview model. Defaults to 0.

    Declaration
    public int? Logprobs { get; set; }
    Property Value
    Type Description
    int?

    MinP

    Minimum probability for token filtering (less common). Range: 0.0–1.0

    Declaration
    public float? MinP { get; set; }
    Property Value
    Type Description
    float?

    Models

    Optional (OpenRouter-only). Alternate list of models for routing overrides.

    Declaration
    public string[] Models { get; set; }
    Property Value
    Type Description
    string[]

    PresencePenalty

    Penalizes tokens already present in the generated content. Range: -2.0–2.0 (typical: 0–1.0).

    Declaration
    public float? PresencePenalty { get; set; }
    Property Value
    Type Description
    float?

    Reasoning

    Declaration
    public ReasoningOptions Reasoning { get; set; }
    Property Value
    Type Description
    ReasoningOptions

    RepeatPenalty

    Penalizes repetition of recent tokens. Range: 0.0–2.0 (typical: 1.1).

    Declaration
    public float? RepeatPenalty { get; set; }
    Property Value
    Type Description
    float?

    TopA

    Top-A sampling: limits the next token selection to the A most probable tokens. Range: 1–100 (typical: 40).

    Declaration
    public int? TopA { get; set; }
    Property Value
    Type Description
    int?

    TopK

    Top-K sampling: limits the next token selection to the K most probable tokens. Range: 1–100 (typical: 40).

    Declaration
    public int? TopK { get; set; }
    Property Value
    Type Description
    int?

    TopLogprobs

    Number of top log probabilities to return per token. Range: 0–20 (if supported).

    Declaration
    public int? TopLogprobs { get; set; }
    Property Value
    Type Description
    int?

    TopP

    Top-P sampling (nucleus sampling): limits the next token selection to a cumulative probability. Range: 0.0–1.0 (typical: 0.9).

    Declaration
    public float? TopP { get; set; }
    Property Value
    Type Description
    float?

    Transforms

    Optional (OpenRouter-only). List of prompt transforms.

    Declaration
    public string[] Transforms { get; set; }
    Property Value
    Type Description
    string[]

    Implements

    ICompletionOptions
    IGENOptions
    In this article
    Back to top Generated by DocFX