diff --git a/.changeset/rich-spiders-develop.md b/.changeset/rich-spiders-develop.md new file mode 100644 index 0000000000..9e3ba75849 --- /dev/null +++ b/.changeset/rich-spiders-develop.md @@ -0,0 +1,5 @@ +--- +"livekit-plugins-google": patch +--- + +chore: Replace ValueError with logger.warning for missing GOOGLE_APPLICATION_CREDENTIALS environment variable diff --git a/livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py b/livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py index 649f55f2dd..51c0b85f53 100644 --- a/livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py +++ b/livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py @@ -108,8 +108,8 @@ def __init__( self._api_key = api_key or os.environ.get("GOOGLE_API_KEY", None) _gac = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS") if _gac is None: - raise ValueError( - "`GOOGLE_APPLICATION_CREDENTIALS` environment variable is not set. please set it to the path of the service account key file." + logger.warning( + "`GOOGLE_APPLICATION_CREDENTIALS` environment variable is not set. please set it to the path of the service account key file. Otherwise, use any of the other Google Cloud auth methods." ) if vertexai: