-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding SA key authentication to gemini model initialization #195
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
base: main
Are you sure you want to change the base?
Conversation
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
Your branch is 8 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
Your branch is 10 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
Your branch is 13 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
Your branch is 14 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
1 similar comment
Your branch is 14 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
Your branch is 15 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
1 similar comment
Your branch is 15 commits behind git fetch origin main
git merge origin/main
git push Note: Enable "Allow edits by maintainers" to allow automatic updates. |
This PR adds an option to initialize a gemini model based on a Google Cloud platform project's SA key using the project name + location. This is helpful for situations when a user might have access to a company GCP project and SA key, but without access to a Gemini API key-- this is the situation I was in, and this fix let me skip the hoops of requesting the tech team to provision me a specific API key.
Achieving this is simple; when calling a gemini model, a user now has an option of 2 additional parameters; location and project_id. If the API key is not set, the code now attempts to create a genai instance using an SA key before throwing the "No API key detected" exception. The ReadMe and in-line documentation have been updated to reflect this change as well.
Fixes #58