Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@atheriel
Copy link
Collaborator

This commit expands chat_gemini() to support non-API key authentication, very similar to what we've done for other cloud providers.

As a bonus I threw in viewer-based credential support for Connect.

I don't have an environment to test this out yet, so this is mostly conjectural.

Closes #317.

This commit expands `chat_gemini()` to support non-API key
authentication, very similar to what we've done for other cloud
providers.

As a bonus I threw in viewer-based credential support for Connect.

I don't have an environment to test this out yet, so this is mostly
conjectural.

Closes #317.

Signed-off-by: Aaron Jacobs <[email protected]>
if (nchar(provider@api_key)) {
req <- req_headers_redacted(req, "x-goog-api-key" = provider@api_key)
} else {
# TODO: Can use req_headers_redacted() when !!! is supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually once we bump to the next version of httr2, req_headers() will auto-redact Authorization.

@hadley hadley merged commit 236376b into main Feb 17, 2025
11 checks passed
@hadley hadley deleted the gargle-support-for-gemini branch February 17, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Service Account (from Google Vertex AI) to access Gemini services

3 participants