Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -12,10 +12,10 @@ from linebot.models import MessageEvent, TextMessage, TextSendMessage, ImageSend
|
|
12 |
genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
13 |
|
14 |
# 設定生成文字的參數
|
15 |
-
generation_config = genai.types.GenerationConfig(max_output_tokens=
|
16 |
|
17 |
# 使用 Gemini-1.5-flash 模型
|
18 |
-
model = genai.GenerativeModel('gemini-2.0-flash-thinking-exp
|
19 |
|
20 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
21 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|
|
|
12 |
genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
13 |
|
14 |
# 設定生成文字的參數
|
15 |
+
generation_config = genai.types.GenerationConfig(max_output_tokens=None, temperature=0.2, top_p=0.5, top_k=16)
|
16 |
|
17 |
# 使用 Gemini-1.5-flash 模型
|
18 |
+
model = genai.GenerativeModel('gemini-2.0-flash-thinking-exp')
|
19 |
|
20 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
21 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|