The JSON schema of the output type.
(self)
| 128 | return self._strict_json_schema |
| 129 | |
| 130 | def json_schema(self) -> dict[str, Any]: |
| 131 | """The JSON schema of the output type.""" |
| 132 | if self.is_plain_text(): |
| 133 | raise UserError("Output type is plain text, so no JSON schema is available") |
| 134 | return self._output_schema |
| 135 | |
| 136 | def validate_json(self, json_str: str) -> Any: |
| 137 | """Validate a JSON string against the output type. Returns the validated object, or raises |