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 = "你是投信分析師,請使用繁體中文2000字以內,分項說明公司股市價量表現、融資融卷、內外資進出及財務資訊,並分析近期公司股市展望給投資人具體的專業建議!"
|
| 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=5000, temperature=0.1, top_p=0.2,
|
| 16 |
thinking_config=thinking_config,
|
| 17 |
system_instruction=system_instruction)
|
| 18 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|