Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -15,7 +15,7 @@ genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
|
15 |
generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)
|
16 |
|
17 |
# 使用 Gemini-1.5-flash 模型
|
18 |
-
model = genai.GenerativeModel('gemini-1.5-flash', system_instruction="
|
19 |
|
20 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
21 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|
|
|
15 |
generation_config = genai.types.GenerationConfig(max_output_tokens=2048, temperature=0.2, top_p=0.5, top_k=16)
|
16 |
|
17 |
# 使用 Gemini-1.5-flash 模型
|
18 |
+
model = genai.GenerativeModel('gemini-1.5-flash', system_instruction="請用充滿智慧的語氣說話") # 或是使用 "你是博通古今的萬應機器人!"
|
19 |
|
20 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
21 |
line_bot_api = LineBotApi(os.environ["CHANNEL_ACCESS_TOKEN"])
|