You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gemini models now support systemInstruction param which can be used to send system message. Gateway can map the system message to this new param.
Notes for vertex
Vertex currently fails for gemini 1.5 models when system message is sent because the current config maps system message as a user message and adds an empty model message. This should be fixed if the systemInstruction is mapping is added.
Request body to reproduce this behaviour:
"messages": [
{
"role": "system",
"content": "You are a helpful assistant named Leo"
},
{
"role": "user",
"content": "Who are you?"
}
]
Error message:
Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini
Notes for google:
For google ai managed API, systemInstruction is only supported from gemini-1.5 model onwards. So older models cannot use the new param. For old models, we can keep send it as a user message like we do now. These are the models which do not support systemInstruction:
Gemini models now support
systemInstruction
param which can be used to send system message. Gateway can map the system message to this new param.Notes for vertex
Vertex currently fails for gemini 1.5 models when system message is sent because the current config maps system message as a user message and adds an empty model message. This should be fixed if the systemInstruction is mapping is added.
Request body to reproduce this behaviour:
Error message:
Notes for google:
For google ai managed API, systemInstruction is only supported from gemini-1.5 model onwards. So older models cannot use the new param. For old models, we can keep send it as a user message like we do now. These are the models which do not support systemInstruction:
VertexAI Doc: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
GoogleAI Doc: https://ai.google.dev/gemini-api/docs/system-instructions#code-generation
The text was updated successfully, but these errors were encountered: