Skip to content

Commit 8cd882c

Browse files
authored
Update README.md (#4794)
# External (non-OpenAI) Pull Request Requirements Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed: https://github.com/openai/codex/blob/main/docs/contributing.md If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.
1 parent 90fe5e4 commit 8cd882c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sdk/typescript/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ for await (const event of events) {
5252

5353
### Structured output
5454

55-
Provide a JSON schema per turn to have Codex respond with structured JSON. Pass schemas as
56-
plain JavaScript objects.
57-
55+
The Codex agent can produce a JSON response that conforms to a specified schema. The schema can be provided for each turn as a plain JSON object.
5856

5957
```typescript
6058
const schema = {
@@ -71,7 +69,7 @@ const turn = await thread.run("Summarize repository status", { outputSchema: sch
7169
console.log(turn.finalResponse);
7270
```
7371

74-
You can also create JSON schemas for Zod types using the `zod-to-json-schema` package and setting the `target` to `"openAi"`.
72+
You can also create a JSON schema from a [Zod schema](https://github.com/colinhacks/zod) using the [`zod-to-json-schema`](https://www.npmjs.com/package/zod-to-json-schema) package and setting the `target` to `"openAi"`.
7573

7674
```typescript
7775
const schema = z.object({

0 commit comments

Comments
 (0)