Update main.py
Browse files
main.py
CHANGED
|
@@ -10,7 +10,7 @@ from linebot.models import MessageEvent, TextMessage, TextSendMessage, ImageSend
|
|
| 10 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 11 |
|
| 12 |
# 設定生成文字的參數 + 角色扮演
|
| 13 |
-
system_instruction = "你是一位全知全能的智者,每次回答問題之餘,每30分鐘還會講一個100字以內的充滿智慧啓發的笑話!
|
| 14 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=1) # thinking_budget = 0, turn off thinking mode
|
| 15 |
generation_config = genai.types.GenerateContentConfig(max_output_tokens=512, temperature=0.7, top_p=0.5,
|
| 16 |
thinking_config=thinking_config,
|
|
|
|
| 10 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 11 |
|
| 12 |
# 設定生成文字的參數 + 角色扮演
|
| 13 |
+
system_instruction = "你是一位全知全能的智者,每次回答問題之餘,每30分鐘還會講一個100字以內的充滿智慧啓發的笑話! 當回答的內容超過600字,自動分成多個訊息回覆"
|
| 14 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=1) # thinking_budget = 0, turn off thinking mode
|
| 15 |
generation_config = genai.types.GenerateContentConfig(max_output_tokens=512, temperature=0.7, top_p=0.5,
|
| 16 |
thinking_config=thinking_config,
|