Skip to content

Commit 10cf377

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: Make the bigquery sample agent run with ADC out-of-the-box
Right now the bigquery sample agent is configured to run with OAuth, which requires some set up. This change makes it more readily usable, both locally and in AgentEngine, as Application Default Credentials (ADC) is easier to set up, and often local and AgentEngine environment already have it set up. PiperOrigin-RevId: 808315879
1 parent 3bd2f29 commit 10cf377

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

contributing/samples/bigquery/agent.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
from google.adk.tools.bigquery.config import WriteMode
2323
import google.auth
2424

25-
# Define an appropriate credential type
26-
CREDENTIALS_TYPE = AuthCredentialTypes.OAUTH2
25+
# Define the desired credential type.
26+
# By default use Application Default Credentials (ADC) from the local
27+
# environment, which can be set up by following
28+
# https://cloud.google.com/docs/authentication/provide-credentials-adc.
29+
CREDENTIALS_TYPE = None
2730

2831
# Define an appropriate application name
2932
BIGQUERY_AGENT_NAME = "adk_sample_bigquery_agent"

0 commit comments

Comments
 (0)