google-cloud-java icon indicating copy to clipboard operation
google-cloud-java copied to clipboard

add System Instruction method in GenerativeModel Builder

Open chikarenku opened this issue 1 year ago • 1 comments

In Python SDK, for Gemini, GenerativeModel has implemented System_instruction parameter. We can setup the system prompt when using it. https://cloud.google.com/python/docs/reference/aiplatform/latest/vertexai.generative_models.GenerativeModel#parameter Screenshot 2024-04-29 at 9 12 09 AM

But in Java SDK, the method(setSystemInstruction) hasn't been implemented. we would love the have the method. thank you. https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/com.google.cloud.vertexai.generativeai.GenerativeModel.Builder Screenshot 2024-04-29 at 9 48 24 AM

chikarenku avatar Apr 29 '24 02:04 chikarenku

cc/ @ZhenyiQ

mpeddada1 avatar May 06 '24 20:05 mpeddada1

Thanks @chikarenku for raising this! We didn't prioritize this earlier but it's now in version 1.3.0. Thanks to @glaforge 's contribution: https://github.com/googleapis/google-cloud-java/pull/10775. We will add sample code in the README.md soon!

ZhenyiQ avatar May 10 '24 17:05 ZhenyiQ