Språk

ProjectsAgentsModelFactory.ModelSamplingParams Method

Definition

Represents a set of parameters used to control the sampling behavior of a language model during text generation.

public static Azure.AI.Projects.Agents.ModelSamplingParams ModelSamplingParams(float? temperature = default, float? topP = default, int? seed = default, int? maxCompletionTokens = default);
static member ModelSamplingParams : Nullable<single> * Nullable<single> * Nullable<int> * Nullable<int> -> Azure.AI.Projects.Agents.ModelSamplingParams
Public Shared Function ModelSamplingParams (Optional temperature As Nullable(Of Single) = Nothing, Optional topP As Nullable(Of Single) = Nothing, Optional seed As Nullable(Of Integer) = Nothing, Optional maxCompletionTokens As Nullable(Of Integer) = Nothing) As ModelSamplingParams

Parameters

temperature
Nullable<Single>

The temperature parameter for sampling. Defaults to 1.0.

topP
Nullable<Single>

The top-p parameter for nucleus sampling. Defaults to 1.0.

seed
Nullable<Int32>

The random seed for reproducibility. Defaults to 42.

maxCompletionTokens
Nullable<Int32>

The maximum number of tokens allowed in the completion.

Returns

A new ModelSamplingParams instance for mocking.

Applies to