Skip to content
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
merged 3 commits into from
May 21, 2024

Conversation

MarkDaoust
Copy link
Collaborator

@MarkDaoust MarkDaoust commented May 20, 2024

No description provided.

Change-Id: I294bd094b56287ed923716dce9ea705ef3135f5b
@MarkDaoust MarkDaoust marked this pull request as draft May 20, 2024 17:50
@github-actions 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
Change-Id: I5a3cb3168448a565eb3cdc8a0063ae041c41a260
@MarkDaoust 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
Change-Id: I013d506bdcb64092daddedcf3e30f3728a8f3e30
Copy link
Member

@markmcd markmcd left a 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

@MarkDaoust
Copy link
Collaborator Author

MarkDaoust commented May 21, 2024

Tested, this is working locally and in colab.

@MarkDaoust MarkDaoust marked this pull request as ready for review May 21, 2024 15:50
@@ -30,6 +32,18 @@
GENAI_API_DISCOVERY_URL = "https://generativelanguage.googleapis.com/$discovery/rest"


@contextlib.contextmanager
def patch_colab_gce_credentials():
Copy link
Collaborator Author

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.

@MarkDaoust MarkDaoust merged commit f987fde into google-gemini:main May 21, 2024
8 checks passed
@github-actions 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
Labels
component:python sdk Issue/PR related to Python SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants