GenerativeModelUseJsonMode Property

Determines whether JSON mode is enabled. JSON mode adjusts the content generation response to specifically produce outputs in JSON format as defined in generation configurations.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public bool UseJsonMode { get; set; }

Property Value

Boolean

Implements

IGenerativeModelUseJsonMode

Remarks

JSON mode is incompatible with grounding, Google Search, and code execution tools. Enabling this mode will override other response formats with "application/json".

See Also