-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(gemini) Support Safety Settings for VertexAiGeminiChatModel #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@tzolov I updated the code with updates from the |
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.
Hi @terussell85 , thank you, for the important contribution!
I've left couple of comments. The most important one is to verify if we can use the spring.ai.vertex.ai.gemini.chat.options.SafetySetting to configure the SafetySettings declaratively via app. properties. You can check the auto-config ITs here.
Also can you please check if you can update the VertexAIGemini docs here.
You can build the docs locally with: ./mvnw -pl spring-ai-docs antora .
...i-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java
Outdated
Show resolved
Hide resolved
...i-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java
Outdated
Show resolved
Hide resolved
...-ai-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatModel.java
Outdated
Show resolved
Hide resolved
...i-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java
Outdated
Show resolved
Hide resolved
|
Great feedback. I'll take a look and get back to you. |
feat(gemini) not null checks on safetySettings feat(gemini) check safety settings not empty instead of not null feat(gemini) Add VertexAiGeminiSafetySetting wrapper class feat(gemini) Update documentation with new property feat(gemini) Update equals, hashCode, and toString
|
@tzolov I think we're good to go now. Changes since last review:
I made some changes to the originally suggested Let me know if there is anything else. |
|
thanks @terussell85 |
|
rebased and merged at c14618f |
Adds support for SafetySettings configuration to
VertexAiGeminiChatModelandVertexAiGeminiChatOptionsSee https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters for reference.
Should fix #942