Skip to content

Conversation

BergerKing333
Copy link

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

@github-actions github-actions bot added the size/XS Pull request with less than 50 lines changed label Aug 25, 2025
Copy link

⚠️ Branch Update Required

Your branch is 1 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Copy link

github-actions bot commented Sep 4, 2025

⚠️ Branch Update Required

Your branch is 8 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Copy link

⚠️ Branch Update Required

Your branch is 10 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Copy link

⚠️ Branch Update Required

Your branch is 13 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Copy link

⚠️ Branch Update Required

Your branch is 14 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

1 similar comment
Copy link

github-actions bot commented Oct 4, 2025

⚠️ Branch Update Required

Your branch is 14 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Copy link

⚠️ Branch Update Required

Your branch is 15 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

1 similar comment
Copy link

⚠️ Branch Update Required

Your branch is 15 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Pull request with less than 50 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An API key should not be required when using Gemini to allow using a service account

1 participant