Gemini system instructions via API call

Has anyone successfully done this? I think I will have to go this route as I am having no luck getting OpenAI Assistants to follow system instructions regarding vector store retrieval (leading to inaccurate responses).

I assume I would just add a “Make an API call” using this module


but I can’t connect the dots to what exactly to put in the Body field. I assume that’s where my sysint text would go? IOW it would be a JSON object that looks like this (the part after the “-d”):

Thanks for any tips, I’m a hack so just trying to figure this out as I go…

OK I seem to be getting problems with quotations in my sysint (which I load from a text file and reconstruct using toString function) escaping the JSON in the system instructions in the Body field. Anyone know how to resolve this? I have quite a few quotation marks in my sysint as part of the examples, I’d rather not manually add \ all over the place.

This solved it, able to make API calls now to Gemini.

1 Like