Skip to content

Commit

Permalink
Make json schema output more compatible with Open AI structured outpu… (
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti authored Aug 12, 2024
1 parent 8295281 commit c1987e2
Show file tree
Hide file tree
Showing 5 changed files with 548 additions and 103 deletions.
17 changes: 17 additions & 0 deletions .changeset/brave-zebras-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@effect/schema": minor
---

Make json schema output more compatible with Open AI structured output, closes #3432.

JSONSchema

- remove `oneOf` in favour of `anyOf` (e.g. in `JsonSchema7object`, `JsonSchema7empty`, `JsonSchema7Enums`)
- remove `const` in favour of `enum` (e.g. in `JsonSchema7Enums`)
- remove `JsonSchema7Const` type
- remove `JsonSchema7OneOf` type

AST

- remove `identifier` annotation from `Schema.Null`
- remove `identifier` annotation from `Schema.Object`
Loading

0 comments on commit c1987e2

Please sign in to comment.