Skip to content

Commit 5aa4650

Browse files
authored
fix(langchain): add sentinel value to ProviderStrategy / strict (#34290)
1 parent 92df109 commit 5aa4650

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/langchain_v1/langchain/agents/structured_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class _SchemaSpec(Generic[SchemaT]):
128128
json_schema: dict[str, Any]
129129
"""JSON schema associated with the schema."""
130130

131-
strict: bool = False
131+
strict: bool | None = None
132132
"""Whether to enforce strict validation of the schema."""
133133

134134
def __init__(
@@ -137,7 +137,7 @@ def __init__(
137137
*,
138138
name: str | None = None,
139139
description: str | None = None,
140-
strict: bool = False,
140+
strict: bool | None = None,
141141
) -> None:
142142
"""Initialize SchemaSpec with schema and optional parameters."""
143143
self.schema = schema
@@ -256,7 +256,7 @@ def __init__(
256256
self,
257257
schema: type[SchemaT],
258258
*,
259-
strict: bool = False,
259+
strict: bool | None = None,
260260
) -> None:
261261
"""Initialize ProviderStrategy with schema.
262262

0 commit comments

Comments
 (0)