Skip to content

Update version and fix samples for 0.8.5 release #731

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

Merged
merged 10 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/generativeai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ def configure(
"Invalid configuration: Please set either `api_key` or `client_options['api_key']`, but not both."
)
else:
if api_key is None:
if not api_key:
# If no key is provided explicitly, attempt to load one from the
# environment.
api_key = os.getenv("GEMINI_API_KEY")

if api_key is None:
if not api_key:
# If the GEMINI_API_KEY doesn't exist, attempt to load the
# GOOGLE_API_KEY from the environment.
api_key = os.getenv("GOOGLE_API_KEY")
Expand Down
Loading