Table of Contents

Class ModelParameters

Namespace
JD.AI.Gateway.Config
Assembly
JD.AI.Gateway.dll

Tunable model inference parameters (Ollama, OpenAI, etc.).

public sealed class ModelParameters
Inheritance
ModelParameters
Inherited Members

Properties

ContextWindowSize

Context window size in tokens (Ollama num_ctx). 0 = provider default.

public int? ContextWindowSize { get; set; }

Property Value

int?

FrequencyPenalty

Penalizes tokens that have already appeared. Range: -2.0 to 2.0.

public double? FrequencyPenalty { get; set; }

Property Value

double?

MaxTokens

Maximum tokens in the generated response.

public int? MaxTokens { get; set; }

Property Value

int?

PresencePenalty

Penalizes tokens based on whether they appear at all. Range: -2.0 to 2.0.

public double? PresencePenalty { get; set; }

Property Value

double?

ReasoningEffort

Reasoning effort hint for compatible reasoning models.

public ReasoningEffort? ReasoningEffort { get; set; }

Property Value

ReasoningEffort?

RepeatPenalty

Ollama-specific repeat penalty (1.0 = no penalty).

public double? RepeatPenalty { get; set; }

Property Value

double?

Seed

Random seed for reproducible output. Null = random each time.

public int? Seed { get; set; }

Property Value

int?

StopSequences

Sequences that cause the model to stop generating further tokens.

public IList<string> StopSequences { get; set; }

Property Value

IList<string>

Temperature

Sampling temperature (0.0–2.0). Lower = deterministic, higher = creative.

public double? Temperature { get; set; }

Property Value

double?

TopK

Top-K sampling. Limits token selection to the K most probable tokens.

public int? TopK { get; set; }

Property Value

int?

TopP

Nucleus sampling. Only tokens with cumulative probability ≤ TopP are considered.

public double? TopP { get; set; }

Property Value

double?