Skip to content

Commit 32fa2c6

Browse files
committed
added youtube video
1 parent 59ba4f7 commit 32fa2c6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/src/content/docs/reference/scripts/structured-output.md docs/src/content/docs/reference/scripts/structured-output.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
2-
title: Structured Output
2+
title: Structured Outputs
33
sidebar:
44
order: 12.1
55
description: Utilize structured output in GenAIScript to generate JSON data with schema validation for precise and reliable data structuring.
66
keywords: structured output, JSON schema, GenAIScript, data validation, reliable data
77
---
8+
import { YouTube } from "astro-embed"
9+
810

911
GenAIScript supports the generation of structured outputs with automatic data repairs. It can leverage built-in schema validation from LLM providers or executes it own validation as needed.
1012

13+
<YouTube id="https://youtube.com/U6mWnZOCalo/" />
14+
1115
The structured output are configured through two flags: `responseType`, which controls the data format, and `responseSchema` which controls the data structure.
1216

1317
## Response Type
@@ -83,7 +87,7 @@ Note that there are [several restrictions](https://platform.openai.com/docs/guid
8387
- `additionalProperties: true` is not supported.
8488
- all optional fields (e.g. not in `required`) will be returned and might be `null`
8589

86-
## Schema validation
90+
## Response Schema
8791

8892
You can specify a [schema](/genaiscript/reference/scripts/schemas) through `responseSchema` which will automatically turn on the structured output mode. The output will be validated against the schema, and GenAIScript will attempt to repair the output if it is not valid. The script will fail if the output does not match the schema.
8993

0 commit comments

Comments
 (0)