- Python
- Bash
Enable JSON mode
How to use JSON mode with W&B Inference
Enabling JSON mode instructs the model to return the response in a valid JSON format. However, the response’s schema may not be consistent or adhere to a particular structure. For consistent structured JSON responses, we recommend using structured output when possible.
To enable JSON mode, specify it as the “response_format” in the request: