langchain-ai / langchain-google

MIT License
76 stars 79 forks source link

Specifying json_mode in with_structured_output for Custom Schemas in LangChain #345

Open Ben81828 opened 3 days ago

Ben81828 commented 3 days ago

Is it possible to pass in our defined schema and specify the use of json_mode, like in this example? https://python.langchain.com/v0.1/docs/modules/model_io/chat/structured_output/

structured_llm = model.with_structured_output(Joke, method="json_mode")