Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/shared.ts>ResponseFormatJSONSchema.JSONSchema

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
interface ResponseFormatJSONSchema.JSONSchema
import { type ResponseFormatJSONSchema } from "https://deno.land/x/openai@v4.64.0/resources/shared.ts";
const { JSONSchema } = ResponseFormatJSONSchema;

Properties

name: string

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

optional
description: string

A description of what the response format is for, used by the model to determine how to respond in the format.

optional
schema: Record<string, unknown>

The schema for the response format, described as a JSON Schema object.

optional
strict: boolean | null

Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true. To learn more, read the Structured Outputs guide.