nat.data_models.thinking_mixin#

Attributes#

Classes#

ThinkingMixin

Mixin class for thinking configuration. Only supported on Nemotron models.

Module Contents#

_NEMOTRON_REGEX#
_MODEL_KEYS = ('model_name', 'model', 'azure_deployment')#
class ThinkingMixin(/, **data: Any)#

Bases: pydantic.BaseModel, nat.data_models.gated_field_mixin.GatedFieldMixin

Mixin class for thinking configuration. Only supported on Nemotron models.

Attributes:

thinking: Whether to enable thinking. Defaults to None when supported on the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

thinking: bool | None = None#
property thinking_system_prompt: str | None#

Returns the system prompt to use for thinking. For NVIDIA Nemotron, returns “/think” if enabled, else “/no_think”. For Llama Nemotron v1.5, returns “/think” if enabled, else “/no_think”. For Llama Nemotron v1.0 or v1.1, returns “detailed thinking on” if enabled, else “detailed thinking off”. If thinking is not supported on the model, returns None.

Returns:

str | None: The system prompt to use for thinking.