Update main.py
Browse files
main.py
CHANGED
|
@@ -10,9 +10,9 @@ import tempfile
|
|
| 10 |
|
| 11 |
# 設定 Google AI API 金鑰
|
| 12 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 13 |
-
system_instruction = "你是投信分析師,請使用繁體中文
|
| 14 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=0) # thinking_budget = 0, turn off thinking mode
|
| 15 |
-
generation_config = genai.types.GenerateContentConfig(max_output_tokens=
|
| 16 |
thinking_config=thinking_config,
|
| 17 |
system_instruction=system_instruction)
|
| 18 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
|
|
|
| 10 |
|
| 11 |
# 設定 Google AI API 金鑰
|
| 12 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 13 |
+
system_instruction = "你是投信分析師,請使用繁體中文1000字以內,分項說明公司股市價量下一週的表現"
|
| 14 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=0) # thinking_budget = 0, turn off thinking mode
|
| 15 |
+
generation_config = genai.types.GenerateContentConfig(max_output_tokens=1000, temperature=0.1, top_p=0.2,
|
| 16 |
thinking_config=thinking_config,
|
| 17 |
system_instruction=system_instruction)
|
| 18 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|