Class ChatParameters
Represents the parameters used for configuring AI chat requests.
Inheritance
Namespace: Syncfusion.Blazor.SmartComponents
Assembly: Syncfusion.Blazor.SmartComponents.dll
Syntax
public class ChatParameters : Object
Constructors
ChatParameters()
Declaration
public ChatParameters()
Properties
FrequencyPenalty
Penalizes repeated words or phrases based on their frequency in the generated text. Higher values reduce repetition.
Declaration
public Nullable<float> FrequencyPenalty { get; set; }
Property Value
Type |
---|
System.Nullable<System.Single> |
MaxTokens
Specifies the maximum number of tokens (words or subwords) that the AI model can generate in a response.
Declaration
public Nullable<int> MaxTokens { get; set; }
Property Value
Type |
---|
System.Nullable<System.Int32> |
Messages
A list of chat messages that form the conversation history. These messages help provide context for the AI model to generate responses.
Declaration
public List<ChatMessage> Messages { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<Microsoft.Extensions.AI.ChatMessage> |
PresencePenalty
Encourages the AI to introduce new topics by reducing the likelihood of repeating previous concepts. Higher values encourage diversity in responses.
Declaration
public Nullable<float> PresencePenalty { get; set; }
Property Value
Type |
---|
System.Nullable<System.Single> |
StopSequences
A list of sequences that, when encountered, will cause the AI to stop generating further tokens. Useful for enforcing response constraints.
Declaration
public List<string> StopSequences { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.String> |
Temperature
Controls the randomness of the AI-generated responses. Lower values make responses more deterministic, while higher values increase variability.
Declaration
public Nullable<float> Temperature { get; set; }
Property Value
Type |
---|
System.Nullable<System.Single> |
TopP
An alternative to Temperature that controls the probability mass of token selection. A lower value results in more focused responses by limiting token choices.
Declaration
public Nullable<float> TopP { get; set; }
Property Value
Type |
---|
System.Nullable<System.Single> |