Update main.py
Browse files
main.py
CHANGED
@@ -17,7 +17,7 @@ genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
|
17 |
generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)
|
18 |
|
19 |
# 使用 Gemini-1.5-flash 模型
|
20 |
-
model = genai.GenerativeModel('gemini-2.0-flash-exp', system_instruction="
|
21 |
|
22 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
23 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|
|
|
17 |
generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)
|
18 |
|
19 |
# 使用 Gemini-1.5-flash 模型
|
20 |
+
model = genai.GenerativeModel('gemini-2.0-flash-exp', system_instruction="主要用繁體中文回答,但如果用戶使用詢問英文問題,就用英文回應。你現在是個專業助理,職稱為OPEN小助理,個性活潑、樂觀,願意回答所有問題", generation_config=generation_config)
|
21 |
|
22 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
23 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|