Is there a way to connect to two different GCP accounts using same ADK running instance #2191
Replies: 1 comment 1 reply
|
Is it possible for you to provide details on why you have such a setup? There is at least one approach i can think of, but that requires doing some gymnastics (that i would like to avoid, hence my question above): Assuming that you are using GCP credentials in the context of talking of Gemini model. You could create two instances of Gemini adapter (https://github.com/google/adk-python/blob/main/src/google/adk/models/google_llm.py#L52). This will require you to override the api_client method (https://github.com/google/adk-python/blob/main/src/google/adk/models/google_llm.py#L205) and create new client that takes in GCP project details that you can pass in explicitly (https://googleapis.github.io/python-genai/#api-selection). Once you get to create your own Gemini adapter using this way, you can pass the instance to the Agent (instead of model id string). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, I have two cloud GCP accounts, currently I have an agent (
google.adk.agents -> Agent)setup for both of them hosted seperately. I want to combine them into a single server, so two different agents for two different cloud credentials? Also so is there a way to pass credentials other than the env variable approach?All reactions