You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vast majority of google libraries support ADC for transparent auth. That also means they just "work" when running locally, or deployed as applications on GKE using Workload Identity.
Not needing to create secrets which then require storage, sharing between devs, and rotation is a huge win.
I did have a quick look at the code but it looks like the app is using @google/generative-ai which doesn't support ADC (no clue why - the hopscotch of google libraries always confuses me): google-gemini/generative-ai-js#289.
The @google-cloud/vertexai does, so the app could pivot to that. That's the library I used to use (i now just make rest calls to https://europe-west4-aiplatform.googleapis.com/v1/projects/${projectId}/locations/europe-west4/publishers/google/models/${model}:predict to avoid pulling in all the transitive dependencies of the google library, although that would then break existing users as that doesn't support api keys.
Switching the library would have other benefits too for example being able to target specific regions or zones for those more concerns about data processing locations. The @google/generative-ai library looks super restrictive tbh.
Maybe it'd need to be a new API integration (Vertex) 🤷
The text was updated successfully, but these errors were encountered:
What would you like to see?
The vast majority of google libraries support ADC for transparent auth. That also means they just "work" when running locally, or deployed as applications on GKE using Workload Identity.
Not needing to create secrets which then require storage, sharing between devs, and rotation is a huge win.
I did have a quick look at the code but it looks like the app is using
@google/generative-ai
which doesn't support ADC (no clue why - the hopscotch of google libraries always confuses me): google-gemini/generative-ai-js#289.The @google-cloud/vertexai does, so the app could pivot to that. That's the library I used to use (i now just make rest calls to
https://europe-west4-aiplatform.googleapis.com/v1/projects/${projectId}/locations/europe-west4/publishers/google/models/${model}:predict
to avoid pulling in all the transitive dependencies of the google library, although that would then break existing users as that doesn't support api keys.Switching the library would have other benefits too for example being able to target specific regions or zones for those more concerns about data processing locations. The
@google/generative-ai
library looks super restrictive tbh.Maybe it'd need to be a new API integration (
Vertex
) 🤷The text was updated successfully, but these errors were encountered: