cheesetouched
08/07/2025, 10:34 PMsystemInstruction to the /generateContent endpoint but it seems to be an object. Tried something but not sure if this is the way. Can anyone help?
https://cdn.discordapp.com/attachments/1403144284642742413/1403144284957446164/Screenshot_2025-08-08_at_4.02.59_AM.png?ex=68967b72&is=689529f2&hm=2858923c13a11751bdd4549bd664f9396aae99b4c3efee71d67ed73134609fc1&Vaibhav (BAML 🐑)
08/07/2025, 10:35 PMVaibhav (BAML 🐑)
08/07/2025, 10:35 PMVaibhav (BAML 🐑)
08/07/2025, 10:36 PMfunction Foo() -> returntype {
client "GeminiPro"
prompt #"
{{ _.role('system')
<system stuff>
{{ _.role('user') }}
...
"#
}Vaibhav (BAML 🐑)
08/07/2025, 10:36 PMcheesetouched
08/07/2025, 10:37 PMVaibhav (BAML 🐑)
08/07/2025, 10:37 PMsystem message, but in openai you can. So the default role for a message in gemini is user.
so:
function Foo() -> returntype {
client "GeminiPro"
prompt #"
...
"#
}
is really the same as:
function Foo() -> returntype {
client "GeminiPro"
prompt #"
{{ _.role('user') }}
...
"#
}Vaibhav (BAML 🐑)
08/07/2025, 10:37 PMVaibhav (BAML 🐑)
08/07/2025, 10:38 PMsystemVaibhav (BAML 🐑)
08/07/2025, 10:38 PMclient<llm> MyClient {
options {
default_role "system"
}
}Vaibhav (BAML 🐑)
08/07/2025, 10:38 PMcheesetouched
08/07/2025, 10:40 PMcheesetouched
08/07/2025, 10:43 PM