langchain-ai / langchain-google

MIT License
76 stars 78 forks source link

Vertex AI [feature]: Support JSON Mode for Gemini #144

Open afirstenberg opened 2 months ago

afirstenberg commented 2 months ago

See documentation for responseMimeType at https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini#request_body

See https://github.com/langchain-ai/langchainjs/issues/5071

Ben81828 commented 5 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")