Test structured output via JSON mode.
This test is optional and should be skipped if the model does not support the JSON mode feature (see configuration below).
To disable this test, set supports_json_mode to False in your
test class:
class TestMyChatModelIntegration(ChatModelIntegrationTests):
@property
def supports_json_mode(self) -> bool:
return FalseSee example implementation of with_structured_output here: https://python.langchain.com/api_reference/_modules/langchain_openai/chat_models/base.html#BaseChatOpenAI.with_structured_output
test_json_mode(
self,
model: BaseChatModel,
) -> None