-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(vertexai/genai): add SystemInstruction #9736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to have an example for this too.
Particularly because this is called "system prompt" everywhere else, and this may make it difficult for users to discover. For example, there's an issue on generative-ai-go asking for it: google/generative-ai-go#31
Example forthcoming. |
I added a test and an example that shows various config options. |
The Python sample for system instructions with Gemini 1.5 Pro is working for me. I'll see if I can get similar results with the Go sdk. |
I'm getting compile errors at |
Is it a vet error? What does it say? |
And after fixing the imports:
The errors are trivial but I suspect we don't have jba's latest code. |
Expose GenerateContentRequest.SystemInstruction. As usual, put it on the Model, and use the Model field to construct each request.
Sorry for the wait. I fixed the compilation problem and the feature now works with gemini-1.0-pro. Removing draft status. |
Expose GenerateContentRequest.SystemInstruction.
As usual, put it on the Model, and use the Model field to construct
each request.