google / google/adk-python

Drop the `.env`, it's cleaner (ADK should pick up project and location from GCP metadata server)

オープン
#2,685 コメント 6 件 リアクション 2 件 担当者 1 名 @Jacksunwei が担当を希望しています GitHub で見る
agent engine needs review
主要言語
Python
スター
21.5k
フォーク
4k
平均マージ
1日 14時間
マージ済み PR(30日)
37

説明

## Problem

When deploying ADK to Google Cloud, I must pass a `.env` file with these:

```
GOOGLE_GENAI_USE_VERTEXAI=TRUE
GOOGLE_CLOUD_PROJECT=my-project
GOOGLE_CLOUD_LOCATION=us-central1
```

## Proposal

This should not be needed when deploying to GCP:

- `GOOGLE_GENAI_USE_VERTEXAI` should be assumed to be `TRUE` unless an API key is provided.
- `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` should be retrieved from the instance metadata server.

A note on instance metadata server:

Every GCP runtime exposes the same instance metadata server which allows retrieving project and location. See [reference for Cloud Run](https://cloud.google.com/run/docs/container-contract#metadata-server). It's trivial for ADK to query it (see [example Go code](https://github.com/GoogleCloudPlatform/cloud-run-hello/blob/master/hello.go#L119-L133))

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。