Closed zzj0402 closed 3 weeks ago
same error
@zzj0402, This repository is for issues related to website(https://ai.google.dev/) like documentation bugs or improvements. For issues related to AI Studio, we would suggest you to use "Send Feedback" option in AI Studio. Ref: Screenshot below. Thank you!
Same error here. I assume oauth is somewhat related to this issue, and I think people need some additional guidance. https://ai.google.dev/docs/oauth_quickstart
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
""" At the command line, only need to run once to install the package via pip:
$ pip install google-generativeai """
import google.generativeai as genai
genai.configure(api_key="YOUR_API_KEY")
generation_config = { "temperature": 1, "top_p": 0.95, "top_k": 0, "max_output_tokens": 8192, }
safety_settings = [ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE" }, { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE" }, { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE" }, { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE" }, ]
model = genai.GenerativeModel(model_name="gemini-1.5-pro-latest", generation_config=generation_config, safety_settings=safety_settings)
convo = model.start_chat(history=[ ])
convo.send_message("YOUR_USER_INPUT") print(convo.last.text)
rbrisita:fix_doc
Reenvs\gemini\lib\site-packages\google\api_core\grpc_helpers.py", line 78, in error_remapped_callable raise exceptions.from_grpc_error(exc) from exc google.api_core.exceptions.PermissionDenied: 403 You do not have permission to access tuned model tunedModels/sdfsdfasdfasdfa.ference i
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
This issue is still there, the code given in ai studio doesn't work with the ai studio api key.
Package versions: google-ai-generativelanguage==0.6.4 google-api-core==2.19.0 google-api-python-client==2.130.0 google-auth==2.29.0 google-auth-httplib2==0.2.0 google-generativeai==0.5.4 googleapis-common-protos==1.63.0 langchain-google-genai==1.0.5
Error: raise exceptions.from_grpc_error(exc) from exc google.api_core.exceptions.PermissionDenied: 403 You do not have permission to access tuned model tunedModels/nextnum-k7f103e3mv0y.
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
This issue was closed because it has been inactive for 28 days. Please post a new issue if you need further assistance. Thanks!
Description of the bug:
Trying to use AI Studio locally with the Gemini tuned model with the following code:
Actual vs expected behavior:
Expect return a generated response but get:
Any other information you'd like to share?
No response