GenkitG
Genkitโ€ข13mo ago
worthy-azure

I'm using vertex ai, and I'm trying to

I'm using vertex ai, and I'm trying to get a chat bot to respond in json, and chat with the ai to modify the json... is this possible?

I can pass the model a responseSchema, but whenever I use sendMessage it doesn't seem to respect the schema - all I get is text... so my workaround is chatting in text, then passing the chats response back to another model to convert the text to the right format.

The alternative is to use the original model I had - pass it a prompt and JSON, and continually call with additional prompts... but it's a fresh start everytime, rather than keeping the history as part of the model.

Any tips?
Was this page helpful?