test_with_structured_output(
self,
model: BaseChatModel,
schema: Any
) -> NoneTest with_structured_output method.
Test is skipped if the has_structured_output property on the test class is
False.
If this test fails, ensure that the model's bind_tools method
properly handles Pydantic V2 models.
langchain_core implements a utility function.
that will accommodate most formats.
See example implementation.
of with_structured_output.