# ChatGptParameters.MaxTokens property

Gets or sets the maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.

```csharp
public int? MaxTokens { get; set; }
```

## See Also

* class [ChatGptParameters](../ChatGptParameters.md)
* namespace [ChatGptNet.Models](../../ChatGptNet.md)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
