Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxAIChat.MaxTokens Property

Limits the maximum number of tokens to generate in a single call to a GPT model.

Namespace: DevExpress.AIIntegration.Blazor.Chat

Assembly: DevExpress.AIIntegration.Blazor.Chat.v24.2.dll

NuGet Package: DevExpress.AIIntegration.Blazor.Chat

#Declaration

C#
[Parameter]
public int? MaxTokens { get; set; }

#Property Value

Type Description
Nullable<Int32>

The maximum number of tokens.

#Remarks

Language models process text by dividing it into tokens, which can be words or groups of characters. Use the MaxTokens property to limit the maximum number of tokens generated in a single call to a GPT model.

razor
<DxAIChat MaxTokens="70" />
See Also