alanchen1115 commited on
Commit
d64ab05
·
verified ·
1 Parent(s): 5dac362

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -10,7 +10,7 @@ from linebot.models import MessageEvent, TextMessage, TextSendMessage, ImageSend
10
 
11
  # 設定 Google AI API 金鑰
12
  # genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
13
- client = genai.Client(api_key=userdata.get("GOOGLE_API_KEY"))
14
 
15
  # 設定生成文字的參數
16
  generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)
 
10
 
11
  # 設定 Google AI API 金鑰
12
  # genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
13
+ client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
14
 
15
  # 設定生成文字的參數
16
  generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)