Skip to content

Commit b3710cf

Browse files
committed
JSON Schema needs all properties as required
1 parent 86b80f9 commit b3710cf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Chain/StructuredOutput/SchemaFactory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ public function buildSchema(string $className): array
6666

6767
// Add property schema to main schema
6868
$schema['properties'][$propertyName] = $propertySchema;
69-
70-
// If the property does not allow null, mark it as required
71-
if (!$type->isNullable()) {
72-
$schema['required'][] = $propertyName;
73-
}
69+
$schema['required'][] = $propertyName;
7470
}
7571

7672
return $schema;

0 commit comments

Comments
 (0)