Class OpenRouterCompletionOptions
Inheritance
object
OpenRouterCompletionOptions
Assembly: .dll
Syntax
public class OpenRouterCompletionOptions : ICompletionOptions, IGENOptions
Properties
Api
Declaration
Property Value
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
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
MinP
Minimum probability for token filtering (less common).
Range: 0.0–1.0
Declaration
public float? MinP { get; set; }
Property Value
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
Reasoning
Declaration
public ReasoningOptions Reasoning { get; set; }
Property Value
RepeatPenalty
Penalizes repetition of recent tokens.
Range: 0.0–2.0 (typical: 1.1).
Declaration
public float? RepeatPenalty { get; set; }
Property Value
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
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
TopLogprobs
Number of top log probabilities to return per token.
Range: 0–20 (if supported).
Declaration
public int? TopLogprobs { get; set; }
Property Value
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
Optional (OpenRouter-only).
List of prompt transforms.
Declaration
public string[] Transforms { get; set; }
Property Value
Type |
Description |
string[] |
|
Implements