yooke commited on
Commit
014bad5
·
verified ·
1 Parent(s): 1593f05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -140,14 +140,14 @@ class BasicAgent:
140
  raise ValueError("DEEPSEEK_API_KEY environment variable not set.")
141
 
142
 
143
- # # Assuming you've set GOOGLE_API_KEY in secrets
144
- # google_api_key = os.environ.get("GOOGLE_API_KEY")
145
- # if not google_api_key:
146
- # raise ValueError("GOOGLE_API_KEY environment variable not set.")
147
-
148
- # # Check if the global credential setup was successful
149
- # if not CREDENTIALS_CONFIGURED:
150
- # raise ValueError("Google Cloud credentials could not be configured. Check startup logs and HF Secrets (ensure 'GOOGLE_APPLICATION_CREDENTIALS_JSON' is set correctly).")
151
 
152
  # 设置环境变量,使LiteLLM能够使用DeepSeek API密钥
153
  os.environ["DEEPSEEK_API_KEY"] = deepseek_api_key
 
140
  raise ValueError("DEEPSEEK_API_KEY environment variable not set.")
141
 
142
 
143
+ # Assuming you've set GOOGLE_API_KEY in secrets
144
+ google_api_key = os.environ.get("GOOGLE_API_KEY")
145
+ if not google_api_key:
146
+ raise ValueError("GOOGLE_API_KEY environment variable not set.")
147
+
148
+ # Check if the global credential setup was successful
149
+ if not CREDENTIALS_CONFIGURED:
150
+ raise ValueError("Google Cloud credentials could not be configured. Check startup logs and HF Secrets (ensure 'GOOGLE_APPLICATION_CREDENTIALS_JSON' is set correctly).")
151
 
152
  # 设置环境变量,使LiteLLM能够使用DeepSeek API密钥
153
  os.environ["DEEPSEEK_API_KEY"] = deepseek_api_key