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
[Question]: Updating safety settings for gemini when using Vertex Ai #13081
Comments
To update the safety settings of your Gemini model in Vertex AI, you'll need to use the from google.generativeai import types as genai_types
# Define your safety settings
safety_settings = genai_types.SafetySettingOptions(
# Your safety settings configuration here
)
# Initialize the Gemini model with custom safety settings
gemini_model = GeminiMultiModal(
model_name="models/gemini-pro-vision",
temperature=0.7,
max_tokens=100,
safety_settings=safety_settings,
) As for the "max_retries" parameter, it seems there might have been some confusion, as it is not directly associated with the If you're dealing with operations that might fail and are looking to implement a retry mechanism, you would typically use "max_retries" in those specific contexts, not directly with the Gemini model initialization in Vertex AI.
|
@dosu Vertex is used using the import statement "from llama_index.llms.vertex import Vertex" and it has no parameters safety settings |
To address your concern about updating safety settings for the Gemini model in Vertex AI and the use of the For updating safety settings specifically for the Gemini model, it's important to consult the documentation or source code related to the Regarding the If you're looking to implement or adjust safety settings and retry mechanisms, you'll likely need to extend or modify the existing classes or functions you're working with. For retries, consider wrapping your operation calls in a retry logic block, which could be custom-built or utilize existing libraries like For more precise guidance, reviewing the specific documentation or source code of the
|
Question Validation
Question
I am currently using gemini from vertex ai. Everything is working fine but i am not able to update the safety settings of the model. How can I do that?
Another question is what does the parameter "max_retries" do in the Vertex() class
The text was updated successfully, but these errors were encountered: