-
Notifications
You must be signed in to change notification settings - Fork 406
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
improve the no-credentials error message, fail fast for no-credentials in colab. #352
Merged
MarkDaoust
merged 3 commits into
google-gemini:main
from
MarkDaoust:DefaultCredentialError
May 21, 2024
Merged
improve the no-credentials error message, fail fast for no-credentials in colab. #352
MarkDaoust
merged 3 commits into
google-gemini:main
from
MarkDaoust:DefaultCredentialError
May 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change-Id: I294bd094b56287ed923716dce9ea705ef3135f5b
github-actions
bot
added
status:awaiting review
PR awaiting review from a maintainer
component:python sdk
Issue/PR related to Python SDK
labels
May 20, 2024
MarkDaoust
force-pushed
the
DefaultCredentialError
branch
from
May 20, 2024 21:31
374ca2c
to
5cb2e0e
Compare
Change-Id: I5a3cb3168448a565eb3cdc8a0063ae041c41a260
MarkDaoust
force-pushed
the
DefaultCredentialError
branch
from
May 20, 2024 21:33
5cb2e0e
to
301ddb0
Compare
MarkDaoust
changed the title
improve the no-credentials error message
improve the no-credentials error message, fail fast for no-credentials in colab.
May 20, 2024
markmcd
approved these changes
May 20, 2024
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.
I realise this is a draft but yayyyy
Tested, this is working locally and in colab. |
MarkDaoust
commented
May 21, 2024
@@ -30,6 +32,18 @@ | |||
GENAI_API_DISCOVERY_URL = "https://generativelanguage.googleapis.com/$discovery/rest" | |||
|
|||
|
|||
@contextlib.contextmanager | |||
def patch_colab_gce_credentials(): |
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.
This is super-sketchy but it works.
github-actions
bot
removed
the
status:awaiting review
PR awaiting review from a maintainer
label
May 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.