fix(langchain): add sentinel value to ProviderStrategy / strict (#34290)

This commit is contained in:
ccurme
2025-12-10 16:25:06 -05:00
committed by GitHub
parent 92df109dd5
commit 5aa46501cf

View File

@@ -128,7 +128,7 @@ class _SchemaSpec(Generic[SchemaT]):
json_schema: dict[str, Any]
"""JSON schema associated with the schema."""
strict: bool = False
strict: bool | None = None
"""Whether to enforce strict validation of the schema."""
def __init__(
@@ -137,7 +137,7 @@ class _SchemaSpec(Generic[SchemaT]):
*,
name: str | None = None,
description: str | None = None,
strict: bool = False,
strict: bool | None = None,
) -> None:
"""Initialize SchemaSpec with schema and optional parameters."""
self.schema = schema
@@ -256,7 +256,7 @@ class ProviderStrategy(Generic[SchemaT]):
self,
schema: type[SchemaT],
*,
strict: bool = False,
strict: bool | None = None,
) -> None:
"""Initialize ProviderStrategy with schema.